diff options
Diffstat (limited to 'svx/inc')
666 files changed, 96515 insertions, 0 deletions
diff --git a/svx/inc/AccessibleSelectionBase.hxx b/svx/inc/AccessibleSelectionBase.hxx new file mode 100644 index 000000000000..09767025d84a --- /dev/null +++ b/svx/inc/AccessibleSelectionBase.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleSelectionBase.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX +#define _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX + +#include <comphelper/accessibleselectionhelper.hxx> +#include "svx/svxdllapi.h" + +namespace accessibility +{ +/** @descr + This base class provides a base implementation of the + <type>XAccessibleSelection</type> interface. + The following methods have to be implemented if this + class is used: + + <method>implGetMutex</method>, + <method>implGetAccessibleContext</method>, + <method>implIsSelected</method>, + <method>implSelect</method>, +*/ + class SVX_DLLPUBLIC AccessibleSelectionBase : public ::comphelper::OCommonAccessibleSelection, + public ::com::sun::star::accessibility::XAccessibleSelection + { + protected: + + virtual ::osl::Mutex& implGetMutex() = 0; + + public: + + // XAccessibleSelection - default implementations + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + public: + + AccessibleSelectionBase(); + virtual ~AccessibleSelectionBase(); + }; + +} + +#endif // _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX diff --git a/svx/inc/AccessibleStaticTextBase.hxx b/svx/inc/AccessibleStaticTextBase.hxx new file mode 100644 index 000000000000..60a31117185f --- /dev/null +++ b/svx/inc/AccessibleStaticTextBase.hxx @@ -0,0 +1,562 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleStaticTextBase.hxx,v $ + * $Revision: 1.14 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ +#define _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ + +#include <memory> +#include <tools/gen.hxx> +#include <cppuhelper/implbase2.hxx> +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/accessibility/XAccessible.hpp> +#include <com/sun/star/accessibility/XAccessibleText.hpp> +#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp> +#include <com/sun/star/accessibility/TextSegment.hpp> +#include "svx/svxdllapi.h" + + +class SvxEditSource; +class SvxEditViewForwarder; + +namespace accessibility +{ + + class AccessibleStaticTextBase_Impl; + + typedef ::cppu::ImplHelper2< + ::com::sun::star::accessibility::XAccessibleText, + ::com::sun::star::accessibility::XAccessibleTextAttributes > AccessibleStaticTextBase_BASE; + + /** Helper class for objects containing EditEngine/Outliner text + + This class implements the XAccessibleText interface for static + text, somewhat similar to the children of the + AccessibleTextHelper class. Currently, there are no children, + i.e. the whole text is presented in one big chunk. This might + change in the future, if a need for image bullets should + arise. These, by convention, would be represented as children + of the text. + + You have to implement the SvxEditSource, SvxTextForwarder, + SvxViewForwarder and SvxEditViewForwarder interfaces in order + to enable your object to cooperate with this + class. SvxTextForwarder encapsulates the fact that text + objects do not necessarily have an EditEngine at their + disposal, SvxViewForwarder and SvxEditViewForwarder do the + same for the document and the edit view. The three mentioned + forwarder objects are not stored by the AccessibleTextHelper, + but fetched every time from the SvxEditSource. So you are best + off making your SvxEditSource::Get*Forwarder methods cache the + current forwarder. + + As this class is intended for static (i.e. non-changing) text + only, no event broadcasting is necessary. You must handle + visibility by yourself, the bounding boxes returned by + getCharacterBounds() are relative to your accessibility + object. + + @attention All public non-UNO methods (those are the uppercase + ones) must not be called with any mutex hold, except when + calling from the main thread (with holds the solar mutex), + unless stated otherwise. This is because they themselves might + need the solar mutex in addition to the object mutex, and the + ordering of the locking must be: first solar mutex, then + object mutex. Furthermore, state change events might be fired + internally. + + @derive Use this class as a base for objects containing static + edit engine text. To avoid overwriting every interface method + to intercept derived object defunc state, just set NULL as the + edit source. Every interface method will then properly throw + an exception. + */ + class SVX_DLLPUBLIC AccessibleStaticTextBase : public AccessibleStaticTextBase_BASE + { + + public: + /** Create accessible text object for given edit source + + @param pEditSource + The edit source to use. Object ownership is transferred + from the caller to the callee. The object listens on the + SvxEditSource for object disposal, so no provisions have + to be taken if the caller destroys the data (e.g. the + model) contained in the given SvxEditSource. + + */ + explicit AccessibleStaticTextBase( ::std::auto_ptr< SvxEditSource > pEditSource ); + virtual ~AccessibleStaticTextBase(); + + private: + + // declared, but not defined + SVX_DLLPRIVATE AccessibleStaticTextBase( const AccessibleStaticTextBase& ); + // declared, but not defined + SVX_DLLPRIVATE AccessibleStaticTextBase& operator= ( const AccessibleStaticTextBase& ); + + public: + /** Query the current edit source + + @attention This method returns by reference, so you are + responsible for serialization (typically, you aquired the + solar mutex when calling this method). Thus, the method + should only be called from the main office thread. + + */ + virtual const SvxEditSource& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Set the current edit source + + @attention You are required to have the solar mutex + locked, when calling this method. Thus, the method should + only be called from the main office thread. + + The EditSource set here is required to broadcast out the + following hints: EDITSOURCE_HINT_PARASMOVED, + EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED, + TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED, + TEXT_HINT_TEXTHEIGHTCHANGED, + TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes + will get noticed by the accessibility object. Further + more, when the corresponding core object or the model is + dying, either the edit source must be set to NULL or it + has to broadcast a SFX_HINT_DYING hint. + + This class does not have a dispose method, since it is not + a UNO component. Nevertheless, it holds C++ references to + several core objects, so you should issue a + SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in + your dispose() method. + + @param pEditSource + The new edit source to set. Object ownership is transferred + from the caller to the callee. + */ + virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ) SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Set the event source + + @attention When setting a reference here, you should call + Dispose() when you as the owner are disposing, since until + then this object will hold that reference + + @param rInterface + The interface that should be set as the source for + accessibility events sent by this object. + */ + virtual void SetEventSource( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rInterface ); + + /** Get the event source + + @return the interface that is set as the source for + accessibility events sent by this object. + */ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetEventSource() const; + + /** Set offset of EditEngine from parent + + @attention You are required to have the solar mutex + locked, when calling this method. Thus, the method should + only be called from the main office thread. + + If the origin of the underlying EditEngine does + not correspond to the upper left corner of the object + using this class, you have to specify the offset. + + @param rPoint + The offset in screen coordinates (i.e. pixel) + */ + virtual void SetOffset( const Point& rPoint ); + + /** Query offset of EditEngine from parent + + @return the offset in screen coordinates (i.e. pixel) + */ + virtual Point GetOffset() const; + + /** Update the visible children + + As this class currently does not represent any content + using children, this does nothing at the moment. + + @attention You are required to have the solar mutex + locked, when calling this method. Thus, the method should + only be called from the main office thread. + + This method reevaluates the visibility of all + childrens. Call this method if your visibility state has + changed somehow, e.g. if the visible area has changed and + the AccessibleStaticTextHelper isn't notified + internally. Normally, there should not be a need to call + this method. + */ + virtual void UpdateChildren() SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Drop all references and enter disposed state + + This method drops all references to external objects (also + the event source reference set via SetEventSource()) and + sets the object into the disposed state (i.e. the methods + return default values or throw a uno::DisposedException + exception). + */ + virtual void Dispose(); + + // XAccessibleText interface implementation + virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException); + /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine) + virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine) + virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine) + virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // XAccessibleTextAttributes + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // child-related methods from XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // child-related methods from XAccessibleComponent + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException); + + protected: + Rectangle GetParagraphBoundingBox() const; + sal_Int32 GetParagraphCount() const; + sal_Int32 GetParagraphIndex() const; + sal_Int32 GetLineCount( sal_Int32 nParagraph ) const; + + private: + + /// @dyn + const std::auto_ptr< AccessibleStaticTextBase_Impl > mpImpl; + + }; + +} // end of namespace accessibility + +#endif /* _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleStaticTextBase.hxx,v $ + * $Revision: 1.14 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ +#define _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ + +#include <memory> +#include <tools/gen.hxx> +#include <cppuhelper/implbase2.hxx> +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/accessibility/XAccessible.hpp> +#include <com/sun/star/accessibility/XAccessibleText.hpp> +#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp> +#include <com/sun/star/accessibility/TextSegment.hpp> +#include "svx/svxdllapi.h" + + +class SvxEditSource; + +namespace accessibility +{ + + class AccessibleStaticTextBase_Impl; + + typedef ::cppu::ImplHelper2< + ::com::sun::star::accessibility::XAccessibleText, + ::com::sun::star::accessibility::XAccessibleTextAttributes > AccessibleStaticTextBase_BASE; + + /** Helper class for objects containing EditEngine/Outliner text + + This class implements the XAccessibleText interface for static + text, somewhat similar to the children of the + AccessibleTextHelper class. Currently, there are no children, + i.e. the whole text is presented in one big chunk. This might + change in the future, if a need for image bullets should + arise. These, by convention, would be represented as children + of the text. + + You have to implement the SvxEditSource, SvxTextForwarder, + SvxViewForwarder and SvxEditViewForwarder interfaces in order + to enable your object to cooperate with this + class. SvxTextForwarder encapsulates the fact that text + objects do not necessarily have an EditEngine at their + disposal, SvxViewForwarder and SvxEditViewForwarder do the + same for the document and the edit view. The three mentioned + forwarder objects are not stored by the AccessibleTextHelper, + but fetched every time from the SvxEditSource. So you are best + off making your SvxEditSource::Get*Forwarder methods cache the + current forwarder. + + As this class is intended for static (i.e. non-changing) text + only, no event broadcasting is necessary. You must handle + visibility by yourself, the bounding boxes returned by + getCharacterBounds() are relative to your accessibility + object. + + @attention All public non-UNO methods (those are the uppercase + ones) must not be called with any mutex hold, except when + calling from the main thread (with holds the solar mutex), + unless stated otherwise. This is because they themselves might + need the solar mutex in addition to the object mutex, and the + ordering of the locking must be: first solar mutex, then + object mutex. Furthermore, state change events might be fired + internally. + + @derive Use this class as a base for objects containing static + edit engine text. To avoid overwriting every interface method + to intercept derived object defunc state, just set NULL as the + edit source. Every interface method will then properly throw + an exception. + */ + class SVX_DLLPUBLIC AccessibleStaticTextBase : public AccessibleStaticTextBase_BASE + { + + public: + /** Create accessible text object for given edit source + + @param pEditSource + The edit source to use. Object ownership is transferred + from the caller to the callee. The object listens on the + SvxEditSource for object disposal, so no provisions have + to be taken if the caller destroys the data (e.g. the + model) contained in the given SvxEditSource. + + */ + explicit AccessibleStaticTextBase( ::std::auto_ptr< SvxEditSource > pEditSource ); + virtual ~AccessibleStaticTextBase(); + + private: + + // declared, but not defined + SVX_DLLPRIVATE AccessibleStaticTextBase( const AccessibleStaticTextBase& ); + // declared, but not defined + SVX_DLLPRIVATE AccessibleStaticTextBase& operator= ( const AccessibleStaticTextBase& ); + + public: + /** Query the current edit source + + @attention This method returns by reference, so you are + responsible for serialization (typically, you aquired the + solar mutex when calling this method). Thus, the method + should only be called from the main office thread. + + */ + virtual const SvxEditSource& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Set the current edit source + + @attention You are required to have the solar mutex + locked, when calling this method. Thus, the method should + only be called from the main office thread. + + The EditSource set here is required to broadcast out the + following hints: EDITSOURCE_HINT_PARASMOVED, + EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED, + TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED, + TEXT_HINT_TEXTHEIGHTCHANGED, + TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes + will get noticed by the accessibility object. Further + more, when the corresponding core object or the model is + dying, either the edit source must be set to NULL or it + has to broadcast a SFX_HINT_DYING hint. + + This class does not have a dispose method, since it is not + a UNO component. Nevertheless, it holds C++ references to + several core objects, so you should issue a + SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in + your dispose() method. + + @param pEditSource + The new edit source to set. Object ownership is transferred + from the caller to the callee. + */ + virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ) SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Set the event source + + @attention When setting a reference here, you should call + Dispose() when you as the owner are disposing, since until + then this object will hold that reference + + @param rInterface + The interface that should be set as the source for + accessibility events sent by this object. + */ + virtual void SetEventSource( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rInterface ); + + /** Get the event source + + @return the interface that is set as the source for + accessibility events sent by this object. + */ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetEventSource() const; + + /** Set offset of EditEngine from parent + + @attention You are required to have the solar mutex + locked, when calling this method. Thus, the method should + only be called from the main office thread. + + If the origin of the underlying EditEngine does + not correspond to the upper left corner of the object + using this class, you have to specify the offset. + + @param rPoint + The offset in screen coordinates (i.e. pixel) + */ + virtual void SetOffset( const Point& rPoint ); + + /** Query offset of EditEngine from parent + + @return the offset in screen coordinates (i.e. pixel) + */ + virtual Point GetOffset() const; + + /** Update the visible children + + As this class currently does not represent any content + using children, this does nothing at the moment. + + @attention You are required to have the solar mutex + locked, when calling this method. Thus, the method should + only be called from the main office thread. + + This method reevaluates the visibility of all + childrens. Call this method if your visibility state has + changed somehow, e.g. if the visible area has changed and + the AccessibleStaticTextHelper isn't notified + internally. Normally, there should not be a need to call + this method. + */ + virtual void UpdateChildren() SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Drop all references and enter disposed state + + This method drops all references to external objects (also + the event source reference set via SetEventSource()) and + sets the object into the disposed state (i.e. the methods + return default values or throw a uno::DisposedException + exception). + */ + virtual void Dispose(); + + // XAccessibleText interface implementation + virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException); + /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine) + virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine) + virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine) + virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // XAccessibleTextAttributes + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // child-related methods from XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // child-related methods from XAccessibleComponent + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException); + + protected: + Rectangle GetParagraphBoundingBox() const; + + private: + + /// @dyn + const std::auto_ptr< AccessibleStaticTextBase_Impl > mpImpl; + + }; + +} // end of namespace accessibility + +#endif /* _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ */ diff --git a/svx/inc/ActionDescriptionProvider.hxx b/svx/inc/ActionDescriptionProvider.hxx new file mode 100644 index 000000000000..b34ca9a1d312 --- /dev/null +++ b/svx/inc/ActionDescriptionProvider.hxx @@ -0,0 +1,68 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ActionDescriptionProvider.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACTIONDESCRIPTIONPROVIDER_HXX +#define _SVX_ACTIONDESCRIPTIONPROVIDER_HXX + +#include "svx/svxdllapi.h" + +// header for class OUString +#include <rtl/ustring.hxx> + +//----------------------------------------------------------------------------- +/** This class provides localized descriptions for some basic actions done with objects. +The strings are intended to be provided to the user e.g. as description for undo actions in the menu. +The name of the object acted on and the type of action needs to be given as input parameter. +*/ + +class SVX_DLLPUBLIC ActionDescriptionProvider +{ +public: + enum ActionType + { + INSERT + , DELETE + , CUT + , MOVE + , RESIZE + , ROTATE + , TRANSFORM + , FORMAT + , MOVE_TOTOP + , MOVE_TOBOTTOM + , POS_SIZE + }; + +public: + static ::rtl::OUString createDescription( ActionType eActionType + , const ::rtl::OUString& rObjectName ); +}; + +#endif diff --git a/svx/inc/DescriptionGenerator.hxx b/svx/inc/DescriptionGenerator.hxx new file mode 100644 index 000000000000..5eaa84893ffb --- /dev/null +++ b/svx/inc/DescriptionGenerator.hxx @@ -0,0 +1,220 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: DescriptionGenerator.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef _SVX_ACCESSIBILITY_DESCRIPTION_GENERATOR_HXX +#define _SVX_ACCESSIBILITY_DESCRIPTION_GENERATOR_HXX + +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <rtl/ustrbuf.hxx> +#include "svx/svxdllapi.h" + + +namespace accessibility { + +/** This class creates description strings for shapes. + <p>Initialized with a given shape additional calls to the + <member>addProperty</member> method will build a descriptive string that + starts with a general shape description and the shapes style. Appended + are all the specified property names and values that differ from the + default values in the style.</p> +*/ +class SVX_DLLPUBLIC DescriptionGenerator +{ +public: + enum PropertyType { + COLOR, + INTEGER, + STRING, + FILL_STYLE + }; + + /** Creates a new description generator with an empty description + string. Usually you will want to call initialize next to specifiy + a general description of the shape. + @param xShape + The shape from which properties will be extracted by later calls + to <member>addProperty</member>. + */ + DescriptionGenerator (const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape>& xShape); + + ~DescriptionGenerator (void); + + /** Initialize the description with the given prefix followed by the + shape's style in parantheses and a colon. + @param sPrefix + An introductory description of the shape that is made more + specific by later calls to <member>addProperty</member>. + */ + void Initialize (::rtl::OUString sPrefix); + + /** Initialize the description with the specified string from the + resource followed by the shape's style in parantheses and a colon. + @param nResourceId + A resource id the specifies the introductory description of the + shape that is made more specific by later calls to + <member>addProperty</member>. + */ + void Initialize (sal_Int32 nResourceId); + + /** Returns the description string and then resets it. Usually called + as last method before destroying the object. + @return + The description string in its current form. + */ + ::rtl::OUString operator() (void); + + /** Add the given property name and its associated value to the + description string. If the property value does not differ from the + default value of the shape's style then the description string is + not modified. + @param sPropertyName + The Name of the property to append. + @param aType + Type of the property's value. It controls the transformation + into the value's string representation. + @param sLocalizedName + Localized name of the property. An empty string tells the + method to use the property name instead. + @param nWhichId + This which id is used to localize the property value. If it is + not known a value of -1 signals to use a default representation. + */ + void AddProperty (const ::rtl::OUString& sPropertyName, + PropertyType aType, + const ::rtl::OUString& sLocalizedName=::rtl::OUString(), + long nWhichId=-1); + + /** Add the given property name and its associated value to the + description string. If the property value does not differ from the + default value of the shape's style then the description string is + not modified. This method forwards the request to its cousing but + first replaces the id of the localized name by the associated string + from the resource. + @param sPropertyName + The Name of the property to append. + @param aType + Type of the property's value. It controls the transformation + into the value's string representation. + @param nResourceId + Id of the kocalized name of the property int the resource. + @param nWhichId + This which id is used to localize the property value. If it is + not known a value of -1 signals to use a default representation. + */ + void AddProperty (const ::rtl::OUString& sPropertyName, + PropertyType aType, + sal_Int32 nResourceId, + long nWhichId=-1); + + /** Append the given string as is to the current description. + @param sString + String to append to the current description. It is not modified + in any way. + */ + void AppendString (const ::rtl::OUString& sString); + + /** This method adds for debuging and development the list of all known + properties to the description. Don't use in production code. + */ + void AddPropertyNames (void); + + /** Add properties that describe line and border attributes. + */ + void AddLineProperties (void); + + /** Add properties that describe how areas are filled. + */ + void AddFillProperties (void); + + /** Add properties that describesattributes of 3D objects. + */ + void Add3DProperties (void); + + /** Add properties that describe text attributes. + */ + void AddTextProperties (void); + +private: + /// Reference to the shape from which the properties are extracted. + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape> mxShape; + + /// Reference to the shape's property set. + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> mxSet; + + /// The description string that is build. + ::rtl::OUStringBuffer msDescription; + + /** This flag is used to determine whether to insert a separator e.g. a + comma before the next property. + */ + bool mbIsFirstProperty; + + /** Add a property value formated as color to the description string. + */ + SVX_DLLPRIVATE void AddColor (const ::rtl::OUString& sPropertyName, + const ::rtl::OUString& sLocalizedName); + + /** Add a property value of unknown type to the description string. + */ + SVX_DLLPRIVATE void AddUnknown (const ::rtl::OUString& sPropertyName, + const ::rtl::OUString& sLocalizedName); + + /** Add a property value formated as integer to the description string. + */ + SVX_DLLPRIVATE void AddInteger (const ::rtl::OUString& sPropertyName, + const ::rtl::OUString& sLocalizedName); + + /** Add a property value formated as string to the description string. + @param sPropertyName + Name of the property. + */ + SVX_DLLPRIVATE void AddString (const ::rtl::OUString& sPropertyName, + const ::rtl::OUString& sLocalizedName, long nWhichId = -1); + + /** Add a property value formated as fill style to the description + string. If the fill style is <const>HATCH</const>, + <const>GRADIENT</const>, or <const>BITMAP</const>, then the of the + hatch, gradient, or bitmap is appended as well. + @param sPropertyName + Name of the property. Usually this will be "FillStyle". + */ + SVX_DLLPRIVATE void AddFillStyle (const ::rtl::OUString& sPropertyName, + const ::rtl::OUString& sLocalizedName); +}; + + +} // end of namespace accessibility + + +#endif + diff --git a/svx/inc/ParseContext.hxx b/svx/inc/ParseContext.hxx new file mode 100644 index 000000000000..135919ab7993 --- /dev/null +++ b/svx/inc/ParseContext.hxx @@ -0,0 +1,94 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ParseContext.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef SVX_QUERYDESIGNCONTEXT_HXX +#define SVX_QUERYDESIGNCONTEXT_HXX + +#include "svx/svxdllapi.h" +#include <connectivity/IParseContext.hxx> +#include <tools/string.hxx> +#include <unotools/localedatawrapper.hxx> + + +#include <vector> + +namespace svxform +{ + //========================================================================== + //= OSystemParseContext + //========================================================================== + class SVX_DLLPUBLIC OSystemParseContext : public ::connectivity::IParseContext + { + private: + + ::std::vector< String > m_aLocalizedKeywords; + + public: + OSystemParseContext(); + + virtual ~OSystemParseContext(); + // retrieves language specific error messages + virtual ::rtl::OUString getErrorMessage(ErrorCode _eCodes) const; + + // retrieves language specific keyword strings (only ASCII allowed) + virtual ::rtl::OString getIntlKeywordAscii(InternationalKeyCode _eKey) const; + + // finds out, if we have an international keyword (only ASCII allowed) + virtual InternationalKeyCode getIntlKeyCode(const ::rtl::OString& rToken) const; + + /** get's a locale instance which should be used when parsing in the context specified by this instance + <p>if this is not overridden by derived classes, it returns the static default locale.</p> + */ + virtual ::com::sun::star::lang::Locale getPreferredLocale( ) const; + + public: + // helper methods to ease access to some of the characteristics of the locale + sal_Unicode getNumDecimalSep( ) const; + sal_Unicode getNumThousandSep( ) const; + }; + + //========================================================================== + //= OParseContextClient + //========================================================================== + /** helper class which needs access to a (shared and ref-counted) OSystemParseContext + instance. + */ + class SVX_DLLPUBLIC OParseContextClient + { + protected: + OParseContextClient(); + virtual ~OParseContextClient(); + + const OSystemParseContext* getParseContext() const; + }; +} +#endif // SVX_QUERYDESIGNCONTEXT_HXX + + + diff --git a/svx/inc/UnoForbiddenCharsTable.hxx b/svx/inc/UnoForbiddenCharsTable.hxx new file mode 100644 index 000000000000..3fe2d2054da7 --- /dev/null +++ b/svx/inc/UnoForbiddenCharsTable.hxx @@ -0,0 +1,68 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: UnoForbiddenCharsTable.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOFORBIDDENCHARSTABLE_HXX_ +#define _SVX_UNOFORBIDDENCHARSTABLE_HXX_ + +#include <com/sun/star/i18n/XForbiddenCharacters.hpp> +#include <com/sun/star/linguistic2/XSupportedLocales.hpp> +#include <vos/ref.hxx> + +#include <cppuhelper/implbase2.hxx> +#include "svx/svxdllapi.h" + +class SvxForbiddenCharactersTable; + +class SVX_DLLPUBLIC SvxUnoForbiddenCharsTable : public cppu::WeakImplHelper2< + com::sun::star::i18n::XForbiddenCharacters, + com::sun::star::linguistic2::XSupportedLocales> +{ +protected: + /** this virtual function is called if the forbidden characters are changed */ + virtual void onChange(); + + vos::ORef<SvxForbiddenCharactersTable> mxForbiddenChars; + +public: + SvxUnoForbiddenCharsTable(vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars); + ~SvxUnoForbiddenCharsTable(); + + // XForbiddenCharacters + virtual com::sun::star::i18n::ForbiddenCharacters SAL_CALL getForbiddenCharacters( const com::sun::star::lang::Locale& rLocale ) throw(com::sun::star::container::NoSuchElementException, com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasForbiddenCharacters( const com::sun::star::lang::Locale& rLocale ) throw(com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setForbiddenCharacters( const com::sun::star::lang::Locale& rLocale, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) throw(com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeForbiddenCharacters( const com::sun::star::lang::Locale& rLocale ) throw(com::sun::star::uno::RuntimeException); + + // XSupportedLocales + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > SAL_CALL getLocales( ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasLocale( const ::com::sun::star::lang::Locale& aLocale ) throw (::com::sun::star::uno::RuntimeException); +}; + +#endif // _SVX_UNOFORBIDDENCHARSTABLE_HXX_ diff --git a/svx/inc/UnoNamespaceMap.hxx b/svx/inc/UnoNamespaceMap.hxx new file mode 100644 index 000000000000..4fd3fe211483 --- /dev/null +++ b/svx/inc/UnoNamespaceMap.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: UnoNamespaceMap.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNONAMESPACEMAP_HXX_ +#define _SVX_UNONAMESPACEMAP_HXX_ + +#include <com/sun/star/uno/XInterface.hpp> +#include "svx/svxdllapi.h" + +class SfxItemPool; + +namespace svx { + +SVX_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL NamespaceMap_createInstance( sal_uInt16* pWhichIds, SfxItemPool* pPool ); + +/** deprecated */ +SVX_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL NamespaceMap_createInstance( sal_uInt16* pWhichIds, SfxItemPool* pPool1, SfxItemPool* pPool2 ); + +} + +#endif // _SVX_UNONAMESPACEMAP_HXX_ diff --git a/svx/inc/XPropertyTable.hxx b/svx/inc/XPropertyTable.hxx new file mode 100644 index 000000000000..bc0fa5ea74e8 --- /dev/null +++ b/svx/inc/XPropertyTable.hxx @@ -0,0 +1,47 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XPropertyTable.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XPROPERTYTABLE_HXX +#define _SVX_XPROPERTYTABLE_HXX + +#include <com/sun/star/uno/XInterface.hpp> +#include "svx/svxdllapi.h" +#include <svx/xtable.hxx> + +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxUnoXColorTable_createInstance( XPropertyTable* pTable ) throw(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxUnoXLineEndTable_createInstance( XPropertyList* pList ) throw(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxUnoXDashTable_createInstance( XPropertyList* pList ) throw(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxUnoXHatchTable_createInstance( XPropertyList* pList ) throw(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxUnoXGradientTable_createInstance( XPropertyList* pList ) throw(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxUnoXBitmapTable_createInstance( XPropertyList* pList ) throw(); + +#endif + + diff --git a/svx/inc/accessibility.hrc b/svx/inc/accessibility.hrc new file mode 100644 index 000000000000..5688f7a8033e --- /dev/null +++ b/svx/inc/accessibility.hrc @@ -0,0 +1,92 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: accessibility.hrc,v $ + * $Revision: 1.10 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_HRC +#define _SVX_ACCESSIBILITY_HRC + +#include <svx/dialogs.hrc> + +#define RID_SVXSTR_A11Y_3D_MATERIAL_COLOR (RID_SVXSTR_ACCESSIBILITY_START + 1) +#define RID_SVXSTR_A11Y_TEXT_COLOR (RID_SVXSTR_ACCESSIBILITY_START + 2) +#define RID_SVXSTR_A11Y_BACKGROUND_COLOR (RID_SVXSTR_ACCESSIBILITY_START + 3) +#define RID_SVXSTR_A11Y_FILLSTYLE_NONE (RID_SVXSTR_ACCESSIBILITY_START + 4) +#define RID_SVXSTR_A11Y_FILLSTYLE_SOLID (RID_SVXSTR_ACCESSIBILITY_START + 5) +#define RID_SVXSTR_A11Y_FILLSTYLE_HATCH (RID_SVXSTR_ACCESSIBILITY_START + 6) +#define RID_SVXSTR_A11Y_FILLSTYLE_GRADIENT (RID_SVXSTR_ACCESSIBILITY_START + 7) +#define RID_SVXSTR_A11Y_FILLSTYLE_BITMAP (RID_SVXSTR_ACCESSIBILITY_START + 8) +#define RID_SVXSTR_A11Y_WITH (RID_SVXSTR_ACCESSIBILITY_START + 9) +#define RID_SVXSTR_A11Y_STYLE (RID_SVXSTR_ACCESSIBILITY_START + 10) +#define RID_SVXSTR_A11Y_AND (RID_SVXSTR_ACCESSIBILITY_START + 11) + + +// SvxRectCtl & childs +#define RID_SVXSTR_RECTCTL_ACC_START (RID_SVXSTR_ACCESSIBILITY_START + 20) +#define RID_SVXSTR_RECTCTL_ACC_CORN_NAME (RID_SVXSTR_RECTCTL_ACC_START + 0) +#define RID_SVXSTR_RECTCTL_ACC_CORN_DESCR (RID_SVXSTR_RECTCTL_ACC_START + 1) +#define RID_SVXSTR_RECTCTL_ACC_ANGL_NAME (RID_SVXSTR_RECTCTL_ACC_START + 2) +#define RID_SVXSTR_RECTCTL_ACC_ANGL_DESCR (RID_SVXSTR_RECTCTL_ACC_START + 3) + +#define RID_SVXSTR_RECTCTL_ACC_CHLD_LT (RID_SVXSTR_RECTCTL_ACC_START + 4) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_MT (RID_SVXSTR_RECTCTL_ACC_START + 5) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_RT (RID_SVXSTR_RECTCTL_ACC_START + 6) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_LM (RID_SVXSTR_RECTCTL_ACC_START + 7) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_MM (RID_SVXSTR_RECTCTL_ACC_START + 8) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_RM (RID_SVXSTR_RECTCTL_ACC_START + 9) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_LB (RID_SVXSTR_RECTCTL_ACC_START + 10) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_MB (RID_SVXSTR_RECTCTL_ACC_START + 11) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_RB (RID_SVXSTR_RECTCTL_ACC_START + 12) + +#define RID_SVXSTR_RECTCTL_ACC_CHLD_A000 (RID_SVXSTR_RECTCTL_ACC_START + 13) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_A045 (RID_SVXSTR_RECTCTL_ACC_START + 14) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_A090 (RID_SVXSTR_RECTCTL_ACC_START + 15) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_A135 (RID_SVXSTR_RECTCTL_ACC_START + 16) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_A180 (RID_SVXSTR_RECTCTL_ACC_START + 17) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_A225 (RID_SVXSTR_RECTCTL_ACC_START + 18) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_A270 (RID_SVXSTR_RECTCTL_ACC_START + 19) +#define RID_SVXSTR_RECTCTL_ACC_CHLD_A315 (RID_SVXSTR_RECTCTL_ACC_START + 20) +#define RID_SVXSTR_RECTCTL_ACC_END (RID_SVXSTR_RECTCTL_ACC_START + 21) + +// SvxGraphCtrlAccessibleContext +#define RID_SVXSTR_GRAPHCTRL_ACC_START (RID_SVXSTR_RECTCTL_ACC_END) +#define RID_SVXSTR_GRAPHCTRL_ACC_NAME (RID_SVXSTR_GRAPHCTRL_ACC_START + 0) +#define RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION (RID_SVXSTR_GRAPHCTRL_ACC_START + 1) + +// text paragraphs and bullets +#define RID_SVXSTR_A11Y_TEXTHELPER_START (RID_SVXSTR_ACCESSIBILITY_START + 70) +#define RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION (RID_SVXSTR_A11Y_TEXTHELPER_START + 2) +#define RID_SVXSTR_A11Y_IMAGEBULLET_NAME (RID_SVXSTR_A11Y_TEXTHELPER_START + 3) + +// SvxShowCharSetAcc +#define RID_SVXSTR_CHARACTER_SELECTION (RID_SVXSTR_ACCESSIBILITY_START + 80) +#define RID_SVXSTR_CHARACTER_CODE (RID_SVXSTR_ACCESSIBILITY_START + 81) +#define RID_SVXSTR_CHAR_SEL_DESC (RID_SVXSTR_ACCESSIBILITY_START + 82) + +#endif + diff --git a/svx/inc/acorrcfg.hxx b/svx/inc/acorrcfg.hxx new file mode 100644 index 000000000000..046cf1a6198a --- /dev/null +++ b/svx/inc/acorrcfg.hxx @@ -0,0 +1,136 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: acorrcfg.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVXACCFG_HXX +#define _SVXACCFG_HXX + +// include --------------------------------------------------------------- + +#include "svx/svxdllapi.h" +#include <unotools/configitem.hxx> +/* -----------------------------12.10.00 11:40-------------------------------- + + ---------------------------------------------------------------------------*/ +class SvxAutoCorrect; +class SvxAutoCorrCfg; +class SVX_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem +{ + SvxAutoCorrCfg& rParent; + com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); + +public: + SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rParent); + ~SvxBaseAutoCorrCfg(); + + void Load(sal_Bool bInit); + virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); + void SetModified() {ConfigItem::SetModified();} +}; +/* -----------------------------12.10.00 11:40-------------------------------- + + ---------------------------------------------------------------------------*/ +class SVX_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem +{ + SvxAutoCorrCfg& rParent; + com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); + +public: + SvxSwAutoCorrCfg(SvxAutoCorrCfg& rParent); + ~SvxSwAutoCorrCfg(); + + void Load(sal_Bool bInit); + virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); + void SetModified() {ConfigItem::SetModified();} +}; +/*-------------------------------------------------------------------- + Beschreibung: Konfiguration fuer Auto Correction + --------------------------------------------------------------------*/ +class SVX_DLLPUBLIC SvxAutoCorrCfg +{ + friend class SvxBaseAutoCorrCfg; + friend class SvxSwAutoCorrCfg; + + SvxAutoCorrect* pAutoCorrect; + + SvxBaseAutoCorrCfg aBaseConfig; + SvxSwAutoCorrCfg aSwConfig; + + // Flags f"ur Autotext: + sal_Bool bFileRel; + sal_Bool bNetRel; + // Tiphilfe f"ur Autotext w"ahrend der Eingabe + sal_Bool bAutoTextTip; + sal_Bool bAutoTextPreview; + sal_Bool bAutoFmtByInput; + sal_Bool bSearchInAllCategories; + +public: + void SetModified() + { + aBaseConfig.SetModified(); + aSwConfig.SetModified(); + } + void Commit() + { + aBaseConfig.Commit(); + aSwConfig.Commit(); + } + + SvxAutoCorrect* GetAutoCorrect() { return pAutoCorrect; } + const SvxAutoCorrect* GetAutoCorrect() const { return pAutoCorrect; } + // der Pointer geht in den Besitz des ConfigItems! + void SetAutoCorrect( SvxAutoCorrect* ); + + sal_Bool IsAutoFmtByInput() const { return bAutoFmtByInput; } + void SetAutoFmtByInput( sal_Bool bSet ) { bAutoFmtByInput = bSet;aSwConfig.SetModified();} + + sal_Bool IsSaveRelFile() const { return bFileRel; } + void SetSaveRelFile( sal_Bool bSet ) { bFileRel = bSet; aSwConfig.SetModified(); } + + sal_Bool IsSaveRelNet() const { return bNetRel; } + void SetSaveRelNet( sal_Bool bSet ) { bNetRel = bSet; aSwConfig.SetModified();} + + sal_Bool IsAutoTextPreview() const {return bAutoTextPreview;} + void SetAutoTextPreview(sal_Bool bSet) {bAutoTextPreview = bSet; aSwConfig.SetModified();} + + sal_Bool IsAutoTextTip() const { return bAutoTextTip; } + void SetAutoTextTip(sal_Bool bSet ) { bAutoTextTip = bSet;aSwConfig.SetModified();} + + sal_Bool IsSearchInAllCategories() const { return bSearchInAllCategories;} + void SetSearchInAllCategories(sal_Bool bSet ) { bSearchInAllCategories = bSet; aSwConfig.SetModified(); } + + SvxAutoCorrCfg(); + virtual ~SvxAutoCorrCfg(); + static SvxAutoCorrCfg* Get(); +}; + + +#endif diff --git a/svx/inc/anchorid.hxx b/svx/inc/anchorid.hxx new file mode 100644 index 000000000000..db897fb3e11e --- /dev/null +++ b/svx/inc/anchorid.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: anchorid.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ANCHORID_HXX +#define _SVX_ANCHORID_HXX + + +enum SvxAnchorIds +{ + SVX_OBJ_AT_CNTNT = 0x01, //Absatzgebundener Rahmen + SVX_OBJ_IN_CNTNT = 0x02, //Zeichengebundener Rahmen + SVX_OBJ_PAGE = 0x04, //Seitengebundener Rahmen + SVX_OBJ_AT_FLY = 0x08 //Rahmengebundener Rahmen +// SVX_OBJ_AUTO_CNTNT = 0x10 //Automatisch positionierter, absatzgebundener Rahmen +}; + + + +#endif diff --git a/svx/inc/asiancfg.hxx b/svx/inc/asiancfg.hxx new file mode 100644 index 000000000000..303da7e76630 --- /dev/null +++ b/svx/inc/asiancfg.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: asiancfg.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ASIANCFG_HXX +#define _SVX_ASIANCFG_HXX + +#include <unotools/configitem.hxx> +#include <com/sun/star/uno/Sequence.h> +#include "svx/svxdllapi.h" + +namespace com{namespace sun{namespace star{ +namespace lang{ + struct Locale; +}}}} +//----------------------------------------------------------------------------- +struct SvxAsianConfig_Impl; +class SVX_DLLPUBLIC SvxAsianConfig : public utl::ConfigItem +{ + SvxAsianConfig_Impl* pImpl; + +public: + SvxAsianConfig(sal_Bool bEnableNotify = sal_True); + virtual ~SvxAsianConfig(); + + void Load(); + virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); + + sal_Bool IsKerningWesternTextOnly() const; + void SetKerningWesternTextOnly(sal_Bool bSet); + + sal_Int16 GetCharDistanceCompression() const; + void SetCharDistanceCompression(sal_Int16 nSet); + + com::sun::star::uno::Sequence<com::sun::star::lang::Locale> + GetStartEndCharLocales(); + + sal_Bool GetStartEndChars( const com::sun::star::lang::Locale& rLocale, + rtl::OUString& rStartChars, + rtl::OUString& rEndChars ); + void SetStartEndChars( const com::sun::star::lang::Locale& rLocale, + const rtl::OUString* pStartChars, + const rtl::OUString* pEndChars ); +}; + +#endif diff --git a/svx/inc/bolnitem.hxx b/svx/inc/bolnitem.hxx new file mode 100644 index 000000000000..22040d790c71 --- /dev/null +++ b/svx/inc/bolnitem.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: bolnitem.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_BOLNITEM_HXX +#define _SVX_BOLNITEM_HXX + +// include --------------------------------------------------------------- + + + +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + + + +// class SvxLineItem ----------------------------------------------------- + + +/* +[Beschreibung] +Dieses Item transportiert eine SvxBorderLine. +*/ + +class SvxBorderLine; + +class SVX_DLLPUBLIC SvxLineItem : public SfxPoolItem +{ +public: + TYPEINFO(); + + SvxLineItem( const USHORT nId ); + SvxLineItem( const SvxLineItem& rCpy ); + ~SvxLineItem(); + SvxLineItem &operator=( const SvxLineItem& rLine ); + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual int ScaleMetrics( long nMult, long nDiv ); + virtual int HasMetrics() const; + + const SvxBorderLine* GetLine () const { return pLine; } + void SetLine ( const SvxBorderLine *pNew ); + +private: + SvxBorderLine* pLine; +}; + + + + +#endif diff --git a/svx/inc/bulitem.hxx b/svx/inc/bulitem.hxx new file mode 100644 index 000000000000..cae4fbcc24ef --- /dev/null +++ b/svx/inc/bulitem.hxx @@ -0,0 +1,163 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: bulitem.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_BULITEM_HXX +#define _SVX_BULITEM_HXX + +// include --------------------------------------------------------------- + +#include "svx/svxdllapi.h" + + +// define ---------------------------------------------------------------- + +// Styles +#define BS_ABC_BIG 0 +#define BS_ABC_SMALL 1 +#define BS_ROMAN_BIG 2 +#define BS_ROMAN_SMALL 3 +#define BS_123 4 +#define BS_NONE 5 +#define BS_BULLET 6 +#define BS_BMP 128 + +// Justification +#define BJ_HLEFT 0x01 +#define BJ_HRIGHT 0x02 +#define BJ_HCENTER 0x04 +#define BJ_VTOP 0x08 +#define BJ_VBOTTOM 0x10 +#define BJ_VCENTER 0x20 + +// Valid-Bits +// Erstmal nur die Werte, die vom Dialog geaendert werden... +#define VALID_FONTCOLOR 0x0001 +#define VALID_FONTNAME 0x0002 +#define VALID_SYMBOL 0x0004 +#define VALID_BITMAP 0x0008 +#define VALID_SCALE 0x0010 +#define VALID_START 0x0020 +#define VALID_STYLE 0x0040 +#define VALID_PREVTEXT 0x0080 +#define VALID_FOLLOWTEXT 0x0100 +#include <svl/poolitem.hxx> +#include <vcl/font.hxx> +#include <goodies/grfmgr.hxx> + +// class SvxBulletItem --------------------------------------------------- + +class SVX_DLLPUBLIC SvxBulletItem : public SfxPoolItem +{ + Font aFont; + GraphicObject* pGraphicObject; + String aPrevText; + String aFollowText; + USHORT nStart; + USHORT nStyle; + long nWidth; + USHORT nScale; + sal_Unicode cSymbol; + BYTE nJustify; + USHORT nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets + +#ifdef _SVX_BULITEM_CXX + void SetDefaultFont_Impl(); + void SetDefaults_Impl(); +#endif + +public: + TYPEINFO(); + + SvxBulletItem( USHORT nWhich = 0 ); + SvxBulletItem( BYTE nStyle, const Font& rFont, USHORT nStart = 0, USHORT nWhich = 0 ); + SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, USHORT nWhich=0 ); + SvxBulletItem( const Bitmap&, USHORT nWhich = 0 ); + SvxBulletItem( const GraphicObject&, USHORT nWhich = 0 ); + SvxBulletItem( SvStream& rStrm, USHORT nWhich = 0 ); + SvxBulletItem( const SvxBulletItem& ); + ~SvxBulletItem(); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; + virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const; + + String GetFullText() const; + sal_Unicode GetSymbol() const { return cSymbol; } + String GetPrevText() const { return aPrevText; } + String GetFollowText() const { return aFollowText; } + + USHORT GetStart() const { return nStart; } + long GetWidth() const { return nWidth; } + USHORT GetStyle() const { return nStyle; } + BYTE GetJustification() const { return nJustify; } + Font GetFont() const { return aFont; } + USHORT GetScale() const { return nScale; } + + Bitmap GetBitmap() const; + void SetBitmap( const Bitmap& rBmp ); + + const GraphicObject& GetGraphicObject() const; + void SetGraphicObject( const GraphicObject& rGraphicObject ); + + void SetSymbol( sal_Unicode c) { cSymbol = c; } + void SetPrevText( const String& rStr) { aPrevText = rStr;} + void SetFollowText(const String& rStr) { aFollowText=rStr;} + + void SetStart( USHORT nNew ) { nStart = nNew; } + void SetWidth( long nNew ) { nWidth = nNew; } + void SetStyle( USHORT nNew ) { nStyle = nNew; } + void SetJustification( BYTE nNew ) { nJustify = nNew; } + void SetFont( const Font& rNew) { aFont = rNew; } + void SetScale( USHORT nNew ) { nScale = nNew; } + + virtual USHORT GetVersion(USHORT nFileVersion) const; + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + static void StoreFont( SvStream&, const Font& ); + static Font CreateFont( SvStream&, USHORT nVer ); + + USHORT& GetValidMask() { return nValidMask; } + USHORT GetValidMask() const { return nValidMask; } + USHORT IsValid( USHORT nFlag ) const { return nValidMask & nFlag; } + void SetValid( USHORT nFlag, BOOL bValid ) + { + if ( bValid ) + nValidMask |= nFlag; + else + nValidMask &= ~nFlag; + } + void CopyValidProperties( const SvxBulletItem& rCopyFrom ); +}; + + +#endif diff --git a/svx/inc/charhiddenitem.hxx b/svx/inc/charhiddenitem.hxx new file mode 100644 index 000000000000..c11abea5145d --- /dev/null +++ b/svx/inc/charhiddenitem.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: charhiddenitem.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CHARHIDDENITEM_HXX +#define _SVX_CHARHIDDENITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +// class SvxCharHiddenItem ------------------------------------------------- +/* + [Description] + This item marks text as hidden +*/ + +class SVX_DLLPUBLIC SvxCharHiddenItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxCharHiddenItem( const BOOL bHidden /*= FALSE*/, const USHORT nId ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxCharHiddenItem& operator=(const SvxCharHiddenItem& rHidden) { + SetValue(rHidden.GetValue()); + return *this; + } +}; + +#endif diff --git a/svx/inc/chrtitem.hxx b/svx/inc/chrtitem.hxx new file mode 100644 index 000000000000..ffaa10c71360 --- /dev/null +++ b/svx/inc/chrtitem.hxx @@ -0,0 +1,388 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: chrtitem.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CHRTITEM_HXX +#define _SVX_CHRTITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +//------------------------------------------------------------------------ + +enum SvxChartStyle +{ + CHSTYLE_2D_LINE, + CHSTYLE_2D_STACKEDLINE, + CHSTYLE_2D_PERCENTLINE, + CHSTYLE_2D_COLUMN, + CHSTYLE_2D_STACKEDCOLUMN, + CHSTYLE_2D_PERCENTCOLUMN, + CHSTYLE_2D_BAR, + CHSTYLE_2D_STACKEDBAR, + CHSTYLE_2D_PERCENTBAR, + CHSTYLE_2D_AREA, + CHSTYLE_2D_STACKEDAREA, + CHSTYLE_2D_PERCENTAREA, + CHSTYLE_2D_PIE, + CHSTYLE_3D_STRIPE, + CHSTYLE_3D_COLUMN, + CHSTYLE_3D_FLATCOLUMN, + CHSTYLE_3D_STACKEDFLATCOLUMN, + CHSTYLE_3D_PERCENTFLATCOLUMN, + CHSTYLE_3D_AREA, + CHSTYLE_3D_STACKEDAREA, + CHSTYLE_3D_PERCENTAREA, + CHSTYLE_3D_SURFACE, + CHSTYLE_3D_PIE, + CHSTYLE_2D_XY, + CHSTYLE_3D_XYZ, + CHSTYLE_2D_LINESYMBOLS, + CHSTYLE_2D_STACKEDLINESYM, + CHSTYLE_2D_PERCENTLINESYM, + CHSTYLE_2D_XYSYMBOLS, + CHSTYLE_3D_XYZSYMBOLS, + CHSTYLE_2D_DONUT1, + CHSTYLE_2D_DONUT2, + CHSTYLE_3D_BAR, + CHSTYLE_3D_FLATBAR, + CHSTYLE_3D_STACKEDFLATBAR, + CHSTYLE_3D_PERCENTFLATBAR, + CHSTYLE_2D_PIE_SEGOF1, + CHSTYLE_2D_PIE_SEGOFALL, + CHSTYLE_2D_NET, + CHSTYLE_2D_NET_SYMBOLS, + CHSTYLE_2D_NET_STACK, + CHSTYLE_2D_NET_SYMBOLS_STACK, + CHSTYLE_2D_NET_PERCENT, + CHSTYLE_2D_NET_SYMBOLS_PERCENT, + CHSTYLE_2D_CUBIC_SPLINE, + CHSTYLE_2D_CUBIC_SPLINE_SYMBOL, + CHSTYLE_2D_B_SPLINE, + CHSTYLE_2D_B_SPLINE_SYMBOL, + CHSTYLE_2D_CUBIC_SPLINE_XY, + CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY, + CHSTYLE_2D_B_SPLINE_XY, + CHSTYLE_2D_B_SPLINE_SYMBOL_XY, + CHSTYLE_2D_XY_LINE, + CHSTYLE_2D_LINE_COLUMN, + CHSTYLE_2D_LINE_STACKEDCOLUMN, + CHSTYLE_2D_STOCK_1, + CHSTYLE_2D_STOCK_2, + CHSTYLE_2D_STOCK_3, + CHSTYLE_2D_STOCK_4, + CHSTYLE_ADDIN +}; + +#define CHSTYLE_COUNT (CHSTYLE_ADDIN + 1) + +enum SvxChartDataDescr +{ + CHDESCR_NONE, + CHDESCR_VALUE, + CHDESCR_PERCENT, + CHDESCR_TEXT, + CHDESCR_TEXTANDPERCENT, + CHDESCR_NUMFORMAT_PERCENT, + CHDESCR_NUMFORMAT_VALUE, + CHDESCR_TEXTANDVALUE +}; + +#define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1) + +enum SvxChartLegendPos +{ + CHLEGEND_NONE, + CHLEGEND_LEFT, + CHLEGEND_TOP, + CHLEGEND_RIGHT, + CHLEGEND_BOTTOM, + CHLEGEND_NONE_TOP, + CHLEGEND_NONE_LEFT, + CHLEGEND_NONE_RIGHT, + CHLEGEND_NONE_BOTTOM +}; + +#define CHLEGEND_COUNT (CHLEGEND_BOTTOM + 1) + +enum SvxChartTextOrder +{ + CHTXTORDER_SIDEBYSIDE, + CHTXTORDER_UPDOWN, + CHTXTORDER_DOWNUP, + CHTXTORDER_AUTO +}; + +#define CHTXTORDER_COUNT (CHTXTORDER_AUTO + 1) + +enum SvxChartTextOrient +{ + CHTXTORIENT_AUTOMATIC, + CHTXTORIENT_STANDARD, + CHTXTORIENT_BOTTOMTOP, + CHTXTORIENT_STACKED, + CHTXTORIENT_TOPBOTTOM +}; + +#define CHTXTORIENT_COUNT (CHTXTORIENT_TOPBOTTOM + 1) + +enum SvxChartKindError +{ + CHERROR_NONE, + CHERROR_VARIANT, + CHERROR_SIGMA, + CHERROR_PERCENT, + CHERROR_BIGERROR, + CHERROR_CONST, + CHERROR_STDERROR, + CHERROR_RANGE +}; + +#define CHERROR_COUNT (CHERROR_RANGE + 1) + +enum SvxChartIndicate +{ + CHINDICATE_NONE, + CHINDICATE_BOTH, + CHINDICATE_UP, + CHINDICATE_DOWN +}; + +#define CHINDICATE_COUNT (CHINDICATE_DOWN + 1) + +enum SvxChartRegress +{ + CHREGRESS_NONE, + CHREGRESS_LINEAR, + CHREGRESS_LOG, + CHREGRESS_EXP, + CHREGRESS_POWER +}; + +#define CHREGRESS_COUNT (CHREGRESS_POWER + 1) + +//------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxChartStyleItem : public SfxEnumItem +{ +public: + TYPEINFO(); + SvxChartStyleItem(SvxChartStyle eStyle /*= CHSTYLE_2D_LINE*/, + USHORT nId ); + SvxChartStyleItem(SvStream& rIn, USHORT nId ); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + USHORT GetValueCount() const { return CHSTYLE_COUNT; } + SvxChartStyle GetValue() const + { return (SvxChartStyle)SfxEnumItem::GetValue(); } +}; + +//------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxChartRegressItem : public SfxEnumItem +{ +public: + TYPEINFO(); + SvxChartRegressItem(SvxChartRegress eRegress /*= CHREGRESS_LINEAR*/, + USHORT nId ); + SvxChartRegressItem(SvStream& rIn, USHORT nId ); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + USHORT GetValueCount() const { return CHREGRESS_COUNT; } + SvxChartRegress GetValue() const + { return (SvxChartRegress)SfxEnumItem::GetValue(); } + USHORT GetVersion (USHORT nFileFormatVersion) const; +}; + +//------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxChartDataDescrItem : public SfxEnumItem +{ +public: + TYPEINFO(); + SvxChartDataDescrItem(SvxChartDataDescr eDataDescr /*= CHDESCR_NONE*/, + USHORT nId ); + SvxChartDataDescrItem(SvStream& rIn, + USHORT nId ); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + USHORT GetValueCount() const { return CHDESCR_COUNT; } + SvxChartDataDescr GetValue() const + { return (SvxChartDataDescr)SfxEnumItem::GetValue(); } +}; + +//------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxChartLegendPosItem : public SfxEnumItem +{ +public: + TYPEINFO(); + SvxChartLegendPosItem(SvxChartLegendPos eLegendPos /*= CHLEGEND_NONE*/, + USHORT nId ); + SvxChartLegendPosItem(SvStream& rIn, + USHORT nId ); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + USHORT GetValueCount() const { return CHLEGEND_COUNT; } + SvxChartLegendPos GetValue() const + { return (SvxChartLegendPos)SfxEnumItem::GetValue(); } +}; + +//------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxChartTextOrderItem : public SfxEnumItem +{ +public: + TYPEINFO(); + SvxChartTextOrderItem(SvxChartTextOrder eOrder /*= CHTXTORDER_SIDEBYSIDE*/, + USHORT nId ); + SvxChartTextOrderItem(SvStream& rIn, + USHORT nId ); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + USHORT GetValueCount() const { return CHTXTORDER_COUNT; } + SvxChartTextOrder GetValue() const + { return (SvxChartTextOrder)SfxEnumItem::GetValue(); } +}; + +//------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxChartTextOrientItem : public SfxEnumItem +{ +public: + TYPEINFO(); + SvxChartTextOrientItem(SvxChartTextOrient /*eOrient = CHTXTORIENT_STANDARD*/, + USHORT nId ); + SvxChartTextOrientItem(SvStream& rIn, + USHORT nId ); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + USHORT GetValueCount() const { return CHTXTORDER_COUNT; } + SvxChartTextOrient GetValue() const + { return (SvxChartTextOrient)SfxEnumItem::GetValue(); } +}; + +//------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxChartKindErrorItem : public SfxEnumItem +{ +public: + TYPEINFO(); + SvxChartKindErrorItem(SvxChartKindError /*eOrient = CHERROR_NONE*/, + USHORT nId ); + SvxChartKindErrorItem(SvStream& rIn, + USHORT nId ); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + USHORT GetValueCount() const { return CHERROR_COUNT; } + SvxChartKindError GetValue() const + { return (SvxChartKindError)SfxEnumItem::GetValue(); } + + USHORT GetVersion (USHORT nFileFormatVersion) const; +}; + +//------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxChartIndicateItem : public SfxEnumItem +{ +public: + TYPEINFO(); + SvxChartIndicateItem(SvxChartIndicate eOrient /*= CHINDICATE_NONE*/, + USHORT nId ); + SvxChartIndicateItem(SvStream& rIn, + USHORT nId ); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + USHORT GetValueCount() const { return CHINDICATE_COUNT; } + SvxChartIndicate GetValue() const + { return (SvxChartIndicate)SfxEnumItem::GetValue(); } + + USHORT GetVersion (USHORT nFileFormatVersion) const; +}; + +//------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxDoubleItem : public SfxPoolItem +{ + double fVal; + +public: + TYPEINFO(); + SvxDoubleItem(double fValue /*= 0.0*/, USHORT nId ); + SvxDoubleItem(SvStream& rIn, USHORT nId ); + SvxDoubleItem(const SvxDoubleItem& rItem); + + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + + + virtual String GetValueText() const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0) const; + + virtual int operator == (const SfxPoolItem&) const; + virtual SfxPoolItem* Clone(SfxItemPool *pPool = NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVersion) const; + virtual SvStream& Store(SvStream& rOut, USHORT nItemVersion ) const; + + virtual double GetMin() const; + virtual double GetMax() const; + + virtual SfxFieldUnit GetUnit() const; + + double GetValue() const { return fVal; } + void SetValue(double fNewVal) { fVal = fNewVal; } +}; + +#endif // _SVX_CHRTITEM_HXX + diff --git a/svx/inc/clipboardctl.hxx b/svx/inc/clipboardctl.hxx new file mode 100644 index 000000000000..3e76dc7a5fe1 --- /dev/null +++ b/svx/inc/clipboardctl.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: clipboardctl.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_CLIPBOARDCTL_HXX_ +#define _SVX_CLIPBOARDCTL_HXX_ + +#include <sfx2/tbxctrl.hxx> +#include <sfx2/ctrlitem.hxx> +#include <svl/poolitem.hxx> + + +#include "svx/svxdllapi.h" + +class PopupMenu; +class SvxClipboardFmtItem; + + +class SVX_DLLPUBLIC SvxClipBoardControl : public SfxToolBoxControl +{ + SfxPoolItem* pClipboardFmtItem; + PopupMenu* pPopup; + USHORT nItemId; + BOOL bDisabled; + + void DelPopup(); + +public: + SFX_DECL_TOOLBOX_CONTROL(); + + SvxClipBoardControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxClipBoardControl(); + + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); + virtual void StateChanged( USHORT nSID, + SfxItemState eState, + const SfxPoolItem* pState ); +}; + + +#endif + diff --git a/svx/inc/clipfmtitem.hxx b/svx/inc/clipfmtitem.hxx new file mode 100644 index 000000000000..b304c0796bfc --- /dev/null +++ b/svx/inc/clipfmtitem.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: clipfmtitem.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CLIPFMTITEM_HXX +#define _SVX_CLIPFMTITEM_HXX + +// include --------------------------------------------------------------- + +#include <tools/gen.hxx> +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + +// class SvxClipboardFmtItem ---------------------------------------------- +struct SvxClipboardFmtItem_Impl; + +class SVX_DLLPUBLIC SvxClipboardFmtItem : public SfxPoolItem +{ + SvxClipboardFmtItem_Impl* pImpl; +protected: + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + +public: + TYPEINFO(); + SvxClipboardFmtItem( USHORT nId = 0 ); + SvxClipboardFmtItem( const SvxClipboardFmtItem& ); + virtual ~SvxClipboardFmtItem(); + + virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); + + void AddClipbrdFormat( ULONG nId, USHORT nPos = USHRT_MAX ); + void AddClipbrdFormat( ULONG nId, const String& rName, + USHORT nPos = USHRT_MAX ); + USHORT Count() const; + + ULONG GetClipbrdFormatId( USHORT nPos ) const; + const String& GetClipbrdFormatName( USHORT nPos ) const; +}; + + +#endif + diff --git a/svx/inc/connctrl.hxx b/svx/inc/connctrl.hxx new file mode 100644 index 000000000000..ad21b4f2ef21 --- /dev/null +++ b/svx/inc/connctrl.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: connctrl.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CONNCTRL_HXX +#define _SVX_CONNCTRL_HXX + +// include --------------------------------------------------------------- + +#ifndef _CTRL_HXX //autogen +#include <vcl/ctrl.hxx> +#endif +#include "svx/svxdllapi.h" + +class SfxItemSet; +class SdrEdgeObj; +class SdrView; +class SdrObjList; + +/************************************************************************* +|* +|* SvxXConnectionPreview +|* +\************************************************************************/ +class SVX_DLLPUBLIC SvxXConnectionPreview : public Control +{ + friend class SvxConnectionPage; + +private: + const SfxItemSet& rAttrs; + SdrEdgeObj* pEdgeObj; + SdrObjList* pObjList; + const SdrView* pView; + + SVX_DLLPRIVATE void SetStyles(); +public: + SvxXConnectionPreview( Window* pParent, const ResId& rResId, + const SfxItemSet& rInAttrs ); + ~SvxXConnectionPreview(); + + virtual void Paint( const Rectangle& rRect ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + + void SetAttributes( const SfxItemSet& rInAttrs ); + USHORT GetLineDeltaAnz(); + + void Construct(); + void SetView( const SdrView* pSdrView ) { pView = pSdrView; } + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + + +#endif // _SVX_CONNCTRL_HXX + diff --git a/svx/inc/databaseregistrationui.hxx b/svx/inc/databaseregistrationui.hxx new file mode 100644 index 000000000000..0bded1307815 --- /dev/null +++ b/svx/inc/databaseregistrationui.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: databaseregistrationui.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_DATABASE_REGISTRATION_UI_HXX +#define SVX_DATABASE_REGISTRATION_UI_HXX + +#include "svx/svxdllapi.h" +#include <tools/solar.h> + +class Window; + +#define SID_SB_POOLING_ENABLED (RID_OFA_START + 247) +#define SID_SB_DRIVER_TIMEOUTS (RID_OFA_START + 248) +#define SID_SB_DB_REGISTER (RID_OFA_START + 249) + +//........................................................................ +namespace svx +{ +//........................................................................ + + /** opens a dialog which allows the user to administrate the database registrations + */ + USHORT SVX_DLLPUBLIC administrateDatabaseRegistration( Window* _parentWindow ); + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // SVX_DATABASE_REGISTRATION_UI_HXX diff --git a/svx/inc/dbexch.hrc b/svx/inc/dbexch.hrc new file mode 100644 index 000000000000..2f47ca1a2bd5 --- /dev/null +++ b/svx/inc/dbexch.hrc @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dbexch.hrc,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DBEXCH_HRC +#define _SVX_DBEXCH_HRC + +// Format zum Uebertragen von Daten aus dem DatenbankBrowser +// Format: "Datenbankname";"Tabellen/QueryName"; 1/0(fuer Tabelle/Abfrage); SQL-Statement;Selektionsliste +// Name der Tabelle kann leer sein +// Feldtrenner ist "ASCII 11" !!!! +// Selektionsliste:"" // alle selektiert +// | "1;2;...n" // Selektierte Saetze, Start bei 1 +#define SBA_DATAEXCHANGE_FORMAT "SBA-DATAFORMAT" + +// Feldtrenner ist "ASCII 11" !!!! +// Format zum Uebertragen von Feldname aus dem DatenbankBrowser +// "Datenbankname";"Tabellen/QueryName";0(Tabelle) / 1(Abfrage) / 2(SQL) / 3(NATIVE_SQL);"Feldname" +#define SBA_FIELDEXCHANGE_FORMAT "SBA-FIELDFORMAT" + +// Feldtrenner ist "ASCII 11" !!!! +// Format zum Uebertragen von Feldinhalten aus dem DatenbankBrowser +// "Datenbankname";"Tabellen/QueryName";1/0(fuer Tabelle/Abfrage);"Feldname";"FeldInhalt" +#define SBA_FIELDDATAEXCHANGE_FORMAT "SBA-FIELDDATAFORMAT" + +// Office-internes Format (entspricht der private-URL ) +// Wird vom Writer und Calc benutzt, wenn Explorer-Contents gedraggt werden +#define SBA_PRIVATEURL_EXCHANGE_FORMAT "SBA-PRIVATEURLFORMAT" + +// SBA-internes Format fuer das erzeugen von Joins in der RelationsShell +#define SBA_JOIN_EXCHANGE_FORMAT "SBA-JOINFORMAT" + + +#endif // _SVX_DBEXCH_HRC + diff --git a/svx/inc/dgdefs_.hxx b/svx/inc/dgdefs_.hxx new file mode 100644 index 000000000000..accc5e2a67d0 --- /dev/null +++ b/svx/inc/dgdefs_.hxx @@ -0,0 +1,344 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dgdefs_.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define optlingu_0a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define insctrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define insctrl_03 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define insctrl_06 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define zoomctrl_03 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define zoomctrl_05 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define pszctrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define selctrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define selctrl_02 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define selctrl_05 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define modctrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_02 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_08 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_09 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_0a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_11 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_12 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_13 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_35 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_37 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_38 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_39 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_3a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_3c SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_3d SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_3e SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_3f SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_40 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_41 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_42 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_43 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_44 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_45 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_46 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_47 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_48 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_49 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_4a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_4e SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_4f SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_53 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_54 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_58 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_59 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_5c SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_5f SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_63 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_64 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_65 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define tbcontrl_66 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define linectrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define linectrl_03 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define linectrl_04 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define linectrl_05 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define linectrl_06 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define linectrl_08 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define linectrl_09 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define linectrl_0a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define linectrl_0e SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define fillctrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define fillctrl_03 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define fillctrl_05 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define fillctrl_06 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define fillctrl_08 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define itemwin_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define itemwin_08 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define itemwin_10 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define itemwin_12 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define itemwin_19 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define itemwin_1f SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define layctrl_09 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define layctrl_0d SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) +#define pszctrl_03 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define tcovmain_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define pszctrl_04 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define pszctrl_05 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define tcovidle_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define optgrid_02 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define optgrid_17 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define optgrid_16 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define optgrid_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define optgrid_18 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define optgrid_15 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define modctrl_02 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define modctrl_04 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define adritem_07 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define adritem_28 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define optgrid_12 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) +#define optpath_01 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) +#define optpath_02 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) +#define optpath_04 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) +#define optitems_01 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) +#define optitems_02 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) +#define optitems_04 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) +#define optgenrl_01 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) +#define optgenrl_02 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) +#define optgenrl_04 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) +#define optgenrl_06 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) +#define optgenrl_08 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) +#define adritem_25 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) +#define optgenrl_0b SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE) +#define adritem_04 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE) +#define opttypes_01 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE) +#define optlingu_01 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE) +#define optlingu_03 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE) +#define optlingu_05 SEG_SEGCLASS(STARTSLICE_SEG004,STARTSLICE_CODE) +#define optlingu_09 SEG_SEGCLASS(STARTSLICE_SEG004,STARTSLICE_CODE) +#define optgrid_03 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) +#define optgrid_07 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) +#define optgrid_08 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) +#define optgrid_0a SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE) +#define linectrl_0c SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE) +#define itemwin_0a SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE) +#define linectrl_0d SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE) +#define fillctrl_04 SEG_SEGCLASS(STARTSLICE_SEG007,STARTSLICE_CODE) +#define optpath_07 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) +#define optitems_06 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) +#define optitems_07 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) +#define optitems_0b SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) +#define optgenrl_03 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) +#define optgrid_09 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) +#define tbcontrl_36 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) +#define fillctrl_07 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) +#define optpath_03 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) +#define optlingu_04 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) +#define pszctrl_02 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) +#define tbcontrl_3b SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) +#define optgenrl_07 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) +#define optgenrl_0a SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) +#define adritem_06 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) +#define adritem_29 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) +#define optgrid_11 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) +#define optgrid_13 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) +#define insctrl_02 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) +#define tbcontrl_4b SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) +#define tbcontrl_50 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) +#define tbcontrl_55 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) +#define linectrl_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define linectrl_07 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define linectrl_0b SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define fillctrl_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define itemwin_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define itemwin_09 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define itemwin_11 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define itemwin_1a SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define itemwin_20 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define layctrl_0a SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define layctrl_0e SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) +#define fntctl_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntctl_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntctl_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntctl_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntctl_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntctl_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntctl_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntszctl_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntszctl_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntszctl_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntszctl_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define fntszctl_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optpath_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optpath_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_08 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_09 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_0a SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optdict_0b SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optitems_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optitems_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optitems_08 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optitems_09 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optitems_0a SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optitems_0c SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optitems_0d SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optitems_0e SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optspell_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optspell_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optspell_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optspell_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optspell_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optspell_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optspell_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgenrl_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgenrl_09 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define adritem_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define adritem_26 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define adritem_27 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define adritem_2a SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define opttypes_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optlingu_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optlingu_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optlingu_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optlingu_08 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgrid_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgrid_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgrid_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgrid_0b SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgrid_0c SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgrid_0d SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgrid_0e SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgrid_0f SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgrid_10 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define optgrid_14 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define insctrl_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define insctrl_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define zoomctrl_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define zoomctrl_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define zoomctrl_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define zoomctrl_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define selctrl_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define selctrl_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define modctrl_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define tbcontrl_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define tbcontrl_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define tbcontrl_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) +#define tbcontrl_05 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_06 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_07 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_0b SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_0c SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_0d SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_0e SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_0f SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_10 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_14 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_15 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_16 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_17 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_18 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_19 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_1a SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_1b SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_1c SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_1d SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_1e SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_1f SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_20 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_21 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_22 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_23 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_24 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_25 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_26 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_27 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_28 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_29 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_2a SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_2b SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_2c SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_2d SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_2e SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_2f SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_30 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_31 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_32 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_33 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_34 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_4c SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_4d SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_51 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_52 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_56 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_57 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_5a SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_5b SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_5d SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_5e SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_60 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_61 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define tbcontrl_62 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define fillctrl_09 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define itemwin_03 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define itemwin_04 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define itemwin_05 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define itemwin_06 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define itemwin_07 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define itemwin_0b SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) +#define itemwin_0c SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_0d SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_0e SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_0f SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_13 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_14 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_15 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_16 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_17 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_18 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_1b SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_1c SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_1d SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_1e SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_21 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_22 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_23 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_24 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_25 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define itemwin_26 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_01 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_02 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_03 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_04 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_05 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_06 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_07 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_08 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_0b SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_0c SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_0f SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) +#define layctrl_10 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) diff --git a/svx/inc/dialcontrol.hxx b/svx/inc/dialcontrol.hxx new file mode 100644 index 000000000000..386a8dd4c706 --- /dev/null +++ b/svx/inc/dialcontrol.hxx @@ -0,0 +1,141 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dialcontrol.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_DIALCONTROL_HXX +#define SVX_DIALCONTROL_HXX + +#include <memory> +#include <vcl/ctrl.hxx> +#include <sfx2/itemconnect.hxx> +#include "svx/svxdllapi.h" + +class NumericField; + +namespace svx { + +// ============================================================================ + +struct DialControl_Impl; + +/** This control allows to input a rotation angle, visualized by a dial. + + Usage: A single click sets a rotation angle rounded to steps of 15 degrees. + Dragging with the left mouse button sets an exact rotation angle. Pressing + the ESCAPE key during mouse drag cancels the operation and restores the old + state of the control. + + It is possible to link a numeric field to this control using the function + SetLinkedField(). The DialControl will take full control of this numeric + field: + - Sets the rotation angle to the numeric field in mouse operations. + - Shows the value entered/modified in the numeric field. + - Enables/disables/shows/hides the field according to own state changes. + */ +class SVX_DLLPUBLIC DialControl : public Control +{ +public: + explicit DialControl( Window* pParent, const Size& rSize, const Font& rFont, WinBits nWinStyle = 0 ); + explicit DialControl( Window* pParent, const Size& rSize, WinBits nWinStyle = 0 ); + explicit DialControl( Window* pParent, const ResId& rResId ); + virtual ~DialControl(); + + virtual void Paint( const Rectangle& rRect ); + + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void LoseFocus(); + + /** Returns true, if the control is not in "don't care" state. */ + bool HasRotation() const; + /** Sets the control to "don't care" state. */ + void SetNoRotation(); + + /** Returns the current rotation angle in 1/100 degrees. */ + sal_Int32 GetRotation() const; + /** Sets the rotation to the passed value (in 1/100 degrees). */ + void SetRotation( sal_Int32 nAngle ); + + /** Links the passed numeric edit field to the control (bi-directional). */ + void SetLinkedField( NumericField* pField ); + /** Returns the linked numeric edit field, or 0. */ + NumericField* GetLinkedField() const; + + /** The passed handler is called whenever the totation value changes. */ + void SetModifyHdl( const Link& rLink ); + /** Returns the current modify handler. */ + const Link& GetModifyHdl() const; + +private: + void Init( const Size& rWinSize, const Font& rWinFont ); + void Init( const Size& rWinSize ); + void InvalidateControl(); + + void ImplSetRotation( sal_Int32 nAngle, bool bBroadcast ); + void ImplSetFieldLink( const Link& rLink ); + + void HandleMouseEvent( const Point& rPos, bool bInitial ); + void HandleEscapeEvent(); + + DECL_LINK( LinkedFieldModifyHdl, NumericField* ); + + std::auto_ptr< DialControl_Impl > mpImpl; +}; + +// ============================================================================ + +/** Wrapper for usage of a DialControl in item connections. */ +class SVX_DLLPUBLIC DialControlWrapper : public sfx::SingleControlWrapper< DialControl, sal_Int32 > +{ +public: + explicit DialControlWrapper( DialControl& rDial ); + + virtual bool IsControlDontKnow() const; + virtual void SetControlDontKnow( bool bSet ); + + virtual sal_Int32 GetControlValue() const; + virtual void SetControlValue( sal_Int32 nValue ); +}; + +// ---------------------------------------------------------------------------- + +/** An item<->control connection for a DialControl. */ +typedef sfx::ItemControlConnection< sfx::Int32ItemWrapper, DialControlWrapper > DialControlConnection; + +// ============================================================================ + +} // namespace svx + +#endif + diff --git a/svx/inc/dialdll.hxx b/svx/inc/dialdll.hxx new file mode 100644 index 000000000000..49b534244b4f --- /dev/null +++ b/svx/inc/dialdll.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dialdll.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DIALDLL_HXX +#define _SVX_DIALDLL_HXX + +// class SvxDialogDll ---------------------------------------------------- + +class SvxDialogDll +{ +public: + SvxDialogDll(); + ~SvxDialogDll(); + + static void ResetResMgr(); +}; + +#endif + diff --git a/svx/inc/dlgutil.hxx b/svx/inc/dlgutil.hxx new file mode 100644 index 000000000000..9cf995814674 --- /dev/null +++ b/svx/inc/dlgutil.hxx @@ -0,0 +1,133 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dlgutil.hxx,v $ + * $Revision: 1.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DLGUTIL_HXX +#define _SVX_DLGUTIL_HXX + +// include --------------------------------------------------------------- +#ifndef _FIELD_HXX +#include <vcl/field.hxx> +#endif +#include <svl/poolitem.hxx> +#include <svl/intitem.hxx> +#include "svx/svxdllapi.h" + +// macro ----------------------------------------------------------------- + +// typedef --------------------------------------------------------------- + +typedef long (*FUNC_CONVERT)(long); + +// Functions ------------------------------------------------------------- + +// HM- und LanguageStrings aus der Resource laden +SVX_DLLPUBLIC String GetLanguageString( LanguageType eType ); +SVX_DLLPUBLIC String GetDicInfoStr( const String& rName, const USHORT nLang, + const BOOL bNeg ); + +// FieldUnit im MetricField oder -Box umsetzen +SVX_DLLPUBLIC void SetFieldUnit( MetricField& rCtrl, + FieldUnit eUnit, BOOL bAll = FALSE ); +SVX_DLLPUBLIC void SetFieldUnit( MetricBox& rCtrl, + FieldUnit eUnit, BOOL bAll = FALSE ); + +SVX_DLLPUBLIC FieldUnit GetModuleFieldUnit( const SfxItemSet* pSet = NULL ); + +// Metriken umrechnen +SVX_DLLPUBLIC long CalcToUnit( float nIn, SfxMapUnit eUnit ); +SVX_DLLPUBLIC long CalcToPoint( long nIn, SfxMapUnit eUnit, USHORT nFaktor ); + +SVX_DLLPUBLIC long ItemToControl( long nIn, SfxMapUnit eItem, SfxFieldUnit eCtrl ); +long ControlToItem( long nIn, SfxFieldUnit eCtrl, SfxMapUnit eItem ); + +SVX_DLLPUBLIC FieldUnit MapToFieldUnit( const SfxMapUnit eUnit ); +MapUnit FieldToMapUnit( const SfxFieldUnit eUnit ); + +long ConvertValueToMap( long nVal, SfxMapUnit eUnit ); +long ConvertValueToUnit( long nVal, SfxMapUnit eUnit ); + +SVX_DLLPUBLIC void SetMetricValue( MetricField& rField, + long lCoreValue, SfxMapUnit eUnit ); +SVX_DLLPUBLIC long GetCoreValue( const MetricField& rField, SfxMapUnit eUnit ); + +// to Twips +long CMToTwips( long nIn ); +long MMToTwips( long nIn ); +long InchToTwips( long nIn ); +SVX_DLLPUBLIC long PointToTwips( long nIn ); +long PicaToTwips( long nIn ); + +// to CM +long TwipsToCM( long nIn ); +long InchToCM( long nIn ); +long MMToCM( long nIn ); +long PointToCM( long nIn ); +long PicaToCM( long nIn ); + +// to MM +long TwipsToMM( long nIn ); +long CMToMM( long nIn ); +long InchToMM( long nIn ); +long PointToMM( long nIn ); +long PicaToMM( long nIn ); + +// to Inch +long TwipsToInch(long nIn ); +long CMToInch(long nIn ); +long MMToInch(long nIn ); +long PointToInch(long nIn ); +long PicaToInch(long nIn ); + +// to Point +long TwipsToPoint(long nIn ); +long InchToPoint(long nIn ); +long CMToPoint(long nIn ); +long MMToPoint(long nIn ); +long PicaToPoint(long nIn ); + +// To Pica +long TwipsToPica(long nIn ); +long InchToPica(long nIn ); +long PointToPica(long nIn ); +long CMToPica(long nIn ); +long MMToPica(long nIn ); + +// generische Wandlung +long TransformMetric( long nVal, FieldUnit aOld, FieldUnit aNew ); + +// replacement of the SfxIniManager +String ConvertPosSizeToIniString( const Point& rPos, const Size& rSize ); +sal_Bool ConvertIniStringToPosSize( const String& rIniStr, Point& rPos, Size& rSize ); + + +#define OUTPUT_DRAWMODE_COLOR (DRAWMODE_DEFAULT) +#define OUTPUT_DRAWMODE_CONTRAST (DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT) + +#endif + diff --git a/svx/inc/dragmt3d.hxx b/svx/inc/dragmt3d.hxx new file mode 100644 index 000000000000..69c324ce1f62 --- /dev/null +++ b/svx/inc/dragmt3d.hxx @@ -0,0 +1,156 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dragmt3d.hxx,v $ + * $Revision: 1.8.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_DRAGMT3D_HXX +#define _E3D_DRAGMT3D_HXX + +#include <svx/svddrgmt.hxx> +#include <svx/view3d.hxx> +#include <basegfx/polygon/b3dpolypolygon.hxx> +#include <vcl/timer.hxx> +#include <basegfx/matrix/b3dhommatrix.hxx> + +class E3dScene; + +/************************************************************************* +|* +|* Parameter fuer Interaktion eines 3D-Objektes +|* +\************************************************************************/ +class E3dDragMethodUnit +{ +public: + E3dObject* mp3DObj; + basegfx::B3DPolyPolygon maWireframePoly; + basegfx::B3DHomMatrix maDisplayTransform; + basegfx::B3DHomMatrix maInvDisplayTransform; + basegfx::B3DHomMatrix maInitTransform; + basegfx::B3DHomMatrix maTransform; + sal_Int32 mnStartAngle; + sal_Int32 mnLastAngle; + + E3dDragMethodUnit() + : mp3DObj(0), + maWireframePoly(), + maDisplayTransform(), + maInvDisplayTransform(), + maInitTransform(), + maTransform(), + mnStartAngle(0), + mnLastAngle(0) + {} +}; + +/************************************************************************* +|* +|* Ableitung von SdrDragMethod fuer 3D-Objekte +|* +\************************************************************************/ + +class E3dDragMethod : public SdrDragMethod +{ +protected: + ::std::vector< E3dDragMethodUnit > maGrp; + E3dDragConstraint meConstraint; + Point maLastPos; + Rectangle maFullBound; + bool mbMoveFull; + bool mbMovedAtAll; + +public: + TYPEINFO(); + E3dDragMethod( + SdrDragView &rView, + const SdrMarkList& rMark, + E3dDragConstraint eConstr = E3DDRAG_CONSTR_XYZ, + BOOL bFull = FALSE); + + virtual void TakeSdrDragComment(String& rStr) const; + virtual bool BeginSdrDrag(); + virtual void MoveSdrDrag(const Point& rPnt); + virtual void CancelSdrDrag(); + virtual bool EndSdrDrag(bool bCopy); + + E3dView& Get3DView() { return (E3dView&)getSdrDragView(); } + + // for migration from XOR to overlay + virtual void CreateOverlayGeometry(::sdr::overlay::OverlayManager& rOverlayManager); +}; + + +/************************************************************************* +|* +|* Ableitung von SdrDragMethod zum Drehen von 3D-Objekten +|* +\************************************************************************/ + +class E3dDragRotate : public E3dDragMethod +{ + basegfx::B3DPoint maGlobalCenter; + +public: + TYPEINFO(); + E3dDragRotate( + SdrDragView &rView, + const SdrMarkList& rMark, + E3dDragConstraint eConstr = E3DDRAG_CONSTR_XYZ, + BOOL bFull = FALSE); + + virtual void MoveSdrDrag(const Point& rPnt); + virtual Pointer GetSdrDragPointer() const; +}; + + +/************************************************************************* +|* +|* Ableitung von SdrDragMethod zum Verschieben von 3D-Subobjekten +|* +\************************************************************************/ + +class E3dDragMove : public E3dDragMethod +{ + SdrHdlKind meWhatDragHdl; + Point maScaleFixPos; + +public: + TYPEINFO(); + E3dDragMove( + SdrDragView &rView, + const SdrMarkList& rMark, + SdrHdlKind eDrgHdl = HDL_MOVE, + E3dDragConstraint eConstr = E3DDRAG_CONSTR_XYZ, + BOOL bFull = FALSE); + + virtual void MoveSdrDrag(const Point& rPnt); + virtual Pointer GetSdrDragPointer() const; +}; + + +#endif // _E3D_DRAGMT3D_HXX diff --git a/svx/inc/drawitem.hxx b/svx/inc/drawitem.hxx new file mode 100644 index 000000000000..f9bb93b47136 --- /dev/null +++ b/svx/inc/drawitem.hxx @@ -0,0 +1,249 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: drawitem.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DRAWITEM_HXX +#define _SVX_DRAWITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/drawing/LineDash.hpp> +#include "svx/svxdllapi.h" + +//================================================================== +// SvxColorTableItem +//================================================================== + +class XColorTable; + +class SVX_DLLPUBLIC SvxColorTableItem: public SfxPoolItem +{ + XColorTable* pColorTable; + +public: + TYPEINFO(); + SvxColorTableItem(); + SvxColorTableItem( XColorTable* pTable, + USHORT nWhich ); + SvxColorTableItem( const SvxColorTableItem& ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); + + XColorTable* GetColorTable() const { return pColorTable; } + void SetColorTable( XColorTable* pTable ) { + pColorTable = pTable; } +}; + + +//================================================================== +// SvxGradientListItem +//================================================================== + + +class XGradientList; + +class SVX_DLLPUBLIC SvxGradientListItem: public SfxPoolItem +{ + XGradientList* pGradientList; + +public: + TYPEINFO(); + SvxGradientListItem(); + SvxGradientListItem( XGradientList* pList, + USHORT nWhich ); + SvxGradientListItem( const SvxGradientListItem& ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); + + XGradientList* GetGradientList() const { return pGradientList; } + void SetGradientList( XGradientList* pList ) { + pGradientList = pList; } +}; + + + +//================================================================== +// SvxHatchListItem +//================================================================== + + +class XHatchList; + +class SVX_DLLPUBLIC SvxHatchListItem: public SfxPoolItem +{ + XHatchList* pHatchList; + +public: + TYPEINFO(); + SvxHatchListItem(); + SvxHatchListItem( XHatchList* pList, + USHORT nWhich ); + SvxHatchListItem( const SvxHatchListItem& ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); + + XHatchList* GetHatchList() const { return pHatchList; } + void SetHatchList( XHatchList* pList ) { + pHatchList = pList; } +}; + + + +//================================================================== +// SvxBitmapListItem +//================================================================== + + +class XBitmapList; + +class SVX_DLLPUBLIC SvxBitmapListItem: public SfxPoolItem +{ + XBitmapList* pBitmapList; + +public: + TYPEINFO(); + SvxBitmapListItem(); + SvxBitmapListItem( XBitmapList* pBL, + USHORT nWhich ); + SvxBitmapListItem( const SvxBitmapListItem& ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); + + XBitmapList* GetBitmapList() const { return pBitmapList; } + void SetBitmapList( XBitmapList* pList ) { + pBitmapList = pList; } +}; + + + +//================================================================== +// SvxDashListItem +//================================================================== + + +class XDashList; + +class SVX_DLLPUBLIC SvxDashListItem: public SfxPoolItem +{ + XDashList* pDashList; + +public: + TYPEINFO(); + SvxDashListItem(); + SvxDashListItem( XDashList* pList, + USHORT nWhich ); + SvxDashListItem( const SvxDashListItem& ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); + + XDashList* GetDashList() const { return pDashList; } + void SetDashList( XDashList* pList ); +}; + + + +//================================================================== +// SvxLineEndListItem +//================================================================== + + +class XLineEndList; + +class SVX_DLLPUBLIC SvxLineEndListItem: public SfxPoolItem +{ + XLineEndList* pLineEndList; + +public: + TYPEINFO(); + SvxLineEndListItem(); + SvxLineEndListItem( XLineEndList* pList, + USHORT nWhich ); + SvxLineEndListItem( const SvxLineEndListItem& ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); + + XLineEndList* GetLineEndList() const { return pLineEndList; } + void SetLineEndList( XLineEndList* pList ) { + pLineEndList = pList; } +}; + + + + +#endif + diff --git a/svx/inc/drawuiks.hxx b/svx/inc/drawuiks.hxx new file mode 100644 index 000000000000..893a5400f485 --- /dev/null +++ b/svx/inc/drawuiks.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: drawuiks.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDUIKS_HXX +#define _SDUIKS_HXX + +#include <usr/uiks.hxx> + +#define UIK_SHAPEFACTORY UIK_DRAWING(00) +#define UIK_POLYGONFACTORY UIK_DRAWING(01) +#define UIK_TEXTSHAPEFACTORY UIK_DRAWING(02) +#define UIK_SNAPFACTORY UIK_DRAWING(03) + +#define UIK_DRAWPAGES UIK_DRAWING(10) +#define UIK_DRAWPAGESUMMARIZER UIK_DRAWING(11) +#define UIK_DRAWPAGEXPANDER UIK_DRAWING(12) + +#define UIK_XSHAPEDESCRIPTOR UIK_DRAWING(20) +#define UIK_XSHAPE UIK_DRAWING(21) +#define UIK_XSHAPECONNECTOR UIK_DRAWING(22) +#define UIK_XCONNECTABLESHAPE UIK_DRAWING(23) +#define UIK_XSHAPE3D UIK_DRAWING(24) +#define UIK_XSHAPEGROUP UIK_DRAWING(25) +#define UIK_XSHAPEMIRROR UIK_DRAWING(26) +#define UIK_XSHAPEALIGNER UIK_DRAWING(27) +#define UIK_XSHAPEARRANGER UIK_DRAWING(28) +#define UIK_XCONVERTABLESHAPE UIK_DRAWING(29) +#define UIK_XANIMATEDSHAPEFACTORY UIK_DRAWING(2a) + +#define UIK_DRAWPAGE UIK_DRAWING(30) +#define UIK_SHAPES UIK_DRAWING(31) +#define UIK_XSHAPEGROUPER UIK_DRAWING(35) +#define UIK_XSHAPECOMBINER UIK_DRAWING(36) +#define UIK_SHAPEBINDER UIK_DRAWING(37) +#define UIK_DRAWLAYER UIK_DRAWING(38) + +#define SD_UIK_PRESENTATION UIK_DRAWING(40) +#define SD_UIK_PRESENTATION_NAVIGATION UIK_DRAWING(41) +#define SD_UIK_CUSTOM_PRESENTATION UIK_DRAWING(42) +#define SD_UIK_CUSTOM_PRESENTATIONS UIK_DRAWING(43) +//#define SD_UIK_CUSTOM_PRESENTATIONS UIK_DRAWING(44) + +#define SD_UIK_ZOOM UIK_DRAWING(50) +#define SD_UIK_DRAW_VIEW UIK_DRAWING(51) +#define SD_UIK_OUTLINE_VIEW UIK_DRAWING(52) +#define SD_UIK_SLIDE_VIEW UIK_DRAWING(53) + +#define SD_UIK_PRESENTATION_STYLES UIK_DRAWING(60) + +#endif diff --git a/svx/inc/editstat.hxx b/svx/inc/editstat.hxx new file mode 100644 index 000000000000..71f65dbe6657 --- /dev/null +++ b/svx/inc/editstat.hxx @@ -0,0 +1,153 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: editstat.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _EDITSTAT_HXX +#define _EDITSTAT_HXX + +#include <tools/string.hxx> +#include <i18npool/lang.h> + +#define EE_CNTRL_USECHARATTRIBS 0x00000001 // Verwendung harter ZeichenAttr. +#define EE_CNTRL_USEPARAATTRIBS 0x00000002 // Verwendung von AbsatzAttr. +#define EE_CNTRL_CRSRLEFTPARA 0x00000004 // Cursor ist in einen anderen Absatz gewandert +#define EE_CNTRL_DOIDLEFORMAT 0x00000008 // Idle-Formatierung +#define EE_CNTRL_PASTESPECIAL 0x00000010 // Allow PasteSpecial +#define EE_CNTRL_AUTOINDENTING 0x00000020 // Automatisches einruecken +#define EE_CNTRL_UNDOATTRIBS 0x00000040 // Undo fuer Attribute.... +#define EE_CNTRL_ONECHARPERLINE 0x00000080 // Ein Zeichen pro Zeile +#define EE_CNTRL_NOCOLORS 0x00000100 // Engine: Keine Farben +#define EE_CNTRL_OUTLINER 0x00000200 // Sonderbehandlung Outliner/Gliederungsmodus +#define EE_CNTRL_OUTLINER2 0x00000400 // Sonderbehandlung Outliner/Seite +#define EE_CNTRL_ALLOWBIGOBJS 0x00000800 // PortionInfo in Textobjekten +#define EE_CNTRL_ONLINESPELLING 0x00001000 // Waehrend des editieren Spelling +#define EE_CNTRL_STRETCHING 0x00002000 // Stretch-Modus +#define EE_CNTRL_MARKFIELDS 0x00004000 // Felder farblich hinterlegen +#define EE_CNTRL_URLSFXEXECUTE 0x00008000 // !!!OLD!!!: SFX-URL-Execute. +#define EE_CNTRL_RESTOREFONT 0x00010000 // Font im OutDev restaurieren +#define EE_CNTRL_RTFSTYLESHEETS 0x00020000 // Stylesheets bei Import verwenden +//#define EE_CNTRL_NOREDLINES 0x00040000 // Keine RedLines bei OnlineSpellError /* removed #i91949 */ +#define EE_CNTRL_AUTOCORRECT 0x00080000 // AutoKorrektur +#define EE_CNTRL_AUTOCOMPLETE 0x00100000 // AutoComplete +#define EE_CNTRL_AUTOPAGESIZEX 0x00200000 // Papierbreite an Text anpassen +#define EE_CNTRL_AUTOPAGESIZEY 0x00400000 // Papierhoehe an Text anpassen +#define EE_CNTRL_AUTOPAGESIZE (EE_CNTRL_AUTOPAGESIZEX|EE_CNTRL_AUTOPAGESIZEY) +#define EE_CNTRL_TABINDENTING 0x00800000 // Einruecken mit Tab +#define EE_CNTRL_FORMAT100 0x01000000 // Immer nach 100% formatieren +#define EE_CNTRL_ULSPACESUMMATION 0x02000000 // MS Compat: SA und SB aufsummieren, nicht maximalwert +#define EE_CNTRL_ULSPACEFIRSTPARA 0x04000000 // MS Compat: SB auch beim ersten Absatz auswerten + +#define EV_CNTRL_AUTOSCROLL 0x00000001 // Autom. Scrollen horiz. +#define EV_CNTRL_BIGSCROLL 0x00000002 // Weiter Scrollen, als nur zum Cursor +#define EV_CNTRL_ENABLEPASTE 0x00000004 // Paste erlauben +#define EV_CNTRL_SINGLELINEPASTE 0x00000008 // View: Paste in Eingabezeile... +#define EV_CNTRL_OVERWRITE 0x00000010 // Ueberschreibmodus +#define EV_CNTRL_INVONEMORE 0x00000020 // Ein Pixel mehr invalidieren +#define EV_CNTRL_AUTOSIZEX 0x00000040 // Automatisch an Textbreite anpassen +#define EV_CNTRL_AUTOSIZEY 0x00000080 // Automatisch an Texthoehe anpassen +#define EV_CNTRL_AUTOSIZE (EV_CNTRL_AUTOSIZEX|EV_CNTRL_AUTOSIZEY) + +#define EE_STAT_HSCROLL 0x00000001 +#define EE_STAT_VSCROLL 0x00000002 +#define EE_STAT_CURSOROUT 0x00000004 +#define EE_STAT_CRSRMOVEFAIL 0x00000008 +#define EE_STAT_CRSRLEFTPARA 0x00000010 +#define EE_STAT_TEXTWIDTHCHANGED 0x00000020 +#define EE_STAT_TEXTHEIGHTCHANGED 0x00000040 +#define EE_STAT_WRONGWORDCHANGED 0x00000080 +// #define EE_STAT_MODIFIED 0x00000100 + +// Nur fuer Update: +#define EE_CNTRL_AUTOCENTER EE_CNTRL_AUTOPAGESIZE +#define EE_STAT_GROWY EE_STAT_TEXTHEIGHTCHANGED + +/* + EE_STAT_CRSRLEFTPARA zur Zeit bei Cursorbewegungen und Return. +*/ + +inline void SetFlags( ULONG& rBits, const ULONG nMask, FASTBOOL bOn ) +{ + if ( bOn ) + rBits |= nMask; + else + rBits &= ~nMask; +} + +class EditStatus +{ +protected: + ULONG nStatusBits; + ULONG nControlBits; + USHORT nPrevPara; // fuer EE_STAT_CRSRLEFTPARA + +public: + EditStatus() { nStatusBits = 0; nControlBits = 0; nPrevPara = 0xFFFF; } + + void Clear() { nStatusBits = 0; } + void SetControlBits( ULONG nMask, FASTBOOL bOn ) + { SetFlags( nControlBits, nMask, bOn ); } + + ULONG GetStatusWord() const { return nStatusBits; } + ULONG& GetStatusWord() { return nStatusBits; } + + ULONG GetControlWord() const { return nControlBits; } + ULONG& GetControlWord() { return nControlBits; } + + USHORT GetPrevParagraph() const { return nPrevPara; } + USHORT& GetPrevParagraph() { return nPrevPara; } +}; + +#define SPELLCMD_IGNOREWORD 0x0001 +#define SPELLCMD_STARTSPELLDLG 0x0002 +#define SPELLCMD_ADDTODICTIONARY 0x0003 +#define SPELLCMD_WORDLANGUAGE 0x0004 +#define SPELLCMD_PARALANGUAGE 0x0005 + +struct SpellCallbackInfo +{ + USHORT nCommand; + String aWord; + LanguageType eLanguage; + + SpellCallbackInfo( USHORT nCMD, const String& rWord ) + : aWord( rWord ) + { + nCommand = nCMD; + eLanguage = LANGUAGE_DONTKNOW; + } + + SpellCallbackInfo( USHORT nCMD, LanguageType eLang ) + { + nCommand = nCMD; + eLanguage = eLang; + } +}; + +#endif // _EDITSTAT_HXX + diff --git a/svx/inc/editund2.hxx b/svx/inc/editund2.hxx new file mode 100644 index 000000000000..65c83dd4f0e8 --- /dev/null +++ b/svx/inc/editund2.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: editund2.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _EDITUND2_HXX +#define _EDITUND2_HXX + +#include "svx/svxdllapi.h" +#include <svl/undo.hxx> + +class ImpEditEngine; + +class SVX_DLLPUBLIC EditUndoManager : public SfxUndoManager +{ + using SfxUndoManager::Undo; + using SfxUndoManager::Redo; + +private: + ImpEditEngine* pImpEE; +public: + EditUndoManager( ImpEditEngine* pImpEE ); + + virtual BOOL Undo( USHORT nCount=1 ); + virtual BOOL Redo( USHORT nCount=1 ); +}; + +// ----------------------------------------------------------------------- +// EditUndo +// ------------------------------------------------------------------------ +class SVX_DLLPUBLIC EditUndo : public SfxUndoAction +{ +private: + USHORT nId; + ImpEditEngine* pImpEE; + +public: + TYPEINFO(); + EditUndo( USHORT nI, ImpEditEngine* pImpEE ); + virtual ~EditUndo(); + + ImpEditEngine* GetImpEditEngine() const { return pImpEE; } + + virtual void Undo() = 0; + virtual void Redo() = 0; + + virtual BOOL CanRepeat(SfxRepeatTarget&) const; + virtual String GetComment() const; + virtual USHORT GetId() const; +}; + +#endif // _EDITUND2_HXX + + diff --git a/svx/inc/edtspell.hxx b/svx/inc/edtspell.hxx new file mode 100644 index 000000000000..15e180342d85 --- /dev/null +++ b/svx/inc/edtspell.hxx @@ -0,0 +1,188 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: edtspell.hxx,v $ + * $Revision: 1.10 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _EDTSPELL_HXX +#define _EDTSPELL_HXX + +#include <svx/svxbox.hxx> +#include <svx/svxenum.hxx> +#include <svx/splwrap.hxx> +#include <svx/svxacorr.hxx> +#include <com/sun/star/uno/Reference.h> +#include "svx/svxdllapi.h" + +namespace com { namespace sun { namespace star { namespace linguistic2 { + class XSpellChecker1; +}}}} + + +class EditView; +class ImpEditEngine; +class ContentNode; + +class EditSpellWrapper : public SvxSpellWrapper +{ +private: + EditView* pEditView; + void CheckSpellTo(); + +protected: + virtual void SpellStart( SvxSpellArea eArea ); + virtual BOOL SpellContinue(); // Bereich pruefen + virtual void ReplaceAll( const String &rNewText, INT16 nLanguage ); + virtual void SpellEnd(); + virtual BOOL SpellMore(); + virtual BOOL HasOtherCnt(); + virtual void ScrollArea(); + virtual void ChangeWord( const String& rNewWord, const USHORT nLang ); + virtual void ChangeThesWord( const String& rNewWord ); + virtual void AutoCorrect( const String& rOldWord, const String& rNewWord ); + +public: + EditSpellWrapper( Window* pWin, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > &xChecker, + BOOL bIsStart, + BOOL bIsAllRight, EditView* pView ); + +}; + + +struct WrongRange +{ + USHORT nStart; + USHORT nEnd; + + WrongRange( USHORT nS, USHORT nE ) { nStart = nS; nEnd = nE; } +}; + +SV_DECL_VARARR( WrongRanges, WrongRange, 4, 4 ) +#define NOT_INVALID 0xFFFF + +class WrongList : private WrongRanges +{ +private: + USHORT nInvalidStart; + USHORT nInvalidEnd; + + BOOL DbgIsBuggy() const; + +public: + WrongList(); + ~WrongList(); + + BOOL IsInvalid() const { return nInvalidStart != NOT_INVALID; } + void SetValid() { nInvalidStart = NOT_INVALID; nInvalidEnd = 0; } + void MarkInvalid( USHORT nS, USHORT nE ) + { + if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) ) + nInvalidStart = nS; + if ( nInvalidEnd < nE ) + nInvalidEnd = nE; + } + + USHORT Count() const { return WrongRanges::Count(); } + + // Wenn man weiss was man tut: + WrongRange& GetObject( USHORT n ) const { return WrongRanges::GetObject( n ); } + void InsertWrong( const WrongRange& rWrong, USHORT nPos ); + + USHORT GetInvalidStart() const { return nInvalidStart; } + USHORT& GetInvalidStart() { return nInvalidStart; } + + USHORT GetInvalidEnd() const { return nInvalidEnd; } + USHORT& GetInvalidEnd() { return nInvalidEnd; } + + void TextInserted( USHORT nPos, USHORT nChars, BOOL bPosIsSep ); + void TextDeleted( USHORT nPos, USHORT nChars ); + + void ResetRanges() { Remove( 0, Count() ); } + BOOL HasWrongs() const { return Count() != 0; } + void InsertWrong( USHORT nStart, USHORT nEnd, BOOL bClearRange ); + BOOL NextWrong( USHORT& rnStart, USHORT& rnEnd ) const; + BOOL HasWrong( USHORT nStart, USHORT nEnd ) const; + BOOL HasAnyWrong( USHORT nStart, USHORT nEnd ) const; + void ClearWrongs( USHORT nStart, USHORT nEnd, const ContentNode* pNode ); + void MarkWrongsInvalid(); + + WrongList* Clone() const; + + // #i102062# + bool operator==(const WrongList& rCompare) const; +}; + +inline void WrongList::InsertWrong( const WrongRange& rWrong, USHORT nPos ) +{ + WrongRanges::Insert( rWrong, nPos ); +#ifdef DBG_UTIL + DBG_ASSERT( !DbgIsBuggy(), "Insert: WrongList kaputt!" ); +#endif +} + + + +class SVX_DLLPUBLIC EdtAutoCorrDoc : public SvxAutoCorrDoc +{ + ImpEditEngine* pImpEE; + ContentNode* pCurNode; + USHORT nCursor; + + BOOL bAllowUndoAction; + BOOL bUndoAction; + +protected: + void ImplStartUndoAction(); + +public: + EdtAutoCorrDoc( ImpEditEngine* pImpEE, ContentNode* pCurNode, USHORT nCrsr, xub_Unicode cIns ); + ~EdtAutoCorrDoc(); + + virtual BOOL Delete( USHORT nStt, USHORT nEnd ); + virtual BOOL Insert( USHORT nPos, const String& rTxt ); + virtual BOOL Replace( USHORT nPos, const String& rTxt ); + + virtual BOOL SetAttr( USHORT nStt, USHORT nEnd, USHORT nSlotId, SfxPoolItem& ); + virtual BOOL SetINetAttr( USHORT nStt, USHORT nEnd, const String& rURL ); + + virtual BOOL HasSymbolChars( USHORT nStt, USHORT nEnd ); + + virtual const String* GetPrevPara( BOOL bAtNormalPos ); + + virtual BOOL ChgAutoCorrWord( USHORT& rSttPos, USHORT nEndPos, + SvxAutoCorrect& rACorrect, const String** ppPara ); + + virtual LanguageType GetLanguage( USHORT nPos, BOOL bPrevPara = FALSE ) const; + + USHORT GetCursor() const { return nCursor; } + +}; + +#endif // EDTSPELL + diff --git a/svx/inc/eerdll.hxx b/svx/inc/eerdll.hxx new file mode 100644 index 000000000000..331cd1eeb6ff --- /dev/null +++ b/svx/inc/eerdll.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: eerdll.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _EERDLL_HXX +#define _EERDLL_HXX + +class GlobalEditData; + +#include <tools/resid.hxx> +#include <tools/shl.hxx> + +class EditResId: public ResId +{ +public: + EditResId( USHORT nId ); +}; + +class EditDLL +{ + ResMgr* pResMgr; + GlobalEditData* pGlobalData; + +public: + EditDLL(); + ~EditDLL(); + + ResMgr* GetResMgr() const { return pResMgr; } + GlobalEditData* GetGlobalData() const { return pGlobalData; } + static EditDLL* Get(); +}; + +#define EE_DLL() EditDLL::Get() + +#endif //_EERDLL_HXX diff --git a/svx/inc/extrusioncontrols.hxx b/svx/inc/extrusioncontrols.hxx new file mode 100644 index 000000000000..b707cae39f98 --- /dev/null +++ b/svx/inc/extrusioncontrols.hxx @@ -0,0 +1,393 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: extrusioncontrols.hxx,v $ + * $Revision: 1.10 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_EXTRUSION_CONTROLS_HXX +#define _SVX_EXTRUSION_CONTROLS_HXX + +#include <svtools/valueset.hxx> +#include <svl/lstner.hxx> +#include <sfx2/tbxctrl.hxx> +#include <svtools/svtreebx.hxx> +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#include <vcl/dialog.hxx> +#include <vcl/field.hxx> +#include <com/sun/star/frame/XFrame.hpp> +#include "svx/svxdllapi.h" + +class SfxBindings; +class ToolbarMenu; +class SfxStatusForwarder; + +//======================================================================== + +namespace svx +{ +class ToolboxButtonColorUpdater; + +class ExtrusionDirectionWindow : public SfxPopupWindow +{ + using FloatingWindow::StateChanged; + +private: + ToolbarMenu* mpMenu; + ValueSet* mpDirectionSet; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; + + SfxStatusForwarder* mpDirectionForewarder; + SfxStatusForwarder* mpProjectionForewarder; + + Image maImgDirection[9]; + Image maImgDirectionH[9]; + + Image maImgPerspective; + Image maImgPerspectiveH; + Image maImgParallel; + Image maImgParallelH; + + bool mbPopupMode; + + DECL_LINK( SelectHdl, void * ); + void FillValueSet(); + + void implSetDirection( sal_Int32 nSkew, bool bEnabled = true ); + void implSetProjection( sal_Int32 nProjection, bool bEnabled = true ); + void implInit(); + +protected: + virtual BOOL Close(); + virtual void PopupModeEnd(); + + /** This function is called when the window gets the focus. It grabs + the focus to the line ends value set so that it can be controlled with + the keyboard. + */ + virtual void GetFocus (void); + +public: + ExtrusionDirectionWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + ExtrusionDirectionWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + Window* pParentWindow ); + ~ExtrusionDirectionWindow(); + + void StartSelection(); + + virtual SfxPopupWindow* Clone() const; + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +//======================================================================== + +class SVX_DLLPUBLIC ExtrusionDirectionControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + ExtrusionDirectionControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~ExtrusionDirectionControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +//======================================================================== + +class ExtrusionDepthWindow : public SfxPopupWindow +{ + using FloatingWindow::StateChanged; + +private: + ToolbarMenu* mpMenu; + + Image maImgDepth0; + Image maImgDepth1; + Image maImgDepth2; + Image maImgDepth3; + Image maImgDepth4; + Image maImgDepthInfinity; + + Image maImgDepth0h; + Image maImgDepth1h; + Image maImgDepth2h; + Image maImgDepth3h; + Image maImgDepth4h; + Image maImgDepthInfinityh; + + SfxStatusForwarder* mpDepthForewarder; + SfxStatusForwarder* mpMetricForewarder; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; + + bool mbPopupMode; + FieldUnit meUnit; + double mfDepth; + bool mbEnabled; + + DECL_LINK( SelectHdl, void * ); + + void implFillStrings( FieldUnit eUnit ); + void implSetDepth( double fDepth, bool bEnabled ); + void implInit(); + +protected: + virtual BOOL Close(); + virtual void PopupModeEnd(); + + /** This function is called when the window gets the focus. It grabs + the focus to the line ends value set so that it can be controlled with + the keyboard. + */ + virtual void GetFocus (void); + +public: + ExtrusionDepthWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + ExtrusionDepthWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + Window* pParentWindow ); + ~ExtrusionDepthWindow(); + + void StartSelection(); + + virtual SfxPopupWindow* Clone() const; + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +//======================================================================== + +class SVX_DLLPUBLIC ExtrusionDepthControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + ExtrusionDepthControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~ExtrusionDepthControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +//======================================================================== + +class ExtrusionLightingWindow : public SfxPopupWindow +{ + using FloatingWindow::StateChanged; + +private: + ToolbarMenu* mpMenu; + ValueSet* mpLightingSet; + + Image maImgLightingOff[9]; + Image maImgLightingOn[9]; + Image maImgLightingPreview[9]; + + Image maImgLightingOffh[9]; + Image maImgLightingOnh[9]; + Image maImgLightingPreviewh[9]; + + Image maImgBright; + Image maImgNormal; + Image maImgDim; + Image maImgBrighth; + Image maImgNormalh; + Image maImgDimh; + + SfxStatusForwarder* mpLightingDirectionForewarder; + SfxStatusForwarder* mpLightingIntensityForewarder; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; + + bool mbPopupMode; + int mnLevel; + bool mbLevelEnabled; + int mnDirection; + bool mbDirectionEnabled; + + void implSetIntensity( int nLevel, bool bEnabled ); + void implSetDirection( int nDirection, bool bEnabled ); + void implInit(); + + DECL_LINK( SelectHdl, void * ); + +protected: + virtual BOOL Close(); + virtual void PopupModeEnd(); + + /** This function is called when the window gets the focus. It grabs + the focus to the line ends value set so that it can be controlled with + the keyboard. + */ + virtual void GetFocus (void); + +public: + ExtrusionLightingWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + ExtrusionLightingWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + Window* pParentWindow ); + ~ExtrusionLightingWindow(); + + void StartSelection(); + + virtual SfxPopupWindow* Clone() const; + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +//======================================================================== + +class SVX_DLLPUBLIC ExtrusionLightingControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + ExtrusionLightingControl( USHORT nSlotid, USHORT nId, ToolBox& rTbx ); + ~ExtrusionLightingControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +//======================================================================== + +class ExtrusionSurfaceWindow : public SfxPopupWindow +{ + using FloatingWindow::StateChanged; +private: + ToolbarMenu* mpMenu; + + Image maImgSurface1; + Image maImgSurface2; + Image maImgSurface3; + Image maImgSurface4; + Image maImgSurface1h; + Image maImgSurface2h; + Image maImgSurface3h; + Image maImgSurface4h; + + SfxStatusForwarder* mpSurfaceForewarder; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; + + bool mbPopupMode; + + DECL_LINK( SelectHdl, void * ); + + void implSetSurface( int nSurface, bool bEnabled ); + void implInit(); + +protected: + virtual BOOL Close(); + virtual void PopupModeEnd(); + + /** This function is called when the window gets the focus. It grabs + the focus to the line ends value set so that it can be controlled with + the keyboard. + */ + virtual void GetFocus (void); + +public: + ExtrusionSurfaceWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + ExtrusionSurfaceWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + Window* pParentWindow ); + ~ExtrusionSurfaceWindow(); + + void StartSelection(); + + virtual SfxPopupWindow* Clone() const; + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +//======================================================================== + +class SVX_DLLPUBLIC ExtrusionSurfaceControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + ExtrusionSurfaceControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~ExtrusionSurfaceControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +//======================================================================== + +class SVX_DLLPUBLIC ExtrusionColorControl : public SfxToolBoxControl +{ +private: + ToolboxButtonColorUpdater* mpBtnUpdater; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + ExtrusionColorControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~ExtrusionColorControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +//======================================================================== + +class ExtrusionDepthDialog : public ModalDialog +{ + FixedText maFLDepth; + MetricField maMtrDepth; + OKButton maOKButton; + CancelButton maCancelButton; + HelpButton maHelpButton; + + FieldUnit meDefaultUnit; + +public: + ExtrusionDepthDialog( Window* pParent, double fDepth, FieldUnit eDefaultUnit ); + ~ExtrusionDepthDialog(); + + double getDepth() const; +}; + +} +#endif + diff --git a/svx/inc/flagsdef.hxx b/svx/inc/flagsdef.hxx new file mode 100644 index 000000000000..08c4e8deda60 --- /dev/null +++ b/svx/inc/flagsdef.hxx @@ -0,0 +1,106 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: flagsdef.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FLAGSDEF_HXX +#define _SVX_FLAGSDEF_HXX + +// defines --------------------------------------------------------------- + +//CHINA001 copy from border.hxx +// Border-Modes for paragraphs, textframes and tables +#define SW_BORDER_MODE_PARA 0x01 +#define SW_BORDER_MODE_TABLE 0x02 +#define SW_BORDER_MODE_FRAME 0x04 + +//CHINA001 flags for SvxBackgroundTabPage +#define SVX_SHOW_SELECTOR 0x01 +#define SVX_SHOW_PARACTL 0x02 +#define SVX_ENABLE_TRANSPARENCY 0x04 +#define SVX_SHOW_TBLCTL 0x08 + +//CHINA001 flags for SvxBorderTabPage +#define SVX_HIDESHADOWCTL 0x01 + +//CHINA001 copy from chardlg.hxx +#define DISABLE_CASEMAP ((USHORT)0x0001) +#define DISABLE_WORDLINE ((USHORT)0x0002) +#define DISABLE_BLINK ((USHORT)0x0004) +#define DISABLE_UNDERLINE_COLOR ((USHORT)0x0008) + +#define DISABLE_LANGUAGE ((USHORT)0x0010) +#define DISABLE_HIDE_LANGUAGE ((USHORT)0x0020) + +//CHINA001 flags for SvxCharBasePage's child class +#define SVX_PREVIEW_CHARACTER 0x01 +//CHINA001 flags for SvxCharNamePage +#define SVX_RELATIVE_MODE 0x02 +//CHINA001 flags for SvxCharEffectsPage +#define SVX_ENABLE_FLASH 0x04 + + +//CHINA001 copy from numfmt.hxx +#define SVX_NUMVAL_STANDARD -1234.12345678901234 +#define SVX_NUMVAL_CURRENCY -1234 +#define SVX_NUMVAL_PERCENT -0.1295 +#define SVX_NUMVAL_TIME 36525.5678935185 +#define SVX_NUMVAL_DATE 36525.5678935185 +#define SVX_NUMVAL_BOOLEAN 1 + +//CHINA001 copy from page.hxx +// enum ------------------------------------------------------------------ + +enum SvxModeType +{ + SVX_PAGE_MODE_STANDARD, + SVX_PAGE_MODE_CENTER, + SVX_PAGE_MODE_PRESENTATION +}; +// define ---------------------------------------------------------------- + +// 1/2 cm in TWIPS +// wird auch fuer Minimalgrosse der LayFrms aller Arten benutzt +#define MM50 283 //from original svx/inc/paragrph.hxx + +//--------------from original svx/inc/tabstpge.hxx +#define TABTYPE_LEFT 0x0001 +#define TABTYPE_RIGHT 0x0002 +#define TABTYPE_CENTER 0x0004 +#define TABTYPE_DEZIMAL 0x0008 +#define TABTYPE_ALL 0x000F + +#define TABFILL_NONE 0x0010 +#define TABFILL_POINT 0x0020 +#define TABFILL_DASHLINE 0x0040 +#define TABFILL_SOLIDLINE 0x0080 +#define TABFILL_SPECIAL 0x0100 +#define TABFILL_ALL 0x01F0 + +//----- + +#endif diff --git a/svx/inc/float3d.hrc b/svx/inc/float3d.hrc new file mode 100644 index 000000000000..1241c437a007 --- /dev/null +++ b/svx/inc/float3d.hrc @@ -0,0 +1,187 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: float3d.hrc,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#include <svx/dialogs.hrc> + +//#define FLT_WIN_3D 827 + +#define BTN_GEO 2 +#define BTN_REPRESENTATION 3 +#define BTN_LIGHT 4 +#define BTN_TEXTURE 5 +#define BTN_MATERIAL 6 +#define BTN_UPDATE 7 +#define BTN_ASSIGN 8 + +// Unterer Teil +#define BTN_PERSPECTIVE 9 +#define BTN_CHANGE_TO_3D 10 +#define BTN_LATHE_OBJ 11 +#define CTL_PREVIEW 12 +#define CTL_LIGHT_PREVIEW 13 + +// Geometrie +#define FT_HORIZONTAL 24 +#define NUM_HORIZONTAL 25 +#define FT_VERTICAL 26 +#define NUM_VERTICAL 27 +#define FL_SEGMENTS 28 +#define FT_PERCENT_DIAGONAL 29 +#define MTR_PERCENT_DIAGONAL 30 +#define FT_BACKSCALE 31 +#define MTR_BACKSCALE 32 +#define FT_END_ANGLE 33 +#define MTR_END_ANGLE 34 +#define FT_DEPTH 35 +#define MTR_DEPTH 36 +#define FL_GEOMETRIE 37 + +#define BTN_NORMALS_OBJ 38 +#define BTN_NORMALS_FLAT 39 +#define BTN_NORMALS_SPHERE 40 +#define BTN_TWO_SIDED_LIGHTING 41 +#define BTN_NORMALS_INVERT 42 +#define FL_NORMALS 43 + +#define BTN_DOUBLE_SIDED 44 + +// Darstellung +#define FT_SHADEMODE 45 +#define LB_SHADEMODE 46 +#define BTN_SHADOW_3D 47 +#define FT_SLANT 48 +#define MTR_SLANT 49 +#define FL_SHADOW 50 +#define FT_DISTANCE 51 +#define MTR_DISTANCE 52 +#define FT_FOCAL_LENGTH 53 +#define MTR_FOCAL_LENGTH 54 +#define FL_CAMERA 55 +#define FL_REPRESENTATION 56 + +// Beleuchtung +#define BTN_LIGHT_1 60 +#define BTN_LIGHT_2 61 +#define BTN_LIGHT_3 62 +#define BTN_LIGHT_4 63 +#define BTN_LIGHT_5 64 +#define BTN_LIGHT_6 65 +#define BTN_LIGHT_7 66 +#define BTN_LIGHT_8 67 +#define LB_LIGHT_1 68 +#define LB_LIGHT_2 69 +#define LB_LIGHT_3 70 +#define LB_LIGHT_4 71 +#define LB_LIGHT_5 72 +#define LB_LIGHT_6 73 +#define LB_LIGHT_7 74 +#define LB_LIGHT_8 75 +#define BTN_LIGHT_COLOR 76 +#define FT_LIGHTSOURCE 77 +#define LB_AMBIENTLIGHT 78 +#define BTN_AMBIENT_COLOR 79 +#define FT_AMBIENTLIGHT 80 +#define FL_LIGHT 81 + +// Texturen +#define FT_TEX_KIND 90 +#define BTN_TEX_LUMINANCE 91 +#define BTN_TEX_COLOR 92 +#define FT_TEX_MODE 93 +#define BTN_TEX_REPLACE 94 +#define BTN_TEX_MODULATE 95 +#define BTN_TEX_BLEND 96 +#define FT_TEX_PROJECTION_X 97 +#define BTN_TEX_PARALLEL_X 98 +#define BTN_TEX_CIRCLE_X 99 +#define BTN_TEX_OBJECT_X 100 +#define FT_TEX_PROJECTION_Y 101 +#define BTN_TEX_PARALLEL_Y 102 +#define BTN_TEX_CIRCLE_Y 103 +#define BTN_TEX_OBJECT_Y 104 +#define FT_TEX_FILTER 105 +#define BTN_TEX_FILTER 106 +#define FL_TEXTURE 107 + +// Material +//#define CTL_MATERIAL 110 +#define FL_MATERIAL 111 + +#define FT_MAT_COLOR 112 +#define LB_MAT_COLOR 113 +#define BTN_MAT_COLOR 114 +#define FT_MAT_EMISSION 115 +#define LB_MAT_EMISSION 116 +#define BTN_EMISSION_COLOR 117 +#define FT_MAT_SPECULAR 118 +#define LB_MAT_SPECULAR 119 +#define BTN_SPECULAR_COLOR 120 +#define FT_MAT_SPECULAR_INTENSITY 121 +#define MTR_MAT_SPECULAR_INTENSITY 122 +#define FL_MAT_SPECULAR 123 +#define FT_MAT_FAVORITES 124 +#define LB_MAT_FAVORITES 125 + + +//#define BTN_MAT_FAVORITES 125 +//#define BTN_MAT_EDITOR 126 + + +// high contrast +#define BMP_GEO_H 130 +#define BMP_REPRESENTATION_H 131 +#define BMP_LIGHT_H 132 +#define BMP_TEXTURE_H 133 +#define BMP_MATERIAL_H 134 +#define BMP_UPDATE_H 135 +#define BMP_ASSIGN_H 136 +#define BMP_CHANGE_TO_3D_H 137 +#define BMP_LATHE_OBJ_H 138 +#define BMP_PERSPECTIVE_H 139 +#define BMP_NORMALS_OBJ_H 142 +#define BMP_NORMALS_FLAT_H 143 +#define BMP_NORMALS_SPHERE_H 144 +#define BMP_NORMALS_INVERT_H 145 +#define BMP_TWO_SIDED_LIGHTING_H 146 +#define BMP_DOUBLE_SIDED_H 147 +#define BMP_SHADOW_3D_H 148 +#define BMP_3DLIGHT_H 149 +#define BMP_LIGHT_COLOR_H 150 +#define BMP_AMBIENT_COLOR_H 151 +#define BMP_TEX_LUMINANCE_H 152 +#define BMP_TEX_COLOR_H 153 +#define BMP_TEX_REPLACE_H 154 +#define BMP_TEX_MODULATE_H 155 +#define BMP_TEX_BLEND_H 156 +#define BMP_TEX_OBJECT_H 157 +#define BMP_TEX_PARALLEL_H 158 +#define BMP_TEX_CIRCLE_H 159 +#define BMP_TEX_FILTER_H 160 +#define BMP_COLORDLG_H 161 + diff --git a/svx/inc/flstitem.hxx b/svx/inc/flstitem.hxx new file mode 100644 index 000000000000..f41970cc79da --- /dev/null +++ b/svx/inc/flstitem.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: flstitem.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FLSTITEM_HXX +#define _SVX_FLSTITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#include <rtl/ustring.hxx> +#include <com/sun/star/uno/Sequence.h> +#include "svx/svxdllapi.h" + +// class SvxFontListItem ------------------------------------------------- + +class FontList; + +/* + [Beschreibung] + + Dieses Item dient als Transport-Medium fuer eine FontListe. + Die Fontliste wird nicht kopiert und nicht geloescht! +*/ + +class SVX_DLLPUBLIC SvxFontListItem : public SfxPoolItem +{ +private: + const FontList* pFontList; + com::sun::star::uno::Sequence< rtl::OUString > aFontNameSeq; + +public: + TYPEINFO(); + + SvxFontListItem( const FontList* pFontLst, + const USHORT nId ); + SvxFontListItem( const SvxFontListItem& rItem ); + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + const FontList* GetFontList() const { return pFontList; } +}; + + + + +#endif + + diff --git a/svx/inc/fmgridif.hxx b/svx/inc/fmgridif.hxx new file mode 100644 index 000000000000..39b108026654 --- /dev/null +++ b/svx/inc/fmgridif.hxx @@ -0,0 +1,554 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmgridif.hxx,v $ + * $Revision: 1.13 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FMGRIDIF_HXX +#define _SVX_FMGRIDIF_HXX + +#include "svx/svxdllapi.h" + +#include <com/sun/star/view/XSelectionSupplier.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/container/XEnumerationAccess.hpp> +#include <com/sun/star/container/XContainer.hpp> +#include <com/sun/star/container/XContainerListener.hpp> +#include <com/sun/star/sdbc/XRowSetListener.hpp> +#include <com/sun/star/sdb/XRowSetSupplier.hpp> +#include <com/sun/star/form/XReset.hpp> +#include <com/sun/star/form/XBoundComponent.hpp> +#include <com/sun/star/form/XLoadListener.hpp> +#include <com/sun/star/form/XGridControl.hpp> +#include <com/sun/star/form/XGridPeer.hpp> +#include <com/sun/star/frame/XDispatchProvider.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> +#include <com/sun/star/frame/XDispatchProviderInterception.hpp> +#include <com/sun/star/view/XSelectionChangeListener.hpp> +#include <com/sun/star/util/XModeSelector.hpp> +#include <com/sun/star/util/XModifyListener.hpp> +#include <com/sun/star/util/XModifyBroadcaster.hpp> + +#include <vcl/wintypes.hxx> +#include <toolkit/controls/unocontrol.hxx> +#include <toolkit/awt/vclxwindow.hxx> +#include <comphelper/uno3.hxx> +#include <cppuhelper/implbase10.hxx> + +#if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_19) +#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_19 +#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 19 +#include <comphelper/implbase_var.hxx> +#endif + + +class DbGridColumn; + +class OWeakSubObject : public ::cppu::OWeakObject +{ +protected: + ::cppu::OWeakObject& m_rParent; + +public: + OWeakSubObject(::cppu::OWeakObject& rParent) : m_rParent(rParent) { } + + virtual void SAL_CALL acquire() throw() { m_rParent.acquire(); } + virtual void SAL_CALL release() throw() { m_rParent.release(); } +}; + +//================================================================== +// FmXModifyMultiplexer +//================================================================== +class FmXModifyMultiplexer :public OWeakSubObject + ,public ::cppu::OInterfaceContainerHelper + ,public ::com::sun::star::util::XModifyListener +{ +public: + FmXModifyMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex ); + DECLARE_UNO3_DEFAULTS(FmXModifyMultiplexer,OWeakSubObject); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::util::XModifyListener + virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); + +// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators + void * SAL_CALL operator new( size_t size ) throw() { return OWeakSubObject::operator new(size); } + void SAL_CALL operator delete( void * p ) throw() { OWeakSubObject::operator delete(p); } +}; + +//================================================================== +// FmXUpdateMultiplexer +//================================================================== +class FmXUpdateMultiplexer : public OWeakSubObject, + public ::cppu::OInterfaceContainerHelper, + public ::com::sun::star::form::XUpdateListener +{ +public: + FmXUpdateMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex ); + DECLARE_UNO3_DEFAULTS(FmXUpdateMultiplexer,OWeakSubObject); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XUpdateListener + virtual sal_Bool SAL_CALL approveUpdate(const ::com::sun::star::lang::EventObject &) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updated(const ::com::sun::star::lang::EventObject &) throw(::com::sun::star::uno::RuntimeException); + +// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators + void * SAL_CALL operator new( size_t size ) throw() { return OWeakSubObject::operator new(size); } + void SAL_CALL operator delete( void * p ) throw() { OWeakSubObject::operator delete(p); } +}; + +//================================================================== +// FmXSelectionMultiplexer +//================================================================== +class FmXSelectionMultiplexer :public OWeakSubObject + ,public ::cppu::OInterfaceContainerHelper + ,public ::com::sun::star::view::XSelectionChangeListener +{ +public: + FmXSelectionMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex ); + DECLARE_UNO3_DEFAULTS(FmXSelectionMultiplexer, OWeakSubObject); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::view::XSelectionChangeListener + virtual void SAL_CALL selectionChanged( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); + +// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators + void * SAL_CALL operator new( size_t size ) throw() { return OWeakSubObject::operator new(size); } + void SAL_CALL operator delete( void * p ) throw() { OWeakSubObject::operator delete(p); } +}; + +//================================================================== +// FmXGridControlMultiplexer +//================================================================== +class FmXGridControlMultiplexer :public OWeakSubObject + ,public ::cppu::OInterfaceContainerHelper + ,public ::com::sun::star::form::XGridControlListener +{ +public: + FmXGridControlMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex ); + DECLARE_UNO3_DEFAULTS( FmXGridControlMultiplexer, OWeakSubObject ); + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::view::XSelectionChangeListener + virtual void SAL_CALL columnChanged( const ::com::sun::star::lang::EventObject& _event ) throw (::com::sun::star::uno::RuntimeException); + +// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators + void * SAL_CALL operator new( size_t size ) throw() { return OWeakSubObject::operator new(size); } + void SAL_CALL operator delete( void * p ) throw() { OWeakSubObject::operator delete(p); } +}; + +//================================================================== +// FmXContainerMultiplexer +//================================================================== +class FmXContainerMultiplexer : public OWeakSubObject, + public ::cppu::OInterfaceContainerHelper, + public ::com::sun::star::container::XContainerListener +{ +public: + FmXContainerMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex); + DECLARE_UNO3_DEFAULTS(FmXContainerMultiplexer,OWeakSubObject); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::container::XContainerListener + virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& Event) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& Event) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& Event) throw(::com::sun::star::uno::RuntimeException); + +// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators + void * SAL_CALL operator new( size_t size ) throw() { return OWeakSubObject::operator new(size); } + void SAL_CALL operator delete( void * p ) throw() { OWeakSubObject::operator delete(p); } +}; + +//================================================================== +// FmXGridControl +//================================================================== +typedef ::cppu::ImplHelper10< ::com::sun::star::form::XBoundComponent, + ::com::sun::star::form::XGridControl, + ::com::sun::star::util::XModifyBroadcaster, + ::com::sun::star::container::XIndexAccess, + ::com::sun::star::container::XEnumerationAccess, + ::com::sun::star::util::XModeSelector, + ::com::sun::star::container::XContainer, + ::com::sun::star::frame::XDispatchProvider, + ::com::sun::star::frame::XDispatchProviderInterception, + ::com::sun::star::view::XSelectionSupplier + > FmXGridControl_BASE; + +class FmXGridPeer; +class SVX_DLLPUBLIC FmXGridControl :public UnoControl + ,public FmXGridControl_BASE +{ + FmXModifyMultiplexer m_aModifyListeners; + FmXUpdateMultiplexer m_aUpdateListeners; + FmXContainerMultiplexer m_aContainerListeners; + FmXSelectionMultiplexer m_aSelectionListeners; + FmXGridControlMultiplexer m_aGridControlListeners; + +protected: + sal_uInt16 m_nPeerCreationLevel; + sal_Bool m_bInDraw; + + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory; + +public: + FmXGridControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&); + virtual ~FmXGridControl(); + + // UNO Anbindung + DECLARE_UNO3_AGG_DEFAULTS(FmXGridControl, UnoControl); + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); + +// XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::lang::XComponent + virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::lang::XServiceInfo + virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw(); + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(); + +// ::com::sun::star::awt::XControl + virtual void SAL_CALL createPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& _rToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDesignMode(sal_Bool bOn) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::awt::XView + virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XBoundComponent + virtual void SAL_CALL addUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL commit() throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::container::XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::container::XEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration() throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::container::XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XGridControl + virtual void SAL_CALL addGridControlListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridControlListener >& _listener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeGridControlListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridControlListener >& _listener ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XGrid (base of XGridControl) + virtual sal_Int16 SAL_CALL getCurrentColumnPosition() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XGridFieldDataSupplier (base of XGridControl) + virtual ::com::sun::star::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType( const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL queryFieldData( sal_Int32 nRow, const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException); + +// UnoControl + virtual ::rtl::OUString GetComponentServiceName(); + +// ::com::sun::star::util::XModifyBroadcaster + virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::util::XModeSelector + virtual void SAL_CALL setMode(const ::rtl::OUString& Mode) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getMode() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedModes() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsMode(const ::rtl::OUString& Mode) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::container::XContainer + virtual void SAL_CALL addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::frame::XDispatchProvider + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches(const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::frame::XDispatchProviderInterception + virtual void SAL_CALL registerDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& xInterceptor) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL releaseDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& xInterceptor) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::view::XSelectionSupplier + virtual sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& aSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getSelection( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + +protected: + virtual FmXGridPeer* imp_CreatePeer(Window* pParent); + // ImplCreatePeer waere besser ;) geht aber nicht, da dann nicht exportiert + +}; + +//================================================================== +// FmXGridPeer -> Peer fuers Gridcontrol +//================================================================== +typedef ::comphelper::ImplHelper19 < ::com::sun::star::form::XGridPeer, + ::com::sun::star::form::XBoundComponent, + ::com::sun::star::form::XGridControl, + ::com::sun::star::sdb::XRowSetSupplier, + ::com::sun::star::util::XModifyBroadcaster, + ::com::sun::star::beans::XPropertyChangeListener, + ::com::sun::star::container::XContainerListener, + ::com::sun::star::sdbc::XRowSetListener, + ::com::sun::star::form::XLoadListener, + ::com::sun::star::view::XSelectionChangeListener, + ::com::sun::star::container::XIndexAccess, + ::com::sun::star::container::XEnumerationAccess, + ::com::sun::star::util::XModeSelector, + ::com::sun::star::container::XContainer, + ::com::sun::star::frame::XStatusListener, + ::com::sun::star::frame::XDispatchProvider, + ::com::sun::star::frame::XDispatchProviderInterception, + ::com::sun::star::form::XResetListener, + ::com::sun::star::view::XSelectionSupplier + > FmXGridPeer_BASE; +class FmGridControl; +class SVX_DLLPUBLIC FmXGridPeer :public VCLXWindow + ,public FmXGridPeer_BASE +{ + ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > m_xColumns; + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xCursor; + ::cppu::OInterfaceContainerHelper m_aModifyListeners, + m_aUpdateListeners, + m_aContainerListeners, + m_aSelectionListeners, + m_aGridControlListeners; + + ::rtl::OUString m_aMode; + sal_Int32 m_nCursorListening; + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > m_xFirstDispatchInterceptor; + + sal_Bool m_bInterceptingDispatch; + + sal_Bool* m_pStateCache; + // one bool for each supported url + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > * m_pDispatchers; + // one dispatcher for each supported url + // (I would like to have a vector here but including the stl in an exported file seems + // very risky to me ....) + + class GridListenerDelegator; + friend class GridListenerDelegator; + GridListenerDelegator* m_pGridListener; + +protected: + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory; + ::osl::Mutex m_aMutex; + +public: + FmXGridPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&); + ~FmXGridPeer(); + + // spaeter Constructor, immer nach dem realen Constructor zu rufen ! + void Create(Window* pParent, WinBits nStyle); + +// UNO Anbindung + DECLARE_UNO3_DEFAULTS(FmXGridPeer, VCLXWindow); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); + +// XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::lang::XUnoTunnel + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId() throw(); + static FmXGridPeer* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxIFace ) throw(); + sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XGridPeer + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setColumns( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& aColumns ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::lang::XComponent + virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XBoundComponent + virtual void SAL_CALL addUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL commit() throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::container::XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::container::XEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration() throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::container::XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::beans::XPropertyChangeListener + virtual void SAL_CALL SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XLoadListener + virtual void SAL_CALL loaded(const ::com::sun::star::lang::EventObject& rEvent) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL unloaded(const ::com::sun::star::lang::EventObject& rEvent) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL reloading(const ::com::sun::star::lang::EventObject& aEvent) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL reloaded(const ::com::sun::star::lang::EventObject& aEvent) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::sdbc::XRowSetListener + virtual void SAL_CALL cursorMoved(const ::com::sun::star::lang::EventObject& event) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowChanged(const ::com::sun::star::lang::EventObject& event) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rowSetChanged(const ::com::sun::star::lang::EventObject& event) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::container::XContainerListener + virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& Event) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& Event) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& Event) throw(::com::sun::star::uno::RuntimeException); + +// VCLXWindow + virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > + CreateAccessibleContext(); + +// ::com::sun::star::form::XGridControl + virtual void SAL_CALL addGridControlListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridControlListener >& _listener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeGridControlListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridControlListener >& _listener ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XGrid (base of XGridControl) + virtual sal_Int16 SAL_CALL getCurrentColumnPosition() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XGridFieldDataSupplier (base of XGridControl) + virtual ::com::sun::star::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType( const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL queryFieldData( sal_Int32 nRow, const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::sdb::XRowSetSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > SAL_CALL getRowSet() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRowSet(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xDataSource) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::util::XModifyBroadcaster + virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l) throw(::com::sun::star::uno::RuntimeException); + +// UnoControl + virtual void SAL_CALL SAL_CALL setDesignMode(sal_Bool bOn) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isDesignMode() throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::view::XSelectionChangeListener + virtual void SAL_CALL selectionChanged(const ::com::sun::star::lang::EventObject& aEvent) throw(::com::sun::star::uno::RuntimeException); + + void CellModified(); + +// PropertyListening + void updateGrid(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rDatabaseCursor); + void startCursorListening(); + void stopCursorListening(); + +// ::com::sun::star::util::XModeSelector + virtual void SAL_CALL setMode(const ::rtl::OUString& Mode) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getMode() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedModes() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsMode(const ::rtl::OUString& Mode) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::container::XContainer + virtual void SAL_CALL addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw(::com::sun::star::uno::RuntimeException); + + void columnVisible(DbGridColumn* pColumn); + void columnHidden(DbGridColumn* pColumn); + +// ::com::sun::star::awt::XView + virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::frame::XDispatchProvider + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches(const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::frame::XDispatchProviderInterception + virtual void SAL_CALL registerDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& xInterceptor) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL releaseDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& xInterceptor) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::frame::XStatusListener + virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::form::XResetListener + virtual sal_Bool SAL_CALL approveReset(const ::com::sun::star::lang::EventObject& rEvent) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL resetted(const ::com::sun::star::lang::EventObject& rEvent) throw(::com::sun::star::uno::RuntimeException); + +// ::com::sun::star::view::XSelectionSupplier + virtual sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& aSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getSelection( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + +protected: + virtual FmGridControl* imp_CreateControl(Window* pParent, WinBits nStyle); + + static ::com::sun::star::uno::Sequence< ::com::sun::star::util::URL>& getSupportedURLs(); + static ::com::sun::star::uno::Sequence<sal_uInt16>& getSupportedGridSlots(); + void ConnectToDispatcher(); + void DisConnectFromDispatcher(); + void UpdateDispatches(); // will connect if not already connected and just update else + + /** If a derived class wants to listen at some column properties, it doesn't have + to overload all methods affecting columns (setColumns, elementInserted, elementRemoved ...) + Instead it may use addColumnListeners and removeColumnListeners which are called in all + the cases. + */ + virtual void addColumnListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xCol); + virtual void removeColumnListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xCol); + + void selectionChanged(); + void columnChanged(); + + DECL_LINK(OnQueryGridSlotState, void*); + DECL_LINK(OnExecuteGridSlot, void*); +}; + + + +#endif // _SVX_FMGRID_HXX + diff --git a/svx/inc/fmhelp.hrc b/svx/inc/fmhelp.hrc new file mode 100644 index 000000000000..ef445ab11f82 --- /dev/null +++ b/svx/inc/fmhelp.hrc @@ -0,0 +1,120 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmhelp.hrc,v $ + * $Revision: 1.17 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FMHELP_HRC +#define _SVX_FMHELP_HRC + +// include ----------------------------------------------------------- +#include <svl/solar.hrc> + +// in solar.hrc +//#define HID_FORMS_START (HID_LIB_START+4000) +//#define HID_FORMS_END (HID_LIB_START+4999) + +// Help-Ids -------------------------------------------------------------- +#define HID_DLG_DBMSG ( HID_FORMS_START + 1) +#define HID_FORM_NAVIGATOR ( HID_FORMS_START + 2) +#define HID_FORM_NAVIGATOR_WIN ( HID_FORMS_START + 3) +#define HID_FIELD_SEL ( HID_FORMS_START + 4) +#define HID_FIELD_SEL_WIN ( HID_FORMS_START + 5) +#define HID_FILTER_NAVIGATOR ( HID_FORMS_START + 6) +#define HID_FILTER_NAVIGATOR_WIN ( HID_FORMS_START + 7) +#define HID_FM_DLG_SEARCH ( HID_FORMS_START + 8) +#define HID_SEARCH_TEXT ( HID_FORMS_START + 9) +#define HID_SEARCH_ALLFIELDS ( HID_FORMS_START + 10) +//#define HID_SEARCH_SINGLEFIELD ( HID_FORMS_START + 11) +#define HID_SEARCH_FIELDSELECTION ( HID_FORMS_START + 12) +#define HID_SEARCH_POSITION ( HID_FORMS_START + 13) +#define HID_SEARCH_FORMATTER ( HID_FORMS_START + 14) +#define HID_SEARCH_CASE ( HID_FORMS_START + 15) +#define HID_SEARCH_BACKWARD ( HID_FORMS_START + 16) +#define HID_SEARCH_STARTOVER ( HID_FORMS_START + 17) +#define HID_SEARCH_WILDCARD ( HID_FORMS_START + 18) +#define HID_SEARCH_REGULAR ( HID_FORMS_START + 19) +#define HID_SEARCH_APPROX ( HID_FORMS_START + 20) +#define HID_SEARCH_APPROXSETTINGS ( HID_FORMS_START + 21) +#define HID_SEARCH_BTN_SEARCH ( HID_FORMS_START + 22) +#define HID_SEARCH_BTN_CLOSE ( HID_FORMS_START + 23) +#define HID_CONTROLS_DATE_N_TIME ( HID_FORMS_START + 24) +#define HID_GRID_TRAVEL_FIRST ( HID_FORMS_START + 25) +#define HID_GRID_TRAVEL_PREV ( HID_FORMS_START + 26) +#define HID_GRID_TRAVEL_NEXT ( HID_FORMS_START + 27) +#define HID_GRID_TRAVEL_LAST ( HID_FORMS_START + 28) +#define HID_GRID_TRAVEL_NEW ( HID_FORMS_START + 29) +#define HID_GRID_TRAVEL_ABSOLUTE ( HID_FORMS_START + 30) +#define HID_GRID_NUMBEROFRECORDS ( HID_FORMS_START + 31) +#define UID_SEARCH_RECORDSTATUS ( HID_FORMS_START + 32) +#define UID_FORMPROPBROWSER_FRAME ( HID_FORMS_START + 33) +#define UID_ABSOLUTE_RECORD_WINDOW ( HID_FORMS_START + 34) +#define HID_DATA_NAVIGATOR_WIN ( HID_FORMS_START + 35) +#define HID_XFORMS_ADDDATAITEM_DLG ( HID_FORMS_START + 36) +#define HID_XFORMS_ADDCONDITION_DLG ( HID_FORMS_START + 37) +#define HID_XFORMS_NAMESPACEITEM_DLG ( HID_FORMS_START + 38) +#define HID_XFORMS_NAMESPACEITEM_LIST ( HID_FORMS_START + 39) +#define HID_XFORMS_MANAGENAMESPACE_DLG ( HID_FORMS_START + 40) +//#define HID_TP_XFORMS_INSTANCE ( HID_FORMS_START + 41) +//#define HID_TP_XFORMS_SUBMISSION ( HID_FORMS_START + 42) +//#define HID_TP_XFORMS_BINDING ( HID_FORMS_START + 43) +#define HID_MN_XFORMS_MODELS_ADD ( HID_FORMS_START + 44) +#define HID_MN_XFORMS_MODELS_EDIT ( HID_FORMS_START + 45) +#define HID_MN_XFORMS_MODELS_REMOVE ( HID_FORMS_START + 46) +#define HID_MN_XFORMS_INSTANCES_ADD ( HID_FORMS_START + 47) +#define HID_MN_XFORMS_INSTANCES_EDIT ( HID_FORMS_START + 48) +#define HID_MN_XFORMS_INSTANCES_REMOVE ( HID_FORMS_START + 49) +#define HID_MN_XFORMS_SHOW_DETAILS ( HID_FORMS_START + 50) +#define HID_XFORMS_TOOLBOX ( HID_FORMS_START + 51) +#define HID_XFORMS_TOOLBOX_ITEM_ADD ( HID_FORMS_START + 52) +#define HID_XFORMS_TOOLBOX_ITEM_ADD_ELEMENT ( HID_FORMS_START + 53) +#define HID_XFORMS_TOOLBOX_ITEM_ADD_ATTRIBUTE ( HID_FORMS_START + 54) +#define HID_XFORMS_TOOLBOX_ITEM_EDIT ( HID_FORMS_START + 55) +#define HID_XFORMS_TOOLBOX_ITEM_REMOVE ( HID_FORMS_START + 56) +#define HID_XFORMS_ITEMS_LIST ( HID_FORMS_START + 57) +#define HID_XFORMS_MODELS_LIST ( HID_FORMS_START + 58) +#define HID_XFORMS_MODELS_MENUBTN ( HID_FORMS_START + 59) +#define HID_XFORMS_INSTANCES_MENUBTN ( HID_FORMS_START + 60) +#define HID_XFORMS_ADDSUBMISSION_DLG ( HID_FORMS_START + 61) +#define HID_XFORMS_ADDMODEL_DLG ( HID_FORMS_START + 62) +#define HID_XFORMS_ADDINSTANCE_DLG ( HID_FORMS_START + 63) +#define HID_XFORMS_MID_INSERT_CONTROL ( HID_FORMS_START + 64) +#define HID_XFORMS_TAB_CONTROL ( HID_FORMS_START + 65) + // if you add a new define here, please adjust the overflow check + // at the end of the file!! + +// ----------------------------------------------------------------------- +// "Uberlaufpr"ufung ----------------------------------------------------- +// ----------------------------------------------------------------------- + +#define ACT_FM_HID_END HID_XFORMS_TAB_CONTROL + +#if ACT_FM_HID_END > HID_FORMS_END +#error Resource-Ueberlauf in #line, #file +#endif + +#endif + diff --git a/svx/inc/fmobjfac.hxx b/svx/inc/fmobjfac.hxx new file mode 100644 index 000000000000..c5a8b01f1f87 --- /dev/null +++ b/svx/inc/fmobjfac.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmobjfac.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FMOBJFAC_HXX +#define _SVX_FMOBJFAC_HXX + +#include <tools/link.hxx> +#include "svx/svxdllapi.h" + +class SdrObjFactory; + + + +class SVX_DLLPUBLIC FmFormObjFactory +{ +public: + FmFormObjFactory(); + ~FmFormObjFactory(); + + DECL_LINK(MakeObject, SdrObjFactory*); +}; + + + + +#endif // _FM_FMOBJFAC_HXX + diff --git a/svx/inc/fontitem.hxx b/svx/inc/fontitem.hxx new file mode 100644 index 000000000000..c6d0087382a5 --- /dev/null +++ b/svx/inc/fontitem.hxx @@ -0,0 +1,123 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fontitem.hxx,v $ + * $Revision: 1.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FONTITEM_HXX +#define _SVX_FONTITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#include <tools/string.hxx> +#ifndef _FONT_HXX //autogen +#include <vcl/font.hxx> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxFontItem ----------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt einen Font. +*/ + +class SVX_DLLPUBLIC SvxFontItem : public SfxPoolItem +{ + String aFamilyName; + String aStyleName; + FontFamily eFamily; + FontPitch ePitch; + rtl_TextEncoding eTextEncoding; + + static BOOL bEnableStoreUnicodeNames; + +public: + TYPEINFO(); + + SvxFontItem( const USHORT nId ); + SvxFontItem( const FontFamily eFam, const String& rFamilyName, + const String& rStyleName, + const FontPitch eFontPitch /*= PITCH_DONTKNOW*/, + const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + // ZugriffsMethoden: + inline String &GetFamilyName() { return aFamilyName; } + inline const String &GetFamilyName() const { return aFamilyName; } + + inline String &GetStyleName() { return aStyleName; } + inline const String &GetStyleName() const { return aStyleName; } + + inline FontFamily &GetFamily() { return eFamily; } + inline FontFamily GetFamily() const { return eFamily; } + + inline FontPitch &GetPitch() { return ePitch; } + inline FontPitch GetPitch() const { return ePitch; } + + inline rtl_TextEncoding &GetCharSet() { return eTextEncoding; } + inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; } + + inline SvxFontItem& operator=(const SvxFontItem& rFont) + { + aFamilyName = rFont.GetFamilyName(); + aStyleName = rFont.GetStyleName(); + eFamily = rFont.GetFamily(); + ePitch = rFont.GetPitch(); + eTextEncoding = rFont.GetCharSet(); + return *this; + } + + static void EnableStoreUnicodeNames( BOOL bEnable ); + +}; + +SVX_DLLPUBLIC void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, + SvxFontItem& rComplex ); + +#endif // #ifndef _SVX_FONTITEM_HXX + + diff --git a/svx/inc/fontlb.hxx b/svx/inc/fontlb.hxx new file mode 100644 index 000000000000..6a853618c401 --- /dev/null +++ b/svx/inc/fontlb.hxx @@ -0,0 +1,141 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fontlb.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_FONTLB_HXX +#define SVX_FONTLB_HXX + +#ifndef _SVTABBOX_HXX +#include <svtools/svtabbx.hxx> +#endif +#include <vcl/virdev.hxx> +#include "svx/svxdllapi.h" +#include <layout/layout.hxx> + +// ============================================================================ + +/** A list box string item which stores its text and font. */ +class SvLBoxFontString : public SvLBoxString +{ +private: + Font maFont; /// The font used by this item. + bool mbUseColor; /// true = use font color, false = default listbox color. + +public: + SvLBoxFontString(); + SvLBoxFontString( + SvLBoxEntry* pEntry, + sal_uInt16 nFlags, + const XubString& rString, + const Font& rFont, + const Color* pColor = NULL ); + + virtual ~SvLBoxFontString(); + + /** Creates a new empty list box item. */ + virtual SvLBoxItem* Create() const; + + void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* ); + + /** Paints this entry to the specified position, using the own font settings. */ + void Paint( + const Point& rPos, + SvLBox& rDev, + sal_uInt16 nFlags, + SvLBoxEntry* pEntry ); +}; + + +// ============================================================================ + +/** A list box supporting formatted string entries. */ +class SVX_DLLPUBLIC SvxFontListBox : public SvTabListBox +{ +private: + Font maStdFont; /// Used for entries without specific font. + + // The following members are used to store additional parameters for InitEntry(). + Font maEntryFont; /// Current entry font used in InitEntry(). + const Color* mpEntryColor; /// Current entry color used in InitEntry(). + bool mbUseFont; /// true = Use maEntryFont/mpEntryColor in InitEntry(). + +public: + SvxFontListBox( Window* pParent, const ResId& rResId ); + + /** Inserts a list entry and sets the font used for this entry. + @param pColor The font color. NULL = use default listbox text color. */ + void InsertFontEntry( + const String& rString, const Font& rFont, const Color* pColor = NULL ); + + /** Selects/deselects an entry specified by its position in the list box. */ + void SelectEntryPos( sal_uInt16 nPos, bool bSelect = true ); + /** Removes a selection. */ + void SetNoSelection(); + + /** Returns the position of the entry currently selected or LIST_APPEND. */ + ULONG GetSelectEntryPos() const; + /** Returns the text of the selected entry or an empty string. */ + XubString GetSelectEntry() const; + +protected: + /** Initializes a new SvLBoxFontString entry. + @descr Uses current value of maEntryFont to set the entry font (if mbUseFont is true). */ + virtual void InitEntry( + SvLBoxEntry* pEntry, + const XubString& rEntryText, + const Image& rCollImg, + const Image& rExpImg, + SvLBoxButtonKind eButtonKind ); +}; + +#if ENABLE_LAYOUT + +namespace layout +{ +class SvxFontListBoxImpl; +class SVX_DLLPUBLIC SvxFontListBox : public ListBox +{ + /*DECL_GET_IMPL( SvxFontListBox ); + DECL_CONSTRUCTORS( SvxFontListBox, ListBox, WB_BORDER ); + DECL_GET_WINDOW (SvxFontListBox);*/ + +public: + SvxFontListBox( Context*, const char* ); + ~SvxFontListBox (); + sal_uInt16 InsertFontEntry (String const& entry, Font const& font, Color const* color=0); +}; +}; + +#endif + + +// ============================================================================ + +#endif + diff --git a/svx/inc/fontworkgallery.hrc b/svx/inc/fontworkgallery.hrc new file mode 100644 index 000000000000..8d7847824d81 --- /dev/null +++ b/svx/inc/fontworkgallery.hrc @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fontworkgallery.hrc,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#include <svx/dialogs.hrc> + +#define FL_FAVORITES 1 +#define CTL_FAVORITES 2 +#define BTN_OK 3 +#define BTN_CANCEL 4 +#define MF_VALUE 7 +#define FT_VALUE 8 +#define BTN_HELP 9 + +#define STR_CLICK_TO_ADD_TEXT 1 + + +#define STR_ALIGN_LEFT 1 +#define STR_ALIGN_CENTER 2 +#define STR_ALIGN_RIGHT 3 +#define STR_ALIGN_WORD 4 +#define STR_ALIGN_STRETCH 5 +#define STR_CHARS_SPACING_VERY_TIGHT 6 +#define STR_CHARS_SPACING_TIGHT 7 +#define STR_CHARS_SPACING_NORMAL 8 +#define STR_CHARS_SPACING_LOOSE 9 +#define STR_CHARS_SPACING_VERY_LOOSE 10 +#define STR_CHARS_SPACING_CUSTOM 11 +#define STR_CHARS_SPACING_KERN_PAIRS 12 + +#define IMG_FONTWORK_ALIGN_LEFT_16 1 +#define IMG_FONTWORK_ALIGN_LEFT_16_H 2 +#define IMG_FONTWORK_ALIGN_LEFT_26 3 +#define IMG_FONTWORK_ALIGN_LEFT_26_H 4 +#define IMG_FONTWORK_ALIGN_CENTER_16 5 +#define IMG_FONTWORK_ALIGN_CENTER_16_H 6 +#define IMG_FONTWORK_ALIGN_CENTER_26 7 +#define IMG_FONTWORK_ALIGN_CENTER_26_H 8 +#define IMG_FONTWORK_ALIGN_RIGHT_16 9 +#define IMG_FONTWORK_ALIGN_RIGHT_16_H 10 +#define IMG_FONTWORK_ALIGN_RIGHT_26 11 +#define IMG_FONTWORK_ALIGN_RIGHT_26_H 12 +#define IMG_FONTWORK_ALIGN_WORD_16 13 +#define IMG_FONTWORK_ALIGN_WORD_16_H 14 +#define IMG_FONTWORK_ALIGN_WORD_26 15 +#define IMG_FONTWORK_ALIGN_WORD_26_H 16 +#define IMG_FONTWORK_ALIGN_STRETCH_16 17 +#define IMG_FONTWORK_ALIGN_STRETCH_16_H 18 +#define IMG_FONTWORK_ALIGN_STRETCH_26 19 +#define IMG_FONTWORK_ALIGN_STRETCH_26_H 20 diff --git a/svx/inc/fontworkgallery.hxx b/svx/inc/fontworkgallery.hxx new file mode 100644 index 000000000000..3ceb365d32f0 --- /dev/null +++ b/svx/inc/fontworkgallery.hxx @@ -0,0 +1,261 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fontworkgallery.hxx,v $ + * $Revision: 1.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef _SVX_FONTWORK_GALLERY_DIALOG_HXX +#define _SVX_FONTWORK_GALLERY_DIALOG_HXX + +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#include <svtools/valueset.hxx> +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#include <vcl/dialog.hxx> +#include <sfx2/tbxctrl.hxx> +#include "svx/svxdllapi.h" + +#include <vector> + +class FmFormModel; +class SdrView; +class Window; +class SdrTextObj; +class SdrObject; +class SdrModel; + +class SfxBindings; +class ToolbarMenu; +class SfxStatusForwarder; + +//------------------------------------------------------------------------ + +namespace svx +{ + +class FontWorkAlignmentWindow : public SfxPopupWindow +{ + using FloatingWindow::StateChanged; +private: + ToolbarMenu* mpMenu; + + Image maImgAlgin1; + Image maImgAlgin2; + Image maImgAlgin3; + Image maImgAlgin4; + Image maImgAlgin5; + Image maImgAlgin1h; + Image maImgAlgin2h; + Image maImgAlgin3h; + Image maImgAlgin4h; + Image maImgAlgin5h; + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; + + bool mbPopupMode; + + DECL_LINK( SelectHdl, void * ); + + void implSetAlignment( int nAlignmentMode, bool bEnabled ); + void implInit(); + +protected: + virtual BOOL Close(); + virtual void PopupModeEnd(); + + /** This function is called when the window gets the focus. It grabs + the focus to the line ends value set so that it can be controlled with + the keyboard. + */ + virtual void GetFocus (void); + +public: + FontWorkAlignmentWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + FontWorkAlignmentWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + Window* pParentWindow ); + ~FontWorkAlignmentWindow(); + + void StartSelection(); + + virtual SfxPopupWindow* Clone() const; + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +class SVX_DLLPUBLIC FontWorkAlignmentControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + FontWorkAlignmentControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~FontWorkAlignmentControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +//------------------------------------------------------------------------ + +class FontWorkCharacterSpacingWindow : public SfxPopupWindow +{ + using FloatingWindow::StateChanged; +private: + ToolbarMenu* mpMenu; + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; + + bool mbPopupMode; + + DECL_LINK( SelectHdl, void * ); + + void implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled ); + void implSetKernCharacterPairs( sal_Bool bKernOnOff, bool bEnabled ); + void implInit(); + +protected: + virtual BOOL Close(); + virtual void PopupModeEnd(); + + /** This function is called when the window gets the focus. It grabs + the focus to the line ends value set so that it can be controlled with + the keyboard. + */ + virtual void GetFocus (void); + +public: + FontWorkCharacterSpacingWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + FontWorkCharacterSpacingWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + Window* pParentWindow ); + ~FontWorkCharacterSpacingWindow(); + + void StartSelection(); + + virtual SfxPopupWindow* Clone() const; + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +class SVX_DLLPUBLIC FontWorkCharacterSpacingControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + FontWorkCharacterSpacingControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~FontWorkCharacterSpacingControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +//------------------------------------------------------------------------ + +class SVX_DLLPUBLIC FontWorkShapeTypeControl : public SfxToolBoxControl +{ + using SfxToolBoxControl::Select; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + FontWorkShapeTypeControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~FontWorkShapeTypeControl(); + + virtual void Select( BOOL bMod1 = FALSE ); + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +//------------------------------------------------------------------------ + +class FontworkCharacterSpacingDialog : public ModalDialog +{ + FixedText maFLScale; + MetricField maMtrScale; + OKButton maOKButton; + CancelButton maCancelButton; + HelpButton maHelpButton; + +public: + FontworkCharacterSpacingDialog( Window* pParent, sal_Int32 nScale ); + ~FontworkCharacterSpacingDialog(); + + sal_Int32 getScale() const; +}; + + +class SVX_DLLPUBLIC FontWorkGalleryDialog : public ModalDialog +{ + ValueSet maCtlFavorites; + FixedLine maFLFavorites; + OKButton maOKButton; + CancelButton maCancelButton; + HelpButton maHelpButton; + + sal_uInt16 mnThemeId; + + SdrView* mpSdrView; + FmFormModel* mpModel; + + String maStrClickToAddText; + + DECL_LINK( DoubleClickFavoriteHdl, void * ); + DECL_LINK( ClickOKHdl, void * ); + DECL_LINK( ClickTextDirectionHdl, ImageButton * ); + + SdrObject** mppSdrObject; + SdrModel* mpDestModel; + + void initfavorites(sal_uInt16 nThemeId, std::vector< Bitmap * >& rFavorites); + void insertSelectedFontwork(); + void changeText( SdrTextObj* pObj ); + void fillFavorites( sal_uInt16 nThemeId, std::vector< Bitmap * >& rFavorites ); + + std::vector< Bitmap * > maFavoritesHorizontal; + +public: + FontWorkGalleryDialog( SdrView* pView, Window* pParent, sal_uInt16 nSID ); + ~FontWorkGalleryDialog(); + + // SJ: if the SdrObject** is set, the SdrObject is not inserted into the page when executing the dialog + void SetSdrObjectRef( SdrObject**, SdrModel* pModel ); +}; + +} + +#endif diff --git a/svx/inc/forbiddencharacterstable.hxx b/svx/inc/forbiddencharacterstable.hxx new file mode 100644 index 000000000000..d59c93c58994 --- /dev/null +++ b/svx/inc/forbiddencharacterstable.hxx @@ -0,0 +1,73 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: forbiddencharacterstable.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _FORBIDDENCHARACTERSTABLE_HXX +#define _FORBIDDENCHARACTERSTABLE_HXX + +#ifndef _TABLE_HXX //autogen +#include <tools/table.hxx> +#endif + +#include <vos/refernce.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/i18n/ForbiddenCharacters.hpp> +#include "svx/svxdllapi.h" + +namespace com { +namespace sun { +namespace star { +namespace lang { + class XMultiServiceFactory; +}}}} + +struct ForbiddenCharactersInfo +{ + com::sun::star::i18n::ForbiddenCharacters aForbiddenChars; + BOOL bTemporary; +}; + +DECLARE_TABLE( SvxForbiddenCharactersTableImpl, ForbiddenCharactersInfo* ) + +class SVX_DLLPUBLIC SvxForbiddenCharactersTable : public SvxForbiddenCharactersTableImpl, public vos::OReference +{ +private: + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; + +public: + SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize = 4, USHORT nGrow = 4 ); + ~SvxForbiddenCharactersTable(); + + const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( USHORT nLanuage, BOOL bGetDefault ) const; + void SetForbiddenCharacters( USHORT nLanuage , const com::sun::star::i18n::ForbiddenCharacters& ); + void ClearForbiddenCharacters( USHORT nLanuage ); +}; + +#endif // _FORBIDDENCHARACTERSTABLE_HXX + diff --git a/svx/inc/formatpaintbrushctrl.hxx b/svx/inc/formatpaintbrushctrl.hxx new file mode 100644 index 000000000000..5d8ef7b6f673 --- /dev/null +++ b/svx/inc/formatpaintbrushctrl.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: formatpaintbrushctrl.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FORMATPAINTBRUSHCTRL_HXX +#define _SVX_FORMATPAINTBRUSHCTRL_HXX + +// header for class SfxToolBoxControl +#include <sfx2/tbxctrl.hxx> +// header for class Timer +#include <vcl/timer.hxx> +#include "svx/svxdllapi.h" + +//............................................................................. +namespace svx +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** +*/ + +class SVX_DLLPUBLIC FormatPaintBrushToolBoxControl : public SfxToolBoxControl +{ + using SfxToolBoxControl::Select; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + FormatPaintBrushToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~FormatPaintBrushToolBoxControl(); + + virtual void DoubleClick(); + virtual void Click(); + virtual void Select( BOOL bMod1 = FALSE ); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); +private: + DECL_LINK( WaitDoubleClickHdl, void* ); + void impl_executePaintBrush(); + +private: + bool m_bPersistentCopy;//indicates that the content of the format clipboard should not be erased after paste + Timer m_aDoubleClickTimer; +}; + +//............................................................................. +} //namespace svx +//............................................................................. +#endif diff --git a/svx/inc/fwdtitem.hxx b/svx/inc/fwdtitem.hxx new file mode 100644 index 000000000000..8a02474f525c --- /dev/null +++ b/svx/inc/fwdtitem.hxx @@ -0,0 +1,111 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fwdtitem.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FWDTITEM_HXX +#define _SVX_FWDTITEM_HXX + +// include --------------------------------------------------------------- + + +#include <svl/poolitem.hxx> + + +// class SvxFontWidthItem ----------------------------------------------- + + +/* [Beschreibung] + + Dieses Item beschreibt die Font-Breite. +*/ + +class SvxFontWidthItem : public SfxPoolItem +{ + UINT16 nWidth; // 0 = default + USHORT nProp; // default 100% +public: + TYPEINFO(); + + SvxFontWidthItem( const USHORT nSz /*= 0*/, + const USHORT nPropWidth /*= 100*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual int ScaleMetrics( long nMult, long nDiv ); + virtual int HasMetrics() const; + + inline SvxFontWidthItem& operator=(const SvxFontWidthItem& rItem ) + { + SetWidthValue( rItem.GetWidth() ); + SetProp( rItem.GetProp() ); + return *this; + } + + void SetWidth( UINT16 nNewWidth, const USHORT nNewProp = 100 ) + { + DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); + nWidth = UINT16(( (UINT32)nNewWidth * nNewProp ) / 100 ); + nProp = nNewProp; + } + + UINT16 GetWidth() const { return nWidth; } + + void SetWidthValue( UINT16 nNewWidth ) + { + DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); + nWidth = nNewWidth; + } + + void SetProp( const USHORT nNewProp ) + { + DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); + nProp = nNewProp; + } + + USHORT GetProp() const { return nProp; } +}; + + + + + +#endif + + diff --git a/svx/inc/galbrws.hxx b/svx/inc/galbrws.hxx new file mode 100644 index 000000000000..30733d955b10 --- /dev/null +++ b/svx/inc/galbrws.hxx @@ -0,0 +1,119 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: galbrws.hxx,v $ + * $Revision: 1.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_GALBRWS_HXX_ +#define _SVX_GALBRWS_HXX_ + +#include <sfx2/ctrlitem.hxx> +#include <sfx2/dockwin.hxx> +#include <vcl/graph.hxx> +#include <tools/urlobj.hxx> +#include "svx/svxdllapi.h" + +// ----------- +// - Defines - +// ----------- + +#define GALLERYBROWSER() ((GalleryBrowser*)( SfxViewFrame::Current()->GetChildWindow(GalleryChildWindow::GetChildWindowId())->GetWindow())) + +// ------------------------- +// - SvxGalleryChildWindow - +// ------------------------- + +class SVX_DLLPUBLIC GalleryChildWindow : public SfxChildWindow +{ +public: + GalleryChildWindow( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); + ~GalleryChildWindow(); + + SFX_DECL_CHILDWINDOW( GalleryChildWindow ); +}; + +// ------------------ +// - FormModel - +// ------------------ + +class FmFormModel; + +// ------------------ +// - GalleryBrowser - +// ------------------ + +class GalleryBrowser1; +class GalleryBrowser2; +class GallerySplitter; +class Gallery; + +class GalleryBrowser : public SfxDockingWindow +{ + friend class GalleryBrowser1; + friend class GalleryBrowser2; + friend class GallerySplitter; + using Window::KeyInput; + +private: + + Size maLastSize; + GallerySplitter* mpSplitter; + GalleryBrowser1* mpBrowser1; + GalleryBrowser2* mpBrowser2; + Gallery* mpGallery; + long mnDummy1; + long mnDummy2; + long mnDummy3; + + void InitSettings(); + + virtual BOOL Close(); + virtual void Resize(); + virtual void GetFocus(); + + DECL_LINK( SplitHdl, void* ); + +protected: + + void ThemeSelectionHasChanged(); + +public: + + GalleryBrowser( SfxBindings* pBindings, SfxChildWindow* pCW, + Window* pParent, const ResId& rResId ); + ~GalleryBrowser(); + + INetURLObject GetURL() const; + String GetFilterName() const; + Graphic GetGraphic() const; + BOOL GetVCDrawModel( FmFormModel& rModel ) const; + BOOL IsLinkage() const; + + BOOL KeyInput( const KeyEvent& rKEvt, Window* pWindow ); +}; + +#endif // _SVX_GALBRWS_HXX_ diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx new file mode 100644 index 000000000000..119146fe62e7 --- /dev/null +++ b/svx/inc/galbrws2.hxx @@ -0,0 +1,184 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: galbrws2.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_GALBRWS2_HXX_ +#define _SVX_GALBRWS2_HXX_ + +#include <vcl/lstbox.hxx> +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <vcl/timer.hxx> +#include <vcl/toolbox.hxx> +#include <svtools/transfer.hxx> +#include <svl/lstner.hxx> +#include <svtools/miscopt.hxx> +#include "galbrws.hxx" + +// ---------------------- +// - GalleryBrowserMode - +// ---------------------- + +enum GalleryBrowserMode +{ + GALLERYBROWSERMODE_NONE = 0, + GALLERYBROWSERMODE_ICON = 1, + GALLERYBROWSERMODE_LIST = 2, + GALLERYBROWSERMODE_PREVIEW = 3 +}; + +// ----------------- +// - GalleryTravel - +// ----------------- + +enum GalleryBrowserTravel +{ + GALLERYBROWSERTRAVEL_CURRENT = 0, + GALLERYBROWSERTRAVEL_FIRST = 1, + GALLERYBROWSERTRAVEL_LAST = 2, + GALLERYBROWSERTRAVEL_PREVIOUS = 3, + GALLERYBROWSERTRAVEL_NEXT = 4 +}; + +// ------------------------ +// - GalleryItemTextFlags - +// ------------------------ + +#define GALLERY_ITEM_THEMENAME 0x00000001 +#define GALLERY_ITEM_TITLE 0x00000002 +#define GALLERY_ITEM_PATH 0x00000004 + +// ------------------ +// - GalleryToolBox - +// ------------------ + +class GalleryToolBox : public ToolBox +{ +private: + + virtual void KeyInput( const KeyEvent& rKEvt ); + +public: + + GalleryToolBox( GalleryBrowser2* pParent ); + ~GalleryToolBox(); +}; + +// ------------------- +// - GalleryBrowser2 - +// ------------------- + +class Gallery; +class GalleryTheme; +class GalleryIconView; +class GalleryListView; +class GalleryPreview; +class Menu; +class SgaObject; + +class GalleryBrowser2 : public Control, public SfxListener +{ + friend class GalleryBrowser; + using Control::Notify; + using Window::KeyInput; + +private: + + SvtMiscOptions maMiscOptions; + Gallery* mpGallery; + GalleryTheme* mpCurTheme; + GalleryIconView* mpIconView; + GalleryListView* mpListView; + GalleryPreview* mpPreview; + GalleryToolBox maViewBox; + FixedLine maSeparator; + FixedText maInfoBar; + Point maDragStartPos; + ULONG mnCurActionPos; + GalleryBrowserMode meMode; + GalleryBrowserMode meLastMode; + BOOL mbCurActionIsLinkage; + + void InitSettings(); + + void ImplUpdateViews( USHORT nSelectionId ); + void ImplUpdateInfoBar(); + ULONG ImplGetSelectedItemId( const Point* pSelPosPixel, Point& rSelPos ); + void ImplSelectItemId( ULONG nItemId ); + void ImplExecute( USHORT nId ); + + // Control + virtual void Resize(); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + // SfxListener + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + + DECL_LINK( MenuSelectHdl, Menu* pMenu ); + DECL_LINK( SelectObjectHdl, void* ); + DECL_LINK( SelectTbxHdl, ToolBox* ); + DECL_LINK( MiscHdl, void* ); + +private: + + static GalleryBrowserMode meInitMode; + +public: + + static String GetItemText( const GalleryTheme& rTheme, const SgaObject& rObj, ULONG nItemTextFlags ); + +public: + + GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, Gallery* pGallery ); + ~GalleryBrowser2(); + + void SelectTheme( const String& rThemeName ); + + GalleryBrowserMode GetMode() const { return meMode; } + void SetMode( GalleryBrowserMode eMode ); + + Window* GetViewWindow() const; + + void Travel( GalleryBrowserTravel eTravel ); + + INetURLObject GetURL() const; + String GetFilterName() const; + Graphic GetGraphic() const; + BOOL GetVCDrawModel( FmFormModel& rModel ) const; + BOOL IsLinkage() const; + + sal_Int8 AcceptDrop( DropTargetHelper& rTarget, const AcceptDropEvent& rEvt ); + sal_Int8 ExecuteDrop( DropTargetHelper& rTarget, const ExecuteDropEvent& rEvt ); + void StartDrag( Window* pWindow, const Point* pDragPoint = NULL ); + void TogglePreview( Window* pWindow, const Point* pPreviewPoint = NULL ); + void ShowContextMenu( Window* pWindow, const Point* pContextPoint = NULL ); + BOOL KeyInput( const KeyEvent& rEvt, Window* pWindow ); +}; + +#endif diff --git a/svx/inc/galctrl.hxx b/svx/inc/galctrl.hxx new file mode 100644 index 000000000000..2a986ea60ba8 --- /dev/null +++ b/svx/inc/galctrl.hxx @@ -0,0 +1,194 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: galctrl.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_GALCTRL_HXX_ +#define _SVX_GALCTRL_HXX_ + +#include <vcl/dialog.hxx> +#include <vcl/graph.hxx> +#include <vcl/fixed.hxx> +#include <vcl/group.hxx> +#include <vcl/button.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/menu.hxx> +#include <vcl/edit.hxx> +#include <vcl/combobox.hxx> +#include <vcl/sound.hxx> +#include <svl/slstitm.hxx> +#include <svtools/transfer.hxx> +#include <svtools/valueset.hxx> +#include <svtools/brwbox.hxx> +#include <goodies/grfmgr.hxx> +#include "svx/galmisc.hxx" +#include "svx/svxdllapi.h" + +// ------------ +// - Forwards - +// ------------ + +class GalleryTheme; +class GalleryBrowser2; + +// ------------------ +// - GalleryPreview - +// ------------------ + +class SVX_DLLPUBLIC GalleryPreview : public Window, public DropTargetHelper, public DragSourceHelper +{ +private: + + GraphicObject aGraphicObj; + Rectangle aPreviewRect; + GalleryTheme* mpTheme; + + SVX_DLLPRIVATE BOOL ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; + SVX_DLLPRIVATE void InitSettings(); + + // Window + SVX_DLLPRIVATE virtual void Paint(const Rectangle& rRect); + SVX_DLLPRIVATE virtual void MouseButtonDown(const MouseEvent& rMEvt); + SVX_DLLPRIVATE virtual void Command(const CommandEvent& rCEvt); + SVX_DLLPRIVATE virtual void KeyInput( const KeyEvent& rKEvt ); + SVX_DLLPRIVATE virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + + // DropTargetHelper + SVX_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); + SVX_DLLPRIVATE virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); + + // DragSourceHelper + SVX_DLLPRIVATE virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ); + + DECL_LINK( MenuSelectHdl, Menu* ); + +public: + + GalleryPreview( GalleryBrowser2* pParent, GalleryTheme* pTheme ); + GalleryPreview( Window* pParent, const ResId& rResId ); + ~GalleryPreview(); + + void SetGraphic( const Graphic& rGraphic ) { aGraphicObj.SetGraphic( rGraphic ); } + bool SetGraphic( const INetURLObject& ); + void PreviewMedia( const INetURLObject& rURL ); +}; + +// ------------------- +// - GalleryIconView - +// ------------------- + +class GalleryIconView : public ValueSet, public DropTargetHelper, public DragSourceHelper +{ + using ValueSet::StartDrag; + +private: + + GalleryTheme* mpTheme; + + void InitSettings(); + + // ValueSet + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + + // Window + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void Command( const CommandEvent& rCEvt ); + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + // DropTargetHelper + virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); + virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); + + // DragSourceHelper + virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ); + +public: + + GalleryIconView( GalleryBrowser2* pParent, GalleryTheme* pTheme ); + ~GalleryIconView(); +}; + +// ------------------- +// - GalleryListView - +// ------------------- + +class GalleryListView : public BrowseBox +{ + using BrowseBox::AcceptDrop; + using BrowseBox::ExecuteDrop; + +private: + + Link maSelectHdl; + GalleryTheme* mpTheme; + ULONG mnCurRow; + BOOL mbInit; + + void InitSettings(); + + // BrowseBox + virtual BOOL SeekRow( long nRow ); + virtual void PaintField( OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId ) const; + virtual void DoubleClick( const BrowserMouseEvent& rEvt ); + virtual void Select(); + virtual sal_Int8 AcceptDrop( const BrowserAcceptDropEvent& rEvt ); + virtual sal_Int8 ExecuteDrop( const BrowserExecuteDropEvent& rEvt ); + virtual void KeyInput( const KeyEvent& rKEvt ); + + // Window + virtual void Command( const CommandEvent& rCEvt ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + // DragSourceHelper + virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ); + +public: + + GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme ); + ~GalleryListView(); + + void SetSelectHdl( const Link& rSelectHdl ) { maSelectHdl = rSelectHdl; } + + /** GetCellText returns the text at the given position + @param _nRow + the number of the row + @param _nColId + the ID of the column + @return + the text out of the cell + */ + virtual String GetCellText(long _nRow, USHORT _nColId) const; + + // from IAccessibleTableProvider + virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex); + virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint); +}; + +#endif // _SVX_GALCTRL_HXX_ diff --git a/svx/inc/gallery.hrc b/svx/inc/gallery.hrc new file mode 100644 index 000000000000..556399b2a5f3 --- /dev/null +++ b/svx/inc/gallery.hrc @@ -0,0 +1,215 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: gallery.hrc,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DIALOGS_HRC +#include <svx/dialogs.hrc> +#endif +#include "galtheme.hrc" + +// ----------- +// - Defines - +// ----------- + +// Dialoge +#define RID_SVXDLG_GALLERYBROWSER (RID_SVX_GALLERY_START + 5) + +// Gallery-Strings +#define RID_SVXSTR_EXTFORMAT1_SYS (RID_SVX_GALLERY_START + 15) +#define RID_SVXSTR_EXTFORMAT1_UI (RID_SVX_GALLERY_START + 16) +#define RID_SVXSTR_EXTFORMAT2_SYS (RID_SVX_GALLERY_START + 17) +#define RID_SVXSTR_EXTFORMAT2_UI (RID_SVX_GALLERY_START + 18) +#define RID_SVXSTR_EXTFORMAT3_SYS (RID_SVX_GALLERY_START + 19) +#define RID_SVXSTR_EXTFORMAT3_UI (RID_SVX_GALLERY_START + 20) +#define RID_SVXSTR_EXTFORMAT4_SYS (RID_SVX_GALLERY_START + 21) +#define RID_SVXSTR_EXTFORMAT4_UI (RID_SVX_GALLERY_START + 22) +#define RID_SVXSTR_EXTFORMAT5_SYS (RID_SVX_GALLERY_START + 23) +#define RID_SVXSTR_EXTFORMAT5_UI (RID_SVX_GALLERY_START + 24) +#define RID_SVXSTR_GALLERY_FOPENERROR (RID_SVX_GALLERY_START + 11) +#define RID_SVXSTR_GALLERY_NOTHEME (RID_SVX_GALLERY_START + 13) +#define RID_SVXSTR_GALLERY_DELETEOBJ (RID_SVX_GALLERY_START + 14) +#define RID_SVXSTR_GALLERY_ACTUALIZE_PROGRESS (RID_SVX_GALLERY_START + 25) +#define RID_SVXSTR_GALLERY_FILTER (RID_SVX_GALLERY_START + 26) +#define RID_SVXSTR_GALLERY_LENGTH (RID_SVX_GALLERY_START + 27) +#define RID_SVXSTR_GALLERY_SIZE (RID_SVX_GALLERY_START + 28) +#define RID_SVXSTR_GALLERY_DELETEDD (RID_SVX_GALLERY_START + 29) +#define RID_SVXSTR_GALLERY_SGIERROR (RID_SVX_GALLERY_START + 31) +#define RID_SVXSTR_GALLERY_NEWTHEME (RID_SVX_GALLERY_START + 32) +#define RID_SVXSTR_GALLERY_BROWSER (RID_SVX_GALLERY_START + 33) +#define RID_SVXSTR_GALLERY_THEMEERR (RID_SVX_GALLERY_START + 34) +#define RID_SVXSTR_GALLERY_IMPORTTHEME (RID_SVX_GALLERY_START + 41) +#define RID_SVXSTR_GALLERY_CREATETHEME (RID_SVX_GALLERY_START + 42) +#define RID_SVXSTR_GALLERY_DIALOGID (RID_SVX_GALLERY_START + 80) +#define RID_SVXSTR_GALLERY_DELETETHEME (RID_SVX_GALLERY_START + 83) +#define RID_SVXSTR_GALLERY_TITLE (RID_SVX_GALLERY_START + 84) +#define RID_SVXSTR_GALLERY_PATH (RID_SVX_GALLERY_START + 85) +#define RID_SVXSTR_GALLERY_ICONVIEW (RID_SVX_GALLERY_START + 86) +#define RID_SVXSTR_GALLERY_LISTVIEW (RID_SVX_GALLERY_START + 87) + +// Controls fuer Gallery +#define RID_SVXMN_GALLERY1 (RID_SVX_GALLERY_START + 36) +#define RID_SVXMN_GALLERY2 (RID_SVX_GALLERY_START + 37) + +// Images +#define RID_SVXBMP_GALLERY (RID_SVX_GALLERY_START + 46) +#define RID_SVXBMP_THEME (RID_SVX_GALLERY_START + 47) +#define RID_SVXBMP_THEME_NORMAL (RID_SVX_GALLERY_START + 48) +#define RID_SVXBMP_THEME_IMPORTED (RID_SVX_GALLERY_START + 50) +#define RID_SVXBMP_THEME_READONLY (RID_SVX_GALLERY_START + 52) +#define RID_SVXBMP_THEME_DEFAULT (RID_SVX_GALLERY_START + 54) +#define RID_SVXIMG_GALLERY_VIEW_ICON (RID_SVX_GALLERY_START + 56) +#define RID_SVXIMG_GALLERY_VIEW_LIST (RID_SVX_GALLERY_START + 57) +#define RID_SVXIMG_GALLERY_VIEW_ICON_HC (RID_SVX_GALLERY_START + 58) +#define RID_SVXIMG_GALLERY_VIEW_LIST_HC (RID_SVX_GALLERY_START + 59) + +// Gallery-Bitmaps fuer Sounds +#define RID_SVXBMP_GALLERY_SOUND_0 (RID_SVX_GALLERY_START + 61) +#define RID_SVXBMP_GALLERY_SOUND_1 (RID_SVX_GALLERY_START + 62) +#define RID_SVXBMP_GALLERY_SOUND_2 (RID_SVX_GALLERY_START + 63) +#define RID_SVXBMP_GALLERY_SOUND_3 (RID_SVX_GALLERY_START + 64) +#define RID_SVXBMP_GALLERY_SOUND_4 (RID_SVX_GALLERY_START + 65) +#define RID_SVXBMP_GALLERY_SOUND_5 (RID_SVX_GALLERY_START + 66) +#define RID_SVXBMP_GALLERY_SOUND_6 (RID_SVX_GALLERY_START + 67) +#define RID_SVXBMP_GALLERY_SOUND_7 (RID_SVX_GALLERY_START + 68) +#define RID_SVXBMP_GALLERY_MEDIA (RID_SVX_GALLERY_START + 71) + +// lokale Defines +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 + +#define CTL_GALLERY 1 +#define FL_THEMELIST 2 +#define LBX_THEMELIST 1 +#define FL_INFO 1 +#define FT_SIZE 1 +#define FT_DEPTH 2 +#define FT_MEMSIZE 3 +#define FT_FORMAT 4 +#define FT_CLIPART 5 +#define FT_BMPSIZE 6 +#define FT_BMPDEPTH 7 +#define FT_BMPMEM 8 +#define FT_BMPFORMAT 9 +#define BTN_BROWSER 1 +#define FL_THEME 1 +#define FL_PATH 4 +#define FL_FOUND 2 +#define FL_THEMEFILES 3 +#define EDT_PATH 1 +#define EDT_FILETYPE 1 +#define LBX_FOUND 1 +#define LBX_THEMEFILES 2 +#define BTN_TAKE 5 +#define BTN_CLEAR 6 +#define BTN_NEWTHEME 2 +#define BTN_IMPORT 5 +#define BTN_CLEARTHEME 3 +#define BTN_RENAMETHEME 7 +#define BTN_PATH 1 +#define BTN_SEARCH 4 +#define CBX_SUBDIRS 1 +#define CBX_TAKEALL 2 +#define CBX_PREVIEW 3 +#define CBX_CLEARALL 3 +#define FT_PATH 1 +#define FT_FILETYPE 2 +#define CBB_FILETYPE 1 +#define BTN_CLEARTHEMEFILE 6 +#define CTL_BROWSER 1 +#define FL_BROWSER 1 +#define FL_DRIVES 2 +#define LBX_DRIVE 1 +#define EDT_NEWTHEME 1 +#define FL_SEARCH_DIR 1 +#define FL_SEARCH_TYPE 2 +#define FT_SEARCH_DIR 1 +#define FT_SEARCH_TYPE 2 +#define FL_TAKE_PROGRESS 1 +#define FT_TAKE_FILE 1 +#define EDT_RENAMETHEME 1 +#define BTN_ADD 2 +#define CBX_LINKAGE 1 +#define WND_PREVIEW 1 +#define FT_FOUND 1 +#define BTN_TAKEALL 1 +#define BTN_PREVIEW 6 +#define WND_BRSPRV 1 +#define BTN_THEME 2 +#define BTN_RECOVER 3 +#define BTN_CLOSEBROWSER 7 +#define LBX_THEME2 1 +#define FL_THEME2 1 +#define BTN_NEWTHEME2 1 +#define BTN_RENAMETHEME2 3 +#define BTN_CLEARTHEME2 2 +#define BTN_CLOSETHEME 4 +#define MN_ADDMENU 2 +#define MN_ADD 6 +#define MN_ADD_LINK 8 +#define MN_PREVIEW 10 +#define MN_DELETE 12 +#define MN_BACKGROUND 14 +#define MN_TITLE 15 +#define MN_COPYCLIPBOARD 16 +#define MN_PASTECLIPBOARD 17 + +#define MN_NEWTHEME 20 +#define MN_ACTUALIZE 21 +#define MN_RENAME 22 +#define MN_PROPERTIES 23 +#define MN_ASSIGN_ID 24 + +#define FL_ACTUALIZE_PROGRESS 1 +#define FT_ACTUALIZE_FILE 1 +#define FL_ID 1 +#define MTF_ID 1 +#define LB_RESNAME 1 +#define BTN_RESNAME 1 +#define EDT_TITLE 20 +#define FL_TITLE 21 + +// Gallery-TabDialog +#define FI_MS_IMAGE 1 +#define FT_MS_NAME 1 +#define EDT_MS_NAME 1 +#define FL_MS_GENERAL_FIRST 1 +#define FT_MS_TYPE 2 +#define FT_MS_SHOW_TYPE 3 +#define FT_MS_PATH 4 +#define FT_MS_SHOW_PATH 5 +#define FT_MS_CONTENT 6 +#define FT_MS_SHOW_CONTENT 7 +#define FL_MS_GENERAL_SECOND 2 +#define FT_MS_CHANGEDATE 10 +#define FT_MS_SHOW_CHANGEDATE 11 + +// Gallery Browser +#define GALLERY_BROWSER1 1 +#define GALLERY_BROWSER2 2 +#define GALLERY_SPLITTER 1 diff --git a/svx/inc/gallery.hxx b/svx/inc/gallery.hxx new file mode 100644 index 000000000000..64b87184a0e7 --- /dev/null +++ b/svx/inc/gallery.hxx @@ -0,0 +1,177 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: gallery.hxx,v $ + * $Revision: 1.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _GALLERY_HXX_ +#define _GALLERY_HXX_ + +#include <tools/solar.h> +#include <tools/string.hxx> +#include <tools/urlobj.hxx> +#include <vector> +#include "svx/svxdllapi.h" + +// ----------- +// - Defines - +// ----------- + +#define SGA_FORMAT_NONE 0x00000000L +#define SGA_FORMAT_STRING 0x00000001L +#define SGA_FORMAT_GRAPHIC 0x00000010L +#define SGA_FORMAT_SOUND 0x00000100L +#define SGA_FORMAT_OLE 0x00001000L +#define SGA_FORMAT_SVDRAW 0x00010000L +#define SGA_FORMAT_ALL 0xFFFFFFFFL + +#define SVX_GALLERY() (GalleryExplorer::GetGallery()) + +// Defines for preinstalled themes +#define GALLERY_THEME_3D 1 +#define GALLERY_THEME_ANIMATIONS 2 +#define GALLERY_THEME_BULLETS 3 +#define GALLERY_THEME_OFFICE 4 +#define GALLERY_THEME_FLAGS 5 +#define GALLERY_THEME_FLOWCHARTS 6 +#define GALLERY_THEME_EMOTICONS 7 +#define GALLERY_THEME_PHOTOS 8 +#define GALLERY_THEME_BACKGROUNDS 9 +#define GALLERY_THEME_HOMEPAGE 10 +#define GALLERY_THEME_INTERACTION 11 +#define GALLERY_THEME_MAPS 12 +#define GALLERY_THEME_PEOPLE 13 +#define GALLERY_THEME_SURFACES 14 +#define GALLERY_THEME_HTMLBUTTONS 15 +#define GALLERY_THEME_POWERPOINT 16 +#define GALLERY_THEME_RULERS 17 +#define GALLERY_THEME_SOUNDS 18 +#define GALLERY_THEME_SYMBOLS 19 +#define GALLERY_THEME_MYTHEME 20 +#define GALLERY_THEME_USERSOUNDS 21 +#define GALLERY_THEME_ARROWS 22 +#define GALLERY_THEME_BALLOONS 23 +#define GALLERY_THEME_KEYBOARD 24 +#define GALLERY_THEME_TIME 25 +#define GALLERY_THEME_PRESENTATION 26 +#define GALLERY_THEME_CALENDAR 27 +#define GALLERY_THEME_NAVIGATION 28 +#define GALLERY_THEME_COMMUNICATION 29 +#define GALLERY_THEME_FINANCES 30 +#define GALLERY_THEME_COMPUTER 31 +#define GALLERY_THEME_CLIMA 32 +#define GALLERY_THEME_EDUCATION 33 +#define GALLERY_THEME_TROUBLE 34 +#define GALLERY_THEME_SCREENBEANS 35 +#define GALLERY_THEME_FONTWORK 36 +#define GALLERY_THEME_FONTWORK_VERTICAL 37 + +#define GALLERY_THEME_DUMMY5 38 + +// ------------------- +// - GalleryExplorer - +// ------------------- + +class List; +class Gallery; +class VCDrawModel; +class FmFormModel; +class SdrModel; +class Graphic; +class FmFormModel; +class Bitmap; +class OutputDevice; + +class SVX_DLLPUBLIC GalleryExplorer +{ +private: + + SVX_DLLPRIVATE static Gallery* ImplGetGallery(); + +public: + + static GalleryExplorer* GetGallery(); + +public: + + INetURLObject GetURL() const; + String GetFilterName() const; + Graphic GetGraphic() const; + BOOL GetVCDrawModel( FmFormModel& rModel ) const; + BOOL IsLinkage() const; + + static BOOL FillThemeList( List& rThemeList ); + + // FillObjList is filling rObjList with Strings of the internal Gallery Object URL + static BOOL FillObjList( const String& rThemeName, List& rObjList ); + static BOOL FillObjList( ULONG nThemeId, List& rObjList ); + + // FillObjTitleList is filling the rList with the title for each gallery object + static sal_Bool FillObjListTitle( const sal_uInt32 nThemeId, std::vector< rtl::OUString >& rList ); + + static BOOL InsertURL( const String& rThemeName, const String& rURL ); + static BOOL InsertURL( ULONG nThemeId, const String& rURL ); + + static BOOL InsertURL( const String& rThemeName, const String& rURL, + const ULONG nSgaFormat /* = SGA_FORMAT_ALL */ ); + static BOOL InsertURL( ULONG nThemeId, const String& rURL, + const ULONG nSgaFormat /* = SGA_FORMAT_ALL */ ); + + static ULONG GetObjCount( const String& rThemeName ); + static ULONG GetObjCount( ULONG nThemeId ); + + static BOOL GetGraphicObj( const String& rThemeName, ULONG nPos, + Graphic* pGraphic = NULL, Bitmap* pThumb = NULL, + BOOL bProgess = FALSE ); + static BOOL GetGraphicObj( ULONG nThemeId, ULONG nPos, + Graphic* pGraphic = NULL, Bitmap* pThumb = NULL, + BOOL bProgess = FALSE ); + + static BOOL InsertGraphicObj( const String& rThemeName, const Graphic& rGraphic ); + static BOOL InsertGraphicObj( ULONG nThemeId, const Graphic& rGraphic ); + + static ULONG GetSdrObjCount( const String& rThemeName ); + static ULONG GetSdrObjCount( ULONG nThemeId ); + + static BOOL GetSdrObj( const String& rThemeName, ULONG nSdrModelPos, + SdrModel* pModel = NULL, Bitmap* pThumb = NULL ); + static BOOL GetSdrObj( ULONG nThemeId, ULONG nSdrModelPos, + SdrModel* pModel = NULL, Bitmap* pThumb = NULL ); + + static BOOL InsertSdrObj( const String& rThemeName, FmFormModel& rModel ); + static BOOL InsertSdrObj( ULONG nThemeId, FmFormModel& rModel ); + + static BOOL BeginLocking( const String& rThemeName ); + static BOOL BeginLocking( ULONG nThemeId ); + + static BOOL EndLocking( const String& rThemeName ); + static BOOL EndLocking( ULONG nThemeId ); + + static BOOL DrawCentered( OutputDevice* pOut, const FmFormModel& rModel ); +}; + +#endif // _GALLERY_HXX_ diff --git a/svx/inc/galobj.hxx b/svx/inc/galobj.hxx new file mode 100644 index 000000000000..e2a5bee41dd6 --- /dev/null +++ b/svx/inc/galobj.hxx @@ -0,0 +1,241 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: galobj.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_GALOBJ_HXX_ +#define _SVX_GALOBJ_HXX_ + +#include <tools/urlobj.hxx> +#include <vcl/graph.hxx> +#include "svx/galmisc.hxx" + +// ----------- +// - Defines - +// ----------- + +#define S_THUMB 80 + +// ----------------------------------------------------------------------------- + +#define SGA_FORMAT_NONE 0x00000000L +#define SGA_FORMAT_STRING 0x00000001L +#define SGA_FORMAT_GRAPHIC 0x00000010L +#define SGA_FORMAT_SOUND 0x00000100L +#define SGA_FORMAT_OLE 0x00001000L +#define SGA_FORMAT_SVDRAW 0x00010000L +#define SGA_FORMAT_ALL 0xFFFFFFFFL + +// ---------------- +// - GalSoundType - +// ---------------- + +enum GalSoundType +{ + SOUND_STANDARD = 0, + SOUND_COMPUTER = 1, + SOUND_MISC = 2, + SOUND_MUSIC = 3, + SOUND_NATURE = 4, + SOUND_SPEECH = 5, + SOUND_TECHNIC = 6, + SOUND_ANIMAL = 7 +}; + +// ------------- +// - SgaObject - +// ------------- + +class SVX_DLLPUBLIC SgaObject +{ + friend class GalleryTheme; + +private: + + void ImplUpdateURL( const INetURLObject& rNewURL ) { aURL = rNewURL; } + +protected: + + Bitmap aThumbBmp; + GDIMetaFile aThumbMtf; + INetURLObject aURL; + String aUserName; + String aTitle; + BOOL bIsValid; + BOOL bIsThumbBmp; + + virtual void WriteData( SvStream& rOut, const String& rDestDir ) const; + virtual void ReadData( SvStream& rIn, UINT16& rReadVersion ); + + BOOL CreateThumb( const Graphic& rGraphic ); + +public: + + SgaObject(); + virtual ~SgaObject() {}; + + virtual SgaObjKind GetObjKind() const = 0; + virtual UINT16 GetVersion() const = 0; + + virtual Bitmap GetThumbBmp() const { return aThumbBmp; } + const GDIMetaFile& GetThumbMtf() const { return aThumbMtf; } + const INetURLObject& GetURL() const { return aURL; } + BOOL IsValid() const { return bIsValid; } + BOOL IsThumbBitmap() const { return bIsThumbBmp; } + + const String GetTitle() const; + void SetTitle( const String& rTitle ); + + friend SvStream& operator<<( SvStream& rOut, const SgaObject& rObj ); + friend SvStream& operator>>( SvStream& rIn, SgaObject& rObj ); +}; + +// ------------------ +// - SgaObjectSound - +// ------------------ + +class SgaObjectSound : public SgaObject +{ +private: + + GalSoundType eSoundType; + + virtual void WriteData( SvStream& rOut, const String& rDestDir ) const; + virtual void ReadData( SvStream& rIn, UINT16& rReadVersion ); + + virtual UINT16 GetVersion() const { return 6; } + +public: + + SgaObjectSound(); + SgaObjectSound( const INetURLObject& rURL ); + virtual ~SgaObjectSound(); + + virtual SgaObjKind GetObjKind() const { return SGA_OBJ_SOUND; } + virtual Bitmap GetThumbBmp() const; + GalSoundType GetSoundType() const { return eSoundType; } +}; + +// ------------------- +// - SgaObjectSvDraw - +// ------------------- + +class FmFormModel; + +class SgaObjectSvDraw : public SgaObject +{ + using SgaObject::CreateThumb; + +private: + + BOOL CreateThumb( const FmFormModel& rModel ); + + virtual void WriteData( SvStream& rOut, const String& rDestDir ) const; + virtual void ReadData( SvStream& rIn, UINT16& rReadVersion ); + + virtual UINT16 GetVersion() const { return 5; } + +public: + + SgaObjectSvDraw(); + SgaObjectSvDraw( const FmFormModel& rModel, const INetURLObject& rURL ); + SgaObjectSvDraw( SvStream& rIStm, const INetURLObject& rURL ); + virtual ~SgaObjectSvDraw() {}; + + virtual SgaObjKind GetObjKind() const { return SGA_OBJ_SVDRAW; } + +public: + + static BOOL DrawCentered( OutputDevice* pOut, const FmFormModel& rModel ); +}; + +// ---------------- +// - SgaObjectBmp - +// ---------------- + +class SgaObjectBmp: public SgaObject +{ +private: + + void Init( const Graphic& rGraphic, const INetURLObject& rURL ); + + virtual void WriteData( SvStream& rOut, const String& rDestDir ) const; + virtual void ReadData( SvStream& rIn, UINT16& rReadVersion ); + + virtual UINT16 GetVersion() const { return 5; } + +public: + + SgaObjectBmp(); + SgaObjectBmp( const INetURLObject& rURL ); + SgaObjectBmp( const Graphic& rGraphic, const INetURLObject& rURL, const String& rFormat ); + virtual ~SgaObjectBmp() {}; + + virtual SgaObjKind GetObjKind() const { return SGA_OBJ_BMP; } +}; + +// ----------------- +// - SgaObjectAnim - +// ----------------- + +class SgaObjectAnim : public SgaObjectBmp +{ +private: + + SgaObjectAnim( const INetURLObject& ) {}; + +public: + + SgaObjectAnim(); + SgaObjectAnim( const Graphic& rGraphic, const INetURLObject& rURL, const String& rFormatName ); + + virtual ~SgaObjectAnim() {}; + + virtual SgaObjKind GetObjKind() const { return SGA_OBJ_ANIM; } +}; + +// ----------------- +// - SgaObjectINet - +// ----------------- + +class SgaObjectINet : public SgaObjectAnim +{ +private: + + SgaObjectINet( const INetURLObject& ) {}; + +public: + + SgaObjectINet(); + SgaObjectINet( const Graphic& rGraphic, const INetURLObject& rURL, const String& rFormatName ); + + virtual ~SgaObjectINet() {}; + + virtual SgaObjKind GetObjKind() const { return SGA_OBJ_INET; } +}; +#endif diff --git a/svx/inc/galtheme.hrc b/svx/inc/galtheme.hrc new file mode 100644 index 000000000000..d8b047cdf5f5 --- /dev/null +++ b/svx/inc/galtheme.hrc @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: galtheme.hrc,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _GALTHEME_HRC_ +#define _GALTHEME_HRC_ + +#define RID_GALLERYSTR_THEME_START (6000) + +#define RID_GALLERYSTR_THEME_3D (RID_GALLERYSTR_THEME_START + 1) +#define RID_GALLERYSTR_THEME_ANIMATIONS (RID_GALLERYSTR_THEME_START + 2) +#define RID_GALLERYSTR_THEME_BULLETS (RID_GALLERYSTR_THEME_START + 3) +#define RID_GALLERYSTR_THEME_OFFICE (RID_GALLERYSTR_THEME_START + 4) +#define RID_GALLERYSTR_THEME_FLAGS (RID_GALLERYSTR_THEME_START + 5) +#define RID_GALLERYSTR_THEME_FLOWCHARTS (RID_GALLERYSTR_THEME_START + 6) +#define RID_GALLERYSTR_THEME_EMOTICONS (RID_GALLERYSTR_THEME_START + 7) +#define RID_GALLERYSTR_THEME_PHOTOS (RID_GALLERYSTR_THEME_START + 8) +#define RID_GALLERYSTR_THEME_BACKGROUNDS (RID_GALLERYSTR_THEME_START + 9) +#define RID_GALLERYSTR_THEME_HOMEPAGE (RID_GALLERYSTR_THEME_START + 10) +#define RID_GALLERYSTR_THEME_INTERACTION (RID_GALLERYSTR_THEME_START + 11) +#define RID_GALLERYSTR_THEME_MAPS (RID_GALLERYSTR_THEME_START + 12) +#define RID_GALLERYSTR_THEME_PEOPLE (RID_GALLERYSTR_THEME_START + 13) +#define RID_GALLERYSTR_THEME_SURFACES (RID_GALLERYSTR_THEME_START + 14) +#define RID_GALLERYSTR_THEME_HTMLBUTTONS (RID_GALLERYSTR_THEME_START + 15) +#define RID_GALLERYSTR_THEME_POWERPOINT (RID_GALLERYSTR_THEME_START + 16) +#define RID_GALLERYSTR_THEME_RULERS (RID_GALLERYSTR_THEME_START + 17) +#define RID_GALLERYSTR_THEME_SOUNDS (RID_GALLERYSTR_THEME_START + 18) +#define RID_GALLERYSTR_THEME_SYMBOLS (RID_GALLERYSTR_THEME_START + 19) +#define RID_GALLERYSTR_THEME_MYTHEME (RID_GALLERYSTR_THEME_START + 20) +#define RID_GALLERYSTR_THEME_USERSOUNDS (RID_GALLERYSTR_THEME_START + 21) + +#define RID_GALLERYSTR_THEME_ARROWS (RID_GALLERYSTR_THEME_START + 22) +#define RID_GALLERYSTR_THEME_BALLOONS (RID_GALLERYSTR_THEME_START + 23) +#define RID_GALLERYSTR_THEME_KEYBOARD (RID_GALLERYSTR_THEME_START + 24) +#define RID_GALLERYSTR_THEME_TIME (RID_GALLERYSTR_THEME_START + 25) +#define RID_GALLERYSTR_THEME_PRESENTATION (RID_GALLERYSTR_THEME_START + 26) +#define RID_GALLERYSTR_THEME_CALENDAR (RID_GALLERYSTR_THEME_START + 27) +#define RID_GALLERYSTR_THEME_NAVIGATION (RID_GALLERYSTR_THEME_START + 28) +#define RID_GALLERYSTR_THEME_COMMUNICATION (RID_GALLERYSTR_THEME_START + 29) +#define RID_GALLERYSTR_THEME_FINANCES (RID_GALLERYSTR_THEME_START + 30) +#define RID_GALLERYSTR_THEME_COMPUTER (RID_GALLERYSTR_THEME_START + 31) + +#define RID_GALLERYSTR_THEME_CLIMA (RID_GALLERYSTR_THEME_START + 32) +#define RID_GALLERYSTR_THEME_EDUCATION (RID_GALLERYSTR_THEME_START + 33) +#define RID_GALLERYSTR_THEME_TROUBLE (RID_GALLERYSTR_THEME_START + 34) +#define RID_GALLERYSTR_THEME_SCREENBEANS (RID_GALLERYSTR_THEME_START + 35) + +#define RID_GALLERYSTR_THEME_DUMMY5 (RID_GALLERYSTR_THEME_START + 36) +#define RID_GALLERYSTR_THEME_FONTWORK (RID_GALLERYSTR_THEME_START + 37) +#define RID_GALLERYSTR_THEME_FONTWORK_VERTICAL (RID_GALLERYSTR_THEME_START + 38) + +#define RID_GALLERYSTR_THEME_FIRST RID_GALLERYSTR_THEME_3D +#define RID_GALLERYSTR_THEME_LAST RID_GALLERYSTR_THEME_FONTWORK_VERTICAL + +#endif diff --git a/svx/inc/galtheme.hxx b/svx/inc/galtheme.hxx new file mode 100644 index 000000000000..96834327a203 --- /dev/null +++ b/svx/inc/galtheme.hxx @@ -0,0 +1,234 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: galtheme.hxx,v $ + * $Revision: 1.11.216.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_GALTHEME_HXX_ +#define _SVX_GALTHEME_HXX_ + +#include "svx/svxdllapi.h" + +#define ENABLE_BYTESTRING_STREAM_OPERATORS + +#include <tools/debug.hxx> +#include <tools/urlobj.hxx> +#include <vcl/salctype.hxx> +#include <svl/brdcst.hxx> +#include <svl/lstner.hxx> +#include <svtools/transfer.hxx> +#include <sot/storage.hxx> +#include <svx/svdmodel.hxx> +//#include <svx/galobj.hxx> +#include <svx/galmisc.hxx> +//#include <svx/gallery1.hxx> + +// ----------------- +// - GalleryObject - +// ----------------- +// -------------- +// - SgaObjKind - +// -------------- + +struct GalleryObject +{ + INetURLObject aURL; + sal_uInt32 nOffset; + SgaObjKind eObjKind; + BOOL bDummy; +}; + +DECLARE_LIST( GalleryObjectList, GalleryObject* ) + +class GalleryThemeEntry; +class SgaObject; +class FmFormModel; +class ListBox; + +// ----------------- +// - GalDragParams - +// ----------------- + +struct GalDragParams +{ + Region aDragRegion; + ULONG nDragObjPos; + String aThemeName; + String aFileName; + SgaObjKind eObjKind; +}; + +// ---------------- +// - GalleryTheme - +// ---------------- + +class Gallery; +class GalleryProgress; +namespace unogallery +{ + class GalleryTheme; + class GalleryItem; +} + +class GalleryTheme : public SfxBroadcaster +{ + friend class Gallery; + friend class GalleryThemeCacheEntry; + friend class ::unogallery::GalleryTheme; + friend class ::unogallery::GalleryItem; + +private: + + GalleryObjectList aObjectList; + String aImportName; + String m_aDestDir; + SotStorageRef aSvDrawStorageRef; + Gallery* pParent; + GalleryThemeEntry* pThm; + ULONG mnThemeLockCount; + ULONG mnBroadcasterLockCount; + ULONG nDragPos; + BOOL bDragging; + BOOL bAbortActualize; + + void ImplCreateSvDrawStorage(); + SVX_DLLPUBLIC SgaObject* ImplReadSgaObject( GalleryObject* pEntry ); + BOOL ImplWriteSgaObject( const SgaObject& rObj, ULONG nPos, GalleryObject* pExistentEntry ); + void ImplRead(); + void ImplWrite(); + const GalleryObject* ImplGetGalleryObject( ULONG nPos ) const { return aObjectList.GetObject( nPos ); } + SVX_DLLPUBLIC const GalleryObject* ImplGetGalleryObject( const INetURLObject& rURL ); + ULONG ImplGetGalleryObjectPos( const GalleryObject* pObj ) const { return aObjectList.GetPos( pObj ); } + INetURLObject ImplGetURL( const GalleryObject* pObject ) const; + INetURLObject ImplCreateUniqueURL( SgaObjKind eObjKind, ULONG nFormat = CVT_UNKNOWN ); + void ImplSetModified( BOOL bModified ); + void ImplBroadcast( ULONG nUpdatePos ); + + GalleryTheme(); + GalleryTheme( Gallery* pGallery, GalleryThemeEntry* pThemeEntry ); + ~GalleryTheme(); + +public: + + static GalleryThemeEntry* CreateThemeEntry( const INetURLObject& rURL, BOOL bReadOnly ); + + ULONG GetObjectCount() const { return aObjectList.Count(); } + + SVX_DLLPUBLIC SgaObject* AcquireObject( ULONG nPos ); + SVX_DLLPUBLIC void ReleaseObject( SgaObject* pObj ); + + SVX_DLLPUBLIC BOOL InsertObject( const SgaObject& rObj, ULONG nPos = LIST_APPEND ); + SVX_DLLPUBLIC BOOL RemoveObject( ULONG nPos ); + BOOL ChangeObjectPos( ULONG nOldPos, ULONG nNewPos ); + + SVX_DLLPUBLIC const String& GetName() const; + const String& GetRealName() const; + const String& GetImportName() const { return aImportName; } + void SetImportName(const String& rImportName) { aImportName = rImportName; } + + const String& GetDestDir() const { return m_aDestDir; } + void SetDestDir(const String& rDestDir) { m_aDestDir = rDestDir; } + + const INetURLObject& GetThmURL() const; + SVX_DLLPUBLIC const INetURLObject& GetSdgURL() const; + const INetURLObject& GetSdvURL() const; + + SVX_DLLPUBLIC UINT32 GetId() const; + void SetId( UINT32 nNewId, BOOL bResetThemeName ); + + void SetDragging( BOOL bSet ) { bDragging = bSet; } + BOOL IsDragging() const { return bDragging; } + + void LockTheme() { ++mnThemeLockCount; } + BOOL UnlockTheme(); + + void LockBroadcaster() { mnBroadcasterLockCount++; } + SVX_DLLPUBLIC void UnlockBroadcaster( ULONG nUpdatePos = 0 ); + BOOL IsBroadcasterLocked() const { return mnBroadcasterLockCount > 0; } + + void SetDragPos( ULONG nPos ) { nDragPos = nPos; } + ULONG GetDragPos() const { return nDragPos; } + + BOOL IsThemeNameFromResource() const; + + SVX_DLLPUBLIC BOOL IsImported() const; + SVX_DLLPUBLIC BOOL IsReadOnly() const; + SVX_DLLPUBLIC BOOL IsDefault() const; + BOOL IsModified() const; + + SVX_DLLPUBLIC void Actualize( const Link& rActualizeLink, GalleryProgress* pProgress = NULL ); + void AbortActualize() { bAbortActualize = TRUE; } + + Gallery* GetParent() const { return pParent; } + SotStorageRef GetSvDrawStorage() const { return aSvDrawStorageRef; } + +public: + + SgaObjKind GetObjectKind( ULONG nPos ) const + { + DBG_ASSERT( nPos < GetObjectCount(), "Position out of range" ); + return ImplGetGalleryObject( nPos )->eObjKind; + } + + + const INetURLObject& GetObjectURL( ULONG nPos ) const + { + DBG_ASSERT( nPos < GetObjectCount(), "Position out of range" ); + return ImplGetGalleryObject( nPos )->aURL; + } + + BOOL GetThumb( ULONG nPos, Bitmap& rBmp, BOOL bProgress = FALSE ); + + SVX_DLLPUBLIC BOOL GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress = FALSE ); + SVX_DLLPUBLIC BOOL InsertGraphic( const Graphic& rGraphic, ULONG nInsertPos = LIST_APPEND ); + + SVX_DLLPUBLIC BOOL GetModel( ULONG nPos, SdrModel& rModel, BOOL bProgress = FALSE ); + SVX_DLLPUBLIC BOOL InsertModel( const FmFormModel& rModel, ULONG nInsertPos = LIST_APPEND ); + + BOOL GetModelStream( ULONG nPos, SotStorageStreamRef& rModelStreamRef, BOOL bProgress = FALSE ); + BOOL InsertModelStream( const SotStorageStreamRef& rModelStream, ULONG nInsertPos = LIST_APPEND ); + + BOOL GetURL( ULONG nPos, INetURLObject& rURL, BOOL bProgress = FALSE ); + SVX_DLLPUBLIC BOOL InsertURL( const INetURLObject& rURL, ULONG nInsertPos = LIST_APPEND ); + BOOL InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, ULONG nInsertPos = LIST_APPEND ); + + BOOL InsertTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, ULONG nInsertPos ); + + void CopyToClipboard( Window* pWindow, ULONG nPos ); + void StartDrag( Window* pWindow, ULONG nPos ); + +public: + + SvStream& WriteData( SvStream& rOut ) const; + SvStream& ReadData( SvStream& rIn ); + static SVX_DLLPUBLIC void InsertAllThemes( ListBox& rListBox ); +}; + +SvStream& operator<<( SvStream& rOut, const GalleryTheme& rTheme ); +SvStream& operator>>( SvStream& rIn, GalleryTheme& rTheme ); + +#endif diff --git a/svx/inc/globl3d.hxx b/svx/inc/globl3d.hxx new file mode 100644 index 000000000000..67af6269c0d7 --- /dev/null +++ b/svx/inc/globl3d.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: globl3d.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_GLOBL3D_HXX +#define _E3D_GLOBL3D_HXX + +#include <tools/solar.h> + +//#define ESODEBUG +#define E3D_STREAMING + +const double PrecisionLimit = 1.0e-14; + +const UINT32 E3dInventor = UINT32('E')*0x00000001+ + UINT32('3')*0x00000100+ + UINT32('D')*0x00010000+ + UINT32('1')*0x01000000; + +const UINT16 E3D_SCENE_ID = 1; +const UINT16 E3D_POLYSCENE_ID = 2; +const UINT16 E3D_OBJECT_ID = 3; // should not be used, it's only a helper class for E3DScene and E3DCompoundObject +const UINT16 E3D_CUBEOBJ_ID = 4; +const UINT16 E3D_SPHEREOBJ_ID = 5; +const UINT16 E3D_EXTRUDEOBJ_ID = 6; +const UINT16 E3D_LATHEOBJ_ID = 7; +const UINT16 E3D_COMPOUNDOBJ_ID = 8; +const UINT16 E3D_POLYGONOBJ_ID = 9; + +#endif // _E3D_GLOBL3D_HXX diff --git a/svx/inc/globlac.hrc b/svx/inc/globlac.hrc new file mode 100644 index 000000000000..99316da00be3 --- /dev/null +++ b/svx/inc/globlac.hrc @@ -0,0 +1,226 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: globlac.hrc,v $ + * $Revision: 1.15 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _GLOBALACC_SRC +#define _GLOBALACC_SRC + +#define ACC_CODE( Id, c, bSh, bM1, bM2 ) \ + AcceleratorItem { Identifier = Id; \ + Key = KeyCode { Code = c ; \ + Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; }; }; + +#define ACC_FUNC( Id, f ) \ + AcceleratorItem { Identifier = Id; \ + Key = KeyCode { Function = f ; }; }; + +#define ACC_KEY( language, c, bSh, bM1, bM2 ) \ + Key[ language ] = KeyCode { Code = c ; \ + Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; }; + +#define ACC_DEF_KEY( c, bSh, bM1, bM2 ) \ + Key = KeyCode { Code = c ; \ + Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; }; + + +#define AI_HELPINDEX ACC_CODE( SID_HELPINDEX, KEY_F1, FALSE, TRUE, FALSE ) + +#define AI_ATTR_CHAR ACC_CODE( SID_ATTR_CHAR, KEY_F2, FALSE, FALSE, FALSE ) +// new shortcut F9 for starting slide-show (see #73417#) +#define AI_PRESENTATION ACC_CODE( SID_PRESENTATION, KEY_F9, FALSE, FALSE, FALSE ) +// formerly used shortcut Ctrl-F2. Still used (in sd) for compatibility +#define AI_PRESENTATION_COMPAT ACC_CODE( SID_PRESENTATION, KEY_F2, FALSE, TRUE, FALSE ) +#define AI_ENTER_GROUP ACC_CODE( SID_ENTER_GROUP, KEY_F3, FALSE, FALSE, FALSE ) +#define AI_COPYOBJECTS ACC_CODE( SID_COPYOBJECTS, KEY_F3, TRUE, FALSE, FALSE ) +#define AI_LEAVE_GROUP ACC_CODE( SID_LEAVE_GROUP, KEY_F3, FALSE, TRUE, FALSE ) +#define AI_ATTR_TRANSFORM ACC_CODE( SID_ATTR_TRANSFORM, KEY_F4, FALSE, FALSE, FALSE ) +#define AI_NAVIGATOR ACC_CODE( SID_NAVIGATOR, KEY_F5, FALSE, FALSE, FALSE ) +#define AI_SPELLING ACC_CODE( SID_SPELL_DIALOG, KEY_F7, FALSE, FALSE, FALSE ) +#define AI_THESAURUS ACC_CODE( SID_THESAURUS, KEY_F7, FALSE, TRUE, FALSE ) +#define AI_BEZIER_EDIT ACC_CODE( SID_BEZIER_EDIT, KEY_F8, FALSE, FALSE, FALSE ) +#define AI_ATTR_TEXT_FITTOSIZE ACC_CODE( SID_ATTR_TEXT_FITTOSIZE, KEY_F8, TRUE, TRUE, FALSE ) +#define AI_STYLE_DESIGNER ACC_CODE( SID_STYLE_DESIGNER, KEY_F11, FALSE, FALSE, FALSE ) +#define AI_OUTLINEMODE ACC_CODE( SID_OUTLINEMODE, KEY_F12, FALSE, FALSE, FALSE ) +#define AI_DRAWINGMODE ACC_CODE( SID_DRAWINGMODE, KEY_F12, FALSE, TRUE, FALSE ) + +#define AI_ATTR_PARA_LINESPACE_10 ACC_CODE( SID_ATTR_PARA_LINESPACE_10, KEY_1, FALSE, TRUE, FALSE ) +#define AI_ATTR_PARA_LINESPACE_20 ACC_CODE( SID_ATTR_PARA_LINESPACE_20, KEY_2, FALSE, TRUE, FALSE ) +#define AI_ATTR_PARA_LINESPACE_15 ACC_CODE( SID_ATTR_PARA_LINESPACE_15, KEY_5, FALSE, TRUE, FALSE ) +#define AI_SHOW_ITEMBROWSER ACC_CODE( SID_SHOW_ITEMBROWSER, KEY_9, TRUE, TRUE, TRUE ) + +#define AI_ATTR_PARA_ADJUST_BLOCK AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_BLOCK;\ + ACC_DEF_KEY( KEY_J, FALSE, TRUE, FALSE ) \ + ACC_KEY( de , KEY_B, FALSE, TRUE, FALSE ) \ + ACC_KEY( en-US , KEY_J, FALSE, TRUE, FALSE ) \ + ACC_KEY( it , KEY_F, FALSE, TRUE, FALSE ) \ + ACC_KEY( es , KEY_J, FALSE, TRUE, FALSE ) \ + ACC_KEY( fr , KEY_J, FALSE, TRUE, FALSE ) \ + ACC_KEY( nl , KEY_J, FALSE, TRUE, FALSE ) \ + ACC_KEY( pl , KEY_J, FALSE, TRUE, FALSE ) \ + ACC_KEY( ru , KEY_J, FALSE, TRUE, FALSE ) }; + +#define AI_ATTR_PARA_ADJUST_CENTER AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_CENTER;\ + ACC_DEF_KEY( KEY_E, FALSE, TRUE, FALSE ) \ + ACC_KEY( de , KEY_E, FALSE, TRUE, FALSE ) \ + ACC_KEY( en-US , KEY_E, FALSE, TRUE, FALSE ) \ + ACC_KEY( it , KEY_E, FALSE, TRUE, FALSE ) \ + ACC_KEY( es , KEY_E, FALSE, TRUE, FALSE ) \ + ACC_KEY( fr , KEY_C, TRUE, TRUE, FALSE ) \ + ACC_KEY( nl , KEY_J, FALSE, TRUE, FALSE ) }; + +#define AI_ATTR_CHAR_WEIGHT AcceleratorItem { Identifier = SID_ATTR_CHAR_WEIGHT;\ + ACC_DEF_KEY( KEY_B, FALSE, TRUE, FALSE ) \ + ACC_KEY( de , KEY_F, FALSE, TRUE, FALSE ) \ + ACC_KEY( en-US , KEY_B, FALSE, TRUE, FALSE ) \ + ACC_KEY( it , KEY_G, FALSE, TRUE, FALSE ) \ + ACC_KEY( es , KEY_N, FALSE, TRUE, FALSE ) \ + ACC_KEY( fr , KEY_G, FALSE, TRUE, FALSE ) \ + ACC_KEY( nl , KEY_B, FALSE, TRUE, FALSE ) \ + ACC_KEY( da , KEY_F, FALSE, TRUE, FALSE ) \ + ACC_KEY( pl , KEY_B, FALSE, TRUE, FALSE ) \ + ACC_KEY( ru, KEY_B, FALSE, TRUE, FALSE ) }; + +#define AI_SEARCH_DLG AcceleratorItem { Identifier = SID_SEARCH_DLG;\ + ACC_DEF_KEY( KEY_F, FALSE, TRUE, FALSE ) \ + ACC_KEY( de , KEY_G, FALSE, TRUE, FALSE ) \ + ACC_KEY( en-US , KEY_F, FALSE, TRUE, FALSE ) \ + ACC_KEY( it , KEY_B, FALSE, TRUE, FALSE ) \ + ACC_KEY( es , KEY_G, FALSE, TRUE, FALSE ) \ + ACC_KEY( fr , KEY_F, FALSE, TRUE, FALSE ) \ + ACC_KEY( nl , KEY_F, FALSE, TRUE, FALSE ) }; + +#define AI_GROUP ACC_CODE( SID_GROUP, KEY_G, TRUE, TRUE, FALSE ) +#define AI_UNGROUP ACC_CODE( SID_UNGROUP, KEY_G, TRUE, TRUE, TRUE ) + +// Weitersuchen ... +#define AI_SET_SUPER_SCRIPT AcceleratorItem { Identifier = SID_SET_SUPER_SCRIPT;\ + ACC_DEF_KEY( KEY_P, TRUE, TRUE, FALSE ) \ + ACC_KEY( de , KEY_H, FALSE, TRUE, FALSE ) \ + ACC_KEY( en-US , KEY_P, TRUE, TRUE, FALSE ) \ + ACC_KEY( it , KEY_H, FALSE, TRUE, FALSE ) \ + ACC_KEY( es , KEY_H, FALSE, TRUE, FALSE ) \ + ACC_KEY( fr , KEY_H, FALSE, TRUE, FALSE ) \ + ACC_KEY( nl , KEY_H, FALSE, TRUE, FALSE ) }; + +#define AI_ATTR_CHAR_POSTURE AcceleratorItem { Identifier = SID_ATTR_CHAR_POSTURE;\ + ACC_DEF_KEY( KEY_I, FALSE, TRUE, FALSE ) \ + ACC_KEY( de , KEY_K, FALSE, TRUE, FALSE ) \ + ACC_KEY( en-US , KEY_I, FALSE, TRUE, FALSE ) \ + ACC_KEY( it , KEY_I, FALSE, TRUE, FALSE ) \ + ACC_KEY( es , KEY_K, FALSE, TRUE, FALSE ) \ + ACC_KEY( fr , KEY_I, FALSE, TRUE, FALSE ) \ + ACC_KEY( nl , KEY_I, FALSE, TRUE, FALSE ) \ + ACC_KEY( da , KEY_K, FALSE, TRUE, FALSE ) \ + ACC_KEY( pl , KEY_I, FALSE, TRUE, FALSE ) \ + ACC_KEY( ru , KEY_I, FALSE, TRUE, FALSE ) }; + +#define AI_COMBINE ACC_CODE( SID_COMBINE, KEY_K, TRUE, TRUE, FALSE ) +#define AI_DISMANTLE ACC_CODE( SID_DISMANTLE, KEY_K, TRUE, TRUE, TRUE ) +#define AI_ATTR_PARA_ADJUST_LEFT AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_LEFT;\ + ACC_DEF_KEY( KEY_L, FALSE, TRUE, FALSE ) \ + ACC_KEY( de , KEY_L, FALSE, TRUE, FALSE ) \ + ACC_KEY( en-US , KEY_L, FALSE, TRUE, FALSE ) \ + ACC_KEY( it , KEY_T, FALSE, TRUE, FALSE ) \ + ACC_KEY( es , KEY_I, FALSE, TRUE, FALSE ) \ + ACC_KEY( fr , KEY_G, TRUE, TRUE, FALSE ) \ + ACC_KEY( nl , KEY_L, FALSE, TRUE, FALSE ) }; + +#define AI_ATTR_PARA_ADJUST_RIGHT AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_RIGHT;\ + ACC_DEF_KEY( KEY_R, FALSE, TRUE, FALSE ) \ + ACC_KEY( de , KEY_R, FALSE, TRUE, FALSE ) \ + ACC_KEY( en-US , KEY_R, FALSE, TRUE, FALSE ) \ + ACC_KEY( it , KEY_R, FALSE, TRUE, FALSE ) \ + ACC_KEY( es , KEY_D, FALSE, TRUE, FALSE ) \ + ACC_KEY( fr , KEY_D, TRUE, TRUE, FALSE ) \ + ACC_KEY( nl , KEY_R, FALSE, TRUE, FALSE ) }; + +#define AI_SET_SUB_SCRIPT AcceleratorItem { Identifier = SID_SET_SUB_SCRIPT;\ + ACC_DEF_KEY( KEY_B, TRUE, TRUE, FALSE ) \ + ACC_KEY( de , KEY_T, FALSE, TRUE, FALSE ) \ + ACC_KEY( en-US , KEY_B, TRUE, TRUE, FALSE ) \ + ACC_KEY( it , KEY_B, TRUE, TRUE, FALSE ) \ + ACC_KEY( es , KEY_T, FALSE, TRUE, FALSE ) \ + ACC_KEY( fr , KEY_T, FALSE, TRUE, FALSE ) \ + ACC_KEY( nl , KEY_P, TRUE, TRUE, FALSE ) }; + +#define AI_ATTR_CHAR_UNDERLINE AcceleratorItem { Identifier = SID_ATTR_CHAR_UNDERLINE;\ + ACC_DEF_KEY( KEY_U, FALSE, TRUE, FALSE ) \ + ACC_KEY( de , KEY_U, FALSE, TRUE, FALSE ) \ + ACC_KEY( en-US , KEY_U, FALSE, TRUE, FALSE ) \ + ACC_KEY( it , KEY_U, FALSE, TRUE, FALSE ) \ + ACC_KEY( es , KEY_U, FALSE, TRUE, FALSE ) \ + ACC_KEY( fr , KEY_U, FALSE, TRUE, FALSE ) \ + ACC_KEY( nl , KEY_U, FALSE, TRUE, FALSE ) \ + ACC_KEY( da, KEY_U, FALSE, TRUE, FALSE ) \ + ACC_KEY( pl, KEY_U, FALSE, TRUE, FALSE ) \ + ACC_KEY( ru , KEY_U, FALSE, TRUE, FALSE ) }; + +#define AI_STYLE_CATALOG ACC_CODE( SID_STYLE_CATALOG, KEY_F11, FALSE, TRUE, FALSE ) +#define AI_WIN_FULLSCREEN ACC_CODE( SID_WIN_FULLSCREEN, KEY_J, TRUE, TRUE, FALSE ) + +#define AI_FOCUSURLBOX ACC_CODE( SID_FOCUSURLBOX, KEY_O, TRUE, TRUE, FALSE ) +#define AI_SELECTALL ACC_CODE( SID_SELECTALL, KEY_A, FALSE, TRUE, FALSE ) + +// Anordnung +#define AI_FRAME_TO_TOP ACC_CODE( SID_FRAME_TO_TOP, KEY_ADD, TRUE, TRUE, FALSE ) +#define AI_MOREFRONT ACC_CODE( SID_MOREFRONT, KEY_ADD, FALSE, TRUE, FALSE ) +#define AI_FRAME_TO_BOTTOM ACC_CODE( SID_FRAME_TO_BOTTOM, KEY_SUBTRACT, TRUE, TRUE, FALSE ) +#define AI_MOREBACK ACC_CODE( SID_MOREBACK, KEY_SUBTRACT, FALSE, TRUE, FALSE ) + +// sonstige Acceleratoren +#define AI_NEWDOC ACC_CODE( SID_NEWDOC, KEY_N, TRUE, TRUE, FALSE ) +#define AI_NEWDOCDIRECT ACC_CODE( SID_NEWDOCDIRECT, KEY_N, FALSE, TRUE, FALSE ) +#define AI_OPENDOC ACC_CODE( SID_OPENDOC, KEY_O, FALSE, TRUE, FALSE ) \ + ACC_CODE( SID_OPENDOC, KEY_OPEN, FALSE, FALSE, FALSE ) +#define AI_CLOSEWIN ACC_CODE( SID_CLOSEWIN, KEY_W, FALSE, TRUE, FALSE ) \ + ACC_CODE( SID_CLOSEWIN, KEY_F4, FALSE, TRUE, FALSE ) +#define AI_SAVEDOC ACC_CODE( SID_SAVEDOC, KEY_S, FALSE, TRUE, FALSE ) +#define AI_PRINTDOC ACC_CODE( SID_PRINTDOC, KEY_P, FALSE, TRUE, FALSE ) +#define AI_QUITAPP ACC_CODE( SID_QUITAPP, KEY_Q, FALSE, TRUE, FALSE ) +#define AI_CUT ACC_CODE( SID_CUT, KEY_X, FALSE, TRUE, FALSE ) \ + ACC_CODE( SID_CUT, KEY_DELETE, TRUE, FALSE, FALSE ) \ + ACC_CODE( SID_CUT, KEY_CUT, FALSE, FALSE, FALSE ) +#define AI_COPY ACC_CODE( SID_COPY, KEY_C, FALSE, TRUE, FALSE ) \ + ACC_CODE( SID_COPY, KEY_INSERT, FALSE, TRUE, FALSE ) \ + ACC_CODE( SID_COPY, KEY_COPY, FALSE, FALSE, FALSE ) +#define AI_PASTE ACC_CODE( SID_PASTE, KEY_V, FALSE, TRUE, FALSE ) \ + ACC_CODE( SID_PASTE, KEY_INSERT, TRUE, FALSE, FALSE ) \ + ACC_CODE( SID_PASTE, KEY_PASTE, FALSE, FALSE, FALSE ) +#define AI_UNDO ACC_CODE( SID_UNDO, KEY_Z, FALSE, TRUE, FALSE ) \ + ACC_CODE( SID_UNDO, KEY_BACKSPACE, FALSE, FALSE, TRUE ) \ + ACC_CODE( SID_UNDO, KEY_UNDO, FALSE, FALSE, FALSE ) +#define AI_REDO ACC_CODE( SID_REDO, KEY_Y, FALSE, TRUE, FALSE ) +#define AI_REPEAT ACC_CODE( SID_REPEAT, KEY_REPEAT, FALSE, FALSE, FALSE ) +#define AI_DELETE ACC_CODE( SID_DELETE, KEY_DELETE, FALSE, FALSE, FALSE ) + +#endif // _GLOBLACC_SRC + + + + diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc new file mode 100644 index 000000000000..d40ca4de1876 --- /dev/null +++ b/svx/inc/globlmn_tmpl.hrc @@ -0,0 +1,1410 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: globlmn_tmpl.hrc,v $ + * $Revision: 1.11.212.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _GLOBLMN_HRC +#define _GLOBLMN_HRC + +/*------------------------------------------------------------------------ + Beschreibung: Menu-IDs +------------------------------------------------------------------------*/ +#define ITEM_FORM_CONFIG \ + Identifier = SID_FM_CONFIG ; \ + Command = ".uno:Config" ; \ + DropDown = TRUE ; + +#define ITEM_FORM_CONTROL_PROPERTIES\ + Identifier = SID_FM_CTL_PROPERTIES ; \ + Command = ".uno:ControlProperties" ; \ + HelpID = SID_FM_CTL_PROPERTIES ; \ + Text [ en-US ] = "Con~trol..." ; \ + +#define ITEM_FORM_PROPERTIES\ + Identifier = SID_FM_PROPERTIES ; \ + Command = ".uno:FormProperties" ; \ + HelpID = SID_FM_PROPERTIES ; \ + Text [ en-US ] = "For~m..." ; \ + +#define ITEM_REPLACE_CONTROL\ + Identifier = SID_FM_CHANGECONTROLTYPE ;\ + Command = ".uno:ChangeControlType" ; \ + HelpID = SID_FM_CHANGECONTROLTYPE ; \ + Text [ en-US ] = "~Replace with"; \ + +#define ITEM_FORMAT_TEMPLATECATALOG \ + Identifier = SID_STYLE_CATALOG ; \ + Command = ".uno:StyleCatalog" ; \ + HelpID = SID_STYLE_CATALOG ; \ + Text [ en-US ] = "~Catalog..." ; \ + +#define ITEM_FORMAT_TEMPLATE \ + Identifier = SID_STYLE_DESIGNER ; \ + Command = ".uno:DesignerDialog" ; \ + HelpID = SID_STYLE_DESIGNER ; \ + Text [ en-US ] = "St~ylist" ; \ + +#define ITEM_FORMAT_AUTOFORMAT \ + Identifier = SID_AUTOFORMAT ; \ + Command = ".uno:AutoFormat" ; \ + HelpID = SID_AUTOFORMAT ; \ + Text [ en-US ] = "Auto~Format..." ;\ + +#define ITEM_FORMAT_CHAR_DLG \ + Identifier = SID_CHAR_DLG ; \ + Command = ".uno:FontDialog" ; \ + HelpID = SID_CHAR_DLG ; \ + Text [ en-US ] = "C~haracter..." ;\ + +#define ITEM_FORMAT_PARA_DLG \ + Identifier = SID_PARA_DLG ; \ + Command = ".uno:ParagraphDialog" ; \ + HelpID = SID_PARA_DLG ; \ + Text [ en-US ] = "P~aragraph..." ;\ + +#define ITEM_FORMAT_FONTWORK \ + Identifier = SID_FONTWORK ; \ + Command = ".uno:FontWork" ; \ + HelpID = SID_FONTWORK ; \ + Text [ en-US ] = "F~ontwork" ;\ + +#define ITEM_EDIT_CUT \ + Identifier = SID_CUT ; \ + Command = ".uno:Cut" ; \ + HelpID = SID_CUT ; \ + Text [ en-US ] = "Cu~t" ;\ + +#define ITEM_EDIT_COPY \ + Identifier = SID_COPY ; \ + Command = ".uno:Copy" ; \ + HelpID = SID_COPY ; \ + Text [ en-US ] = "~Copy" ;\ + +#define ITEM_EDIT_DELETE \ + Identifier = SID_DELETE ; \ + Command = ".uno:Delete" ; \ + HelpID = SID_DELETE ; \ + Text [ en-US ] = "~Delete" ;\ + +#define ITEM_FORMAT_ATTR_CHAR_FONT \ + Identifier = SID_ATTR_CHAR_FONT ; \ + Command = ".uno:CharFontName" ; \ + HelpID = SID_ATTR_CHAR_FONT ; \ + Text [ en-US ] = "Font" ;\ + +#define ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT \ + Identifier = SID_ATTR_CHAR_FONTHEIGHT ; \ + Command = ".uno:FontHeight" ; \ + HelpID = SID_ATTR_CHAR_FONTHEIGHT ; \ + Text [ en-US ] = "Size" ;\ + +#define ITEM_FORMAT_ATTR_CHAR_WEIGHT \ + Identifier = SID_ATTR_CHAR_WEIGHT ; \ + Command = ".uno:Bold" ; \ + HelpID = SID_ATTR_CHAR_WEIGHT ; \ + Text [ en-US ] = "Bold" ; \ + +#define ITEM_FORMAT_ATTR_CHAR_POSTURE \ + Identifier = SID_ATTR_CHAR_POSTURE ; \ + Command = ".uno:Italic" ; \ + HelpID = SID_ATTR_CHAR_POSTURE ; \ + Text [ en-US ] = "Italic" ;\ + +#define ITEM_FORMAT_ATTR_CHAR_UNDERLINE \ + Identifier = SID_ATTR_CHAR_UNDERLINE ; \ + Command = ".uno:Underline" ; \ + HelpID = SID_ATTR_CHAR_UNDERLINE ; \ + Text [ en-US ] = "Underline" ;\ + +#define ITEM_FORMAT_ATTR_CHAR_OVERLINE \ + Identifier = SID_ATTR_CHAR_OVERLINE ; \ + Command = ".uno:Overline" ; \ + HelpID = SID_ATTR_CHAR_OVERLINE ; \ + Text [ en-US ] = "Overline" ;\ + +#define ITEM_FORMAT_ATTR_CHAR_STRIKEOUT \ + Identifier = SID_ATTR_CHAR_STRIKEOUT ; \ + Command = ".uno:Strikeout" ; \ + HelpID = SID_ATTR_CHAR_STRIKEOUT ; \ + Text [ en-US ] = "Strikethrough" ;\ + +#define ITEM_FORMAT_ATTR_CHAR_SHADOWED \ + Identifier = SID_ATTR_CHAR_SHADOWED ; \ + Command = ".uno:Shadowed" ; \ + HelpID = SID_ATTR_CHAR_SHADOWED ; \ + Text [ en-US ] = "Shadow" ;\ + +#define ITEM_FORMAT_ATTR_CHAR_CONTOUR \ + Identifier = SID_ATTR_CHAR_CONTOUR ; \ + Command = ".uno:OutlineFont" ; \ + HelpID = SID_ATTR_CHAR_CONTOUR ; \ + Text [ en-US ] = "Outline" ;\ + +#define ITEM_FORMAT_SET_SUPER_SCRIPT \ + Identifier = SID_SET_SUPER_SCRIPT; \ + HelpID = SID_SET_SUPER_SCRIPT; \ + Text [ en-US ] = "Su~perscript"; \ + +#define ITEM_FORMAT_SET_SUB_SCRIPT \ + Identifier = SID_SET_SUB_SCRIPT; \ + HelpID = SID_SET_SUB_SCRIPT; \ + Text [ en-US ] = "Su~bscript"; \ + + +#define ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT \ + Identifier = SID_ATTR_PARA_ADJUST_LEFT ; \ + Command = ".uno:LeftPara" ; \ + HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \ + Text [ en-US ] = "~Left" ;\ + +#define ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT \ + Identifier = SID_ATTR_PARA_ADJUST_RIGHT ; \ + Command = ".uno:RightPara" ; \ + HelpID = SID_ATTR_PARA_ADJUST_RIGHT ; \ + Text [ en-US ] = "~Right" ;\ + +#define ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER \ + Identifier = SID_ATTR_PARA_ADJUST_CENTER ; \ + Command = ".uno:CenterPara" ; \ + HelpID = SID_ATTR_PARA_ADJUST_CENTER ; \ + Text [ en-US ] = "~Centered" ;\ + +#define ITEM_FORMAT_ATTR_PARA_ADJUST_BLOCK \ + Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ + Command = ".uno:JustifyPara" ; \ + HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \ + Text [ en-US ] = "Justified" ;\ + +#define ITEM_FORMAT_PARA_LINESPACE_10 \ + Identifier = SID_ATTR_PARA_LINESPACE_10 ; \ + Command = ".uno:SpacePara1" ; \ + HelpID = SID_ATTR_PARA_LINESPACE_10 ; \ + Text [ en-US ] = "Single" ;\ + +#define ITEM_FORMAT_PARA_LINESPACE_15 \ + Identifier = SID_ATTR_PARA_LINESPACE_15 ; \ + Command = ".uno:SpacePara15" ; \ + HelpID = SID_ATTR_PARA_LINESPACE_15 ; \ + Text [ en-US ] = "1.5 lines" ;\ + +#define ITEM_FORMAT_PARA_LINESPACE_20 \ + Identifier = SID_ATTR_PARA_LINESPACE_20 ; \ + Command = ".uno:SpacePara2" ; \ + HelpID = SID_ATTR_PARA_LINESPACE_20 ; \ + Text [ en-US ] = "~Double" ;\ + +#define ITEM_FORMAT_FRAME_TO_TOP \ + Identifier = SID_FRAME_TO_TOP ; \ + Command = ".uno:BringToFront" ; \ + HelpID = SID_FRAME_TO_TOP ; \ + Text [ en-US ] = "~Bring to Front" ;\ + +#define ITEM_FORMAT_FRAME_TO_BOTTOM \ + Identifier = SID_FRAME_TO_BOTTOM ; \ + Command = ".uno:SendToBack" ; \ + HelpID = SID_FRAME_TO_BOTTOM ; \ + Text [ en-US ] = "~Send to Back" ;\ + +#define ITEM_FORMAT_OBJECT_ALIGN \ + Identifier = SID_OBJECT_ALIGN ; \ + Command = ".uno:ObjectAlign" ; \ + HelpID = SID_OBJECT_ALIGN ; \ + Text [ en-US ] = "A~lignment" ;\ + +#define ITEM_FORMAT_OBJECT_ALIGN_LEFT \ + Identifier = SID_OBJECT_ALIGN_LEFT ; \ + Command = ".uno:ObjectAlignLeft" ; \ + HelpID = SID_OBJECT_ALIGN_LEFT ; \ + Text [ en-US ] = "~Left" ;\ + +#define ITEM_FORMAT_OBJECT_ALIGN_CENTER \ + Identifier = SID_OBJECT_ALIGN_CENTER ; \ + Command = ".uno:AlignCenter" ; \ + HelpID = SID_OBJECT_ALIGN_CENTER ; \ + Text [ en-US ] = "~Centered" ;\ + +#define ITEM_FORMAT_OBJECT_ALIGN_RIGHT \ + Identifier = SID_OBJECT_ALIGN_RIGHT ; \ + Command = ".uno:ObjectAlignRight" ; \ + HelpID = SID_OBJECT_ALIGN_RIGHT ; \ + Text [ en-US ] = "~Right" ;\ + +#define ITEM_FORMAT_OBJECT_ALIGN_UP \ + Identifier = SID_OBJECT_ALIGN_UP ; \ + Command = ".uno:AlignUp" ; \ + HelpID = SID_OBJECT_ALIGN_UP ; \ + Text [ en-US ] = "~Top" ;\ + +#define ITEM_FORMAT_OBJECT_ALIGN_MIDDLE \ + Identifier = SID_OBJECT_ALIGN_MIDDLE ; \ + Command = ".uno:AlignMiddle" ; \ + HelpID = SID_OBJECT_ALIGN_MIDDLE ; \ + Text [ en-US ] = "C~enter" ;\ + +#define ITEM_FORMAT_OBJECT_ALIGN_DOWN \ + Identifier = SID_OBJECT_ALIGN_DOWN ; \ + Command = ".uno:AlignDown" ; \ + HelpID = SID_OBJECT_ALIGN_DOWN ; \ + Text [ en-US ] = "~Bottom" ;\ + +#define ITEM_FORMAT_ATTRIBUTES_LINE \ + Identifier = SID_ATTRIBUTES_LINE ; \ + Command = ".uno:FormatLine" ; \ + HelpID = SID_ATTRIBUTES_LINE ; \ + Text [ en-US ] = "L~ine..." ;\ + +#define ITEM_FORMAT_ATTRIBUTES_AREA \ + Identifier = SID_ATTRIBUTES_AREA ; \ + Command = ".uno:FormatArea" ; \ + HelpID = SID_ATTRIBUTES_AREA ; \ + Text [ en-US ] = "A~rea..." ;\ + +#define ITEM_FORMAT_ATTR_TRANSFORM \ + Identifier = SID_ATTR_TRANSFORM ; \ + Command = ".uno:TransformDialog" ; \ + HelpID = SID_ATTR_TRANSFORM ; \ + Text [ en-US ] = "Position and Si~ze..." ;\ + +#define ITEM_FORMAT_OBJECT_HEAVEN \ + Identifier = SID_OBJECT_HEAVEN ; \ + Command = ".uno:SetObjectToForeground" ; \ + HelpID = SID_OBJECT_HEAVEN ; \ + Text [ en-US ] = "~To Foreground" ;\ + +#define ITEM_FORMAT_OBJECT_HELL \ + Identifier = SID_OBJECT_HELL ; \ + Command = ".uno:SetObjectToBackground" ; \ + HelpID = SID_OBJECT_HELL ; \ + Text [ en-US ] = "T~o Background" ;\ + +#define ITEM_FORMAT_BEZIER_EDIT \ + Identifier = SID_BEZIER_EDIT ; \ + Command = ".uno:ToggleObjectBezierMode" ; \ + HelpID = SID_BEZIER_EDIT ; \ + Text [ en-US ] = "Edit ~Points" ;\ + +#define ITEM_FILE_PICKLIST \ + Identifier = SID_PICKLIST ; \ + Command = ".uno:PickList" ; \ + HelpID = SID_PICKLIST ; \ + Text [ en-US ] = "~File" ; \ + +#define ITEM_FILE_NEWDOC \ + Identifier = SID_NEWDOCDIRECT ; \ + Command = ".uno:AddDirect" ; \ + HelpID = SID_NEWDOCDIRECT ; \ + Text [ en-US ] = "~New" ;\ + +#define ITEM_FILE_OPENDOC \ + Identifier = SID_OPENDOC ; \ + Command = ".uno:Open" ; \ + HelpID = SID_OPENDOC ; \ + Text [ en-US ] = "~Open..." ;\ + + +#define ITEM_FILE_AUTOPILOT \ + MenuItem\ + {\ + Identifier = SID_AUTOPILOTMENU ; \ + Command = ".uno:AutoPilotMenu" ; \ + HelpID = SID_AUTOPILOTMENU ; \ + Text [ en-US ] = "A~utoPilot" ; \ + }; + +#define ITEM_FILE_CLOSEDOC \ + Identifier = SID_CLOSEDOC ; \ + Command = ".uno:CloseDoc" ; \ + HelpID = SID_CLOSEDOC ; \ + Text [ en-US ] = "~Close" ;\ + +#define ITEM_FILE_SAVEDOC \ + Identifier = SID_SAVEDOC ; \ + Command = ".uno:Save" ; \ + HelpID = SID_SAVEDOC ; \ + Text [ en-US ] = "~Save" ; \ + +#define ITEM_FILE_SAVEDOCS \ + Identifier = SID_SAVEDOCS ; \ + Command = ".uno:SaveAll" ; \ + HelpID = SID_SAVEDOCS ; \ + Text [ en-US ] = "Sa~ve All" ; \ + +#define ITEM_FILE_SAVEASDOC \ + Identifier = SID_SAVEASDOC ; \ + Command = ".uno:SaveAs" ; \ + HelpID = SID_SAVEASDOC ; \ + Text [ en-US ] = "Save ~As..." ; \ + +#define ITEM_FILE_EXPORTDOC \ + Identifier = SID_EXPORTDOC ; \ + Command = ".uno:ExportTo" ; \ + HelpID = SID_EXPORTDOC ; \ + Text [ en-US ] = "Expor~t..." ; \ + +#define ITEM_FILE_EXPORTDOCASPDF \ + Identifier = SID_EXPORTDOCASPDF ; \ + Command = ".uno:ExportToPDF" ; \ + HelpID = SID_EXPORTDOCASPDF ; \ + Text [ en-US ] = "Export as P~DF..." ; \ + +#define ITEM_FILE_VERSIONDIALOG \ + Identifier = SID_VERSION ; \ + Command = ".uno:VersionDialog" ; \ + HelpID = SID_VERSION ; \ + Text [ en-US ] = "Versions..." ; \ + +#define ITEM_FILE_LASTVERSIONDOC \ + Identifier = SID_RELOAD ; \ + Command = ".uno:Reload" ; \ + HelpID = SID_RELOAD ; \ + Text [ en-US ] = "Reload" ;\ + +#define ITEM_FILE_DOCINFO \ + Identifier = SID_DOCINFO ; \ + Command = ".uno:SetDocumentProperties" ; \ + HelpID = SID_DOCINFO ; \ + Text [ en-US ] = "Propert~ies..." ;\ + +#define ITEM_FILE_DOCTEMPLATE \ + Identifier = MN_TEMPLATES; \ + Command = ".uno:TemplateMenu" ; \ + Text [ en-US ] = "~Templates" ;\ + SubMenu = Menu \ + { \ + ItemList = \ + { \ + MenuItem \ + { \ + Identifier = SID_ORGANIZER ; \ + Command = ".uno:Organizer" ; \ + HelpId = SID_ORGANIZER ; \ + Text [ en-US ] = "~Organize...";\ + }; \ + MenuItem \ + { \ + Identifier = SID_TEMPLATE_ADDRESSBOKSOURCE; \ + Command = ".uno:AddressBookSource" ; \ + HelpId = SID_TEMPLATE_ADDRESSBOKSOURCE; \ + Text [ en-US ] = "~Address Book Source..."; \ + }; \ + MenuItem \ + { \ + Identifier = SID_DOCTEMPLATE ; \ + Command = ".uno:SaveAsTemplate" ; \ + HelpId = SID_DOCTEMPLATE ; \ + Text [ en-US ] = "~Save...";\ + }; \ + MenuItem \ + { \ + Identifier = SID_OPENTEMPLATE ; \ + Command = ".uno:OpenTemplate" ; \ + HelpId = SID_OPENTEMPLATE ; \ + Text [ en-US ] = "~Edit...";\ + }; \ + }; \ + }; \ + +#define ITEM_FILE_PRINTPREVIEW \ + Identifier = SID_PRINTPREVIEW ; \ + Command = ".uno:PrintPreview" ; \ + HelpID = SID_PRINTPREVIEW ; \ + Text [ en-US ] = "Pa~ge Preview" ;\ + +#define ITEM_FILE_SETUPPRINTER \ + Identifier = SID_SETUPPRINTER ; \ + Command = ".uno:PrinterSetup" ; \ + HelpID = SID_SETUPPRINTER ; \ + Text [ en-US ] = "P~rinter Settings..." ; \ + +#define ITEM_FILE_PRINTDOC \ + Identifier = SID_PRINTDOC ; \ + Command = ".uno:Print" ; \ + HelpID = SID_PRINTDOC ; \ + Text [ en-US ] = "~Print..." ; \ + +#define ITEM_FILE_MAIL_SENDDOC \ + Identifier = SID_MAIL_SENDDOC ; \ + Command = ".uno:SendMail" ; \ + HelpID = SID_MAIL_SENDDOC ; \ + Text [ en-US ] = "Document as ~E-mail..." ; \ + +#define ITEM_FILE_MAIL_SENDDOCASPDF \ + Identifier = SID_MAIL_SENDDOCASPDF ; \ + Command = ".uno:SendMailDocAsPDF" ; \ + HelpID = SID_MAIL_SENDDOCASPDF ; \ + Text [ en-US ] = "Document as P~DF Attachment..." ; \ + + +#define ITEM_FILE_QUITAPP \ + Identifier = SID_QUITAPP ; \ + Command = ".uno:Quit" ; \ + HelpID = SID_QUITAPP ; \ + Text [ en-US ] = "E~xit" ; \ + +#define ITEM_FILE_LOGOUT \ + Identifier = SID_LOGOUT ; \ + Command = ".uno:Logout" ; \ + HelpID = SID_LOGOUT ; \ + Text [ en-US ] = "Logout" ; \ + +#define ITEM_FILE_BACKTOWEBTOP \ + Identifier = SID_BACKTOWEBTOP ; \ + Command = ".uno:BackToWebtop" ; \ + HelpID = SID_BACKTOWEBTOP ; \ + Text [ en-US ] = "Back to Webtop"; \ + +#define ITEM_EDIT_UNDO \ + Identifier = SID_UNDO ; \ + Command = ".uno:UndoAction" ; \ + HelpID = SID_UNDO ; \ + Text [ en-US ] = "Can't Undo" ; \ + +#define ITEM_EDIT_REDO \ + Identifier = SID_REDO ; \ + Command = ".uno:Redo" ; \ + HelpID = SID_REDO ; \ + Text [ en-US ] = "Can't Restore" ; \ + +#define ITEM_EDIT_REPEAT \ + Identifier = SID_REPEAT ; \ + Command = ".uno:Repeat" ; \ + HelpID = SID_REPEAT ; \ + Text [ en-US ] = "~Repeat" ; \ + +#define ITEM_EDIT_PASTE \ + Identifier = SID_PASTE ; \ + Command = ".uno:Paste" ; \ + HelpID = SID_PASTE ; \ + Text [ en-US ] = "~Paste" ; \ + +#define ITEM_EDIT_SELECTALL \ + Identifier = SID_SELECTALL ; \ + Command = ".uno:SelectAll" ; \ + HelpID = SID_SELECTALL ; \ + Text [ en-US ] = "Select ~All" ; \ + +#define ITEM_EDIT_SEARCH_DLG \ + Identifier = SID_SEARCH_DLG ; \ + Command = ".uno:SearchDialog" ; \ + HelpID = SID_SEARCH_DLG ; \ + Text [ en-US ] = "~Find & Replace..." ; \ + +#define ITEM_EDIT_NAVIGATOR \ + Identifier = SID_NAVIGATOR ; \ + Command = ".uno:Navigator" ; \ + HelpID = SID_NAVIGATOR ; \ + Text [ en-US ] = "~Navigator" ; \ + + +#define ITEM_EDIT_BIBLIOGRAPHY \ + Identifier = SID_COMP_BIBLIOGRAPHY ; \ + Command = ".uno:BibliographyComponent" ; \ + HelpID = SID_COMP_BIBLIOGRAPHY ; \ + Text [ en-US ] = "~Bibliography Database"; \ + +#define ITEM_EDIT_PLUGINS_ACTIVE \ + Identifier = SID_PLUGINS_ACTIVE ; \ + Command = ".uno:PlugInsActive" ; \ + HelpID = SID_PLUGINS_ACTIVE ; \ + Text [ en-US ] = "P~lug-in" ; \ + +#define ITEM_EDIT_IMAP \ + Identifier = SID_IMAP ; \ + Command = ".uno:ImageMapDialog" ; \ + HelpID = SID_IMAP ; \ + Text [ en-US ] = "ImageMap" ; \ + +#define ITEM_EDIT_OBJECT \ + Identifier = SID_OBJECT ; \ + Command = ".uno:ObjectMenue" ; \ + HelpID = SID_OBJECT ; \ + Text [ en-US ] = "~Object" ; \ + +#define ITEM_VIEW_ATTR_ZOOM \ + Identifier = SID_ATTR_ZOOM ; \ + Command = ".uno:Zoom" ; \ + HelpID = SID_ATTR_ZOOM ; \ + Text [ en-US ] = "~Zoom..." ; \ + +#define ITEM_VIEW_TOGGLEFUNCTIONBAR \ + Identifier = SID_TOGGLEFUNCTIONBAR ; \ + Command = ".uno:FunctionBarVisible" ; \ + HelpID = SID_TOGGLEFUNCTIONBAR ; \ + Text [ en-US ] = "~Function Bar" ; \ + +#define ITEM_VIEW_TOGGLEOBJECTBAR \ + Identifier = SID_TOGGLEOBJECTBAR ; \ + Command = ".uno:ObjectBarVisible" ; \ + HelpID = SID_TOGGLEOBJECTBAR ; \ + Text [ en-US ] = "~Object Bar" ; \ + +#define ITEM_VIEW_TOGGLEINETBAR \ + Identifier = SID_TOGGLEINETBAR ; \ + HelpID = SID_TOGGLEINETBAR ; \ + Text [ en-US ] = "Internet Bar" ; \ + +#define ITEM_VIEW_TOGGLESTATUSBAR \ + Identifier = SID_TOGGLESTATUSBAR ; \ + Command = ".uno:StatusBarVisible" ; \ + HelpID = SID_TOGGLESTATUSBAR ; \ + Text [ en-US ] = "~Status Bar" ; \ + +#define ITEM_VIEW_TOGGLEIMESTATUSWINDOW \ + Identifier = SID_SHOW_IME_STATUS_WINDOW ; \ + Command = ".uno:ShowImeStatusWindow" ; \ + HelpID = SID_SHOW_IME_STATUS_WINDOW ; \ + Text [ en-US ] = "~Input Method Status"; \ + +#define ITEM_VIEW_TASKBAR \ + Identifier = SID_TASKBAR ; \ + Command = ".uno:TaskBarVisible" ; \ + HelpID = SID_TASKBAR ; \ + Text [ en-US ] = "~Status Bar" ; \ + +#define ITEM_VIEW_COLORBAR \ + Identifier = SID_COLOR_CONTROL ; \ + Command = ".uno:ColorControl" ; \ + HelpID = SID_COLOR_CONTROL ; \ + Text [ en-US ] = "~Color Bar" ; \ + +#define ITEM_VIEW_FULLSCREEN \ + Identifier = SID_WIN_FULLSCREEN ; \ + Command = ".uno:FullScreen" ; \ + HelpID = SID_WIN_FULLSCREEN ; \ + Text [ en-US ] = "F~ull Screen" ; \ + + +#define ITEM_VIEW_SCREENMODE \ + MenuItem\ + {\ + ITEM_VIEW_FULLSCREEN\ + }; + +#define ITEM_VIEW_BROWSER_MODE \ + Identifier = SID_BROWSER_MODE ; \ + Command = ".uno:BrowseView" ; \ + HelpID = SID_BROWSER_MODE ; \ + Text [ en-US ] = "~Online Layout" ; \ + +#define ITEM_VIEW_BROWSER \ + Identifier = SID_BROWSER ; \ + Command = ".uno:Beamer" ; \ + HelpID = SID_BROWSER ; \ + Text [ en-US ] = "~Beamer" ; \ + + +#define ITEM_INSERT_HYPERLINK_INSERT \ + Identifier = SID_HYPERLINK_INSERT ; \ + Command = ".uno:InsertHyperlink" ; \ + HelpID = SID_HYPERLINK_INSERT ; \ + Text [ en-US ] = "~Hyperlink Bar" ; \ + +#define ITEM_INSERT_INSERT_GRAPHIC \ + Identifier = SID_INSERT_GRAPHIC ; \ + Command = ".uno:InsertGraphic" ; \ + HelpID = SID_INSERT_GRAPHIC ; \ + Text [ en-US ] = "~Graphics..." ; \ + +#define ITEM_INSERT_TWAIN_SELECT \ + MenuItem\ + {\ + Identifier = SID_TWAIN_SELECT ; \ + Command = ".uno:TwainSelect" ; \ + HelpID = SID_TWAIN_SELECT ; \ + Text [ en-US ] = "~Select Source..." ; \ + }; + +#define ITEM_INSERT_TWAIN_TRANSFER \ + MenuItem\ + {\ + Identifier = SID_TWAIN_TRANSFER ; \ + Command = ".uno:TwainTransfer" ; \ + HelpID = SID_TWAIN_TRANSFER ; \ + Text [ en-US ] = "~Request..." ; \ + }; + +#define ITEM_INSERT_TWAIN_MENU \ + MenuItem\ + {\ + Identifier = SID_SCAN ; \ + Command = ".uno:Scan" ; \ + HelpID = SID_SCAN ; \ + Text [ en-US ] = "Scan" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + ITEM_INSERT_TWAIN_SELECT\ + ITEM_INSERT_TWAIN_TRANSFER\ + };\ + };\ + }; + +#define ITEM_INSERT_INSERT_DIAGRAM \ + Identifier = SID_INSERT_DIAGRAM ; \ + Command = ".uno:InsertObjectChart" ; \ + HelpID = SID_INSERT_DIAGRAM ; \ + Text [ en-US ] = "~Chart..." ; \ + +#define ITEM_INSERT_GALLERY \ + Identifier = SID_GALLERY ; \ + Command = ".uno:Gallery" ; \ + HelpID = SID_GALLERY ; \ + Text [ en-US ] = "~Gallery" ; \ + +#define ITEM_INSERT_INSERTDOC \ + Identifier = SID_INSERTDOC ; \ + Command = ".uno:InsertDoc" ; \ + HelpID = SID_INSERTDOC ; \ + Text [ en-US ] = "~File..." ; \ + +#define TMP_SID_INSERT_PLUGIN \ + MenuItem\ + {\ + Identifier = SID_INSERT_PLUGIN ; \ + Command = ".uno:InsertPlugin" ; \ + HelpID = SID_INSERT_PLUGIN ; \ + Text [ en-US ] = "~Plug-in..." ; \ + }; + +#define TMP_SID_INSERT_SOUND \ + MenuItem\ + {\ + Identifier = SID_INSERT_SOUND ; \ + Command = ".uno:InsertSound" ; \ + HelpID = SID_INSERT_SOUND ; \ + Text [ en-US ] = "~Sound..." ; \ + }; + +#define TMP_SID_INSERT_VIDEO \ + MenuItem\ + {\ + Identifier = SID_INSERT_VIDEO ; \ + Command = ".uno:InsertVideo" ; \ + HelpID = SID_INSERT_VIDEO ; \ + Text [ en-US ] = "~Video..." ; \ + }; + +#ifdef SOLAR_JAVA +#define TMP_SID_INSERT_APPLET \ + MenuItem\ + {\ + Identifier = SID_INSERT_APPLET ; \ + Command = ".uno:InsertApplet" ; \ + HelpID = SID_INSERT_APPLET ; \ + Text [ en-US ] = "~Applet..." ; \ + }; +#else +#define TMP_SID_INSERT_APPLET +#endif +#define ITEM_INSERT_OBJECT_MN \ + MenuItem\ + {\ + Identifier = SID_MN_INSERT_OBJECT_DLGS ; \ + HelpID = SID_MN_INSERT_OBJECT_DLGS ; \ + Command = ".uno:ObjectMenu" ; \ + Text [ en-US ] = "~Object" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + Identifier = SID_INSERT_OBJECT ; \ + Command = ".uno:InsertObject" ; \ + HelpID = SID_INSERT_OBJECT ; \ + Text [ en-US ] = "~OLE Object..." ; \ + };\ + TMP_SID_INSERT_PLUGIN\ + TMP_SID_INSERT_SOUND\ + TMP_SID_INSERT_VIDEO\ + TMP_SID_INSERT_APPLET\ + MenuItem\ + {\ + Identifier = SID_INSERT_MATH ; \ + Command = ".uno:InsertMath" ; \ + HelpID = SID_INSERT_MATH ; \ + Text [ en-US ] = "~Formula..." ; \ + };\ + };\ + };\ + }; + +#define ITEM_INSERT_OBJECT_PORTAL \ + MenuItem\ + {\ + Identifier = SID_MN_INSERT_OBJECT_DLGS ; \ + HelpID = SID_MN_INSERT_OBJECT_DLGS ; \ + Command = ".uno:ObjectMenu" ; \ + Text [ en-US ] = "~Object" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + Identifier = SID_INSERT_OBJECT ; \ + Command = ".uno:InsertObject" ; \ + HelpID = SID_INSERT_OBJECT ; \ + Text [ en-US ] = "~OLE Object..." ; \ + };\ + MenuItem\ + {\ + Identifier = SID_INSERT_MATH ; \ + Command = ".uno:InsertMath" ; \ + HelpID = SID_INSERT_MATH ; \ + Text [ en-US ] = "~Formula" ; \ + };\ + };\ + };\ + }; + +#define ITEM_FORMAT_NUMBERING \ + MenuItem\ + {\ + Identifier = DEFINE_SLOTID_FOR_NUMBER_BULLETS ; \ + HelpID = DEFINE_SLOTID_FOR_NUMBER_BULLETS ; \ + Text [ en-US ] = "~Numbering/Bullets..." ; \ + }; + + + +#define ITEM_FORMAT \ + Identifier = SID_OBJECTMENU0 ; \ + HelpID = SID_OBJECTMENU0 ; \ + Command = ".uno:FormatMenu" ; \ + Text [ en-US ] = "F~ormat" ; \ + +#define ITEM_TOOLS_ID SID_ADDONLIST + +#define ITEM_TOOLS_MACROS \ + Identifier = SID_SCRIPTORGANIZER ; \ + HelpId = SID_SCRIPTORGANIZER ; \ + Command = ".uno:ScriptOrganizer" ; \ + Text [ en-US ] = "Scripts/Macros" ; \ + +/* +#define ITEM_TOOLS_MACROS \ + Command = ".uno:MacrosMenu" ; \ + Text [ en-US ] = "~Macros" ; \ + SubMenu = Menu \ + { \ + ItemList = \ + { \ + MenuItem \ + { \ + Identifier = SID_RECORDMACRO ; \ + Command = ".uno:MacroRecorder" ; \ + HelpId = SID_RECORDMACRO ; \ + Text [ en-US ] = "Record Macro"; }; \ + MenuItem \ + { \ + Identifier = SID_BASICCHOOSER ; \ + Command = ".uno:MacroDialog" ; \ + HelpID = SID_BASICCHOOSER ; \ + Text [ en-US ] = "~Macro..." ; \ + }; \ + }; \ + }; \ + +*/ + +#define ITEM_TOOLS_BASICCHOOSER ITEM_TOOLS_MACROS + +#define ITEM_TOOLS_CONFIG \ + Identifier = SID_CONFIG ; \ + Command = ".uno:ConfigureDialog"; \ + HelpID = SID_CONFIG ; \ + Text [ en-US ] = "~Configure..." ; \ + + +#define ITEM_TOOLS_AUTO_CORRECT \ + MenuItem\ + {\ + Identifier = SID_AUTO_CORRECT_DLG ; \ + Command = ".uno:AutoCorrectDlg" ; \ + HelpID = SID_AUTO_CORRECT_DLG ; \ + Text [ en-US ] = "~AutoCorrect..." ; \ + }; + +#define ITEM_SD_GRAPHIC_OPTIONS \ + MenuItem\ + {\ + Identifier = SID_SD_GRAPHIC_OPTIONS ; \ + Command = ".uno:SdGraphicOptions" ; \ + HelpID = SID_SD_GRAPHIC_OPTIONS ; \ + Text [ en-US ] = "~Drawing..." ; \ + }; + +#define ITEM_MN_OPTIONS \ + MenuItem\ + {\ + Identifier = SID_OPTIONS_TREEDIALOG ; \ + Command = ".uno:OptionsTreeDialog" ; \ + HelpID = SID_OPTIONS_TREEDIALOG ; \ + Text [ en-US ] = "~Options..." ; \ + }; + + +/*------------------------------------------------------------------------ + Beschreibung: Menu Window-IDs +------------------------------------------------------------------------*/ +#define ITEM_WINDOW_MDIWINDOWLIST \ + Identifier = SID_MDIWINDOWLIST ; \ + Command = ".uno:WindowList" ; \ + HelpID = SID_MDIWINDOWLIST ; \ + Text [ en-US ] = "~Window" ; \ + +#define ITEM_WINDOW_CLONEWIN \ + Identifier = SID_NEWWINDOW ; \ + Command = ".uno:NewWindow" ; \ + HelpID = SID_NEWWINDOW ; \ + Text [ en-US ] = "~New Window" ; \ + +#define ITEM_WINDOW_CASCADEWINS \ + MenuItem\ + {\ + Identifier = SID_CASCADEWINS ; \ + Command = ".uno:Cascade" ; \ + HelpID = SID_CASCADEWINS ; \ + Text [ en-US ] = "~Cascade" ; \ + }; + +#define ITEM_WINDOW_TILEWINS \ + MenuItem\ + {\ + Identifier = SID_TILEWINS ; \ + Command = ".uno:Tile" ; \ + HelpID = SID_TILEWINS ; \ + Text [ en-US ] = "~Tile" ; \ + }; + +#define ITEM_WINDOW_HORIZONTALWINS \ + MenuItem\ + {\ + Identifier = SID_HORIZONTALWINS ; \ + Command = ".uno:ArrangeHorizontal" ; \ + HelpID = SID_HORIZONTALWINS ; \ + Text [ en-US ] = "~Horizontally" ; \ + }; + +#define ITEM_WINDOW_VERTICALWINS \ + MenuItem\ + {\ + Identifier = SID_VERTICALWINS ; \ + Command = ".uno:ArrangeVertical" ; \ + HelpID = SID_VERTICALWINS ; \ + Text [ en-US ] = "~Vertically" ; \ + }; + +#define ITEM_WINDOW_CLOSEWIN \ + Identifier = SID_CLOSEWIN ; \ + Command = ".uno:CloseWin" ; \ + HelpID = SID_CLOSEWIN ; \ + Text [ en-US ] = "Close Window" ; \ + +#define ITEM_HYPERLINK_DIALOG \ + MenuItem\ + {\ + Identifier = SID_HYPERLINK_DIALOG ; \ + Command = ".uno:HyperlinkDialog" ; \ + HelpID = SID_HYPERLINK_DIALOG ; \ + Text [ en-US ] = "~Hyperlink" ; \ + } ; + +#define ITEM_POLY_MERGE \ + MenuItem\ + {\ + Identifier = SID_POLY_MERGE ; \ + Command = ".uno:Merge" ; \ + HelpID = SID_POLY_MERGE ; \ + Text [ en-US ] = "~Merge" ; \ + }; +#define ITEM_POLY_SUBSTRACT \ + MenuItem\ + {\ + Identifier = SID_POLY_SUBSTRACT ; \ + Command = ".uno:Substract" ; \ + HelpID = SID_POLY_SUBSTRACT ; \ + Text [ en-US ] = "~Subtract" ; \ + }; +#define ITEM_POLY_INTERSECT \ + MenuItem\ + {\ + Identifier = SID_POLY_INTERSECT ; \ + Command = ".uno:Intersect" ; \ + HelpID = SID_POLY_INTERSECT ; \ + Text [ en-US ] = "I~ntersect" ; \ + }; + +#define MNSUB_FORMEN \ + MenuItem \ + { \ + Identifier = SID_POLY_FORMEN ; \ + Command = ".uno:PolyFormen" ; \ + HelpID = SID_POLY_FORMEN ; \ + Text [ en-US ] = "~Shapes" ; \ + SubMenu = Menu \ + {\ + ItemList = \ + {\ + ITEM_POLY_MERGE \ + ITEM_POLY_SUBSTRACT \ + ITEM_POLY_INTERSECT \ + };\ + };\ + }; + + +/*------------------------------------------------------------------------ + Beschreibung: Menu Window +------------------------------------------------------------------------*/ +#define GLOBLMN_CLONEWIN \ + MenuItem\ + {\ + ITEM_WINDOW_CLONEWIN\ + };\ + MenuItem\ + {\ + ITEM_WINDOW_CLOSEWIN\ + };\ + MenuItem\ + {\ + Separator = TRUE ; \ + }; + +#ifdef MN_SW_WEB + //#define GLOBLMN_CLONEWIN + #define GLOBLMN_WINMN MenuItem MN_WEBWIN +#elif defined MN_SW_GLOBAL + #define GLOBLMN_WINMN MenuItem MN_GLOBALWIN +#else + #define GLOBLMN_WINMN MenuItem MN_WIN +#endif + +#define ITEM_WINDOW_MENU \ + GLOBLMN_WINMN \ + {\ + ITEM_WINDOW_MDIWINDOWLIST\ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + GLOBLMN_CLONEWIN \ + };\ + };\ + }; + +/*------------------------------------------------------------------------ + Beschreibung: Menu Help-IDs +------------------------------------------------------------------------*/ +#define ITEM_HELP_HELPMENU \ + Identifier = SID_HELPMENU ; \ + Command = ".uno:HelpMenu" ; \ + HelpID = SID_HELPMENU ; \ + Text [ en-US ] = "~Help" ; \ + +#define ITEM_HELP_HELPINDEX \ + Identifier = SID_HELPINDEX ; \ + Command = ".uno:HelpIndex" ; \ + HelpID = SID_HELPINDEX ; \ + Text [ en-US ] = "~Contents" ; \ + +#define ITEM_HELP_HELPONHELP \ + Identifier = SID_HELPONHELP ; \ + Command = ".uno:HelpOnHelp" ; \ + HelpID = SID_HELPONHELP ; \ + Text [ en-US ] = "Using Help" ; \ + +#define ITEM_HELP_HELP_PI \ + Identifier = SID_HELP_PI ; \ + Command = ".uno:HelperDialog" ; \ + HelpID = SID_HELP_PI ; \ + Text [ en-US ] = "Help ~Agent" ; \ + +#define ITEM_HELP_HELPTIPS \ + Identifier = SID_HELPTIPS ; \ + Command = ".uno:HelpTip" ; \ + HelpID = SID_HELPTIPS ; \ + Text [ en-US ] = "~Tips" ; \ + +#define ITEM_HELP_BALLOONHELP \ + Identifier = SID_HELPBALLOONS ; \ + Command = ".uno:ActiveHelp" ; \ + HelpID = SID_HELPBALLOONS ; \ + Text [ en-US ] = "~Extended Tips" ; \ + +#define ITEM_HELP_SUPPORTPAGE \ + Identifier = SID_HELP_SUPPORTPAGE ; \ + Command = ".uno:HelpSupport" ; \ + HelpID = SID_HELP_SUPPORTPAGE ; \ + Text [ en-US ] = "~Support" ; \ + +#define ITEM_HELP_ONLINE_REGISTRATION \ + Identifier = SID_ONLINE_REGISTRATION ; \ + Command = ".uno:OnlineRegistrationDlg" ; \ + HelpID = SID_ONLINE_REGISTRATION ; \ + Text [ en-US ] = "~Registration..." ; \ + + +#define ITEM_HELP_ABOUT \ + Identifier = SID_ABOUT ; \ + Command = ".uno:About" ; \ + HelpID = SID_ABOUT ; \ + Text [ en-US ] = "A~bout %PRODUCTNAME..." ; \ + +/*------------------------------------------------------------------------ + Beschreibung: Menu Help +------------------------------------------------------------------------*/ +#define ITEM_HELP_MENU \ + MenuItem MN_HELP\ + {\ + ITEM_HELP_HELPMENU\ + Help = TRUE ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + ITEM_HELP_HELPINDEX\ + };\ + MenuItem\ + {\ + Separator = TRUE ; \ + };\ + MenuItem\ + {\ + ITEM_HELP_HELP_PI\ + };\ + MenuItem\ + {\ + ITEM_HELP_HELPTIPS\ + };\ + MenuItem\ + {\ + ITEM_HELP_BALLOONHELP\ + };\ + MenuItem\ + {\ + Separator = TRUE ; \ + };\ + MenuItem\ + {\ + ITEM_HELP_SUPPORTPAGE\ + };\ + MenuItem\ + {\ + ITEM_HELP_ONLINE_REGISTRATION\ + };\ + MenuItem\ + {\ + Separator = TRUE ; \ + };\ + MenuItem\ + {\ + ITEM_HELP_ABOUT\ + About = TRUE ; \ + };\ + };\ + };\ + }; +/*------------------------------------------------------------------------ + Beschreibung: Kontextmenues +------------------------------------------------------------------------*/ + +#define ITEM_POPUP_TEMPLATE_EDIT \ + Identifier = SID_STYLE_EDIT ; \ + Command = ".uno:EditStyle" ; \ + HelpID = SID_STYLE_EDIT ; \ + Text [ en-US ] = "Edit Paragraph Style..." ; \ + + // Gruppen-/Kombination-Funktionen +#define ITEM_POPUP_GROUP \ + Identifier = SID_GROUP ; \ + Command = ".uno:FormatGroup" ; \ + HelpID = SID_GROUP ; \ + Text [ en-US ] = "~Group" ; \ + +#define ITEM_POPUP_UNGROUP \ + Identifier = SID_UNGROUP ; \ + Command = ".uno:FormatUngroup" ; \ + HelpID = SID_UNGROUP ; \ + Text [ en-US ] = "~Ungroup" ; \ + +#define ITEM_POPUP_ENTER_GROUP \ + Identifier = SID_ENTER_GROUP ; \ + Command = ".uno:EnterGroup" ; \ + HelpID = SID_ENTER_GROUP ; \ + Text [ en-US ] = "~Edit Group" ; \ + +#define ITEM_POPUP_LEAVE_GROUP \ + Identifier = SID_LEAVE_GROUP ; \ + Command = ".uno:LeaveGroup" ; \ + HelpID = SID_LEAVE_GROUP ; \ + Text [ en-US ] = "E~xit Group" ; \ + +#define ITEM_GROUP_MENU \ + MenuItem\ + {\ + Identifier = SID_MN_GROUP ; \ + HelpID = SID_MN_GROUP ; \ + Command = ".uno:GroupMenu" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + ITEM_POPUP_GROUP\ + };\ + MenuItem\ + {\ + ITEM_POPUP_UNGROUP\ + };\ + MenuItem\ + {\ + ITEM_POPUP_ENTER_GROUP\ + };\ + MenuItem\ + {\ + ITEM_POPUP_LEAVE_GROUP\ + };\ + };\ + };\ + Text [ en-US ] = "~Group" ; \ + }; + +#define ITEM_DATASOURCE_ADMINISTRATION \ + MenuItem \ + { \ + Identifier = SID_DATASOURCE_ADMINISTRATION ; \ + Command = ".uno:DatasourceAdministration" ; \ + HelpID = SID_DATASOURCE_ADMINISTRATION ; \ + Text [ en-US ] = "~Data Sources..." ; \ + }; + +#define ITEM_VIEW_DATA_SOURCE_BROWSER \ + Identifier = SID_VIEW_DATA_SOURCE_BROWSER; \ + Command = ".uno:ViewDataSourceBrowser" ; \ + HelpID = SID_VIEW_DATA_SOURCE_BROWSER; \ + Text [ en-US ] = "~Data Sources" ; \ + +/*------------------------------------------------------------------------ + Beschreibung: Toolbar-IDs +------------------------------------------------------------------------*/ +#define ITEM_TOOLBAR_SET_JUSTIFY_PARA \ + Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \ + Command = ".uno:JustifyPara" ; \ + HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; + +#define ITEM_TOOLBAR_NEWDOCDIRECT \ + Identifier = SID_NEWDOCDIRECT ; \ + Command = ".uno:AddDirect" ; \ + HelpID = SID_NEWDOCDIRECT ; + +#define ITEM_TOOLBAR_PRINTDOCDIRECT \ + Identifier = SID_PRINTDOCDIRECT ; \ + Command = ".uno:PrintDefault" ; \ + HelpID = SID_PRINTDOCDIRECT ; + +#define ITEM_TOOLBAR_INSERT_DRAW \ + Identifier = SID_INSERT_DRAW ; \ + Command = ".uno:InsertDraw" ; \ + HelpID = SID_INSERT_DRAW ; \ + DropDown = TRUE ; + +#define ITEM_TOOLBAR_CHOOSE_CONTROLS \ + Identifier = SID_CHOOSE_CONTROLS ; \ + Command = ".uno:ChooseControls" ; \ + HelpID = SID_CHOOSE_CONTROLS ; \ + DropDown = TRUE ; + +#define ITEM_TOOLBAR_AUTOSPELL_CHECK \ + Identifier = SID_AUTOSPELL_CHECK ; \ + Command = ".uno:SpellOnline" ; \ + HelpID = SID_AUTOSPELL_CHECK ; + +#define ITEM_TOOLBAR_TEMPLATE_APPLY \ + Identifier = SID_STYLE_APPLY ; \ + Command = ".uno:StyleApply" ; \ + HelpID = SID_STYLE_APPLY ; + +#define ITEM_TOOLBAR_ATTR_CHAR_COLOR \ + Identifier = SID_ATTR_CHAR_COLOR ; \ + Command = ".uno:Color" ; \ + HelpID = SID_ATTR_CHAR_COLOR ;\ + DropDown = TRUE ; + +#define ITEM_TOOLBAR_BACKGROUND_PATTERN \ + Identifier = SID_BACKGROUND_PATTERN ; \ + Command = ".uno:BackgroundPatternController" ; \ + HelpID = SID_BACKGROUND_PATTERN ;\ + DropDown = TRUE ; + +#define ITEM_TOOLBAR_BACKGROUND_COLOR \ + Identifier = SID_BACKGROUND_COLOR ; \ + Command = ".uno:BackgroundColor" ; \ + HelpID = SID_BACKGROUND_COLOR ;\ + DropDown = TRUE ; + +#define ITEM_TOOLBAR_ATTR_BORDER \ + Identifier = SID_ATTR_BORDER ; \ + Command = ".uno:BorderStyle" ; \ + HelpID = SID_ATTR_BORDER ; + +#define ITEM_TOOLBAR_FRAME_LINESTYLE \ + Identifier = SID_FRAME_LINESTYLE ; \ + Command = ".uno:LineStyle" ; \ + HelpID = SID_FRAME_LINESTYLE ; + +#define ITEM_TOOLBAR_FRAME_LINECOLOR \ + Identifier = SID_FRAME_LINECOLOR ; \ + Command = ".uno:FrameLineColor" ; \ + HelpID = SID_FRAME_LINECOLOR ; + +#define ITEM_TOOLBAR_SIM_START \ + Identifier = SID_SIM_START ; \ + Command = ".uno:LaunchStarImage" ; \ + HelpID = SID_SIM_START ; + +#define ITEM_TOOLBAR_ATTR_LINEEND_STYLE \ + Identifier = SID_ATTR_LINEEND_STYLE ; \ + Command = ".uno:LineEndStyle" ; \ + HelpID = SID_ATTR_LINEEND_STYLE ; \ + DropDown = TRUE ; + +#define ITEM_TOOLBAR_ATTR_LINE_STYLE \ + Identifier = SID_ATTR_LINE_STYLE ; \ + Command = ".uno:XLineStyle" ; \ + HelpID = SID_ATTR_LINE_STYLE ; + +#define ITEM_TOOLBAR_ATTR_LINE_WIDTH \ + Identifier = SID_ATTR_LINE_WIDTH ; \ + Command = ".uno:LineWidth" ; \ + HelpID = SID_ATTR_LINE_WIDTH ; + +#define ITEM_TOOLBAR_ATTR_LINE_COLOR \ + Identifier = SID_ATTR_LINE_COLOR ; \ + Command = ".uno:XLineColor" ; \ + HelpID = SID_ATTR_LINE_COLOR ; + +#define ITEM_TOOLBAR_ATTR_FILL_STYLE \ + Identifier = SID_ATTR_FILL_STYLE ; \ + Command = ".uno:FillStyle" ; \ + HelpID = SID_ATTR_FILL_STYLE ; + +#define ITEM_TOOLBAR_OBJECT_ROTATE \ + Identifier = SID_OBJECT_ROTATE ; \ + Command = ".uno:ToggleObjectRotateMode" ; \ + HelpID = SID_OBJECT_ROTATE ; + +#define ITEM_VIEW_OFFICEBAR \ + Identifier = SID_GROUPVIEW; \ + HelpID = SID_GROUPVIEW; \ + Text [ en-US ] = "~Office Bar" ; \ + + +#define ITEM_TRANSLITERATE_MENU\ + MenuItem\ + {\ + Identifier = SID_MN_SUB_TRANSLITERATE ; \ + HelpID = SID_MN_SUB_TRANSLITERATE ; \ + Command = ".uno:TransliterateMenu" ; \ + SubMenu = Menu\ + {\ + ItemList = \ + {\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_UPPER ; \ + Command = ".uno:ChangeCaseToUpper" ; \ + HelpID = SID_TRANSLITERATE_UPPER ; \ + Text [ en-US ] = "~Uppercase";\ + };\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_LOWER; \ + Command = ".uno:ChangeCaseToLower" ; \ + HelpID = SID_TRANSLITERATE_LOWER; \ + Text [ en-US ] = "~Lowercase";\ + };\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_HALFWIDTH; \ + Command = ".uno:ChangeCaseToHalfWidth" ; \ + HelpID = SID_TRANSLITERATE_HALFWIDTH; \ + Text [ en-US ] = "H~alf-width";\ + };\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_FULLWIDTH; \ + Command = ".uno:ChangeCaseToFullWidth" ; \ + HelpID = SID_TRANSLITERATE_FULLWIDTH; \ + Text [ en-US ] = "Full-width";\ + };\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_HIRAGANA; \ + Command = ".uno:ChangeCaseToHiragana" ; \ + HelpID = SID_TRANSLITERATE_HIRAGANA; \ + Text [ en-US ] = "~Hiragana";\ + };\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_KATAGANA; \ + Command = ".uno:ChangeCaseToKatakana" ; \ + HelpID = SID_TRANSLITERATE_KATAGANA; \ + Text [ en-US ] = "~Katakana";\ + };\ + };\ + };\ + Text [ en-US ] = "Case/Characters";\ + }; + +#define ITEM_OPEN_HYPERLINK \ + Identifier = SID_OPEN_HYPERLINK ; \ + HelpID = SID_OPEN_HYPERLINK ; \ + Text [ en-US ] = "~Open Hyperlink" ; \ + +#define ITEM_OPEN_SMARTTAGMENU \ + Identifier = SID_OPEN_SMARTTAGMENU ; \ + HelpID = SID_OPEN_SMARTTAGMENU ; \ + Text [ en-US ] = "Open ~Smart Tag Menu" ; \ + + +#define ITEM_OPEN_XML_FILTERSETTINGS \ + Identifier = SID_OPEN_XML_FILTERSETTINGS ; \ + HelpID = SID_OPEN_XML_FILTERSETTINGS ; \ + Text [ en-US ] = "~XML Filter Settings..."; \ + +#define ITEM_HANGUL_HANJA_CONVERSION \ + Identifier = SID_HANGUL_HANJA_CONVERSION; \ + HelpId = SID_HANGUL_HANJA_CONVERSION; \ + Text [ en-US ] = "Hangul/Hanja Conversion..."; \ + +#endif // #ifndef _GLOBLMN_HRC diff --git a/svx/inc/grafctrl.hxx b/svx/inc/grafctrl.hxx new file mode 100644 index 000000000000..ea5a7236f6fe --- /dev/null +++ b/svx/inc/grafctrl.hxx @@ -0,0 +1,194 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: grafctrl.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_GRAFCTRL_HXX +#define _SVX_GRAFCTRL_HXX + +#include <svl/lstner.hxx> +#include <svl/intitem.hxx> +#include <sfx2/tbxctrl.hxx> +#include "svx/svxdllapi.h" + +// ---------------- +// - TbxImageItem - +// ---------------- + +class SVX_DLLPUBLIC TbxImageItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + TbxImageItem( USHORT nWhich = 0, UINT16 nImage = 0 ); + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + virtual int operator==( const SfxPoolItem& ) const; +}; + +// ------------------------------- +// - SvxGrafFilterToolBoxControl - +// ------------------------------- + +class SVX_DLLPUBLIC SvxGrafFilterToolBoxControl : public SfxToolBoxControl +{ +public: + + SFX_DECL_TOOLBOX_CONTROL(); + + SvxGrafFilterToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxGrafFilterToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +// ------------------------- +// - SvxGrafToolBoxControl - +// ------------------------- + +class SvxGrafToolBoxControl : public SfxToolBoxControl +{ +public: + + SFX_DECL_TOOLBOX_CONTROL(); + SvxGrafToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxGrafToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual Window* CreateItemWindow( Window *pParent ); +}; + +// ---------------------------- +// - SvxGrafRedToolBoxControl - +// ---------------------------- + +class SVX_DLLPUBLIC SvxGrafRedToolBoxControl : public SvxGrafToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxGrafRedToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); +}; + +// ------------------------------ +// - SvxGrafGreenToolBoxControl - +// ------------------------------ + +class SVX_DLLPUBLIC SvxGrafGreenToolBoxControl : public SvxGrafToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxGrafGreenToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); +}; + +// ----------------------------- +// - SvxGrafBlueToolBoxControl - +// ----------------------------- + +class SVX_DLLPUBLIC SvxGrafBlueToolBoxControl : public SvxGrafToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxGrafBlueToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); +}; + +// ---------------------------------- +// - SvxGrafLuminanceToolBoxControl - +// ---------------------------------- + +class SVX_DLLPUBLIC SvxGrafLuminanceToolBoxControl : public SvxGrafToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxGrafLuminanceToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); +}; + +// --------------------------------- +// - SvxGrafContrastToolBoxControl - +// --------------------------------- + +class SVX_DLLPUBLIC SvxGrafContrastToolBoxControl : public SvxGrafToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxGrafContrastToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); +}; + +// ------------------------------ +// - SvxGrafGammaToolBoxControl - +// ------------------------------ + +class SVX_DLLPUBLIC SvxGrafGammaToolBoxControl : public SvxGrafToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxGrafGammaToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); +}; + +// ------------------------------------- +// - SvxGrafTransparenceToolBoxControl - +// ------------------------------------- + +class SVX_DLLPUBLIC SvxGrafTransparenceToolBoxControl : public SvxGrafToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxGrafTransparenceToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); +}; + +// ----------------------------- +// - SvxGrafModeToolBoxControl - +// ----------------------------- + +class SVX_DLLPUBLIC SvxGrafModeToolBoxControl : public SfxToolBoxControl, public SfxListener +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxGrafModeToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxGrafModeToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual Window* CreateItemWindow( Window *pParent ); +}; + +// --------------------- +// - SvxGrafAttrHelper - +// --------------------- + +class SdrView; +class SfxRequest; + +class SVX_DLLPUBLIC SvxGrafAttrHelper +{ +public: + + static void ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ); + static void GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ); +}; + +#endif // _SVX_GRAFCTRL_HXX diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc new file mode 100644 index 000000000000..bc36634e24c3 --- /dev/null +++ b/svx/inc/helpid.hrc @@ -0,0 +1,299 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: helpid.hrc,v $ + * $Revision: 1.78 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HELPID_HRC +#define _SVX_HELPID_HRC +// include --------------------------------------------------------------- + +#include <svl/solar.hrc> + +#include <svx/exthelpid.hrc> + +// Help-Ids -------------------------------------------------------------- +#define HID_ALIGN_TBX (HID_SVX_START + 1) +#define HID_AUTOCORR_HELP_END (HID_SVX_START + 2) +#define HID_AUTOCORR_HELP_START (HID_SVX_START + 3) +#define HID_BMPMASK_CTL_PIPETTE (HID_SVX_START + 4) +#define HID_BMPMASK_CTL_QCOL_1 (HID_SVX_START + 5) +#define HID_BMPMASK_TBI_PIPETTE (HID_SVX_START + 6) +#define HID_COLOR_CTL_COLORS (HID_SVX_START + 7) +#define HID_CONTDLG_APPLY (HID_SVX_START + 8) +#define HID_CONTDLG_AUTOCONTOUR (HID_SVX_START + 9) +#define HID_CONTDLG_CIRCLE (HID_SVX_START + 10) +#define HID_CONTDLG_FREEPOLY (HID_SVX_START + 11) +#define HID_CONTDLG_GRAPHWND (HID_SVX_START + 12) +#define HID_CONTDLG_PIPETTE (HID_SVX_START + 13) +#define HID_CONTDLG_POLY (HID_SVX_START + 14) +#define HID_CONTDLG_POLYDELETE (HID_SVX_START + 15) +#define HID_CONTDLG_POLYEDIT (HID_SVX_START + 16) +#define HID_CONTDLG_POLYINSERT (HID_SVX_START + 17) +#define HID_CONTDLG_POLYMOVE (HID_SVX_START + 18) +#define HID_CONTDLG_RECT (HID_SVX_START + 19) +#define HID_CONTDLG_REDO (HID_SVX_START + 20) +#define HID_CONTDLG_SELECT (HID_SVX_START + 21) +#define HID_CONTDLG_TOOLBOX (HID_SVX_START + 22) +#define HID_CONTDLG_UNDO (HID_SVX_START + 23) +#define HID_CONTDLG_WORKPLACE (HID_SVX_START + 24) +#define HID_CTL_FONTWORK_FAVORITES (HID_SVX_START + 25) +#define HID_CTRL3D_HSCROLL (HID_SVX_START + 26) +#define HID_CTRL3D_SWITCHER (HID_SVX_START + 27) +#define HID_CTRL3D_VSCROLL (HID_SVX_START + 28) +#define HID_CTRL_COLOR (HID_SVX_START + 29) +#define HID_DRAWTOOL_TBX (HID_SVX_START + 30) +#define HID_EDITENG_SPELLER_ADDWORD (HID_SVX_START + 31) +#define HID_EDITENG_SPELLER_AUTOCORRECT (HID_SVX_START + 32) +#define HID_EDITENG_SPELLER_IGNORE (HID_SVX_START + 33) +#define HID_EDITENG_SPELLER_PARALANGUAGE (HID_SVX_START + 34) +#define HID_EDITENG_SPELLER_START (HID_SVX_START + 35) +#define HID_EDITENG_SPELLER_WORDLANGUAGE (HID_SVX_START + 36) +#define HID_FILL_ATTR_LISTBOX (HID_SVX_START + 37) +#define HID_FILL_TYPE_LISTBOX (HID_SVX_START + 38) +#define HID_FONTWORK_CTL_FORMS (HID_SVX_START + 39) +#define HID_FONTWORK_TBI_ADJUST_AUTOSIZE (HID_SVX_START + 40) +#define HID_FONTWORK_TBI_ADJUST_CENTER (HID_SVX_START + 41) +#define HID_FONTWORK_TBI_ADJUST_LEFT (HID_SVX_START + 42) +#define HID_FONTWORK_TBI_ADJUST_MIRROR (HID_SVX_START + 43) +#define HID_FONTWORK_TBI_ADJUST_RIGHT (HID_SVX_START + 44) +#define HID_FONTWORK_TBI_OUTLINE (HID_SVX_START + 45) +#define HID_FONTWORK_TBI_SHADOW_NORMAL (HID_SVX_START + 46) +#define HID_FONTWORK_TBI_SHADOW_OFF (HID_SVX_START + 47) +#define HID_FONTWORK_TBI_SHADOW_SLANT (HID_SVX_START + 48) +#define HID_FONTWORK_TBI_SHOWFORM (HID_SVX_START + 49) +#define HID_FONTWORK_TBI_STYLE_OFF (HID_SVX_START + 50) +#define HID_FONTWORK_TBI_STYLE_ROTATE (HID_SVX_START + 51) +#define HID_FONTWORK_TBI_STYLE_SLANTX (HID_SVX_START + 52) +#define HID_FONTWORK_TBI_STYLE_SLANTY (HID_SVX_START + 53) +#define HID_FONTWORK_TBI_STYLE_UPRIGHT (HID_SVX_START + 54) +#define HID_FORMAT_FOOTER (HID_SVX_START + 55) +#define HID_FORMAT_HEADER (HID_SVX_START + 56) +// free +#define HID_GALLERY_ICONVIEW (HID_SVX_START + 58) +#define HID_GALLERY_LISTVIEW (HID_SVX_START + 59) +#define HID_GALLERY_MN_ADD (HID_SVX_START + 60) +#define HID_GALLERY_MN_ADDMENU (HID_SVX_START + 61) +#define HID_GALLERY_MN_ADD_LINK (HID_SVX_START + 62) +#define HID_GALLERY_MN_BACKGROUND (HID_SVX_START + 63) +#define HID_GALLERY_MN_COPYCLIPBOARD (HID_SVX_START + 64) +#define HID_GALLERY_MN_DELETE (HID_SVX_START + 65) +#define HID_GALLERY_MN_PASTECLIPBOARD (HID_SVX_START + 66) +#define HID_GALLERY_MN_PREVIEW (HID_SVX_START + 67) +#define HID_GALLERY_NEWTHEME (HID_SVX_START + 68) +#define HID_GALLERY_PREVIEW (HID_SVX_START + 69) +#define HID_GALLERY_PROPERTIES (HID_SVX_START + 70) +#define HID_GALLERY_RENAME (HID_SVX_START + 71) +#define HID_GALLERY_THEMELIST (HID_SVX_START + 72) +// free +#define HID_GALLERY_WINDOW (HID_SVX_START + 74) +#define HID_GRFFILTER (HID_SVX_START + 75) +#define HID_GRFFILTER_EMBOSS (HID_SVX_START + 76) +#define HID_GRFFILTER_INVERT (HID_SVX_START + 77) +#define HID_GRFFILTER_MOSAIC (HID_SVX_START + 78) +#define HID_GRFFILTER_POPART (HID_SVX_START + 79) +#define HID_GRFFILTER_POSTER (HID_SVX_START + 80) +#define HID_GRFFILTER_REMOVENOISE (HID_SVX_START + 81) +#define HID_GRFFILTER_SEPIA (HID_SVX_START + 82) +#define HID_GRFFILTER_SHARPEN (HID_SVX_START + 83) +#define HID_GRFFILTER_SMOOTH (HID_SVX_START + 84) +#define HID_GRFFILTER_SOBEL (HID_SVX_START + 85) +#define HID_GRFFILTER_SOLARIZE (HID_SVX_START + 86) +#define HID_HYPHENATE (HID_SVX_START + 87) +#define HID_IMAPDLG_ACTIVE (HID_SVX_START + 88) +#define HID_IMAPDLG_APPLY (HID_SVX_START + 89) +#define HID_IMAPDLG_CIRCLE (HID_SVX_START + 90) +#define HID_IMAPDLG_FREEPOLY (HID_SVX_START + 91) +#define HID_IMAPDLG_GRAPHWND (HID_SVX_START + 92) +#define HID_IMAPDLG_MACRO (HID_SVX_START + 93) +#define HID_IMAPDLG_OPEN (HID_SVX_START + 94) +#define HID_IMAPDLG_POLY (HID_SVX_START + 95) +#define HID_IMAPDLG_POLYDELETE (HID_SVX_START + 96) +#define HID_IMAPDLG_POLYEDIT (HID_SVX_START + 97) +#define HID_IMAPDLG_POLYINSERT (HID_SVX_START + 98) +#define HID_IMAPDLG_POLYMOVE (HID_SVX_START + 99) +#define HID_IMAPDLG_PROPERTY (HID_SVX_START + 100) +#define HID_IMAPDLG_RECT (HID_SVX_START + 101) +#define HID_IMAPDLG_REDO (HID_SVX_START + 102) +#define HID_IMAPDLG_SAVEAS (HID_SVX_START + 103) +#define HID_IMAPDLG_SELECT (HID_SVX_START + 104) +#define HID_IMAPDLG_TOOLBOX (HID_SVX_START + 105) +#define HID_IMAPDLG_UNDO (HID_SVX_START + 106) +#define HID_MENU_EXTRUSION_DEPTH (HID_SVX_START + 107) +#define HID_MENU_EXTRUSION_DIRECTION (HID_SVX_START + 108) +#define HID_MENU_EXTRUSION_LIGHTING (HID_SVX_START + 109) +#define HID_MENU_EXTRUSION_SURFACE (HID_SVX_START + 110) +#define HID_MNU_FUNC_AVG (HID_SVX_START + 111) +#define HID_MNU_FUNC_COUNT (HID_SVX_START + 112) +#define HID_MNU_FUNC_COUNT2 (HID_SVX_START + 113) +#define HID_MNU_FUNC_MAX (HID_SVX_START + 114) +#define HID_MNU_FUNC_MIN (HID_SVX_START + 115) +#define HID_MNU_FUNC_NONE (HID_SVX_START + 116) +#define HID_MNU_FUNC_SUM (HID_SVX_START + 117) +#define HID_MNU_ZOOM_100 (HID_SVX_START + 118) +#define HID_MNU_ZOOM_150 (HID_SVX_START + 119) +#define HID_MNU_ZOOM_200 (HID_SVX_START + 120) +#define HID_MNU_ZOOM_50 (HID_SVX_START + 121) +#define HID_MNU_ZOOM_75 (HID_SVX_START + 122) +#define HID_MNU_ZOOM_OPTIMAL (HID_SVX_START + 123) +#define HID_MNU_ZOOM_PAGE_WIDTH (HID_SVX_START + 124) +#define HID_MNU_ZOOM_WHOLE_PAGE (HID_SVX_START + 125) +#define HID_OPTIONS_GRID (HID_SVX_START + 126) +#define HID_PASSWORD (HID_SVX_START + 127) +#define HID_POPUP_COLOR (HID_SVX_START + 128) +#define HID_POPUP_COLOR_CTRL (HID_SVX_START + 129) +#define HID_POPUP_EXTRUSION_DEPTH (HID_SVX_START + 130) +#define HID_POPUP_EXTRUSION_DIRECTION (HID_SVX_START + 131) +#define HID_POPUP_EXTRUSION_LIGHTING (HID_SVX_START + 132) +#define HID_POPUP_EXTRUSION_SURFACE (HID_SVX_START + 133) +#define HID_POPUP_FONTWORK_ALIGN (HID_SVX_START + 134) +#define HID_POPUP_FONTWORK_CHARSPACE (HID_SVX_START + 135) +#define HID_POPUP_FRAME (HID_SVX_START + 136) +#define HID_POPUP_LINE (HID_SVX_START + 137) +#define HID_POPUP_LINEEND (HID_SVX_START + 138) +#define HID_POPUP_LINEEND_CTRL (HID_SVX_START + 139) +#define HID_REDLINING_FILTER_BTN_REF (HID_SVX_START + 140) +#define HID_REDLINING_FILTER_CB_ACTION (HID_SVX_START + 141) +#define HID_REDLINING_FILTER_CB_AUTOR (HID_SVX_START + 142) +#define HID_REDLINING_FILTER_CB_COMMENT (HID_SVX_START + 143) +#define HID_REDLINING_FILTER_CB_DATE (HID_SVX_START + 144) +#define HID_REDLINING_FILTER_CB_RANGE (HID_SVX_START + 145) +#define HID_REDLINING_FILTER_DF_DATE (HID_SVX_START + 146) +#define HID_REDLINING_FILTER_DF_DATE2 (HID_SVX_START + 147) +#define HID_REDLINING_FILTER_ED_COMMENT (HID_SVX_START + 148) +#define HID_REDLINING_FILTER_ED_RANGE (HID_SVX_START + 149) +#define HID_REDLINING_FILTER_IB_CLOCK (HID_SVX_START + 150) +#define HID_REDLINING_FILTER_IB_CLOCK2 (HID_SVX_START + 151) +#define HID_REDLINING_FILTER_LB_ACTION (HID_SVX_START + 152) +#define HID_REDLINING_FILTER_LB_AUTOR (HID_SVX_START + 153) +#define HID_REDLINING_FILTER_LB_DATE (HID_SVX_START + 154) +#define HID_REDLINING_FILTER_PAGE (HID_SVX_START + 155) +#define HID_REDLINING_FILTER_TF_DATE (HID_SVX_START + 156) +#define HID_REDLINING_FILTER_TF_DATE2 (HID_SVX_START + 157) +#define HID_REDLINING_TABCONTROL (HID_SVX_START + 158) +#define HID_REDLINING_VIEW_DG_VIEW (HID_SVX_START + 159) +#define HID_REDLINING_VIEW_DG_VIEW_HEADER (HID_SVX_START + 160) +#define HID_REDLINING_VIEW_DG_VIEW_TABLE (HID_SVX_START + 161) +#define HID_REDLINING_VIEW_PAGE (HID_SVX_START + 162) +#define HID_REDLINING_VIEW_PB_ACCEPT (HID_SVX_START + 163) +#define HID_REDLINING_VIEW_PB_ACCEPTALL (HID_SVX_START + 164) +#define HID_REDLINING_VIEW_PB_REJECT (HID_SVX_START + 165) +#define HID_REDLINING_VIEW_PB_REJECTALL (HID_SVX_START + 166) +#define HID_REDLINING_VIEW_PB_UNDO (HID_SVX_START + 167) +#define HID_RUBY_DIALOG (HID_SVX_START + 168) +#define HID_STYLE_LISTBOX (HID_SVX_START + 169) +#define HID_SVXTBX_ALIGNMENT (HID_SVX_START + 170) +#define HID_SVXTBX_DRAW (HID_SVX_START + 171) +#define HID_SVXTBX_UNDO_REDO_CTRL (HID_SVX_START + 172) +#define HID_SVX_CHINESE_DICTIONARY_CB_REVERSE (HID_SVX_START + 173) +#define HID_SVX_CHINESE_DICTIONARY_LB_HEADER (HID_SVX_START + 174) +#define HID_SVX_CHINESE_DICTIONARY_LB_TO_SIMPLIFIED (HID_SVX_START + 175) +#define HID_SVX_CHINESE_DICTIONARY_LB_TO_TRADITIONAL (HID_SVX_START + 176) +#define HID_SVX_CHINESE_DICTIONARY_RB_CONVERSION_TO_SIMPLIFIED (HID_SVX_START + 177) +#define HID_SVX_CHINESE_DICTIONARY_RB_CONVERSION_TO_TRADITIONAL (HID_SVX_START + 178) +#define HID_SVX_CHINESE_TRANSLATION_CB_USE_VARIANTS (HID_SVX_START + 179) +#define HID_SVX_CHINESE_TRANSLATION_RB_CONVERSION_TO_SIMPLIFIED (HID_SVX_START + 180) +#define HID_SVX_CHINESE_TRANSLATION_RB_CONVERSION_TO_TRADITIONAL (HID_SVX_START + 181) +#define HID_SVX_MDLG_DOCRECOVERY_BROKEN (HID_SVX_START + 182) +#define HID_SVX_MDLG_DOCRECOVERY_PROGR (HID_SVX_START + 183) +#define HID_SVX_MDLG_ERR_REP_OPTIONS (HID_SVX_START + 184) +#define HID_SVX_MDLG_ERR_REP_PREVIEW (HID_SVX_START + 185) +#define HID_SVX_TABDLG_DOCRECOVERY (HID_SVX_START + 186) +#define HID_SVX_TP_DOCRECOVERY_RECOVER (HID_SVX_START + 187) +#define HID_SVX_TP_DOCRECOVERY_SAVE (HID_SVX_START + 188) +#define HID_SVX_TP_ERR_REP_SEND (HID_SVX_START + 189) +#define HID_SVX_TP_ERR_REP_WELCOME (HID_SVX_START + 190) +#define HID_THES_LANGUAGE (HID_SVX_START + 191) +#define HID_VALUESET_EXTRUSION_DIRECTION (HID_SVX_START + 192) +#define HID_VALUESET_EXTRUSION_LIGHTING (HID_SVX_START + 193) +#define HID_WIN_FONTWORK_ALIGN (HID_SVX_START + 194) +#define HID_WIN_FONTWORK_CHARSPACE (HID_SVX_START + 195) +#define HID_XMLSEC_CALL (HID_SVX_START + 196) +#define HID_OFA_HYPERLINK_DLG (HID_SVX_START + 197) +#define HID_OFA_HYPERLINK_NAME (HID_SVX_START + 198) +#define HID_OFA_HYPERLINK_SEARCH (HID_SVX_START + 199) +#define HID_OFA_HYPERLINK_TARGET (HID_SVX_START + 200) +#define HID_OFA_HYPERLINK_URL (HID_SVX_START + 201) +#define HID_OFA_HYPERLINK_URL_TXT (HID_SVX_START + 202) +#define HID_AUTOCORR_DLG (HID_SVX_START + 203) +#define HID_SVXCTL_MAIL_ATTACH (HID_SVX_START + 204) +#define HID_SVXDLG_REGISTRATION (HID_SVX_START + 205) +#define HID_SVXDLG_TREE_BASE (HID_SVX_START + 206) +#define HID_SVXDLG_TREE_CHART (HID_SVX_START + 207) +#define HID_SVXDLG_TREE_FILTER (HID_SVX_START + 208) +#define HID_SVXDLG_TREE_LANGUAGE (HID_SVX_START + 209) +#define HID_SVXWIN_MAIL_ATTACH (HID_SVX_START + 210) +#define HID_SVXWIN_MAIL_HEADER (HID_SVX_START + 211) +#define HID_SVX_DLGFORMNEW (HID_SVX_START + 212) +#define HID_SVX_DLGTABNEW (HID_SVX_START + 213) +#define HID_SVX_HYPERLINK (HID_SVX_START + 214) +#define HID_SVX_MAILATTACH_ASCII_CB (HID_SVX_START + 215) +#define HID_SVX_MAILATTACH_HTML_CB (HID_SVX_START + 216) +#define HID_SVX_MAILATTACH_OFFICE_CB (HID_SVX_START + 217) +#define HID_SVX_MAILATTACH_PRIORITY_LB (HID_SVX_START + 218) +#define HID_SVX_MAILATTACH_RECEIPT_CB (HID_SVX_START + 219) +#define HID_SVX_MAILATTACH_RTF_CB (HID_SVX_START + 220) +#define HID_SVX_MAILHEAD_HEAD_WIN (HID_SVX_START + 221) +#define HID_SVX_MAILHEAD_PRIORITY_LB (HID_SVX_START + 222) +#define HID_SVX_MAILHEAD_PROTOCOL_LB (HID_SVX_START + 223) +#define HID_SVX_MAILHEAD_RCPT_CB (HID_SVX_START + 224) +#define HID_SVX_MAILHEAD_RCPT_ED (HID_SVX_START + 225) +#define HID_SVX_MAILHEAD_RCPT_LB (HID_SVX_START + 226) +#define HID_SVX_MAILHEAD_RECEIPT_CB (HID_SVX_START + 227) +#define HID_SVX_MAILHEAD_ROLE_LB (HID_SVX_START + 228) +#define HID_SVX_MAILHEAD_SUBJECT_ED (HID_SVX_START + 229) +#define HID_SVX_MAILMENU_ADDADDRESS (HID_SVX_START + 230) +#define HID_SVX_MAILMENU_COPYLINK (HID_SVX_START + 231) +#define HID_SVX_MAILMENU_DELETE (HID_SVX_START + 232) +#define HID_SVX_MAILMENU_FILE (HID_SVX_START + 233) +#define HID_SVX_MAILMENU_OPEN (HID_SVX_START + 234) +#define HID_SVX_MAILMENU_RENAME (HID_SVX_START + 235) +#define HID_SVX_MAILMENU_SAVEAS (HID_SVX_START + 236) +#define HID_SVX_MAILMENU_SIG1 (HID_SVX_START + 237) +#define HID_SVX_MAILMENU_SIG2 (HID_SVX_START + 238) +#define HID_SVX_MAILMENU_SIG3 (HID_SVX_START + 239) +#define HID_SVX_MAILMENU_SIG4 (HID_SVX_START + 240) +#define HID_SVX_MAILTOOLBOX (HID_SVX_START + 241) +#define HID_SVX_SENDMENU_ENCRYPT (HID_SVX_START + 242) +#define HID_SVX_SENDMENU_PLAIN (HID_SVX_START + 243) +#define HID_SVX_SENDMENU_SIGN (HID_SVX_START + 244) +#define HID_SVX_SENDMENU_SIGNANDENCRYPT (HID_SVX_START + 245) +#define HID_SVX_TP_APPEARANCE (HID_SVX_START + 246) +#define HID_SVX_TP_DESKTOP (HID_SVX_START + 247) + +// please adjust ACT_SVX_HID_END2 below if you add entries here! + +// ----------------------------------------------------------------------- +// Overrun check --------------------------------------------------------- +// ----------------------------------------------------------------------- + +#define ACT_SVX_HID_END (HID_SVX_START+247) +#if ACT_SVX_HID_END > HID_SVX_END +#error Resource-Ueberlauf in #line, #file +#endif + +#endif + diff --git a/svx/inc/hlnkitem.hxx b/svx/inc/hlnkitem.hxx new file mode 100644 index 000000000000..a820be6562f1 --- /dev/null +++ b/svx/inc/hlnkitem.hxx @@ -0,0 +1,113 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hlnkitem.hxx,v $ + * $Revision: 1.6.216.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HLNKITEM_HXX +#define _SVX_HLNKITEM_HXX + +#include <tools/string.hxx> +#include <svl/poolitem.hxx> +#include <sfx2/sfxsids.hrc> +#include <svl/macitem.hxx> +#include "svx/svxdllapi.h" + +#define HYPERDLG_EVENT_MOUSEOVER_OBJECT 0x0001 +#define HYPERDLG_EVENT_MOUSECLICK_OBJECT 0x0002 +#define HYPERDLG_EVENT_MOUSEOUT_OBJECT 0x0004 + +enum SvxLinkInsertMode +{ + HLINK_DEFAULT, + HLINK_FIELD, + HLINK_BUTTON, + HLINK_HTMLMODE = 0x0080 +}; + +class SVX_DLLPUBLIC SvxHyperlinkItem : public SfxPoolItem +{ + String sName; + String sURL; + String sTarget; + SvxLinkInsertMode eType; + + String sIntName; + SvxMacroTableDtor* pMacroTable; + + USHORT nMacroEvents; + +public: + TYPEINFO(); + + SvxHyperlinkItem( USHORT _nWhich = SID_HYPERLINK_GETLINK ): + SfxPoolItem(_nWhich), pMacroTable(NULL) { eType = HLINK_DEFAULT; nMacroEvents=0; }; + SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem ); + SvxHyperlinkItem( USHORT nWhich, String& rName, String& rURL, + String& rTarget, String& rIntName, + SvxLinkInsertMode eTyp = HLINK_FIELD, + USHORT nEvents = 0, + SvxMacroTableDtor *pMacroTbl =NULL ); + virtual ~SvxHyperlinkItem () { delete pMacroTable; } + + inline SvxHyperlinkItem& operator=( const SvxHyperlinkItem &rItem ); + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + const String& GetName() const { return sName; } + void SetName(const String& rName) { sName = rName; } + + const String& GetURL() const { return sURL; } + void SetURL(const String& rURL) { sURL = rURL; } + + const String& GetIntName () const { return sIntName; } + void SetIntName(const String& rIntName) { sIntName = rIntName; } + + const String& GetTargetFrame() const { return sTarget; } + void SetTargetFrame(const String& rTarget) { sTarget = rTarget; } + + SvxLinkInsertMode GetInsertMode() const { return eType; } + void SetInsertMode( SvxLinkInsertMode eNew ) { eType = eNew; } + + void SetMacro( USHORT nEvent, const SvxMacro& rMacro ); + + void SetMacroTable( const SvxMacroTableDtor& rTbl ); + const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTable; } + + void SetMacroEvents (const USHORT nEvents) { nMacroEvents = nEvents; } + USHORT GetMacroEvents() const { return nMacroEvents; } + + virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream &, USHORT nVer ) const; + +}; + +#endif + + diff --git a/svx/inc/htmlcfg.hxx b/svx/inc/htmlcfg.hxx new file mode 100644 index 000000000000..5fa8bdb6071a --- /dev/null +++ b/svx/inc/htmlcfg.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: htmlcfg.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HTMLCFG_HXX +#define _SVX_HTMLCFG_HXX + +// ----------------------------------------------------------------------- + +#include <tools/solar.h> +#include <unotools/configitem.hxx> +#include "svx/svxdllapi.h" + +#define HTML_FONT_COUNT 7 + +// !!!be aware!!!: the following defines are _not_ used as values in the configuration file +// this is because of compatibility reasons +#define HTML_CFG_HTML32 0 // Html 3.2 +#define HTML_CFG_MSIE_40 1 // Internet Explorer 4.0 +#define HTML_CFG_MSIE HTML_CFG_MSIE_40 +#define HTML_CFG_WRITER 2 // Writer +#define HTML_CFG_NS40 3 // Netscape 4.0 +#define HTML_CFG_MSIE_40_OLD 4 // Internet Explorer 4.0 - alter Wert + +#define HTML_CFG_MAX HTML_CFG_NS40 + +struct HtmlOptions_Impl; +// ----------------------------------------------------------------------- + +class SVX_DLLPUBLIC SvxHtmlOptions : public utl::ConfigItem +{ + HtmlOptions_Impl*pImp; + const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames(); + +public: + SvxHtmlOptions(); + ~SvxHtmlOptions(); + + virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames); + + USHORT GetFontSize(USHORT nPos) const; + void SetFontSize(USHORT nPos, USHORT nSize); + + BOOL IsImportUnknown() const; + void SetImportUnknown(BOOL bSet); + + USHORT GetExportMode() const; + void SetExportMode(USHORT nSet); + + BOOL IsStarBasic() const; + void SetStarBasic(BOOL bSet); + + BOOL IsStarBasicWarning() const; + void SetStarBasicWarning(BOOL bSet); + + BOOL IsSaveGraphicsLocal() const; + void SetSaveGraphicsLocal(BOOL bSet); + + BOOL IsPrintLayoutExtension() const; + void SetPrintLayoutExtension(BOOL bSet); + + BOOL IsIgnoreFontFamily() const; + void SetIgnoreFontFamily(BOOL bSet); + + sal_Bool IsDefaultTextEncoding() const; + rtl_TextEncoding GetTextEncoding() const; + void SetTextEncoding( rtl_TextEncoding ); + static SvxHtmlOptions* Get(); + + BOOL IsNumbersEnglishUS() const; + void SetNumbersEnglishUS(BOOL bSet); +}; + +#endif + + + + diff --git a/svx/inc/htmlmode.hxx b/svx/inc/htmlmode.hxx new file mode 100644 index 000000000000..7548effbd690 --- /dev/null +++ b/svx/inc/htmlmode.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: htmlmode.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HTMLMODE_HXX +#define _SVX_HTMLMODE_HXX + +// include --------------------------------------------------------------- + +// define ---------------------------------------------------------------- + +#define HTMLMODE_ON 0x0001 +#define HTMLMODE_PARA_BORDER 0x0002 /* Absatzumrandungen */ +#define HTMLMODE_PARA_DISTANCE 0x0004 /* bestimmte Absatzabstaende */ +#define HTMLMODE_SMALL_CAPS 0x0008 /* Kapitaelchen */ +#define HTMLMODE_FRM_COLUMNS 0x0010 /* spaltige Rahmen */ +#define HTMLMODE_SOME_STYLES 0x0020 /* mind. MS IE */ +#define HTMLMODE_FULL_STYLES 0x0040 /* == SW */ +#define HTMLMODE_BLINK 0x0080 /* blinkende Zeichen*/ +#define HTMLMODE_PARA_BLOCK 0x0100 /* Blocksatz */ +#define HTMLMODE_DROPCAPS 0x0200 /* Initialen*/ +#define HTMLMODE_FIRSTLINE 0x0400 /* Erstzeileneinzug mit Spacer == NS 3.0 */ +#define HTMLMODE_GRAPH_POS 0x0800 /* Grafikpositionen Hintergrund */ +#define HTMLMODE_FULL_ABS_POS 0x1000 /* abs. Rahmenpositionierung */ +#define HTMLMODE_SOME_ABS_POS 0x2000 /* abs. Rahmenpositionierung vollst.*/ +#define HTMLMODE_RESERVED1 0x4000 +#define HTMLMODE_RESERVED0 0x8000 + + + +#endif + + + + + + + + + + + + + + + + + + + diff --git a/svx/inc/hyperdlg.hxx b/svx/inc/hyperdlg.hxx new file mode 100644 index 000000000000..1e78d0f2ba93 --- /dev/null +++ b/svx/inc/hyperdlg.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hyperdlg.hxx,v $ + * $Revision: 1.10 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_TAB_HYPERLINK_HXX +#define _SVX_TAB_HYPERLINK_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/childwin.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Hyperlink-Dialog +|* +\************************************************************************/ + +class AbstractSvxHpLinkDlg; + +class SVX_DLLPUBLIC SvxHlinkDlgWrapper : public SfxChildWindow +{ +private: + AbstractSvxHpLinkDlg* mpDlg; + +public: + SvxHlinkDlgWrapper( Window*pParent, USHORT nId, + SfxBindings* pBindings, SfxChildWinInfo* pInfo ); + + SFX_DECL_CHILDWINDOW(SvxHlinkDlgWrapper); + virtual sal_Bool QueryClose(); +}; + +#endif // _SVX_TAB_HYPERLINK_HXX + diff --git a/svx/inc/imapdlg.hxx b/svx/inc/imapdlg.hxx new file mode 100644 index 000000000000..2c3c19e27b31 --- /dev/null +++ b/svx/inc/imapdlg.hxx @@ -0,0 +1,214 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: imapdlg.hxx,v $ + * $Revision: 1.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef _IMAPDLG_HXX_ +#define _IMAPDLG_HXX_ + +#include <svtools/inettbc.hxx> +#include <sfx2/childwin.hxx> +#include <sfx2/ctrlitem.hxx> +#include <sfx2/basedlgs.hxx> + +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif + +#ifndef _COMBOBOX_HXX //autogen +#include <vcl/combobox.hxx> +#endif + +#ifndef _EDIT_HXX //autogen +#include <vcl/edit.hxx> +#endif + +#ifndef _TOOLBOX_HXX //autogen +#include <vcl/toolbox.hxx> +#endif + +#ifndef _STATUS_HXX //autogen +#include <vcl/status.hxx> +#endif +#include "svx/svxdllapi.h" + + +#ifndef _GOMISC_HXX +class ImageMap; +#endif + + +/************************************************************************* +|* +|* Ableitung vom SfxChildWindow als "Behaelter" fuer Float +|* +\************************************************************************/ + +class Graphic; +class TargetList; + +class SVX_DLLPUBLIC SvxIMapDlgChildWindow : public SfxChildWindow +{ + public: + + SvxIMapDlgChildWindow( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); + + SFX_DECL_CHILDWINDOW( SvxIMapDlgChildWindow ); + + static void UpdateIMapDlg( const Graphic& rGraphic, const ImageMap* pImageMap = NULL, + const TargetList* pTargetList = NULL, void* pEditingObj = NULL ); +}; + + +#ifndef _REDUCED_IMAPDLG_HXX_ +#define _REDUCED_IMAPDLG_HXX_ + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SvxIMapDlg; + +class SvxIMapDlgItem : public SfxControllerItem +{ + SvxIMapDlg& rIMap; + + +protected: + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + + +public: + + SvxIMapDlgItem( USHORT nId, SvxIMapDlg& rIMapDlg, SfxBindings& rBindings ); +}; + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class IMapOwnData; +class IMapWindow; + +class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow +{ + friend class IMapOwnData; + friend class IMapWindow; + using Window::Update; + + ToolBox aTbxIMapDlg1; + FixedText aFtURL; + SvtURLBox maURLBox; + FixedText aFtText; + Edit aEdtText; + FixedText maFtTarget; + ComboBox maCbbTarget; + StatusBar aStbStatus; + ImageList maImageList; + ImageList maImageListH; + + Size aLastSize; + IMapWindow* pIMapWnd; + IMapOwnData* pOwnData; + void* pCheckObj; + SvxIMapDlgItem aIMapItem; + + virtual void Resize(); + virtual BOOL Close(); + +#ifdef _IMAPDLG_PRIVATE + + DECL_LINK( TbxClickHdl, ToolBox* ); + DECL_LINK( InfoHdl, IMapWindow* ); + DECL_LINK( MousePosHdl, IMapWindow* ); + DECL_LINK( GraphSizeHdl, IMapWindow* ); + DECL_LINK( URLModifyHdl, void* ); + DECL_LINK( URLLoseFocusHdl, void* ); + DECL_LINK( UpdateHdl, Timer* ); + DECL_LINK( TbxUpdateHdl, Timer* ); + DECL_LINK( StateHdl, IMapWindow* ); + DECL_LINK( MiscHdl, void* ); + + void DoOpen(); + BOOL DoSave(); + +#endif + + +public: + + SvxIMapDlg( SfxBindings *pBindings, SfxChildWindow *pCW, + Window* pParent, const ResId& rResId ); + ~SvxIMapDlg(); + + void SetExecState( BOOL bEnable ); + + void SetGraphic( const Graphic& rGraphic ); + + void SetEditingObject( void* pObj ) { pCheckObj = pObj; } + const void* GetEditingObject() const { return pCheckObj; } + + void SetImageMap( const ImageMap& rImageMap ); + const ImageMap& GetImageMap() const; + + void SetTargetList( const TargetList& rTargetList ); + const TargetList& GetTargetList() const; + + void Update( const Graphic& rGraphic, const ImageMap* pImageMap = NULL, + const TargetList* pTargetList = NULL, void* pEditingObj = NULL ); + + virtual void KeyInput( const KeyEvent& rKEvt ); + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + void ApplyImageList(); +}; + + +/************************************************************************* +|* +|* Defines +|* +\************************************************************************/ + +#define SVXIMAPDLG() ( (SvxIMapDlg*) ( SfxViewFrame::Current()->GetChildWindow( \ + SvxIMapDlgChildWindow::GetChildWindowId() )-> \ + GetWindow() ) ) + + +#endif // _REDUCED_IMAPDLG_HXX_ +#endif // _IMAPDLG_HXX_ + + diff --git a/svx/inc/insctrl.hxx b/svx/inc/insctrl.hxx new file mode 100644 index 000000000000..b12eac36d78a --- /dev/null +++ b/svx/inc/insctrl.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: insctrl.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_INSCTRL_HXX +#define _SVX_INSCTRL_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/stbitem.hxx> +#include "svx/svxdllapi.h" + +// class SvxInsertToolBoxControl ----------------------------------------- + +class SVX_DLLPUBLIC SvxInsertStatusBarControl : public SfxStatusBarControl +{ +public: + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual void Click(); + virtual void Paint( const UserDrawEvent& rEvt ); + + SFX_DECL_STATUSBAR_CONTROL(); + + SvxInsertStatusBarControl( USHORT nSlotId, USHORT nId, StatusBar& rStb ); + ~SvxInsertStatusBarControl(); + + static ULONG GetDefItemWidth(const StatusBar& rStb); + +private: + BOOL bInsert; + +#ifdef _SVX_INSCTRL_CXX + SVX_DLLPRIVATE void DrawItemText_Impl(); +#endif +}; + + +#endif + diff --git a/svx/inc/layctrl.hxx b/svx/inc/layctrl.hxx new file mode 100644 index 000000000000..5c96ceaee3bb --- /dev/null +++ b/svx/inc/layctrl.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: layctrl.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_LAYCTRL_HXX +#define _SVX_LAYCTRL_HXX + +// include --------------------------------------------------------------- + + +#include <sfx2/tbxctrl.hxx> +#include "svx/svxdllapi.h" + +// class SvxTableToolBoxControl ------------------------------------------ + +class SVX_DLLPUBLIC SvxTableToolBoxControl : public SfxToolBoxControl +{ +private: + FASTBOOL bEnabled; + +public: + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); + virtual SfxPopupWindow* CreatePopupWindowCascading(); + virtual void StateChanged( USHORT nSID, + SfxItemState eState, + const SfxPoolItem* pState ); + + SFX_DECL_TOOLBOX_CONTROL(); + + SvxTableToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxTableToolBoxControl(); +}; + +// class SvxColumnsToolBoxControl ---------------------------------------- + +class SVX_DLLPUBLIC SvxColumnsToolBoxControl : public SfxToolBoxControl +{ + FASTBOOL bEnabled; +public: + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); + virtual SfxPopupWindow* CreatePopupWindowCascading(); + + SFX_DECL_TOOLBOX_CONTROL(); + + SvxColumnsToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxColumnsToolBoxControl(); + + virtual void StateChanged( USHORT nSID, + SfxItemState eState, + const SfxPoolItem* pState ); +}; + + +#endif + diff --git a/svx/inc/lboxctrl.hxx b/svx/inc/lboxctrl.hxx new file mode 100644 index 000000000000..17e0b8182c0c --- /dev/null +++ b/svx/inc/lboxctrl.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: lboxctrl.hxx,v $ + * $Revision: 1.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_LBOXCTRL_HXX_ +#define _SVX_LBOXCTRL_HXX_ + +#include <sfx2/tbxctrl.hxx> +#include <rtl/ustring.hxx> +#include <vector> +#include "svx/svxdllapi.h" + +class ToolBox; +class SvxPopupWindowListBox; + +///////////////////////////////////////////////////////////////// + +class SvxListBoxControl : public SfxToolBoxControl +{ +protected: + String aActionStr; + SvxPopupWindowListBox * pPopupWin; + + void Impl_SetInfo( USHORT nCount ); + + DECL_LINK( PopupModeEndHdl, void * ); + DECL_LINK( SelectHdl, void * ); + +public: + SFX_DECL_TOOLBOX_CONTROL(); + + SvxListBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + virtual ~SvxListBoxControl(); + + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); + virtual void StateChanged( USHORT nSID, + SfxItemState eState, + const SfxPoolItem* pState ); +}; + +///////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SvxUndoRedoControl : public SvxListBoxControl +{ + std::vector< ::rtl::OUString > aUndoRedoList; + ::rtl::OUString aDefaultText; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + + SvxUndoRedoControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + + virtual ~SvxUndoRedoControl(); + virtual void StateChanged( USHORT nSID, + SfxItemState eState, + const SfxPoolItem* pState ); + + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +#endif + diff --git a/svx/inc/lightdlg.hxx b/svx/inc/lightdlg.hxx new file mode 100644 index 000000000000..0330ae22dacc --- /dev/null +++ b/svx/inc/lightdlg.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: lightdlg.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef _SVX_LIGHT3D_HXX_ +#define _SVX_LIGHT3D_HXX_ + +#include <svx/dlgctl3d.hxx> +#include <vcl/fixed.hxx> +#include <vcl/group.hxx> +#include <sfx2/tabdlg.hxx> +#include <sfx2/basedlgs.hxx> + +#ifndef _FIELD_HXX //autogen +#include <vcl/field.hxx> +#endif +#include <svx/dlgctrl.hxx> + +/************************************************************************* +|* +|* 3D-Tab-Dialog +|* +\************************************************************************/ + +class Svx3DTabDialog : public SfxTabDialog +{ +private: + const SfxItemSet& rOutAttrs; + +public: + Svx3DTabDialog( Window* pParent, const SfxItemSet* pAttr ); + ~Svx3DTabDialog(); +}; + +/************************************************************************* +|* +|* 3D-SingleTab-Dialog +|* +\************************************************************************/ +class Svx3DSingleTabDialog : public SfxSingleTabDialog +{ +private: + const SfxItemSet& rOutAttrs; + +public: + Svx3DSingleTabDialog( Window* pParent, const SfxItemSet* pAttr ); + ~Svx3DSingleTabDialog(); +}; + +#endif // _SVX_LIGHT3D_HXX_ + diff --git a/svx/inc/linectrl.hxx b/svx/inc/linectrl.hxx new file mode 100644 index 000000000000..82c042e08d1f --- /dev/null +++ b/svx/inc/linectrl.hxx @@ -0,0 +1,178 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: linectrl.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_LINECTRL_HXX +#define _SVX_LINECTRL_HXX + + +#include <svtools/valueset.hxx> +#include <svl/lstner.hxx> +#include <sfx2/tbxctrl.hxx> +#include "svx/svxdllapi.h" + +class XLineStyleItem; +class XLineDashItem; +class SvxLineBox; +class SvxMetricField; +class SvxColorBox; +class XLineEndList; + +//======================================================================== +// SvxLineStyleController: +//======================================================================== + +class SVX_DLLPUBLIC SvxLineStyleToolBoxControl : public SfxToolBoxControl +{ +private: + XLineStyleItem* pStyleItem; + XLineDashItem* pDashItem; + + BOOL bUpdate; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + + SvxLineStyleToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxLineStyleToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + void Update( const SfxPoolItem* pState ); + virtual Window* CreateItemWindow( Window *pParent ); +}; + +//======================================================================== +// SvxLineWidthController: +//======================================================================== + +class SVX_DLLPUBLIC SvxLineWidthToolBoxControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + + SvxLineWidthToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxLineWidthToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual Window* CreateItemWindow( Window *pParent ); +}; + +//======================================================================== +// SvxLineColorController: +//======================================================================== + +class SVX_DLLPUBLIC SvxLineColorToolBoxControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + + SvxLineColorToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxLineColorToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + void Update( const SfxPoolItem* pState ); + virtual Window* CreateItemWindow( Window *pParent ); +}; + +//======================================================================== +// class SvxLineEndWindow +//======================================================================== +class SvxLineEndWindow : public SfxPopupWindow +{ + using FloatingWindow::StateChanged; + +private: + XLineEndList* pLineEndList; + ValueSet aLineEndSet; + USHORT nCols; + USHORT nLines; + ULONG nLineEndWidth; + Size aBmpSize; + BOOL bPopupMode; + bool mbInResize; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; + + + DECL_LINK( SelectHdl, void * ); + void FillValueSet(); + void SetSize(); + void implInit(); + +protected: + virtual void Resizing( Size& rSize ); + virtual void Resize(); + virtual BOOL Close(); + virtual void PopupModeEnd(); + + /** This function is called when the window gets the focus. It grabs + the focus to the line ends value set so that it can be controlled with + the keyboard. + */ + virtual void GetFocus (void); + +public: + SvxLineEndWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + const String& rWndTitle ); + SvxLineEndWindow( USHORT nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + Window* pParentWindow, + const String& rWndTitle ); + ~SvxLineEndWindow(); + + void StartSelection(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindow* Clone() const; +}; + +//======================================================================== +// class SvxColorToolBoxControl +//======================================================================== + +class SVX_DLLPUBLIC SvxLineEndToolBoxControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxLineEndToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxLineEndToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + + + +#endif + diff --git a/svx/inc/linkmgr.hxx b/svx/inc/linkmgr.hxx new file mode 100644 index 000000000000..b65c91ce7ebd --- /dev/null +++ b/svx/inc/linkmgr.hxx @@ -0,0 +1,101 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: linkmgr.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVXLINKMGR_HXX +#define _SVXLINKMGR_HXX + + +#include <sfx2/linkmgr.hxx> +#include "svx/svxdllapi.h" + +class Graphic; +class Size; + +// Damit der Link ueber den Status der zu ladenen Grafik informierten werden +// verschickt das FileObject ein SvData, mit der FormatId +// "RegisterStatusInfoId" und ein einem String als Datentraeger. Dieser +// enthaelt den folgenden enum. +enum LinkState +{ + STATE_LOAD_OK, + STATE_LOAD_ERROR, + STATE_LOAD_ABORT +}; + +class SVX_DLLPUBLIC SvxLinkManager : public ::sfx2::SvLinkManager +{ + SvxLinkManager( const SvxLinkManager& ); + SvxLinkManager& operator=( const SvxLinkManager& ); + +public: + SvxLinkManager( SfxObjectShell * pCacheCont ); + + // den Link mit einem PseudoObject verbinden und in die Liste eintragen + BOOL InsertFileLink( sfx2::SvBaseLink&, + USHORT nFileType, + const String& rTxt, + const String* pFilterNm = 0, + const String* pRange = 0 ); + + // falls am Link schon alles eingestellt ist ! + BOOL InsertFileLink( sfx2::SvBaseLink& ); + + // erfrage die Strings fuer den Dialog + virtual BOOL GetDisplayNames( const sfx2::SvBaseLink*, + String* pType, + String* pFile = 0, + String* pLink = 0, + String* pFilter = 0 ) const; + + virtual sfx2::SvLinkSourceRef CreateObj( sfx2::SvBaseLink * ); + + // eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln + // (ist zur Zeit nur fuer die FileLinks interressant!) + void CancelTransfers(); + + static void SetTransferPriority( sfx2::SvBaseLink& rLink, USHORT nPrio ); + + // um Status Informationen aus dem FileObject an den BaseLink zu + // senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat + // dann die entsprechenden Informationen als String. + // Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt + // - das braucht Informationen ueber Load/Abort/Error + static ULONG RegisterStatusInfoId(); + + // if the mimetype says graphic/bitmap/gdimetafile then get the + // graphic from the Any. Return says no errors + static BOOL GetGraphicFromAny( const String& rMimeType, + const ::com::sun::star::uno::Any & rValue, + Graphic& rGrf ); + +}; + + +#endif + diff --git a/svx/inc/makefile.mk b/svx/inc/makefile.mk new file mode 100644 index 000000000000..357b21f5a8d3 --- /dev/null +++ b/svx/inc/makefile.mk @@ -0,0 +1,54 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.5 $ +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=.. + +PRJNAME=svx +TARGET=inc + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# --- Files -------------------------------------------------------- + +LOCALIZE_ME=globlmn_tmpl.hrc + +.INCLUDE : target.mk + +.IF "$(ENABLE_PCH)"!="" +ALLTAR : \ + $(SLO)$/precompiled.pch \ + $(SLO)$/precompiled_ex.pch + +.ENDIF # "$(ENABLE_PCH)"!="" + diff --git a/svx/inc/measctrl.hxx b/svx/inc/measctrl.hxx new file mode 100644 index 000000000000..1a553fc0a232 --- /dev/null +++ b/svx/inc/measctrl.hxx @@ -0,0 +1,73 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: measctrl.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_MEASCTRL_HXX +#define _SVX_MEASCTRL_HXX + +// include --------------------------------------------------------------- + +#ifndef _CTRL_HXX //autogen +#include <vcl/ctrl.hxx> +#endif +#include "svx/svxdllapi.h" + + +class SfxItemSet; +class SdrMeasureObj; +class SdrModel; + +/************************************************************************* +|* +|* SvxXMeasurePreview +|* +\************************************************************************/ +class SVX_DLLPUBLIC SvxXMeasurePreview : public Control +{ + friend class SvxMeasurePage; + +private: + const SfxItemSet& rAttrs; + SdrMeasureObj* pMeasureObj; + SdrModel* pModel; + +public: + SvxXMeasurePreview( Window* pParent, const ResId& rResId, + const SfxItemSet& rInAttrs ); + ~SvxXMeasurePreview(); + + virtual void Paint( const Rectangle& rRect ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + + void SetAttributes( const SfxItemSet& rInAttrs ); + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +#endif + diff --git a/svx/inc/modctrl.hxx b/svx/inc/modctrl.hxx new file mode 100644 index 000000000000..5c44f478c4ee --- /dev/null +++ b/svx/inc/modctrl.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: modctrl.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_MODCTRL_HXX +#define _SVX_MODCTRL_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/stbitem.hxx> +#include "svx/svxdllapi.h" + +// class SvxModifyControl ------------------------------------------------ + +class SVX_DLLPUBLIC SvxModifyControl : public SfxStatusBarControl +{ +public: + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual void Paint( const UserDrawEvent& rEvt ); + + SFX_DECL_STATUSBAR_CONTROL(); + + SvxModifyControl( USHORT nSlotId, USHORT nId, StatusBar& rStb ); + + static ULONG GetDefItemWidth(const StatusBar& rStb); + +private: + BOOL bState; + +#ifdef _SVX_MODCTRL_CXX + SVX_DLLPRIVATE void DrawItemText_Impl(); +#endif +}; + + +#endif + diff --git a/svx/inc/nlbkitem.hxx b/svx/inc/nlbkitem.hxx new file mode 100644 index 000000000000..db3298c3d5b1 --- /dev/null +++ b/svx/inc/nlbkitem.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: nlbkitem.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_NLBKITEM_HXX +#define _SVX_NLBKITEM_HXX + +// include --------------------------------------------------------------- + + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +// class SvxNoLinebreakItem ---------------------------------------------- + + +/* [Beschreibung] + + PB: ??? +*/ + +class SVX_DLLPUBLIC SvxNoLinebreakItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxNoLinebreakItem( const BOOL bBreak /*= TRUE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxNoLinebreakItem& operator=(const SvxNoLinebreakItem& rLB) + { + SetValue( rLB.GetValue() ); + return *this; + } +}; + + + +#endif + + diff --git a/svx/inc/numvset.hxx b/svx/inc/numvset.hxx new file mode 100644 index 000000000000..8887afb34e51 --- /dev/null +++ b/svx/inc/numvset.hxx @@ -0,0 +1,168 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: numvset.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_NUMVSET_HXX +#define _SVX_NUMVSET_HXX + + +// include --------------------------------------------------------------- + + +#include <svtools/valueset.hxx> +#include <limits.h> +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/uno/Sequence.h> +#include <com/sun/star/lang/Locale.hpp> +#include "svx/svxdllapi.h" + +namespace com{namespace sun{ namespace star{ + namespace container{ + class XIndexAccess; + } + namespace beans{ + struct PropertyValue; + } + namespace text{ + class XNumberingFormatter; + } +}}} + +class SvxBrushItem; +class SvxNumRule; +struct SvxBmpItemInfo +{ + SvxBrushItem* pBrushItem; + USHORT nItemId; +}; + +/*-----------------09/09/97 01:05pm----------------- + +--------------------------------------------------*/ +class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet +{ + Color aLineColor; + USHORT nPageType; + BOOL bHTMLMode; + Rectangle aOrgRect; + VirtualDevice* pVDev; + + com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter; + com::sun::star::lang::Locale aLocale; + + com::sun::star::uno::Sequence< + com::sun::star::uno::Sequence< + com::sun::star::beans::PropertyValue> > aNumSettings; + + com::sun::star::uno::Sequence< + com::sun::star::uno::Reference< + com::sun::star::container::XIndexAccess> > aOutlineSettings; + public: + SvxNumValueSet( Window* pParent, const ResId& rResId, USHORT nType ); + ~SvxNumValueSet(); + + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + + void SetHTMLMode(BOOL bSet) {bHTMLMode = bSet;} + void SetNumberingSettings( + const com::sun::star::uno::Sequence< + com::sun::star::uno::Sequence< + com::sun::star::beans::PropertyValue> >& aNum, + com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter, + const com::sun::star::lang::Locale& rLocale ); + + void SetOutlineNumberingSettings( + com::sun::star::uno::Sequence< + com::sun::star::uno::Reference< + com::sun::star::container::XIndexAccess> >& rOutline, + com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter, + const com::sun::star::lang::Locale& rLocale); +}; + +/*-----------------13.02.97 09.32------------------- + +--------------------------------------------------*/ + +class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet +{ + String sBullets; + Timer aFormatTimer; + BOOL bGrfNotFound; + + protected: + DECL_LINK(FormatHdl_Impl, Timer*); + + void SetGrfNotFound(BOOL bSet) {bGrfNotFound = bSet;} + BOOL IsGrfNotFound()const {return bGrfNotFound;} + + Timer& GetFormatTimer() {return aFormatTimer;} + + public: + SvxBmpNumValueSet( Window* pParent, const ResId& rResId/*, const List& rStrNames*/); + ~SvxBmpNumValueSet(); + + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + +}; +/*-----------------02.12.97 10:31------------------- + +--------------------------------------------------*/ + +class SvxNumberingPreview : public Window +{ + const SvxNumRule* pActNum; + Font aStdFont; + long nPageWidth; + const String* pOutlineNames; + BOOL bPosition; + UINT16 nActLevel; + + protected: + virtual void Paint( const Rectangle& rRect ); + + public: + SvxNumberingPreview(Window* pParent, const ResId& rResId ) : + Window(pParent, rResId), + pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(FALSE), nActLevel(USHRT_MAX) + { SetBorderStyle( WINDOW_BORDER_MONO ); } + + void SetNumRule(const SvxNumRule* pNum) + {pActNum = pNum; Invalidate();}; + void SetPageWidth(long nPgWidth) + {nPageWidth = nPgWidth;} + void SetOutlineNames(const String* pNames) + {pOutlineNames = pNames;} + void SetPositionMode() + { bPosition = TRUE;} + void SetLevel(USHORT nSet) {nActLevel = nSet;} + +}; + + +#endif + diff --git a/svx/inc/objfac3d.hxx b/svx/inc/objfac3d.hxx new file mode 100644 index 000000000000..25bdc2fe4bbd --- /dev/null +++ b/svx/inc/objfac3d.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: objfac3d.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _OBJFAC3D_HXX +#define _OBJFAC3D_HXX + +#include "svx/svxdllapi.h" + + +/************************************************************************* +|* +|* Factory fuer Chart-spezifische Objekte +|* +\************************************************************************/ + +class SdrObjFactory; + + +#include <tools/link.hxx> + +class SVX_DLLPUBLIC E3dObjFactory +{ +public: + E3dObjFactory(); + ~E3dObjFactory(); + + DECL_LINK(MakeObject, SdrObjFactory*); +}; + + + +#endif // _OBJFAC3D_HXX diff --git a/svx/inc/ofaitem.hxx b/svx/inc/ofaitem.hxx new file mode 100644 index 000000000000..7701cb82206b --- /dev/null +++ b/svx/inc/ofaitem.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ofaitem.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _OFF_OFAITEM_HXX +#define _OFF_OFAITEM_HXX + +// include ---------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + +// class OfaPtrItem ------------------------------------------------------ + +class SVX_DLLPUBLIC OfaPtrItem : public SfxPoolItem +{ +private: + void* pPtr; + +public: + OfaPtrItem( USHORT nWhich, void *pPtr ); + OfaPtrItem( const OfaPtrItem& ); + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + + void* GetValue() const { return pPtr; } + void SetValue( void* pNewPtr ) { pPtr = pNewPtr; } +}; + +#endif diff --git a/svx/inc/opaqitem.hxx b/svx/inc/opaqitem.hxx new file mode 100644 index 000000000000..07a5cbb4fd36 --- /dev/null +++ b/svx/inc/opaqitem.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: opaqitem.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPAQITEM_HXX +#define _SVX_OPAQITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxOpaqueItem --------------------------------------------------- + + +/* +[Beschreibung] +Dieses Item beschreibt eine logische Variable "Undurchsichtig ja oder nein". +*/ + +class SVX_DLLPUBLIC SvxOpaqueItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxOpaqueItem( const USHORT nId , const BOOL bOpa = TRUE ); + inline SvxOpaqueItem &operator=( const SvxOpaqueItem &rCpy ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +inline SvxOpaqueItem::SvxOpaqueItem( const USHORT nId, const BOOL bOpa ) + : SfxBoolItem( nId, bOpa ) +{} + +inline SvxOpaqueItem &SvxOpaqueItem::operator=( const SvxOpaqueItem &rCpy ) +{ + SetValue( rCpy.GetValue() ); + return *this; +} + + + +#endif + diff --git a/svx/inc/opengrf.hxx b/svx/inc/opengrf.hxx new file mode 100644 index 000000000000..e32ce7d1b243 --- /dev/null +++ b/svx/inc/opengrf.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: opengrf.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPENGRF_HXX +#define _SVX_OPENGRF_HXX + +#include <memory> // auto_ptr +#include <svtools/filter.hxx> +#include "svx/svxdllapi.h" + + +struct SvxOpenGrf_Impl; + +class SVX_DLLPUBLIC SvxOpenGraphicDialog +{ +public: + SvxOpenGraphicDialog ( const String& rTitle ); + ~SvxOpenGraphicDialog (); + + short Execute(); + + void SetPath( const String& rPath ); + void SetPath( const String& rPath, sal_Bool bLinkState ); + String GetPath() const; + + int GetGraphic(Graphic&) const; + + void EnableLink(sal_Bool); + void AsLink(sal_Bool); + sal_Bool IsAsLink() const; + + String GetCurrentFilter() const; + void SetCurrentFilter(const String&); + + /// Set dialog help id at FileDlgHelper + void SetControlHelpIds( const INT16* _pControlId, const INT32* _pHelpId ); + /// Set control help ids at FileDlgHelper + void SetDialogHelpId( const INT32 _nHelpId ); +private: + // disable copy and assignment + SVX_DLLPRIVATE SvxOpenGraphicDialog (const SvxOpenGraphicDialog&); + SVX_DLLPRIVATE SvxOpenGraphicDialog& operator = ( const SvxOpenGraphicDialog & ); + + const std::auto_ptr< SvxOpenGrf_Impl > mpImpl; +}; + +#endif // _SVX_OPENGRF_HXX + diff --git a/svx/inc/optextbr.hrc b/svx/inc/optextbr.hrc new file mode 100644 index 000000000000..9524ab69fbb1 --- /dev/null +++ b/svx/inc/optextbr.hrc @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: optextbr.hrc,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPTEXTBR_HRC +#define _SVX_OPTEXTBR_HRC + +// defines --------------------------------------------------------------- + +#define CB_EXTBRW_ON 10 +#define FT_EXTBRW_EXCEPTION 11 +#define ED_EXTBRW_EXCEPTION 12 +#define LB_EXTBRW_EXCEPTION 13 +#define PB_EXTBRW_ADD 14 +#define PB_EXTBRW_DELETE 15 +#define PB_EXTBRW_IEOPTIONS 16 +#define CB_EXTBRW_NOHINT 17 +#define ED_EXTBRW_FILE 18 +#define PB_EXTBRW_FILE 19 +#define CB_EXTBRW_FILE 20 + +#define STR_EXTBRW_FILE 30 + +#define IMG_EXTBRW_WARNING 10 +#define FT_EXTBRW_WARNING 11 +#define CB_EXTBRW_DISABLE 12 +#define GB_EXTBRW_WARNING 13 +#define BTN_EXTBRW_YES 14 +#define BTN_EXTBRW_NO 15 + +#endif // #ifndef _SVX_OPTEXTBR_HRC + +// ******************************************************************* EOF + diff --git a/svx/inc/optgenrl.hxx b/svx/inc/optgenrl.hxx new file mode 100644 index 000000000000..a30a111dce49 --- /dev/null +++ b/svx/inc/optgenrl.hxx @@ -0,0 +1,53 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: optgenrl.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPTGENRL_HXX +#define _SVX_OPTGENRL_HXX + +// Defines for setting the fokus of a Edit via a slot from external. +#define UNKNOWN_EDIT ((USHORT)0) +#define COMPANY_EDIT ((USHORT)1) +#define FIRSTNAME_EDIT ((USHORT)2) +#define LASTNAME_EDIT ((USHORT)3) +#define STREET_EDIT ((USHORT)4) +#define COUNTRY_EDIT ((USHORT)5) +#define PLZ_EDIT ((USHORT)6) +#define CITY_EDIT ((USHORT)7) +#define STATE_EDIT ((USHORT)8) +#define TITLE_EDIT ((USHORT)9) +#define POSITION_EDIT ((USHORT)10) +#define SHORTNAME_EDIT ((USHORT)11) +#define TELPRIV_EDIT ((USHORT)12) +#define TELCOMPANY_EDIT ((USHORT)13) +#define FAX_EDIT ((USHORT)14) +#define EMAIL_EDIT ((USHORT)15) + +#endif // #ifndef _SVX_OPTGENRL_HXX + + diff --git a/svx/inc/optgrid.hxx b/svx/inc/optgrid.hxx new file mode 100644 index 000000000000..e91530f33cd5 --- /dev/null +++ b/svx/inc/optgrid.hxx @@ -0,0 +1,183 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: optgrid.hxx,v $ + * $Revision: 1.13 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPTGRID_HXX +#define _SVX_OPTGRID_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/tabdlg.hxx> +#include <svl/eitem.hxx> +#include <vcl/group.hxx> +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include "svx/svxdllapi.h" + +class SvxGridTabPage; + +// class SvxOptionsGrid -------------------------------------------------- + +class SVX_DLLPUBLIC SvxOptionsGrid +{ +protected: + UINT32 nFldDrawX; + UINT32 nFldDivisionX; + UINT32 nFldDrawY; + UINT32 nFldDivisionY; + UINT32 nFldSnapX; + UINT32 nFldSnapY; + BOOL bUseGridsnap:1; + BOOL bSynchronize:1; + BOOL bGridVisible:1; + BOOL bEqualGrid: 1; + +public: + SvxOptionsGrid(); + ~SvxOptionsGrid(); + + void SetFldDrawX( UINT32 nSet){nFldDrawX = nSet;} + void SetFldDivisionX(UINT32 nSet){nFldDivisionX = nSet;} + void SetFldDrawY ( UINT32 nSet){nFldDrawY = nSet;} + void SetFldDivisionY(UINT32 nSet){nFldDivisionY = nSet;} + void SetFldSnapX( UINT32 nSet){nFldSnapX = nSet;} + void SetFldSnapY ( UINT32 nSet){nFldSnapY = nSet;} + void SetUseGridSnap( BOOL bSet ) {bUseGridsnap = bSet;} + void SetSynchronize( BOOL bSet ) {bSynchronize = bSet;} + void SetGridVisible( BOOL bSet ) {bGridVisible = bSet;} + void SetEqualGrid( BOOL bSet ) {bEqualGrid = bSet;} + + UINT32 GetFldDrawX( ) const { return nFldDrawX; } + UINT32 GetFldDivisionX() const { return nFldDivisionX;} + UINT32 GetFldDrawY ( ) const { return nFldDrawY; } + UINT32 GetFldDivisionY() const { return nFldDivisionY;} + UINT32 GetFldSnapX( ) const { return nFldSnapX; } + UINT32 GetFldSnapY ( ) const { return nFldSnapY; } + BOOL GetUseGridSnap( ) const { return bUseGridsnap; } + BOOL GetSynchronize( ) const { return bSynchronize; } + BOOL GetGridVisible( ) const { return bGridVisible; } + BOOL GetEqualGrid() const { return bEqualGrid; } +}; + +// class SvxGridItem ----------------------------------------------------- + +class SVX_DLLPUBLIC SvxGridItem : public SvxOptionsGrid, public SfxPoolItem +{ + // #i9076# + friend class SvxGridTabPage; + +public: + SvxGridItem( USHORT _nWhich) : SfxPoolItem(_nWhich){}; + SvxGridItem( const SvxGridItem& pTestItem ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual int operator==( const SfxPoolItem& ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + +}; + +// class SvxGridTabPage -------------------------------------------------- + +class SVX_DLLPUBLIC SvxGridTabPage : public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +public: + SvxGridTabPage( Window* pParent, const SfxItemSet& rSet ); + + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); + + virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet ); + +private: + CheckBox aCbxUseGridsnap; + CheckBox aCbxGridVisible; + + FixedLine aFlResolution; + FixedText aFtDrawX; + MetricField aMtrFldDrawX; + FixedText aFtDrawY; + MetricField aMtrFldDrawY; + + FixedLine aFlDivision; + FixedText aFtDivisionX; + NumericField aNumFldDivisionX; + FixedText aDivisionPointX; + + FixedText aFtDivisionY; + NumericField aNumFldDivisionY; + FixedText aDivisionPointY; + + CheckBox aCbxSynchronize; + FixedLine aGrpDrawGrid; // Neu + +protected: + //these controls are used in draw and impress + FixedLine aGrpSnap; + CheckBox aCbxSnapHelplines; + CheckBox aCbxSnapBorder; + CheckBox aCbxSnapFrame; + CheckBox aCbxSnapPoints; + FixedText aFtSnapArea; + MetricField aMtrFldSnapArea; + + FixedLine aSeparatorFL; + + FixedLine aGrpOrtho; + CheckBox aCbxOrtho; + CheckBox aCbxBigOrtho; + CheckBox aCbxRotate; + MetricField aMtrFldAngle; + FixedText aFtBezAngle; + MetricField aMtrFldBezAngle; + +private: + BOOL bAttrModified; +// BOOL bEqualGrid; // Neu + +#ifdef _SVX_OPTGRID_CXX + DECL_LINK( ClickRotateHdl_Impl, void * ); + DECL_LINK( ChangeDrawHdl_Impl, MetricField * ); + DECL_LINK( ChangeGridsnapHdl_Impl, void * ); + DECL_LINK( ChangeDivisionHdl_Impl, NumericField * ); + +#endif +}; + + +#endif + diff --git a/svx/inc/optitems.hxx b/svx/inc/optitems.hxx new file mode 100644 index 000000000000..6e951c0100f4 --- /dev/null +++ b/svx/inc/optitems.hxx @@ -0,0 +1,123 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: optitems.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_OPTITEMS_HXX +#define _SVX_OPTITEMS_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include "svx/svxdllapi.h" + +// forward --------------------------------------------------------------- +namespace com{namespace sun{namespace star{ +namespace beans{ +// class XPropertySet; +} +namespace linguistic2{ + class XSpellChecker1; +}}}} + + +// class SfxSpellCheckItem ----------------------------------------------- + + + +class SVX_DLLPUBLIC SfxSpellCheckItem: public SfxPoolItem +{ +public: + TYPEINFO(); + + SfxSpellCheckItem( ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > &xChecker, + sal_uInt16 nWhich ); + SfxSpellCheckItem( const SfxSpellCheckItem& rItem ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual int operator==( const SfxPoolItem& ) const; + + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > + GetXSpellChecker() const { return xSpellCheck; } + +private: + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > xSpellCheck; +}; + + +// class SfxHyphenRegionItem --------------------------------------------- + + + +class SVX_DLLPUBLIC SfxHyphenRegionItem: public SfxPoolItem +{ + sal_uInt8 nMinLead; + sal_uInt8 nMinTrail; + +public: + TYPEINFO(); + + SfxHyphenRegionItem( const sal_uInt16 nId ); + SfxHyphenRegionItem( const SfxHyphenRegionItem& rItem ); + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStrm, sal_uInt16 nVer ) const; + virtual SvStream& Store( SvStream& rStrm, sal_uInt16 ) const; + + inline sal_uInt8 &GetMinLead() { return nMinLead; } + inline sal_uInt8 GetMinLead() const { return nMinLead; } + + inline sal_uInt8 &GetMinTrail() { return nMinTrail; } + inline sal_uInt8 GetMinTrail() const { return nMinTrail; } + + inline SfxHyphenRegionItem& operator=( const SfxHyphenRegionItem& rNew ) + { + nMinLead = rNew.GetMinLead(); + nMinTrail = rNew.GetMinTrail(); + return *this; + } +}; + + + +#endif + diff --git a/svx/inc/orienthelper.hxx b/svx/inc/orienthelper.hxx new file mode 100644 index 000000000000..3bbbaac77e9a --- /dev/null +++ b/svx/inc/orienthelper.hxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: orienthelper.hxx,v $ + * $Revision: 1.5.274.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_ORIENTHELPER_HXX +#define SVX_ORIENTHELPER_HXX + +#include <memory> +#include <vcl/window.hxx> +#include <sfx2/itemconnect.hxx> +#include "svx/svxdllapi.h" + +class NumericField; +class CheckBox; + +namespace svx { + +class DialControl; + +// ============================================================================ + +struct OrientationHelper_Impl; + +/** A helper class that manages a DialControl and a "Stacked text" check box. + + This helper remembers a DialControl for entering a rotation angle, and a + check box for stacked text, that enables/disables other controls dependent + on its state. + + It is possible to register more controls that have to be enabled/disabled + together with this helper object (optionally dependent on the stacked text + check box), using the function AddDependentWindow(). All registered windows + are handled on a call of Enable(), or Show(), or on changing the state of + the "Stacked text" check box. + + Note: The member function SetStackedState() should be used instead of + direct modifications of the "Stacked text" check box. Otherwise the update + mechanism of registered controls will not work. + */ +class SVX_DLLPUBLIC OrientationHelper +{ +public: + explicit OrientationHelper( + DialControl& rCtrlDial, + CheckBox& rCbStacked ); + + /** @param rNfRotation A numeric field that will be connected to the DialControl. */ + explicit OrientationHelper( + DialControl& rCtrlDial, + NumericField& rNfRotation, + CheckBox& rCbStacked ); + + virtual ~OrientationHelper(); + + /** Registers the passed window to be enabled/disabled on call of Enable(). + @param eDisableIfStacked + STATE_CHECK: Window always disabled, if stacked text is turned on. + STATE_NOCHECK: Window always disabled, if stacked text is turned off. + STATE_DONTKNOW: Window will be enabled/disabled independent from stacked text. */ + void AddDependentWindow( Window& rWindow, TriState eDisableIfStacked = STATE_DONTKNOW ); + + /** Enables or disables the dial control and all dependent windows. */ + void Enable( bool bEnable = true ); + /** Disables the dial control and all dependent windows. */ + inline void Disable() { Enable( false ); } + + /** Shows or hides the dial control and all dependent windows. */ + void Show( bool bShow = true ); + /** Hides the dial control and all dependent windows. */ + inline void Hide() { Show( false ); } + + /** Sets the "stacked" check box to the passed state and updates dependent controls. */ + void SetStackedState( TriState eState ); + /** Returns the state of the "stacked" check box. */ + TriState GetStackedState() const; + + /** Enables/disables the "don't know" state of the "Stacked text" check box. */ + void EnableStackedTriState( bool bEnable = true ); + +private: + std::auto_ptr< OrientationHelper_Impl > mpImpl; +}; + +// ============================================================================ + +/** Wrapper for usage of the stacked attribute of an OrientationHelper in item connections. */ +class SVX_DLLPUBLIC OrientStackedWrapper : public sfx::SingleControlWrapper< OrientationHelper, bool > +{ +public: + explicit OrientStackedWrapper( OrientationHelper& rOrientHlp ); + + virtual bool IsControlDontKnow() const; + virtual void SetControlDontKnow( bool bSet ); + + virtual bool GetControlValue() const; + virtual void SetControlValue( bool bValue ); +}; + +// ---------------------------------------------------------------------------- + +/** An item<->control connection for the stacked attribute of an OrientationHelper. */ +typedef sfx::ItemControlConnection< sfx::BoolItemWrapper, OrientStackedWrapper > OrientStackedConnection; + +// ============================================================================ + +} // namespace + +#endif + diff --git a/svx/inc/passwd.hxx b/svx/inc/passwd.hxx new file mode 100644 index 000000000000..1128337da480 --- /dev/null +++ b/svx/inc/passwd.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: passwd.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PASSWD_HXX +#define _SVX_PASSWD_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/basedlgs.hxx> + +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif + +#ifndef _EDIT_HXX //autogen +#include <vcl/edit.hxx> +#endif + +#ifndef _BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#include "svx/svxdllapi.h" + +// class SvxPasswordDialog ----------------------------------------------- + +class SVX_DLLPUBLIC SvxPasswordDialog : public SfxModalDialog +{ +private: + FixedLine aOldFL; + FixedText aOldPasswdFT; + Edit aOldPasswdED; + FixedLine aNewFL; + FixedText aNewPasswdFT; + Edit aNewPasswdED; + FixedText aRepeatPasswdFT; + Edit aRepeatPasswdED; + OKButton aOKBtn; + CancelButton aEscBtn; + HelpButton aHelpBtn; + + String aOldPasswdErrStr; + String aRepeatPasswdErrStr; + + Link aCheckPasswordHdl; + + BOOL bEmpty; + + DECL_LINK( ButtonHdl, OKButton * ); + DECL_LINK( EditModifyHdl, Edit * ); + +public: + SvxPasswordDialog( Window* pParent, BOOL bAllowEmptyPasswords = FALSE, BOOL bDisableOldPassword = FALSE ); + ~SvxPasswordDialog(); + + String GetOldPassword() const { return aOldPasswdED.GetText(); } + String GetNewPassword() const { return aNewPasswdED.GetText(); } + + void SetCheckPasswordHdl( const Link& rLink ) { aCheckPasswordHdl = rLink; } +}; + + +#endif + diff --git a/svx/inc/pch/precompiled_svx.cxx b/svx/inc/pch/precompiled_svx.cxx new file mode 100644 index 000000000000..70dd166aea8f --- /dev/null +++ b/svx/inc/pch/precompiled_svx.cxx @@ -0,0 +1,32 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: precompiled_svx.cxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_svx.hxx" + diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx new file mode 100644 index 000000000000..fe961050250e --- /dev/null +++ b/svx/inc/pch/precompiled_svx.hxx @@ -0,0 +1,968 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: precompiled_svx.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): Generated on 2006-09-01 17:50:08.279739 + +#ifdef PRECOMPILED_HEADERS +//---MARKER--- +#include "sal/config.h" +#include "avmedia/mediaitem.hxx" +#include "avmedia/mediawindow.hxx" +#include "basegfx/matrix/b2dhommatrix.hxx" +#include "basegfx/numeric/ftools.hxx" +#include "basegfx/point/b2dpoint.hxx" +#include "basegfx/point/b3dpoint.hxx" +#include "basegfx/polygon/b2dlinegeometry.hxx" +#include "basegfx/polygon/b2dpolygon.hxx" +#include "basegfx/polygon/b2dpolygontools.hxx" +#include "basegfx/polygon/b2dpolypolygon.hxx" +#include "basegfx/polygon/b2dpolypolygontools.hxx" +#include "basegfx/polygon/b3dpolygon.hxx" +#include "basegfx/polygon/b3dpolypolygon.hxx" +#include "basegfx/polygon/b3dpolypolygontools.hxx" +#include "basegfx/range/b2drange.hxx" +#include "basegfx/vector/b2dvector.hxx" +#include "basegfx/vector/b3dvector.hxx" +#include "basic/basmgr.hxx" +#include "basic/sbmod.hxx" +#include "basic/sbuno.hxx" +#include "basic/sbx.hxx" +#include "basic/sbxvar.hxx" +#include "boost/scoped_ptr.hpp" +#include "boost/shared_ptr.hpp" +#include "boost/spirit/include/classic_core.hpp" +#include "bootstrp/sstring.hxx" +#include "com/sun/star/accessibility/AccessibleEventId.hpp" +#include "com/sun/star/accessibility/AccessibleEventObject.hpp" +#include "com/sun/star/accessibility/AccessibleRelationType.hpp" +#include "com/sun/star/accessibility/AccessibleRole.hpp" +#include "com/sun/star/accessibility/AccessibleStateType.hpp" +#include "com/sun/star/accessibility/AccessibleTextType.hpp" +#include "com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp" +#include "com/sun/star/accessibility/TextSegment.hpp" +#include "com/sun/star/accessibility/XAccessible.hpp" +#include "com/sun/star/accessibility/XAccessibleAction.hpp" +#include "com/sun/star/accessibility/XAccessibleContext.hpp" +#include "com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp" +#include "com/sun/star/accessibility/XAccessibleEventListener.hpp" +#include "com/sun/star/accessibility/XAccessibleImage.hpp" +#include "com/sun/star/accessibility/XAccessibleRelationSet.hpp" +#include "com/sun/star/accessibility/XAccessibleSelection.hpp" +#include "com/sun/star/accessibility/XAccessibleStateSet.hpp" +#include "com/sun/star/accessibility/XAccessibleTable.hpp" +#include "com/sun/star/accessibility/XAccessibleTextAttributes.hpp" +#include "com/sun/star/accessibility/XAccessibleValue.hpp" +#include "com/sun/star/awt/CharSet.hpp" +#include "com/sun/star/awt/FocusChangeReason.hpp" +#include "com/sun/star/awt/FontDescriptor.hpp" +#include "com/sun/star/awt/FontFamily.hpp" +#include "com/sun/star/awt/FontPitch.hpp" +#include "com/sun/star/awt/FontSlant.hpp" +#include "com/sun/star/awt/FontType.hpp" +#include "com/sun/star/awt/FontWeight.hpp" +#include "com/sun/star/awt/FontWidth.hpp" +#include "com/sun/star/awt/Gradient.hpp" +#include "com/sun/star/awt/GradientStyle.hpp" +#include "com/sun/star/awt/Key.hpp" +#include "com/sun/star/awt/KeyEvent.hpp" +#include "com/sun/star/awt/KeyModifier.hpp" +#include "com/sun/star/awt/LineEndFormat.hpp" +#include "com/sun/star/awt/PosSize.hpp" +#include "com/sun/star/awt/RasterOperation.hpp" +#include "com/sun/star/awt/Rectangle.hpp" +#include "com/sun/star/awt/ScrollBarOrientation.hpp" +#include "com/sun/star/awt/SimpleFontMetric.hpp" +#include "com/sun/star/awt/Size.hpp" +#include "com/sun/star/awt/TextAlign.hpp" +#include "com/sun/star/awt/VisualEffect.hpp" +#include "com/sun/star/awt/WindowAttribute.hpp" +#include "com/sun/star/awt/WindowDescriptor.hpp" +#include "com/sun/star/awt/XBitmap.hpp" +#include "com/sun/star/awt/XCheckBox.hpp" +#include "com/sun/star/awt/XComboBox.hpp" +#include "com/sun/star/awt/XControl.hpp" +#include "com/sun/star/awt/XControlContainer.hpp" +#include "com/sun/star/awt/XControlModel.hpp" +#include "com/sun/star/awt/XDevice.hpp" +#include "com/sun/star/awt/XFocusListener.hpp" +#include "com/sun/star/awt/XFont.hpp" +#include "com/sun/star/awt/XGraphics.hpp" +#include "com/sun/star/awt/XImageConsumer.hpp" +#include "com/sun/star/awt/XItemListener.hpp" +#include "com/sun/star/awt/XLayoutConstrains.hpp" +#include "com/sun/star/awt/XListBox.hpp" +#include "com/sun/star/awt/XMouseListener.hpp" +#include "com/sun/star/awt/XProgressMonitor.hpp" +#include "com/sun/star/awt/XTabController.hpp" +#include "com/sun/star/awt/XTabControllerModel.hpp" +#include "com/sun/star/awt/XTextListener.hpp" +#include "com/sun/star/awt/XToolkit.hpp" +#include "com/sun/star/awt/XVclWindowPeer.hpp" +#include "com/sun/star/awt/XWindow.hpp" +#include "com/sun/star/awt/XWindowListener.hpp" +#include "com/sun/star/awt/XWindowPeer.hpp" +#include "com/sun/star/beans/NamedValue.hpp" +#include "com/sun/star/beans/PropertyAttribute.hpp" +#include "com/sun/star/beans/PropertyChangeEvent.hpp" +#include "com/sun/star/beans/PropertyState.hpp" +#include "com/sun/star/beans/PropertyValue.hpp" +#include "com/sun/star/beans/PropertyValues.hdl" +#include "com/sun/star/beans/PropertyValues.hpp" +#include "com/sun/star/beans/XFastPropertySet.hpp" +#include "com/sun/star/beans/XIntrospection.hpp" +#include "com/sun/star/beans/XMultiPropertySet.hpp" +#include "com/sun/star/beans/XMultiPropertyStates.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/chart/ChartAxisArrangeOrderType.hpp" +#include "com/sun/star/container/ContainerEvent.hpp" +#include "com/sun/star/container/NoSuchElementException.hpp" +#include "com/sun/star/container/XChild.hpp" +#include "com/sun/star/container/XContainer.hpp" +#include "com/sun/star/container/XContainerListener.hpp" +#include "com/sun/star/container/XContainerQuery.hpp" +#include "com/sun/star/container/XContentEnumerationAccess.hpp" +#include "com/sun/star/container/XEnumeration.hpp" +#include "com/sun/star/container/XEnumerationAccess.hpp" +#include "com/sun/star/container/XHierarchicalNameAccess.hpp" +#include "com/sun/star/container/XIdentifierContainer.hpp" +#include "com/sun/star/container/XIndexAccess.hpp" +#include "com/sun/star/container/XIndexContainer.hpp" +#include "com/sun/star/container/XIndexReplace.hpp" +#include "com/sun/star/container/XNameAccess.hpp" +#include "com/sun/star/container/XNameContainer.hpp" +#include "com/sun/star/container/XNameReplace.hpp" +#include "com/sun/star/container/XNamed.hpp" +#include "com/sun/star/container/XSet.hpp" +#include "com/sun/star/datatransfer/DataFlavor.hpp" +#include "com/sun/star/datatransfer/XTransferable.hpp" +#include "com/sun/star/datatransfer/clipboard/XClipboard.hpp" +#include "com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp" +#include "com/sun/star/datatransfer/dnd/DNDConstants.hpp" +#include "com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp" +#include "com/sun/star/datatransfer/dnd/XDropTarget.hpp" +#include "com/sun/star/document/EventObject.hpp" +#include "com/sun/star/document/UpdateDocMode.hpp" +#include "com/sun/star/document/XActionLockable.hpp" +#include "com/sun/star/document/XBinaryStreamResolver.hpp" +#include "com/sun/star/document/XDocumentInfoSupplier.hpp" +#include "com/sun/star/document/XEmbeddedObjectResolver.hpp" +#include "com/sun/star/document/XEventBroadcaster.hpp" +#include "com/sun/star/document/XEventListener.hpp" +#include "com/sun/star/document/XEventsSupplier.hpp" +#include "com/sun/star/document/XExporter.hpp" +#include "com/sun/star/document/XFilter.hpp" +#include "com/sun/star/document/XGraphicObjectResolver.hpp" +#include "com/sun/star/document/XImporter.hpp" +#include "com/sun/star/document/XLinkTargetSupplier.hpp" +#include "com/sun/star/document/XMimeTypeInfo.hpp" +#include "com/sun/star/drawing/BitmapMode.hpp" +#include "com/sun/star/drawing/CameraGeometry.hpp" +#include "com/sun/star/drawing/CircleKind.hpp" +#include "com/sun/star/drawing/ColorMode.hpp" +#include "com/sun/star/drawing/ConnectionType.hpp" +#include "com/sun/star/drawing/ConnectorType.hpp" +#include "com/sun/star/drawing/DashStyle.hpp" +#include "com/sun/star/drawing/Direction3D.hpp" +#include "com/sun/star/drawing/DoubleSequence.hpp" +#include "com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp" +#include "com/sun/star/drawing/EnhancedCustomShapeGluePointType.hpp" +#include "com/sun/star/drawing/EnhancedCustomShapeParameter.hpp" +#include "com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp" +#include "com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp" +#include "com/sun/star/drawing/EnhancedCustomShapeSegment.hpp" +#include "com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp" +#include "com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp" +#include "com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp" +#include "com/sun/star/drawing/FillStyle.hpp" +#include "com/sun/star/drawing/FlagSequence.hpp" +#include "com/sun/star/drawing/Hatch.hpp" +#include "com/sun/star/drawing/HomogenMatrix.hpp" +#include "com/sun/star/drawing/HomogenMatrix3.hpp" +#include "com/sun/star/drawing/LineDash.hpp" +#include "com/sun/star/drawing/LineJoint.hpp" +#include "com/sun/star/drawing/LineStyle.hpp" +#include "com/sun/star/drawing/MeasureKind.hpp" +#include "com/sun/star/drawing/MeasureTextHorzPos.hpp" +#include "com/sun/star/drawing/MeasureTextVertPos.hpp" +#include "com/sun/star/drawing/NormalsKind.hpp" +#include "com/sun/star/drawing/PolyPolygonShape3D.hpp" +#include "com/sun/star/drawing/PolygonFlags.hpp" +#include "com/sun/star/drawing/PolygonKind.hpp" +#include "com/sun/star/drawing/Position3D.hpp" +#include "com/sun/star/drawing/ProjectionMode.hpp" +#include "com/sun/star/drawing/RectanglePoint.hpp" +#include "com/sun/star/drawing/ShadeMode.hpp" +#include "com/sun/star/drawing/TextAdjust.hpp" +#include "com/sun/star/drawing/TextAnimationDirection.hpp" +#include "com/sun/star/drawing/TextAnimationKind.hpp" +#include "com/sun/star/drawing/TextFitToSizeType.hpp" +#include "com/sun/star/drawing/TextHorizontalAdjust.hpp" +#include "com/sun/star/drawing/TextVerticalAdjust.hpp" +#include "com/sun/star/drawing/TextureKind.hpp" +#include "com/sun/star/drawing/TextureMode.hpp" +#include "com/sun/star/drawing/TextureProjectionMode.hpp" +#include "com/sun/star/drawing/XGluePointsSupplier.hpp" +#include "com/sun/star/drawing/XShapeDescriptor.hpp" +#include "com/sun/star/embed/Aspects.hpp" +#include "com/sun/star/embed/ElementModes.hpp" +#include "com/sun/star/embed/EmbedMisc.hpp" +#include "com/sun/star/embed/EmbedStates.hpp" +#include "com/sun/star/embed/EntryInitModes.hpp" +#include "com/sun/star/embed/NoVisualAreaSizeException.hpp" +#include "com/sun/star/embed/XEmbedObjectCreator.hpp" +#include "com/sun/star/embed/XEmbedObjectFactory.hpp" +#include "com/sun/star/embed/XEmbedPersist.hpp" +#include "com/sun/star/embed/XEmbeddedObject.hpp" +#include "com/sun/star/embed/XInsertObjectDialog.hpp" +#include "com/sun/star/embed/XLinkageSupport.hpp" +#include "com/sun/star/embed/XStorage.hpp" +#include "com/sun/star/embed/XTransactedObject.hpp" +#include "com/sun/star/form/DatabaseDeleteEvent.hpp" +#include "com/sun/star/form/DatabaseParameterEvent.hpp" +#include "com/sun/star/form/ErrorEvent.hpp" +#include "com/sun/star/form/FormButtonType.hpp" +#include "com/sun/star/form/FormComponentType.hpp" +#include "com/sun/star/form/ListSourceType.hpp" +#include "com/sun/star/form/NavigationBarMode.hpp" +#include "com/sun/star/form/TabulatorCycle.hpp" +#include "com/sun/star/form/XBoundComponent.hpp" +#include "com/sun/star/form/XBoundControl.hpp" +#include "com/sun/star/form/XConfirmDeleteBroadcaster.hpp" +#include "com/sun/star/form/XConfirmDeleteListener.hpp" +#include "com/sun/star/form/XDatabaseParameterBroadcaster2.hpp" +#include "com/sun/star/form/XDatabaseParameterListener.hpp" +#include "com/sun/star/form/XForm.hpp" +#include "com/sun/star/form/XFormComponent.hpp" +#include "com/sun/star/form/runtime/XFormController.hpp" +#include "com/sun/star/form/XFormControllerListener.hpp" +#include "com/sun/star/form/XFormsSupplier.hpp" +#include "com/sun/star/form/XFormsSupplier2.hpp" +#include "com/sun/star/form/XGrid.hpp" +#include "com/sun/star/form/XGridColumnFactory.hpp" +#include "com/sun/star/form/XGridFieldDataSupplier.hpp" +#include "com/sun/star/form/XGridPeer.hpp" +#include "com/sun/star/form/XImageProducerSupplier.hpp" +#include "com/sun/star/form/XLoadListener.hpp" +#include "com/sun/star/form/XLoadable.hpp" +#include "com/sun/star/form/XReset.hpp" +#include "com/sun/star/form/XResetListener.hpp" +#include "com/sun/star/form/binding/XBindableValue.hpp" +#include "com/sun/star/form/binding/XListEntrySink.hpp" +#include "com/sun/star/form/binding/XValueBinding.hpp" +#include "com/sun/star/form/submission/XSubmissionSupplier.hpp" +#include "com/sun/star/form/validation/XFormComponentValidityListener.hpp" +#include "com/sun/star/form/validation/XValidatableFormComponent.hpp" +#include "com/sun/star/frame/DispatchDescriptor.hpp" +#include "com/sun/star/frame/DispatchInformation.hpp" +#include "com/sun/star/frame/FeatureStateEvent.hpp" +#include "com/sun/star/frame/FrameSearchFlag.hpp" +#include "com/sun/star/frame/XComponentLoader.hpp" +#include "com/sun/star/frame/XController.hpp" +#include "com/sun/star/frame/XDesktop.hpp" +#include "com/sun/star/frame/XDispatch.hpp" +#include "com/sun/star/frame/XDispatchInformationProvider.hpp" +#include "com/sun/star/frame/XDispatchProvider.hpp" +#include "com/sun/star/frame/XDispatchProviderInterception.hpp" +#include "com/sun/star/frame/XDispatchProviderInterceptor.hpp" +#include "com/sun/star/frame/XFrame.hpp" +#include "com/sun/star/frame/XFrameActionListener.hpp" +#include "com/sun/star/frame/XFrames.hpp" +#include "com/sun/star/frame/XFramesSupplier.hpp" +#include "com/sun/star/frame/XInterceptorInfo.hpp" +#include "com/sun/star/frame/XModel.hpp" +#include "com/sun/star/frame/XModuleManager.hpp" +#include "com/sun/star/frame/XStatusListener.hpp" +#include "com/sun/star/frame/XStorable.hpp" +#include "com/sun/star/frame/XSynchronousDispatch.hpp" +#include "com/sun/star/frame/status/ClipboardFormats.hpp" +#include "com/sun/star/frame/status/FontHeight.hpp" +#include "com/sun/star/frame/status/ItemStatus.hpp" +#include "com/sun/star/frame/status/LeftRightMargin.hpp" +#include "com/sun/star/frame/status/UpperLowerMargin.hpp" +#include "com/sun/star/frame/status/UpperLowerMarginScale.hpp" +#include "com/sun/star/gallery/GalleryItemType.hpp" +#include "com/sun/star/gallery/XGalleryItem.hpp" +#include "com/sun/star/gallery/XGalleryTheme.hpp" +#include "com/sun/star/gallery/XGalleryThemeProvider.hpp" +#include "com/sun/star/graphic/XGraphic.hpp" +#include "com/sun/star/graphic/XGraphicProvider.hpp" +#include "com/sun/star/graphic/XGraphicRenderer.hpp" +#include "com/sun/star/i18n/CharacterIteratorMode.hdl" +#include "com/sun/star/i18n/CharacterIteratorMode.hpp" +#include "com/sun/star/i18n/CollatorOptions.hpp" +#include "com/sun/star/i18n/ForbiddenCharacters.hpp" +#include "com/sun/star/i18n/InputSequenceCheckMode.hpp" +#include "com/sun/star/i18n/KCharacterType.hpp" +#include "com/sun/star/i18n/ScriptType.hdl" +#include "com/sun/star/i18n/ScriptType.hpp" +#include "com/sun/star/i18n/TextConversionOption.hdl" +#include "com/sun/star/i18n/TextConversionOption.hpp" +#include "com/sun/star/i18n/TextConversionType.hpp" +#include "com/sun/star/i18n/TransliterationModules.hpp" +#include "com/sun/star/i18n/UnicodeScript.hpp" +#include "com/sun/star/i18n/UnicodeType.hdl" +#include "com/sun/star/i18n/WordType.hpp" +#include "com/sun/star/i18n/XBreakIterator.hpp" +#include "com/sun/star/i18n/XExtendedInputSequenceChecker.hpp" +#include "com/sun/star/i18n/XExtendedTextConversion.hpp" +#include "com/sun/star/i18n/XForbiddenCharacters.hpp" +#include "com/sun/star/i18n/XTextConversion.hpp" +#include "com/sun/star/inspection/XObjectInspector.hpp" +#include "com/sun/star/inspection/XObjectInspectorModel.hpp" +#include "com/sun/star/io/IOException.hpp" +#include "com/sun/star/io/XActiveDataControl.hpp" +#include "com/sun/star/io/XActiveDataSink.hpp" +#include "com/sun/star/io/XActiveDataSource.hpp" +#include "com/sun/star/io/XInputStream.hpp" +#include "com/sun/star/io/XInputStreamProvider.hpp" +#include "com/sun/star/io/XMarkableStream.hpp" +#include "com/sun/star/io/XObjectInputStream.hpp" +#include "com/sun/star/io/XObjectOutputStream.hpp" +#include "com/sun/star/io/XOutputStream.hpp" +#include "com/sun/star/io/XPersistObject.hpp" +#include "com/sun/star/io/XSeekable.hdl" +#include "com/sun/star/io/XStream.hpp" +#include "com/sun/star/lang/DisposedException.hpp" +#include "com/sun/star/lang/EventObject.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/NoSupportException.hpp" +#include "com/sun/star/lang/ServiceNotRegisteredException.hpp" +#include "com/sun/star/lang/XComponent.hpp" +#include "com/sun/star/lang/XEventListener.hpp" +#include "com/sun/star/lang/XInitialization.hpp" +#include "com/sun/star/lang/XMultiComponentFactory.hpp" +#include "com/sun/star/lang/XMultiServiceFactory.hpp" +#include "com/sun/star/lang/XServiceDisplayName.hpp" +#include "com/sun/star/lang/XServiceInfo.hpp" +#include "com/sun/star/lang/XServiceName.hpp" +#include "com/sun/star/lang/XSingleComponentFactory.hpp" +#include "com/sun/star/lang/XTypeProvider.hpp" +#include "com/sun/star/lang/XUnoTunnel.hpp" +#include "com/sun/star/linguistic2/ConversionDictionaryType.hpp" +#include "com/sun/star/linguistic2/ConversionDirection.hdl" +#include "com/sun/star/linguistic2/ConversionPropertyType.hpp" +#include "com/sun/star/linguistic2/DictionaryEvent.hpp" +#include "com/sun/star/linguistic2/DictionaryEventFlags.hpp" +#include "com/sun/star/linguistic2/DictionaryListEvent.hpp" +#include "com/sun/star/linguistic2/DictionaryListEventFlags.hpp" +#include "com/sun/star/linguistic2/DictionaryType.hpp" +#include "com/sun/star/linguistic2/SpellFailure.hpp" +#include "com/sun/star/linguistic2/XAvailableLocales.hpp" +#include "com/sun/star/linguistic2/XConversionDictionary.hpp" +#include "com/sun/star/linguistic2/XConversionDictionaryList.hpp" +#include "com/sun/star/linguistic2/XConversionPropertyType.hpp" +#include "com/sun/star/linguistic2/XDictionary.hpp" +#include "com/sun/star/linguistic2/XDictionary1.hpp" +#include "com/sun/star/linguistic2/XDictionaryEntry.hpp" +#include "com/sun/star/linguistic2/XDictionaryEventListener.hpp" +#include "com/sun/star/linguistic2/XDictionaryList.hpp" +#include "com/sun/star/linguistic2/XDictionaryListEventListener.hpp" +#include "com/sun/star/linguistic2/XHyphenatedWord.hpp" +#include "com/sun/star/linguistic2/XHyphenator.hpp" +#include "com/sun/star/linguistic2/XLinguServiceManager.hdl" +#include "com/sun/star/linguistic2/XLinguServiceManager.hpp" +#include "com/sun/star/linguistic2/XMeaning.hpp" +#include "com/sun/star/linguistic2/XPossibleHyphens.hpp" +#include "com/sun/star/linguistic2/XSpellAlternatives.hpp" +#include "com/sun/star/linguistic2/XSpellChecker.hpp" +#include "com/sun/star/linguistic2/XSpellChecker1.hpp" +#include "com/sun/star/linguistic2/XSupportedLocales.hpp" +#include "com/sun/star/linguistic2/XThesaurus.hpp" +#include "com/sun/star/media/XPlayer.hpp" +#include "com/sun/star/media/ZoomLevel.hpp" +#include "com/sun/star/plugin/PluginDescription.hpp" +#include "com/sun/star/plugin/XPluginManager.hpp" +#include "com/sun/star/reflection/XIdlClass.hpp" +#include "com/sun/star/reflection/XIdlMethod.hpp" +#include "com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp" +#include "com/sun/star/reflection/XProxyFactory.hpp" +#include "com/sun/star/registry/XRegistryKey.hpp" +#include "com/sun/star/registry/XSimpleRegistry.hpp" +#include "com/sun/star/script/ScriptEvent.hpp" +#include "com/sun/star/script/ScriptEventDescriptor.hpp" +#include "com/sun/star/script/XEventAttacherManager.hpp" +#include "com/sun/star/script/XInvocation.hpp" +#include "com/sun/star/script/XLibraryContainer.hpp" +#include "com/sun/star/script/XScriptListener.hpp" +#include "com/sun/star/script/XTypeConverter.hpp" +#include "com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp" +#include "com/sun/star/script/browse/BrowseNodeTypes.hpp" +#include "com/sun/star/script/browse/XBrowseNode.hpp" +#include "com/sun/star/script/browse/XBrowseNodeFactory.hpp" +#include "com/sun/star/script/provider/ScriptErrorRaisedException.hpp" +#include "com/sun/star/script/provider/ScriptExceptionRaisedException.hpp" +#include "com/sun/star/script/provider/ScriptFrameworkErrorType.hpp" +#include "com/sun/star/script/provider/XScriptProvider.hpp" +#include "com/sun/star/script/provider/XScriptProviderSupplier.hpp" +#include "com/sun/star/sdb/CommandType.hpp" +#include "com/sun/star/sdb/ParametersRequest.hpp" +#include "com/sun/star/sdb/RowChangeAction.hpp" +#include "com/sun/star/sdb/RowChangeEvent.hpp" +#include "com/sun/star/sdb/SQLContext.hpp" +#include "com/sun/star/sdb/SQLErrorEvent.hpp" +#include "com/sun/star/sdb/XColumn.hpp" +#include "com/sun/star/sdb/XColumnUpdate.hpp" +#include "com/sun/star/sdb/XCompletedConnection.hpp" +#include "com/sun/star/sdb/XInteractionSupplyParameters.hpp" +#include "com/sun/star/sdb/XQueriesSupplier.hpp" +#include "com/sun/star/sdb/XResultSetAccess.hpp" +#include "com/sun/star/sdb/XRowSetApproveBroadcaster.hpp" +#include "com/sun/star/sdb/XRowSetApproveListener.hpp" +#include "com/sun/star/sdb/XRowSetSupplier.hpp" +#include "com/sun/star/sdb/XSQLErrorBroadcaster.hpp" +#include "com/sun/star/sdb/XSQLErrorListener.hpp" +#include "com/sun/star/sdb/XSQLQueryComposer.hpp" +#include "com/sun/star/sdb/XSQLQueryComposerFactory.hpp" +#include "com/sun/star/sdb/XSingleSelectQueryComposer.hpp" +#include "com/sun/star/sdbc/ColumnValue.hpp" +#include "com/sun/star/sdbc/DataType.hpp" +#include "com/sun/star/sdbc/ResultSetConcurrency.hpp" +#include "com/sun/star/sdbc/ResultSetType.hpp" +#include "com/sun/star/sdbc/XConnection.hpp" +#include "com/sun/star/sdbc/XDataSource.hpp" +#include "com/sun/star/sdbc/XDatabaseMetaData.hpp" +#include "com/sun/star/sdbc/XPreparedStatement.hpp" +#include "com/sun/star/sdbc/XResultSet.hpp" +#include "com/sun/star/sdbc/XResultSetUpdate.hpp" +#include "com/sun/star/sdbc/XRow.hpp" +#include "com/sun/star/sdbc/XRowSet.hpp" +#include "com/sun/star/sdbc/XRowSetListener.hpp" +#include "com/sun/star/sdbc/XStatement.hpp" +#include "com/sun/star/sdbcx/Privilege.hpp" +#include "com/sun/star/sdbcx/XColumnsSupplier.hpp" +#include "com/sun/star/sdbcx/XDataDescriptorFactory.hpp" +#include "com/sun/star/sdbcx/XDeleteRows.hpp" +#include "com/sun/star/sdbcx/XRowLocate.hpp" +#include "com/sun/star/sdbcx/XTablesSupplier.hpp" +#include "com/sun/star/security/XDocumentDigitalSignatures.hpp" +#include "com/sun/star/style/BreakType.hpp" +#include "com/sun/star/style/CaseMap.hpp" +#include "com/sun/star/style/GraphicLocation.hpp" +#include "com/sun/star/style/LineSpacing.hpp" +#include "com/sun/star/style/LineSpacingMode.hpp" +#include "com/sun/star/style/NumberingType.hpp" +#include "com/sun/star/style/PageStyleLayout.hpp" +#include "com/sun/star/style/ParagraphAdjust.hpp" +#include "com/sun/star/style/TabStop.hpp" +#include "com/sun/star/style/VerticalAlignment.hpp" +#include "com/sun/star/style/XStyle.hpp" +#include "com/sun/star/style/XStyleFamiliesSupplier.hpp" +#include "com/sun/star/table/BorderLine.hpp" +#include "com/sun/star/table/CellAddress.hpp" +#include "com/sun/star/table/CellContentType.hpp" +#include "com/sun/star/table/CellHoriJustify.hpp" +#include "com/sun/star/table/CellOrientation.hpp" +#include "com/sun/star/table/CellRangeAddress.hpp" +#include "com/sun/star/table/CellVertJustify.hpp" +#include "com/sun/star/table/ShadowFormat.hpp" +#include "com/sun/star/table/ShadowLocation.hpp" +#include "com/sun/star/table/TableBorder.hpp" +#include "com/sun/star/table/TableOrientation.hpp" +#include "com/sun/star/task/XInteractionHandler.hpp" +#include "com/sun/star/task/XStatusIndicator.hpp" +#include "com/sun/star/task/XStatusIndicatorFactory.hpp" +#include "com/sun/star/text/CharacterCompressionType.hpp" +#include "com/sun/star/text/ControlCharacter.hpp" +#include "com/sun/star/text/FilenameDisplayFormat.hpp" +#include "com/sun/star/text/FontEmphasis.hpp" +#include "com/sun/star/text/GraphicCrop.hpp" +#include "com/sun/star/text/HoriOrientation.hpp" +#include "com/sun/star/text/RelOrientation.hpp" +#include "com/sun/star/text/RubyAdjust.hpp" +#include "com/sun/star/text/TextContentAnchorType.hpp" +#include "com/sun/star/text/VertOrientation.hpp" +#include "com/sun/star/text/WrapTextMode.hpp" +#include "com/sun/star/text/WritingMode.hpp" +#include "com/sun/star/text/WritingMode2.hpp" +#include "com/sun/star/text/XDefaultNumberingProvider.hpp" +#include "com/sun/star/text/XNumberingFormatter.hpp" +#include "com/sun/star/text/XNumberingTypeInfo.hpp" +#include "com/sun/star/text/XRubySelection.hpp" +#include "com/sun/star/text/XSimpleText.hpp" +#include "com/sun/star/text/XText.hpp" +#include "com/sun/star/text/XTextContent.hpp" +#include "com/sun/star/text/XTextCursor.hpp" +#include "com/sun/star/text/XTextField.hdl" +#include "com/sun/star/text/XTextField.hpp" +#include "com/sun/star/text/XTextRange.hpp" +#include "com/sun/star/text/XTextRangeCompare.hpp" +#include "com/sun/star/text/XTextRangeMover.hpp" +#include "com/sun/star/ucb/CommandAbortedException.hpp" +#include "com/sun/star/ucb/NameClash.hpp" +#include "com/sun/star/ucb/NumberedSortingInfo.hpp" +#include "com/sun/star/ucb/TransferInfo.hpp" +#include "com/sun/star/ucb/XAnyCompare.hpp" +#include "com/sun/star/ucb/XAnyCompareFactory.hpp" +#include "com/sun/star/ucb/XCommandEnvironment.hpp" +#include "com/sun/star/ucb/XContent.hpp" +#include "com/sun/star/ucb/XContentAccess.hpp" +#include "com/sun/star/ucb/XContentProvider.hpp" +#include "com/sun/star/ucb/XSimpleFileAccess.hpp" +#include "com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp" +#include "com/sun/star/ui/ImageType.hpp" +#include "com/sun/star/ui/ItemStyle.hpp" +#include "com/sun/star/ui/ItemType.hpp" +#include "com/sun/star/ui/UIElementType.hpp" +#include "com/sun/star/ui/XImageManager.hpp" +#include "com/sun/star/ui/XModuleUIConfigurationManager.hpp" +#include "com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp" +#include "com/sun/star/ui/XUIConfiguration.hpp" +#include "com/sun/star/ui/XUIConfigurationListener.hpp" +#include "com/sun/star/ui/XUIConfigurationManager.hpp" +#include "com/sun/star/ui/XUIConfigurationManagerSupplier.hpp" +#include "com/sun/star/ui/XUIConfigurationPersistence.hpp" +#include "com/sun/star/ui/XUIConfigurationStorage.hpp" +#include "com/sun/star/ui/XUIElement.hpp" +#include "com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp" +#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp" +#include "com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp" +#include "com/sun/star/ui/dialogs/FilePreviewImageFormats.hpp" +#include "com/sun/star/ui/dialogs/ListboxControlActions.hpp" +#include "com/sun/star/ui/dialogs/TemplateDescription.hpp" +#include "com/sun/star/ui/dialogs/XExecutableDialog.hpp" +#include "com/sun/star/ui/dialogs/XFilePicker.hpp" +#include "com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp" +#include "com/sun/star/ui/dialogs/XFilePickerListener.hpp" +#include "com/sun/star/ui/dialogs/XFilePickerNotifier.hpp" +#include "com/sun/star/ui/dialogs/XFilePreview.hpp" +#include "com/sun/star/ui/dialogs/XFilterManager.hpp" +#include "com/sun/star/ui/dialogs/XFolderPicker.hpp" +#include "com/sun/star/uno/Any.h" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Exception.hpp" +#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/XAggregation.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/uno/XNamingService.hpp" +#include "com/sun/star/util/Date.hpp" +#include "com/sun/star/util/DateTime.hpp" +#include "com/sun/star/util/Language.hpp" +#include "com/sun/star/util/MeasureUnit.hpp" +#include "com/sun/star/util/NumberFormat.hpp" +#include "com/sun/star/util/SearchAlgorithms.hpp" +#include "com/sun/star/util/SearchFlags.hpp" +#include "com/sun/star/util/SearchOptions.hpp" +#include "com/sun/star/util/SearchResult.hpp" +#include "com/sun/star/util/SortField.hpp" +#include "com/sun/star/util/SortFieldType.hpp" +#include "com/sun/star/util/URL.hpp" +#include "com/sun/star/util/XCancellable.hpp" +#include "com/sun/star/util/XChangesBatch.hpp" +#include "com/sun/star/util/XCloneable.hpp" +#include "com/sun/star/util/XCloseable.hpp" +#include "com/sun/star/util/XFlushable.hpp" +#include "com/sun/star/util/XLocalizedAliases.hpp" +#include "com/sun/star/util/XModeChangeBroadcaster.hpp" +#include "com/sun/star/util/XModeChangeListener.hpp" +#include "com/sun/star/util/XModeSelector.hpp" +#include "com/sun/star/util/XModifiable.hpp" +#include "com/sun/star/util/XModifyBroadcaster.hpp" +#include "com/sun/star/util/XModifyListener.hpp" +#include "com/sun/star/util/XNumberFormatTypes.hpp" +#include "com/sun/star/util/XNumberFormats.hpp" +#include "com/sun/star/util/XNumberFormatsSupplier.hpp" +#include "com/sun/star/util/XNumberFormatter.hpp" +#include "com/sun/star/util/XTextSearch.hpp" +#include "com/sun/star/util/XURLTransformer.hpp" +#include "com/sun/star/util/logging/LogLevel.hpp" +#include "com/sun/star/util/logging/XLogger.hpp" +#include "com/sun/star/view/XSelectionChangeListener.hpp" +#include "com/sun/star/view/XSelectionSupplier.hpp" +#include "com/sun/star/xforms/XFormsSupplier.hpp" +#include "com/sun/star/xforms/XFormsUIHelper1.hpp" +#include "com/sun/star/xforms/XModel.hpp" +#include "com/sun/star/xforms/XSubmission.hpp" +#include "com/sun/star/xml/AttributeData.hpp" +#include "com/sun/star/xml/dom/DOMException.hpp" +#include "com/sun/star/xml/dom/XDocument.hpp" +#include "com/sun/star/xml/dom/XNode.hpp" +#include "com/sun/star/xml/dom/events/XEventListener.hpp" +#include "com/sun/star/xml/dom/events/XEventTarget.hpp" +#include "com/sun/star/xml/sax/InputSource.hpp" +#include "com/sun/star/xml/sax/SAXParseException.hpp" +#include "com/sun/star/xml/sax/XAttributeList.hpp" +#include "com/sun/star/xml/sax/XDocumentHandler.hpp" +#include "com/sun/star/xml/sax/XParser.hpp" +#include "comphelper/accessibleeventnotifier.hxx" +#include "comphelper/anytostring.hxx" +#include "comphelper/broadcasthelper.hxx" +#include "comphelper/componentcontext.hxx" +#include "comphelper/configurationhelper.hxx" +#include "comphelper/container.hxx" +#include "comphelper/embeddedobjectcontainer.hxx" +#include "comphelper/enumhelper.hxx" +#include "comphelper/implementationreference.hxx" +#include "comphelper/interaction.hxx" +#include "comphelper/numbers.hxx" +#include "comphelper/processfactory.hxx" +#include "comphelper/propertycontainer.hxx" +#include "comphelper/propertysethelper.hxx" +#include "comphelper/regpathhelper.hxx" +#include "comphelper/scopeguard.hxx" +#include "comphelper/seqstream.hxx" +#include "comphelper/sequence.hxx" +#include "comphelper/sequenceashashmap.hxx" +#include "comphelper/sequenceasvector.hxx" +#include "comphelper/servicehelper.hxx" +#include "comphelper/storagehelper.hxx" +#include "comphelper/types.hxx" +#include "comphelper/uno3.hxx" +#include "connectivity/IParseContext.hxx" +#include "connectivity/dbexception.hxx" +#include "connectivity/sqlnode.hxx" +#include "connectivity/sqlparse.hxx" +#include "cppuhelper/bootstrap.hxx" +#include "cppuhelper/compbase12.hxx" +#include "cppuhelper/compbase2.hxx" +#include "cppuhelper/compbase3.hxx" +#include "cppuhelper/compbase4.hxx" +#include "cppuhelper/compbase6.hxx" +#include "cppuhelper/compbase7.hxx" +#include "cppuhelper/component.hxx" +#include "cppuhelper/component_context.hxx" +#include "cppuhelper/exc_hlp.hxx" +#include "cppuhelper/factory.hxx" +#include "cppuhelper/implbase1.hxx" +#include "cppuhelper/implbase11.hxx" +#include "cppuhelper/implbase12.hxx" +#include "cppuhelper/implbase2.hxx" +#include "cppuhelper/implbase3.hxx" +#include "cppuhelper/implbase4.hxx" +#include "cppuhelper/implbase5.hxx" +#include "cppuhelper/implbase6.hxx" +#include "cppuhelper/implbase8.hxx" +#include "cppuhelper/implementationentry.hxx" +#include "cppuhelper/interfacecontainer.h" +#include "cppuhelper/interfacecontainer.hxx" +#include "cppuhelper/propshlp.hxx" +#include "cppuhelper/queryinterface.hxx" +#include "cppuhelper/servicefactory.hxx" +#include "cppuhelper/typeprovider.hxx" +#include "cppuhelper/weak.hxx" +#include "cppuhelper/weakagg.hxx" +#include "cppuhelper/weakref.hxx" +#include "i18npool/lang.h" +#include "i18npool/mslangid.hxx" +#include "jvmfwk/framework.h" +#include "linguistic/lngprops.hxx" +#include "osl/diagnose.h" +#include "osl/endian.h" +#include "osl/file.hxx" +#include "osl/interlck.h" +#include "osl/module.h" +#include "osl/module.hxx" +#include "osl/mutex.hxx" +#include "osl/nlsupport.h" +#include "osl/process.h" +#include "osl/security.hxx" +#include "rsc/rscsfx.hxx" +#include "rtl/bootstrap.hxx" +#include "rtl/cipher.h" +#include "rtl/crc.h" +#include "rtl/digest.h" +#include "rtl/locale.h" +#include "rtl/logfile.hxx" +#include "rtl/math.hxx" +#include "rtl/memory.h" +#include "rtl/tencinfo.h" +#include "rtl/textenc.h" +#include "rtl/ustrbuf.hxx" +#include "rtl/ustring.hxx" +#include "rtl/uuid.h" +#include "sal/config.h" +#include "sal/main.h" +#include "sal/types.h" +#include "sfx2/bindings.hxx" +#include "sfx2/ctrlitem.hxx" +#include "sfx2/dispatch.hxx" +#include "sfx2/docfilt.hxx" +#include "sfx2/event.hxx" +#include "sfx2/frame.hxx" +#include "sfx2/frmdescr.hxx" +#include "sfx2/imagemgr.hxx" +#include "sfx2/imgmgr.hxx" +#include "sfx2/linkmgr.hxx" +#include "sfx2/linksrc.hxx" +#include "sfx2/lnkbase.hxx" +#include "sfx2/minarray.hxx" +#include "sfx2/minfitem.hxx" +#include "sfx2/mnuitem.hxx" +#include "sfx2/module.hxx" +#include "sfx2/msg.hxx" +#include "sfx2/msgpool.hxx" +#include "sfx2/objface.hxx" +#include "sfx2/objitem.hxx" +#include "sfx2/progress.hxx" +#include "sfx2/querystatus.hxx" +#include "sfx2/request.hxx" +#include "sfx2/sfxdefs.hxx" +#include "sfx2/sfxdlg.hxx" +#include "sfx2/sfxhelp.hxx" +#include "sfx2/sfxhtml.hxx" +#include "sfx2/sfxstatuslistener.hxx" +#include "sfx2/sfxuno.hxx" +#include "sfx2/shell.hxx" +#include "sfx2/srchdefs.hxx" +#include "sfx2/tplpitem.hxx" +#include "sfx2/viewfrm.hxx" +#include "sot/clsids.hxx" +#include "sot/exchange.hxx" +#include "sot/factory.hxx" +#include "sot/formats.hxx" +#include <map> +#include <set> +#include <slist> +#include <vector> +#include "svtools/FilterConfigItem.hxx" +#include "svtools/accessibilityoptions.hxx" +#include "svl/adrparse.hxx" +#include "svtools/apearcfg.hxx" +#include "svl/brdcst.hxx" +#include "unotools/cacheoptions.hxx" +#include "svl/cancel.hxx" +#include "svl/cjkoptions.hxx" +#include "unotools/cmdoptions.hxx" +#include "svl/cntwall.hxx" +#include "svtools/colorcfg.hxx" +#include "svl/ctloptions.hxx" +#include "unotools/defaultoptions.hxx" +#include "unotools/dynamicmenuoptions.hxx" +#include "svtools/ehdl.hxx" +#include "svl/eitem.hxx" +#include "unotools/eventcfg.hxx" +#include "unotools/extendedsecurityoptions.hxx" +#include "svl/filenotation.hxx" +#include "svl/flagitem.hxx" +#include "unotools/fltrcfg.hxx" +#include "unotools/fontoptions.hxx" +#include "svtools/fontsubstconfig.hxx" +#include "svtools/helpopt.hxx" +#include "svl/hint.hxx" +#include "svtools/htmlkywd.hxx" +#include "svtools/htmltokn.h" +#include "svtools/imagemgr.hxx" +#include "svtools/imapcirc.hxx" +#include "svtools/imapobj.hxx" +#include "svtools/imappoly.hxx" +#include "svtools/imaprect.hxx" +#include "svtools/inetimg.hxx" +#include "unotools/inetoptions.hxx" +#include "svl/intitem.hxx" +#include "svl/isethint.hxx" +#include "svl/itemiter.hxx" +#include "svl/itempool.hxx" +#include "svl/itemprop.hxx" +#include "svl/itemset.hxx" +#include "unotools/javaoptions.hxx" +#include "svl/languageoptions.hxx" +#include "unotools/lingucfg.hxx" +#include "unotools/linguprops.hxx" +#include "svl/lngmisc.hxx" +#include "svtools/localresaccess.hxx" +#include "svl/lstner.hxx" +#include "svl/macitem.hxx" +#include "svtools/menuoptions.hxx" +#include "svl/metitem.hxx" +#include "unotools/misccfg.hxx" +#include "svtools/miscopt.hxx" +#include "unotools/moduleoptions.hxx" +#include "svl/numuno.hxx" +#include "unotools/optionsdlg.hxx" +#include "svtools/parhtml.hxx" +#include "svtools/parrtf.hxx" +#include "unotools/pathoptions.hxx" +#include "svl/pickerhelper.hxx" +#include "svl/poolitem.hxx" +#include "unotools/printwarningoptions.hxx" +#include "svl/ptitem.hxx" +#include "svl/rectitem.hxx" +#include "svl/rngitem.hxx" +#include "svtools/rtfkeywd.hxx" +#include "svtools/rtfout.hxx" +#include "svtools/rtftoken.h" +#include "unotools/saveopt.hxx" +#include "unotools/searchopt.hxx" +#include "unotools/securityoptions.hxx" +#include "svl/sfontitm.hxx" +#include "svl/slstitm.hxx" +#include "svl/smplhint.hxx" +#include "svtools/soerr.hxx" +#include "unotools/sourceviewconfig.hxx" +#include "unotools/startoptions.hxx" +#include "svtools/stdmenu.hxx" +#include "svtools/stringtransfer.hxx" +#include "svl/stritem.hxx" +#include "svl/style.hxx" +#include "svl/svarray.hxx" +#include "svl/svstdarr.hxx" +#include "unotools/syslocaleoptions.hxx" +#include "svl/szitem.hxx" +#include "svtools/textdata.hxx" +#include "svtools/transfer.hxx" +#include "svtools/txtcmp.hxx" +#include "svl/undo.hxx" +#include "unotools/undoopt.hxx" +#include "svtools/unoevent.hxx" +#include "svtools/unoimap.hxx" +#include "svl/urihelper.hxx" +#include "svl/urlbmk.hxx" +#include "unotools/useroptions.hxx" +#include "unotools/viewoptions.hxx" +#include "svl/visitem.hxx" +#include "svl/whiter.hxx" +#include "sys/stat.h" +#include "sys/types.h" +#include "toolkit/awt/vclxdevice.hxx" +#include "toolkit/controls/unocontrol.hxx" +#include "tools/bigint.hxx" +#include "tools/color.hxx" +#include "tools/config.hxx" +#include "tools/contnr.hxx" +#include "tools/debug.hxx" +#include "tools/diagnose_ex.h" +#include "tools/dynary.hxx" +#include "tools/errcode.hxx" +#include "tools/errinf.hxx" +#include "tools/fract.hxx" +#include "tools/gen.hxx" +#include "tools/globname.hxx" +#include "tools/inetdef.hxx" +#include "tools/line.hxx" +#include "tools/link.hxx" +#include "tools/list.hxx" +#include "tools/multisel.hxx" +#include "tools/poly.hxx" +#include "tools/rc.h" +#include "tools/rc.hxx" +#include "tools/rcid.h" +#include "tools/ref.hxx" +#include "tools/resary.hxx" +#include "tools/resid.hxx" +#include "tools/resmgr.hxx" +#include "tools/rtti.hxx" +#include "tools/shl.hxx" +#include "tools/solar.h" +#include "tools/stack.hxx" +#include "tools/string.hxx" +#include "tools/table.hxx" +#include "tools/tenccvt.hxx" +#include "tools/urlobj.hxx" +#include "tools/vcompat.hxx" +#include "tools/vector2d.hxx" +#include "tools/weakbase.hxx" +#include "tools/wldcrd.hxx" +#include "tools/zcodec.hxx" +#include "ucbhelper/commandenvironment.hxx" +#include "ucbhelper/configurationkeys.hxx" +#include "ucbhelper/content.hxx" +#include "ucbhelper/contentbroker.hxx" +#include "unicode/ubidi.h" +#include "uno/lbnames.h" +#include "uno/mapping.hxx" +#include "unotools/accessiblerelationsethelper.hxx" +#include "unotools/accessiblestatesethelper.hxx" +#include "unotools/bootstrap.hxx" +#include "unotools/charclass.hxx" +#include "unotools/collatorwrapper.hxx" +#include "unotools/configitem.hxx" +#include "unotools/configmgr.hxx" +#include "unotools/confignode.hxx" +#include "unotools/configpathes.hxx" +#include "unotools/configvaluecontainer.hxx" +#include "unotools/localfilehelper.hxx" +#include "unotools/processfactory.hxx" +#include "comphelper/servicehelper.hxx" +#include "unotools/streamwrap.hxx" +#include "unotools/textsearch.hxx" +#include "unotools/transliterationwrapper.hxx" +#include "unotools/ucbhelper.hxx" +#include "vcl/abstdlg.hxx" +#include "vcl/animate.hxx" +#include "vcl/bitmap.hxx" +#include "vcl/bitmapex.hxx" +#include "vcl/bmpacc.hxx" +#include "vcl/cmdevt.h" +#include "vcl/configsettings.hxx" +#include "vcl/controllayout.hxx" +#include "vcl/cursor.hxx" +#include "vcl/decoview.hxx" +#include "vcl/dndhelp.hxx" +#include "vcl/fldunit.hxx" +#include "vcl/fntstyle.hxx" +#include "unotools/fontcvt.hxx" +#include "vcl/gdimtf.hxx" +#include "vcl/help.hxx" +#include "vcl/image.hxx" +#include "vcl/jobset.hxx" +#include "vcl/keycodes.hxx" +#include "vcl/mapmod.hxx" +#include "vcl/menu.hxx" +#include "vcl/mnemonic.hxx" +#include "vcl/pointr.hxx" +#include "vcl/region.hxx" +#include "vcl/salbtype.hxx" +#include "vcl/stdtext.hxx" +#include "vcl/timer.hxx" +#include "vcl/unohelp.hxx" +#include "vcl/unohelp2.hxx" +#include "vcl/wall.hxx" +#include "vcl/wintypes.hxx" +#include "vos/mutex.hxx" +#include "vos/ref.hxx" +#include "vos/refernce.hxx" +#include "vos/thread.hxx" +#include "vos/xception.hxx" +#include "xmloff/DashStyle.hxx" +#include "xmloff/GradientStyle.hxx" +#include "xmloff/HatchStyle.hxx" +#include "xmloff/ImageStyle.hxx" +#include "xmloff/MarkerStyle.hxx" +#include "xmloff/attrlist.hxx" +#include "xmloff/nmspmap.hxx" +#include "xmloff/xmlcnimp.hxx" +#include "xmloff/xmlictxt.hxx" +#include "xmloff/xmlnmspe.hxx" +#include "xmloff/xmlstyle.hxx" +#include "xmloff/xmltoken.hxx" +#include "xmlscript/xmldlg_imexp.hxx" +//---MARKER--- +#endif + diff --git a/svx/inc/pfiledlg.hxx b/svx/inc/pfiledlg.hxx new file mode 100644 index 000000000000..aa48385cdbd3 --- /dev/null +++ b/svx/inc/pfiledlg.hxx @@ -0,0 +1,67 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: pfiledlg.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PFILEDLG_HXX +#define _SVX_PFILEDLG_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/filedlghelper.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Filedialog to insert Plugin-Fileformats +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxPluginFileDlg +{ +private: + sfx2::FileDialogHelper maFileDlg; + +public: + // with nKind = SID_INSERT_SOUND or + // nKind = SID_INSERT_VIDEO + SvxPluginFileDlg (Window *pParent, USHORT nKind ); + ~SvxPluginFileDlg (); + + ErrCode Execute(); + String GetPath() const; + + static bool IsAvailable (USHORT nKind); + + // setting HelpId and/or context of FileDialogHelper + void SetDialogHelpId( const sal_Int32 nHelpId ); + void SetContext( sfx2::FileDialogHelper::Context eNewContext ); +}; + +#endif // _SVX_PFILEDLG_HXX + + diff --git a/svx/inc/pgrditem.hxx b/svx/inc/pgrditem.hxx new file mode 100644 index 000000000000..e1c886829d17 --- /dev/null +++ b/svx/inc/pgrditem.hxx @@ -0,0 +1,67 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: pgrditem.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PGRDITEM_HXX +#define _SVX_PGRDITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +// class SvxParaGridItem ------------------------------------------------- + + +/* + [Beschreibung] + Paragraph snap to grid +*/ + +class SVX_DLLPUBLIC SvxParaGridItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxParaGridItem( const BOOL bSnapToGrid /*= TRUE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif + + diff --git a/svx/inc/postattr.hxx b/svx/inc/postattr.hxx new file mode 100644 index 000000000000..425f3f84bf76 --- /dev/null +++ b/svx/inc/postattr.hxx @@ -0,0 +1,136 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: postattr.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_POSTATTR_HXX +#define _SVX_POSTATTR_HXX + +// include --------------------------------------------------------------- + +#include <svl/stritem.hxx> +#include "svx/svxdllapi.h" + +// class SvxPostItAuthorItem --------------------------------------------- + + + +/* +[Beschreibung] +Dieses Item beschreibt das Autoren-Kuerzel eines Notizzettels. +*/ + +class SVX_DLLPUBLIC SvxPostItAuthorItem: public SfxStringItem +{ +public: + TYPEINFO(); + + SvxPostItAuthorItem( USHORT nWhich ); + + SvxPostItAuthorItem( const String& rAuthor, USHORT nWhich ); + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + + inline SvxPostItAuthorItem& operator=( const SvxPostItAuthorItem& rAuthor ) + { + SetValue( rAuthor.GetValue() ); + return *this; + } +}; + + +// class SvxPostItDateItem ----------------------------------------------- + + + +/* +[Beschreibung] +Dieses Item beschreibt das Datum eines Notizzettels. +*/ + +class SVX_DLLPUBLIC SvxPostItDateItem: public SfxStringItem +{ +public: + TYPEINFO(); + + SvxPostItDateItem( USHORT nWhich ); + + SvxPostItDateItem( const String& rDate, USHORT nWhich ); + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + + inline SvxPostItDateItem& operator=( const SvxPostItDateItem& rDate ) + { + SetValue( rDate.GetValue() ); + return *this; + } +}; + + +// class SvxPostItTextItem ----------------------------------------------- + + + +/* +[Beschreibung] +Dieses Item beschreibt den Text eines Notizzettels. +*/ + +class SVX_DLLPUBLIC SvxPostItTextItem: public SfxStringItem +{ +public: + TYPEINFO(); + + SvxPostItTextItem( USHORT nWhich ); + + SvxPostItTextItem( const String& rText, USHORT nWhich ); + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + + inline SvxPostItTextItem& operator=( const SvxPostItTextItem& rText ) + { + SetValue( rText.GetValue() ); + return *this; + } +}; + + + +#endif + diff --git a/svx/inc/prntitem.hxx b/svx/inc/prntitem.hxx new file mode 100644 index 000000000000..f9b91e12a2a7 --- /dev/null +++ b/svx/inc/prntitem.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: prntitem.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PRNTITEM_HXX +#define _SVX_PRNTITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + + + +// class SvxPrintItem ---------------------------------------------------- + + +/* +[Beschreibung] +Dieses Item beschreibt eine logische Variable "Drucken ja oder nein". +*/ + + +class SVX_DLLPUBLIC SvxPrintItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxPrintItem( const USHORT nId , const BOOL bPrt = TRUE ); + inline SvxPrintItem &operator=( const SvxPrintItem &rCpy ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +inline SvxPrintItem::SvxPrintItem( const USHORT nId, const BOOL bPrt ) + : SfxBoolItem( nId, bPrt ) +{} + +inline SvxPrintItem &SvxPrintItem::operator=( const SvxPrintItem &rCpy ) +{ + SetValue( rCpy.GetValue() ); + return *this; +} + + + + +#endif + diff --git a/svx/inc/protitem.hxx b/svx/inc/protitem.hxx new file mode 100644 index 000000000000..bb6646f9445a --- /dev/null +++ b/svx/inc/protitem.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: protitem.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PROTITEM_HXX +#define _SVX_PROTITEM_HXX + +// include --------------------------------------------------------------- + + +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxProtectItem -------------------------------------------------- + + +/* +[Beschreibung] +Dieses Item beschreibt, ob Inhalt, Groesse oder Position geschuetzt werden +sollen. +*/ + +class SVX_DLLPUBLIC SvxProtectItem : public SfxPoolItem +{ + BOOL bCntnt :1; //Inhalt geschuetzt + BOOL bSize :1; //Groesse geschuetzt + BOOL bPos :1; //Position geschuetzt + +public: + TYPEINFO(); + + inline SvxProtectItem( const USHORT nId ); + inline SvxProtectItem &operator=( const SvxProtectItem &rCpy ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + + BOOL IsCntntProtected() const { return bCntnt; } + BOOL IsSizeProtected() const { return bSize; } + BOOL IsPosProtected() const { return bPos; } + void SetCntntProtect( BOOL bNew ) { bCntnt = bNew; } + void SetSizeProtect ( BOOL bNew ) { bSize = bNew; } + void SetPosProtect ( BOOL bNew ) { bPos = bNew; } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +inline SvxProtectItem::SvxProtectItem( const USHORT nId ) + : SfxPoolItem( nId ) +{ + bCntnt = bSize = bPos = FALSE; +} + +inline SvxProtectItem &SvxProtectItem::operator=( const SvxProtectItem &rCpy ) +{ + bCntnt = rCpy.IsCntntProtected(); + bSize = rCpy.IsSizeProtected(); + bPos = rCpy.IsPosProtected(); + return *this; +} + + + + +#endif + diff --git a/svx/inc/prtqry.hxx b/svx/inc/prtqry.hxx new file mode 100644 index 000000000000..2c75d4386785 --- /dev/null +++ b/svx/inc/prtqry.hxx @@ -0,0 +1,43 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: prtqry.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PRTQRY_HXX +#define _SVX_PRTQRY_HXX + +#include <vcl/msgbox.hxx> +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC SvxPrtQryBox : public MessBox +{ +public: + SvxPrtQryBox(Window* pParent); + ~SvxPrtQryBox(); +}; + +#endif diff --git a/svx/inc/pszctrl.hxx b/svx/inc/pszctrl.hxx new file mode 100644 index 000000000000..c4ebbb3c239a --- /dev/null +++ b/svx/inc/pszctrl.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: pszctrl.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PSZCTRL_HXX +#define _SVX_PSZCTRL_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/stbitem.hxx> +#include "svx/svxdllapi.h" + +// forward --------------------------------------------------------------- + +class SvxSizeItem; +struct SvxPosSizeStatusBarControl_Impl; + +// class SvxPosSizeToolBoxControl ---------------------------------------- + +class SVX_DLLPUBLIC SvxPosSizeStatusBarControl : public SfxStatusBarControl +{ +private: + SvxPosSizeStatusBarControl_Impl* pImp; +public: + SFX_DECL_STATUSBAR_CONTROL(); + + SvxPosSizeStatusBarControl( USHORT nSlotId, USHORT nId, StatusBar& rStb ); + ~SvxPosSizeStatusBarControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void Paint( const UserDrawEvent& rEvt ); + virtual void Command( const CommandEvent& rCEvt ); + + static ULONG GetDefItemWidth( const StatusBar& rStb ); +}; + + +#endif + diff --git a/svx/inc/relfld.hxx b/svx/inc/relfld.hxx new file mode 100644 index 000000000000..aa1bed70f025 --- /dev/null +++ b/svx/inc/relfld.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: relfld.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_RELFLD_HXX +#define _SVX_RELFLD_HXX + +// include --------------------------------------------------------------- + +#ifndef _FIELD_HXX //autogen +#include <vcl/field.hxx> +#endif +#include "svx/svxdllapi.h" + + +// class SvxRelativeField ------------------------------------------------ +/* + [Beschreibung] + + "Ahnlich der Klasse FontSizeBox. Abgeleitet von der Klasse MetricField. + Zus"atzliche Funktionalit"at: relative Angaben. +*/ + +class SVX_DLLPUBLIC SvxRelativeField : public MetricField +{ +private: + USHORT nRelMin; + USHORT nRelMax; + USHORT nRelStep; + BOOL bRelativeMode; + BOOL bRelative; + BOOL bNegativeEnabled; + +protected: + void Modify(); + +public: + SvxRelativeField( Window* pParent, WinBits nWinStyle = 0 ); + SvxRelativeField( Window* pParent, const ResId& rResId ); + + void EnableRelativeMode( USHORT nMin = 50, USHORT nMax = 150, + USHORT nStep = 5 ); + BOOL IsRelativeMode() const { return bRelativeMode; } + void SetRelative( BOOL bRelative = FALSE ); + BOOL IsRelative() const { return bRelative; } + void EnableNegativeMode() {bNegativeEnabled = TRUE;} +}; + + +#endif + diff --git a/svx/inc/rotmodit.hxx b/svx/inc/rotmodit.hxx new file mode 100644 index 000000000000..f88b8a2b35ef --- /dev/null +++ b/svx/inc/rotmodit.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: rotmodit.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ROTMODIT_HXX +#define _SVX_ROTMODIT_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +//---------------------------------------------------------------------------- +// Ausrichtung bei gedrehtem Text + +enum SvxRotateMode +{ + SVX_ROTATE_MODE_STANDARD, + SVX_ROTATE_MODE_TOP, + SVX_ROTATE_MODE_CENTER, + SVX_ROTATE_MODE_BOTTOM +}; + +class SVX_DLLPUBLIC SvxRotateModeItem: public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxRotateModeItem( SvxRotateMode eMode=SVX_ROTATE_MODE_STANDARD, USHORT nWhich=0); + SvxRotateModeItem( const SvxRotateModeItem& rItem ); + ~SvxRotateModeItem(); + + virtual USHORT GetValueCount() const; + virtual String GetValueText( USHORT nVal ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String& rText, const IntlWrapper * = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + + +#endif + diff --git a/svx/inc/rubydialog.hxx b/svx/inc/rubydialog.hxx new file mode 100644 index 000000000000..9606558fa05a --- /dev/null +++ b/svx/inc/rubydialog.hxx @@ -0,0 +1,207 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: rubydialog.hxx,v $ + * $Revision: 1.15 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef _SVX_RUBYDLG_HXX_ +#define _SVX_RUBYDLG_HXX_ + +#include <sfx2/childwin.hxx> +#include <sfx2/basedlgs.hxx> +#include <vcl/lstbox.hxx> +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#include <vcl/edit.hxx> +#include <vcl/scrbar.hxx> +#include <com/sun/star/uno/Reference.h> +#include "svx/svxdllapi.h" + +namespace com{namespace sun{namespace star{ + namespace view{ + class XSelectionChangeListener; + } +}}} + + +class SvxRubyDialog; +class RubyPreview : public Window +{ +protected: + virtual void Paint( const Rectangle& rRect ); + SvxRubyDialog& rParentDlg; + +public: + RubyPreview(SvxRubyDialog& rParent, const ResId& rResId); +}; + +class SVX_DLLPUBLIC SvxRubyChildWindow : public SfxChildWindow +{ + public: + + SvxRubyChildWindow( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); + + SFX_DECL_CHILDWINDOW( SvxRubyChildWindow ); + +}; +class SvxRubyData_Impl; +class RubyEdit : public Edit +{ + Link aScrollHdl; + Link aJumpHdl; + virtual void GetFocus(); + virtual long PreNotify( NotifyEvent& rNEvt ); +public: + RubyEdit(Window* pParent, const ResId& rResId) : + Edit(pParent, rResId){} + void SetScrollHdl(Link& rLink) {aScrollHdl = rLink;} + void SetJumpHdl(Link& rLink) {aJumpHdl = rLink;} +}; + + +class SvxRubyDialog : public SfxModelessDialog +{ + using Window::SetText; + using Window::GetText; + + friend class RubyPreview; + + FixedText aLeftFT; + RubyEdit aLeft1ED; + FixedText aRightFT; + RubyEdit aRight1ED; + RubyEdit aLeft2ED; + RubyEdit aRight2ED; + RubyEdit aLeft3ED; + RubyEdit aRight3ED; + RubyEdit aLeft4ED; + RubyEdit aRight4ED; + + RubyEdit* aEditArr[8]; + ScrollBar aScrollSB; + + CheckBox aAutoDetectionCB; + + FixedText aAdjustFT; + ListBox aAdjustLB; + + FixedText aPositionFT; + ListBox aPositionLB; + + FixedText aCharStyleFT; + ListBox aCharStyleLB; + PushButton aStylistPB; + + FixedText aPreviewFT; + RubyPreview aPreviewWin; + + OKButton aApplyPB; + PushButton aClosePB; + HelpButton aHelpPB; + + long nLastPos; + long nCurrentEdit; + + BOOL bModified; + + com::sun::star::uno::Reference<com::sun::star::view::XSelectionChangeListener> xImpl; + SfxBindings* pBindings; + SvxRubyData_Impl* pImpl; + + DECL_LINK(ApplyHdl_Impl, PushButton*); + DECL_LINK(CloseHdl_Impl, PushButton*); + DECL_LINK(StylistHdl_Impl, PushButton*); + DECL_LINK(AutomaticHdl_Impl, CheckBox*); + DECL_LINK(ScrollHdl_Impl, ScrollBar*); + DECL_LINK(PositionHdl_Impl, ListBox*); + DECL_LINK(AdjustHdl_Impl, ListBox*); + DECL_LINK(CharStyleHdl_Impl, ListBox*); + DECL_LINK(EditModifyHdl_Impl, Edit*); + DECL_LINK(EditScrollHdl_Impl, sal_Int32*); + DECL_LINK(EditJumpHdl_Impl, sal_Int32*); + + void SetText(sal_Int32 nPos, Edit& rLeft, Edit& rRight); + void GetText(); + void ClearCharStyleList(); + void AssertOneEntry(); + + void Update(); + virtual BOOL Close(); + + long GetLastPos() const {return nLastPos;} + void SetLastPos(long nSet) {nLastPos = nSet;} + + BOOL IsModified() const {return bModified;} + void SetModified(BOOL bSet) {bModified = bSet;} + + void EnableControls(sal_Bool bEnable) + { + aLeftFT.Enable(bEnable); + aRightFT.Enable(bEnable); + aLeft1ED.Enable(bEnable); + aRight1ED.Enable(bEnable); + aLeft2ED.Enable(bEnable); + aRight2ED.Enable(bEnable); + aLeft3ED.Enable(bEnable); + aRight3ED.Enable(bEnable); + aLeft4ED.Enable(bEnable); + aRight4ED.Enable(bEnable); + aScrollSB.Enable(bEnable); + aAutoDetectionCB.Enable(bEnable); + aAdjustFT.Enable(bEnable); + aAdjustLB.Enable(bEnable); + aCharStyleFT.Enable(bEnable); + aCharStyleLB.Enable(bEnable); + aStylistPB.Enable(bEnable); + aPreviewFT.Enable(bEnable); + aPreviewWin.Enable(bEnable); + aApplyPB.Enable(bEnable); + } + + void GetCurrentText(String& rBase, String& rRuby); + + void UpdateColors( void ); +protected: + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +public: + + SvxRubyDialog( SfxBindings *pBindings, SfxChildWindow *pCW, + Window* pParent, const ResId& rResId ); + virtual ~SvxRubyDialog(); + + virtual void Activate(); + virtual void Deactivate(); +}; + +#endif // _SVX_RUBYDLG_HXX_ + + diff --git a/svx/inc/rulritem.hxx b/svx/inc/rulritem.hxx new file mode 100644 index 000000000000..7d035acef427 --- /dev/null +++ b/svx/inc/rulritem.hxx @@ -0,0 +1,306 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: rulritem.hxx,v $ + * $Revision: 1.10 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_RULRITEM_HXX +#define _SVX_RULRITEM_HXX + +// include --------------------------------------------------------------- + + +#include <tools/gen.hxx> +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + +// class SvxLongLRSpaceItem ---------------------------------------------- + +class SVX_DLLPUBLIC SvxLongLRSpaceItem : public SfxPoolItem +{ + long lLeft; // nLeft oder der neg. Erstzeileneinzug + long lRight; // der unproblematische rechte Rand + + protected: + + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueText() const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + +private: + SVX_DLLPRIVATE const SvxLongLRSpaceItem& operator=(const SvxLongLRSpaceItem &); // n.i. + +public: + TYPEINFO(); + SvxLongLRSpaceItem(long lLeft, long lRight, USHORT nId); + SvxLongLRSpaceItem(const SvxLongLRSpaceItem &); + SvxLongLRSpaceItem(); + + long GetLeft() const { return lLeft; } + long GetRight() const { return lRight; } + void SetLeft(long lArgLeft) {lLeft=lArgLeft;} + void SetRight(long lArgRight) {lRight=lArgRight;} +}; + +// class SvxLongULSpaceItem ---------------------------------------------- + +class SVX_DLLPUBLIC SvxLongULSpaceItem : public SfxPoolItem +{ + long lLeft; // nLeft oder der neg. Erstzeileneinzug + long lRight; // der unproblematische rechte Rand + + protected: + + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueText() const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + +private: + SVX_DLLPRIVATE const SvxLongULSpaceItem& operator=(const SvxLongULSpaceItem &); // n.i. + +public: + TYPEINFO(); + SvxLongULSpaceItem(long lUpper, long lLower, USHORT nId); + SvxLongULSpaceItem(const SvxLongULSpaceItem &); + SvxLongULSpaceItem(); + + long GetUpper() const { return lLeft; } + long GetLower() const { return lRight; } + void SetUpper(long lArgLeft) {lLeft=lArgLeft;} + void SetLower(long lArgRight) {lRight=lArgRight;} +}; + +// class SvxPagePosSizeItem ---------------------------------------------- + +class SVX_DLLPUBLIC SvxPagePosSizeItem : public SfxPoolItem +{ + Point aPos; + long lWidth; + long lHeight; +protected: + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueText() const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + +private: + SVX_DLLPRIVATE const SvxPagePosSizeItem& operator=(const SvxPagePosSizeItem &); // n.i. +public: + TYPEINFO(); + SvxPagePosSizeItem(const Point &rPos, long lWidth, long lHeight); + SvxPagePosSizeItem(const SvxPagePosSizeItem &); + SvxPagePosSizeItem(); + + const Point &GetPos() const { return aPos; } + long GetWidth() const { return lWidth; } + long GetHeight() const { return lHeight; } +}; + +// struct SvxColumnDescription ------------------------------------------- + +struct SvxColumnDescription +{ + long nStart; /* Spaltenbeginn */ + long nEnd; /* Spaltenende */ + BOOL bVisible; /* Sichtbarkeit */ + + long nEndMin; //min. possible position of end + long nEndMax; //max. possible position of end + + SvxColumnDescription(): + nStart(0), nEnd(0), bVisible(TRUE), nEndMin(0), nEndMax(0) {} + + SvxColumnDescription(const SvxColumnDescription &rCopy) : + nStart(rCopy.nStart), nEnd(rCopy.nEnd), + bVisible(rCopy.bVisible), + nEndMin(rCopy.nEndMin), nEndMax(rCopy.nEndMax) + {} + + SvxColumnDescription(long start, long end, BOOL bVis = TRUE): + nStart(start), nEnd(end), + bVisible(bVis), + nEndMin(0), nEndMax(0) {} + + SvxColumnDescription(long start, long end, + long endMin, long endMax, BOOL bVis = TRUE): + nStart(start), nEnd(end), + bVisible(bVis), + nEndMin(endMin), nEndMax(endMax) + {} + + int operator==(const SvxColumnDescription &rCmp) const { + return nStart == rCmp.nStart && + bVisible == rCmp.bVisible && + nEnd == rCmp.nEnd && + nEndMin == rCmp.nEndMin && + nEndMax == rCmp.nEndMax; + } + int operator!=(const SvxColumnDescription &rCmp) const { + return !operator==(rCmp); + } + long GetWidth() const { return nEnd - nStart; } +}; + +// class SvxColumnItem --------------------------------------------------- + +typedef SvPtrarr SvxColumns; + +class SVX_DLLPUBLIC SvxColumnItem : public SfxPoolItem +{ + SvxColumns aColumns;// Spaltenarray + long nLeft, // Linker Rand bei Tabelle + nRight; // Rechter Rand bei Tabelle; bei Spalten immer gleich + // zum umgebenden Rahmen + USHORT nActColumn; // die aktuelle Spalte + BOOL bTable; // Tabelle? + BOOL bOrtho; // Gleichverteilte Spalten + + void DeleteAndDestroyColumns(); + +protected: + virtual int operator==( const SfxPoolItem& ) const; + + virtual String GetValueText() const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +public: + TYPEINFO(); + // rechter Rand des umgebenden Rahmens + // nLeft, nRight jeweils der Abstand zum umgebenden Rahmen + SvxColumnItem(USHORT nAct = 0); // Spalten + SvxColumnItem(USHORT nActCol, + USHORT nLeft, USHORT nRight = 0); // Tabelle mit Raendern + SvxColumnItem(const SvxColumnItem &); + ~SvxColumnItem(); + + const SvxColumnItem &operator=(const SvxColumnItem &); + + USHORT Count() const { return aColumns.Count(); } + SvxColumnDescription &operator[](USHORT i) + { return *(SvxColumnDescription*)aColumns[i]; } + const SvxColumnDescription &operator[](USHORT i) const + { return *(SvxColumnDescription*)aColumns[i]; } + void Insert(const SvxColumnDescription &rDesc, USHORT nPos) { + SvxColumnDescription* pDesc = new SvxColumnDescription(rDesc); + aColumns.Insert(pDesc, nPos); + } + void Append(const SvxColumnDescription &rDesc) { Insert(rDesc, Count()); } + void SetLeft(long left) { nLeft = left; } + void SetRight(long right) { nRight = right; } + void SetActColumn(USHORT nCol) { nActColumn = nCol; } + + USHORT GetActColumn() const { return nActColumn; } + BOOL IsFirstAct() const { return nActColumn == 0; } + BOOL IsLastAct() const { return nActColumn == Count()-1; } + long GetLeft() { return nLeft; } + long GetRight() { return nRight; } + + BOOL IsTable() const { return bTable; } + + BOOL CalcOrtho() const; + void SetOrtho(BOOL bVal) { bOrtho = bVal; } + BOOL IsOrtho () const { return FALSE ; } + + BOOL IsConsistent() const { return nActColumn < aColumns.Count(); } + long GetVisibleRight() const;// rechter sichtbare Rand der aktuellen Spalte +}; + +// class SvxObjectItem --------------------------------------------------- + +class SVX_DLLPUBLIC SvxObjectItem : public SfxPoolItem +{ +private: + long nStartX; /* Beginn in X-Richtung */ + long nEndX; /* Ende in X-Richtung */ + long nStartY; /* Beginn in Y-Richtung */ + long nEndY; /* Ende in Y-Richtung */ + BOOL bLimits; /* Grenzwertkontrolle durch die Applikation */ +protected: + virtual int operator==( const SfxPoolItem& ) const; + + virtual String GetValueText() const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +private: + SVX_DLLPRIVATE const SvxObjectItem &operator=(const SvxObjectItem &); // n.i. +public: + TYPEINFO(); + SvxObjectItem(long nStartX, long nEndX, + long nStartY, long nEndY, + BOOL bLimits = FALSE); + SvxObjectItem(const SvxObjectItem &); + + BOOL HasLimits() const { return bLimits; } + + long GetStartX() const { return nStartX; } + long GetEndX() const { return nEndX; } + long GetStartY() const { return nStartY; } + long GetEndY() const { return nEndY; } + + void SetStartX(long l) { nStartX = l; } + void SetEndX(long l) { nEndX = l; } + void SetStartY(long l) { nStartY = l; } + void SetEndY(long l) { nEndY = l; } +}; + + +#endif + diff --git a/svx/inc/sdrpaintwindow.hxx b/svx/inc/sdrpaintwindow.hxx new file mode 100644 index 000000000000..c0fa23610625 --- /dev/null +++ b/svx/inc/sdrpaintwindow.hxx @@ -0,0 +1,170 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrpaintwindow.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDRPAINTWINDOW_HXX +#define _SDRPAINTWINDOW_HXX + +#ifndef _VIRDEV_HXX //autogen +#include <vcl/virdev.hxx> +#endif +#include "svx/svxdllapi.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// predeclarations +class SdrPaintView; + +namespace sdr +{ + namespace overlay + { + class OverlayManager; + } // end of namespace overlay +} // end of namespace sdr + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SdrPreRenderDevice +{ + // The original OutputDevice + OutputDevice& mrOutputDevice; + + // The VirtualDevice for PreRendering + VirtualDevice maPreRenderDevice; + +public: + SdrPreRenderDevice(OutputDevice& rOriginal); + ~SdrPreRenderDevice(); + + void PreparePreRenderDevice(); + void OutputPreRenderDevice(const Region& rExpandedRegion); + + OutputDevice& GetOriginalOutputDevice() const { return mrOutputDevice; } + OutputDevice& GetPreRenderDevice() { return maPreRenderDevice; } +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrPaintWindow +{ +private: + // the OutputDevice this window represents + OutputDevice& mrOutputDevice; + + // the SdrPaintView this window belongs to + SdrPaintView& mrPaintView; + + // the new OverlayManager for the new OverlayObjects. Test add here, will + // replace the IAOManager as soon as it works. + ::sdr::overlay::OverlayManager* mpOverlayManager; + + // The PreRenderDevice for PreRendering + SdrPreRenderDevice* mpPreRenderDevice; + + // The RedrawRegion used for rendering + Region maRedrawRegion; + + // bitfield + // #i72889# flag if this is only a temporary target for repaint, default is false + unsigned mbTemporaryTarget : 1; + + /** Remember whether the mpOverlayManager supports buffering. Using + this flags expensive dynamic_casts on mpOverlayManager in order to + detect this. + */ + bool mbUseBuffer; + + // helpers + /** Create mpOverlayManager member on demand. + @param bUseBuffer + Specifies whether to use the buffered (OverlayManagerBuffered) + or the unbuffered (OverlayManager) version of the overlay + manager. When this values is different from that of the + previous call then the overlay manager is replaced by the + specified one. + + The bUseBuffer flag will typically change its value when text + editing is started or stopped. + */ + void impCreateOverlayManager(const bool bUseBuffer); + +public: + SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut); + ~SdrPaintWindow(); + + // data read accesses + SdrPaintView& GetPaintView() const { return mrPaintView; } + OutputDevice& GetOutputDevice() const { return mrOutputDevice; } + + // OVERLAYMANAGER + ::sdr::overlay::OverlayManager* GetOverlayManager() const; + // #i73602# add flag if buffer shall be used + void DrawOverlay(const Region& rRegion, bool bUseBuffer); + void HideOverlay(const Region& rRegion); + + // calculate visible area and return + Rectangle GetVisibleArea() const; + + // Is OutDev a printer? + sal_Bool OutputToPrinter() const { return (OUTDEV_PRINTER == mrOutputDevice.GetOutDevType()); } + + // Is OutDev a window? + sal_Bool OutputToWindow() const { return (OUTDEV_WINDOW == mrOutputDevice.GetOutDevType()); } + + // Is OutDev a VirtualDevice? + sal_Bool OutputToVirtualDevice() const { return (OUTDEV_VIRDEV == mrOutputDevice.GetOutDevType()); } + + // Is OutDev a recording MetaFile? + sal_Bool OutputToRecordingMetaFile() const; + + // prepare PreRendering (evtl.) + void PreparePreRenderDevice(); + void DestroyPreRenderDevice(); + void OutputPreRenderDevice(const Region& rExpandedRegion); + SdrPreRenderDevice* GetPreRenderDevice() const { return mpPreRenderDevice; } + + // RedrawRegion + const Region& GetRedrawRegion() const; + void SetRedrawRegion(const Region& rNew); + + // #i72889# read/write access to TempoparyTarget + bool getTemporaryTarget() const { return (bool)mbTemporaryTarget; } + void setTemporaryTarget(bool bNew) { if(bNew != (bool)mbTemporaryTarget) mbTemporaryTarget = bNew; } + + // #i72889# get target output device, take into account output buffering + OutputDevice& GetTargetOutputDevice() { if(mpPreRenderDevice) return mpPreRenderDevice->GetPreRenderDevice(); else return mrOutputDevice; } +}; + +// typedefs for a list of SdrPaintWindows +typedef ::std::vector< SdrPaintWindow* > SdrPaintWindowVector; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SDRPAINTWINDOW_HXX + diff --git a/svx/inc/selctrl.hxx b/svx/inc/selctrl.hxx new file mode 100644 index 000000000000..96fd8c8f3d9f --- /dev/null +++ b/svx/inc/selctrl.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: selctrl.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SELCTRL_HXX +#define _SVX_SELCTRL_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/stbitem.hxx> +#include "svx/svxdllapi.h" + +// class SvxSelModeControl ----------------------------------------------- + +class SVX_DLLPUBLIC SvxSelectionModeControl : public SfxStatusBarControl +{ +public: + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual void Click(); + virtual void Paint( const UserDrawEvent& rEvt ); + + SFX_DECL_STATUSBAR_CONTROL(); + + SvxSelectionModeControl( USHORT nSlotId, USHORT nId, StatusBar& rStb ); + + static ULONG GetDefItemWidth(const StatusBar& rStb); + +private: + USHORT nState; + +#ifdef _SVX_SELCTRL_CXX + SVX_DLLPRIVATE void DrawItemText_Impl(); +#endif +}; + + +#endif + diff --git a/svx/inc/sjctrl.hxx b/svx/inc/sjctrl.hxx new file mode 100644 index 000000000000..358df9af3671 --- /dev/null +++ b/svx/inc/sjctrl.hxx @@ -0,0 +1,633 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sjctrl.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifdef SOLAR_JAVA + +#ifndef _SFXSFXJS_HXX +#include <sfx2/sfxjs.hxx> +#endif + +class VCControl; +class VCForm; +class VCManager; +class VCRadioManager; + + +// Basis-Klasse aller VCControl-Wrapper-Klassen +// Haelt Verweis auf das Control und handelt einige gemeinsame Properties +class ImpSjJScriptControlBase +{ + protected: + VCControl* pControl; + + public: + // Beibehalten bis zum Vollupdate + /* + String getName() const; + void setName( const String & aStrg ); + String getValue() const; + String getType() const; + */ + + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + String ImpGetName() const; + void ImpSetName( const String & aStrg ); + String ImpGetValue() const; + void ImpSetValue( const String & aStrg ); + String ImpGetType() const; + + // Konstruktor + ImpSjJScriptControlBase::ImpSjJScriptControlBase( VCControl* _pControl ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +// Button-Control +class ImpSjJScriptButtonObject : public SjJScriptButtonObject, ImpSjJScriptControlBase +{ + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual void setValue( const String & aStrg ); + virtual String getType() const; + + // Methoden des Objektes + virtual void click(); + + // Events (C++ --> Java) + //---------------------- + // Neue Event-Schnittstelle mit Function-Objekten + virtual SjJScriptFunctionObject* getOnClick_Fct() const; + virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual String getOnClick() const; + virtual void setOnClick( const String & aSourceStrg ); + void onClick(); + + // Konstruktor + ImpSjJScriptButtonObject( VCControl* _pControl, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +// PasswordControl (Edit-Control zur Password-Eingabe) +class ImpSjJScriptPasswordObject : public SjJScriptPasswordObject, ImpSjJScriptControlBase +{ + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual String getType() const; + + virtual String getDefaultValue() const; + virtual void setDefaultValue( const String & aStrg ); + virtual void setValue( const String & aStrg ); + + // Methoden des Objektes + virtual void focus(); + virtual void blur(); + virtual void select(); + + // Events (C++ --> Java) + //---------------------- + // keine ! + + // Konstruktor + ImpSjJScriptPasswordObject( VCControl* _pControl, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class ImpSjJScriptCheckboxObject : public SjJScriptCheckboxObject, ImpSjJScriptControlBase +{ + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual String getType() const; + + virtual BOOL getChecked() const; + virtual void setChecked( BOOL bCheck ); + virtual BOOL getDefaultChecked() const; + virtual void setDefaultChecked( BOOL bCheck ); + // getValue() wird in der Basisklasse definiert + virtual void setValue( const String & aStrg ); + + // Methoden des Objektes + virtual void click(); + + // Events (C++ --> Java) + //---------------------- + // Neue Event-Schnittstelle mit Function-Objekten + virtual SjJScriptFunctionObject* getOnClick_Fct() const; + virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual String getOnClick() const; + virtual void setOnClick( const String & aSourceStrg ); + void onClick(); + + // Konstruktor + ImpSjJScriptCheckboxObject( VCControl* _pControl, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +// Wrapper-Klasse fuer RadioArray +class ImpSjJScriptRadioArray: public SjJSbxArrayObject +{ + VCRadioManager* pMgr; +public: + INT32 ImpSjJScriptRadioArray::getLength() const; + SjJSbxObject* ImpSjJScriptRadioArray::getElement( INT32 nIndex ) const; + SjJSbxObject* ImpSjJScriptRadioArray::getElement_String( const String & aName ) const; + + // Konstruktor + ImpSjJScriptRadioArray::ImpSjJScriptRadioArray( VCRadioManager* _pMgr, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class ImpSjJScriptRadioObject : public SjJScriptRadioObject, ImpSjJScriptControlBase +{ + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual String getType() const; + + // Properties von SjJScriptCheckboxObject + virtual BOOL getChecked() const; + virtual void setChecked( BOOL bCheck ); + virtual BOOL getDefaultChecked() const; + virtual void setDefaultChecked( BOOL bCheck ); + // getValue() wird in der Basisklasse definiert + virtual void setValue( const String & aStrg ); + + // yyy Raus zum inkompatiblen + //virtual INT32 getLength(); + + // Methoden des Objektes + virtual void click(); + + // Events (C++ --> Java) + // Neue Event-Schnittstelle mit Function-Objekten + virtual SjJScriptFunctionObject* getOnClick_Fct() const; + virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual String getOnClick() const; + virtual void setOnClick( const String & aSourceStrg ); + void onClick(); + + // Konstruktor + ImpSjJScriptRadioObject( VCControl* _pControl, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class ImpSjJScriptSelectObject : public SjJScriptSelectObject, ImpSjJScriptControlBase +{ + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual String getType() const; + + virtual INT32 getLength(); + virtual INT32 getSelectedIndex() const; + virtual void setSelectedIndex( INT32 nNo ); + + // liefert eine Array von Option-Objekten + //yyy Raus zum inkompatiblen + //virtual SjJSbxArrayObject * getOptions(); + + // Methoden des Objektes + virtual void focus(); + virtual void blur(); + + // Events (C++ --> Java) + //---------------------- + // Neue Event-Schnittstelle mit Function-Objekten + virtual SjJScriptFunctionObject* getOnBlur_Fct() const; + virtual void setOnBlur_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual SjJScriptFunctionObject* getOnChange_Fct() const; + virtual void setOnChange_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual SjJScriptFunctionObject* getOnFocus_Fct() const; + virtual void setOnFocus_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual String getOnBlur() const; + virtual void setOnBlur( const String & aSourceStrg ); + void onBlur(); + virtual String getOnChange() const; + virtual void setOnChange( const String & aSourceStrg ); + void onChange(); + virtual String getOnFocus() const; + virtual void setOnFocus( const String & aSourceStrg ); + void onFocus(); + + // SjJSbxArrayObject-Methoden + virtual INT32 getLength() const; + // Zugriff "uber den Index + virtual SjJSbxObject * getElement( INT32 nIndex ) const; + // Zugriff "uber den Namen + // native Java-Methoden k"onnen (noch) nicht "uberladen werden + //virtual SjJSbxObject * getElement_String( const String & aName ) const; + + // Konstruktor + ImpSjJScriptSelectObject( VCControl* _pControl, SjJSbxObject * p ); + + // zum Setzen von Eintr"agen am Objket (zum Aufruf von Java aus) 15.1.1997 + virtual void setOption( INT32 nIndex, const String & aOptionText, + const String & aOptionValue, + BOOL bDefaultSelected, BOOL bSelected ); + + // Schnittstelle fuer die Properties der Option-Objekte + virtual BOOL getOptionDefaultSelected( INT32 nIndex ) const; + virtual void setOptionDefaultSelected( BOOL bSelected, INT32 nIndex ); + virtual BOOL getOptionSelected( INT32 nIndex ) const; + virtual void setOptionSelected( BOOL bSelected, INT32 nIndex ); + virtual String getOptionText( INT32 nIndex ) const; + virtual void setOptionText( const String & sText, INT32 nIndex ); + virtual void setOptionValue( const String & sText, INT32 nIndex ); + virtual String getOptionValue( INT32 nIndex ) const; +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +// Wieso von Controlbase abgeleitet? + +class ImpSjJScriptOptionObject : public SjJScriptOptionObject, ImpSjJScriptControlBase +{ + USHORT nListBoxIndex; + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + virtual BOOL getdefaultSelected() const; + virtual void setdefaultSelected( BOOL bSelected ); + virtual INT32 getIndex() const; + virtual BOOL getSelected() const; + virtual void setSelected( BOOL bSelected ); + + + //yyy Zum Vollupdate raus: + /* + virtual INT32 getSelectedIndex() const; + virtual void setSelectedIndex( INT32 nNo ); + */ + + + virtual String getText() const; + virtual void setText( const String & sText ); + // getValue() wird in der Basisklasse definiert + virtual String getValue() const; + virtual void setValue( const String & aStrg ); + + + // DUMMY-Methoden + virtual String getName() const { return "";} + virtual void setName( const String &s) { } + virtual String getType() const { return "";} + // Methoden des Objektes + // keine ! + + // Events (C++ --> Java) + //---------------------- + // keine ! + + // Konstruktor + ImpSjJScriptOptionObject( VCControl* _pControl, SjJSbxObject * p, USHORT _nListBoxIndex ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +// Eigene Klasse fuer forms-Array anlegen +class SjJSbxFormsArray: public SfxJSArray +{ + VCManager* pManager; + + public: + // SjJSbxArrayObject-Methoden + virtual INT32 getLength() const; + // Zugriff "uber den Index + virtual SjJSbxObject * getElement( INT32 nIndex ) const; + // Zugriff "uber den Namen + // native Java-Methoden k"onnen (noch) nicht "uberladen werden + virtual SjJSbxObject * getElement_String( const String & aName ) const; + + // Konstruktor + SjJSbxFormsArray( VCManager * _pManager, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class ImpSjJScriptTextObject : public SjJScriptTextObject, ImpSjJScriptControlBase +{ + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual String getType() const; + + virtual String getDefaultValue() const; + virtual void setDefaultValue( const String & aStrg ); + // getValue() wird in der Basisklasse definiert + virtual void setValue( const String & aStrg ); + + // Methoden des Objektes + virtual void focus(); + virtual void blur(); + virtual void select(); + + // Events (C++ --> Java) + //---------------------- + // Neue Event-Schnittstelle mit Function-Objekten + virtual SjJScriptFunctionObject* getOnBlur_Fct() const; + virtual void setOnBlur_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual SjJScriptFunctionObject* getOnChange_Fct() const; + virtual void setOnChange_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual SjJScriptFunctionObject* getOnFocus_Fct() const; + virtual void setOnFocus_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual SjJScriptFunctionObject* getOnSelect_Fct() const; + virtual void setOnSelect_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual String getOnBlur() const; + virtual void setOnBlur( const String & aSourceStrg ); + void onBlur(); + virtual String getOnChange() const; + virtual void setOnChange( const String & aSourceStrg ); + void onChange(); + virtual String getOnFocus() const; + virtual void setOnFocus( const String & aSourceStrg ); + void onFocus(); + virtual String getOnSelect() const; + virtual void setOnSelect( const String & aSourceStrg ); + void onSelect(); + + // Konstruktor + ImpSjJScriptTextObject( VCControl* _pControl, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class ImpSjJScriptTextareaObject : public SjJScriptTextareaObject, ImpSjJScriptControlBase +{ + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual String getType() const; + + virtual String getDefaultValue() const; + virtual void setDefaultValue( const String & aStrg ); + // getValue() wird in der Basisklasse definiert + virtual void setValue( const String & aStrg ); + + // Methoden des Objektes + virtual void focus(); + virtual void blur(); + virtual void select(); + + // Events (C++ --> Java) + //---------------------- + // Neue Event-Schnittstelle mit Function-Objekten + virtual SjJScriptFunctionObject* getOnBlur_Fct() const; + virtual void setOnBlur_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual SjJScriptFunctionObject* getOnChange_Fct() const; + virtual void setOnChange_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual SjJScriptFunctionObject* getOnFocus_Fct() const; + virtual void setOnFocus_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual SjJScriptFunctionObject* getOnSelect_Fct() const; + virtual void setOnSelect_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual String getOnBlur() const; + virtual void setOnBlur( const String & aSourceStrg ); + void onBlur(); + virtual String getOnChange() const; + virtual void setOnChange( const String & aSourceStrg ); + void onChange(); + virtual String getOnFocus() const; + virtual void setOnFocus( const String & aSourceStrg ); + void onFocus(); + virtual String getOnSelect() const; + virtual void setOnSelect( const String & aSourceStrg ); + void onSelect(); + + // Konstruktor + ImpSjJScriptTextareaObject( VCControl* _pControl, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class ImpSjJScriptSubmitObject : public SjJScriptSubmitObject, ImpSjJScriptControlBase +{ + // Identisch mit ButtonObject + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual void setValue( const String & aStrg ); + virtual String getType() const; + + // Methoden des Objektes + virtual void click(); + + // Events (C++ --> Java) + //---------------------- + // Neue Event-Schnittstelle mit Function-Objekten + virtual SjJScriptFunctionObject* getOnClick_Fct() const; + virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual String getOnClick() const; + virtual void setOnClick( const String & aSourceStrg ); + void onClick(); + + // Konstruktor + ImpSjJScriptSubmitObject( VCControl* _pControl, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class ImpSjJScriptResetObject : public SjJScriptResetObject, ImpSjJScriptControlBase +{ + // Identisch mit ButtonObject + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual void setValue( const String & aStrg ); + virtual String getType() const; + + // Methoden des Objektes + virtual void click(); + + // Events (C++ --> Java) + //---------------------- + // Neue Event-Schnittstelle mit Function-Objekten + virtual SjJScriptFunctionObject* getOnClick_Fct() const; + virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual String getOnClick() const; + virtual void setOnClick( const String & aSourceStrg ); + void onClick(); + + // Konstruktor + ImpSjJScriptResetObject( VCControl* _pControl, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class ImpSjJScriptHiddenObject : public SjJScriptHiddenObject, ImpSjJScriptControlBase +{ + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual String getType() const; + + // getValue() wird in der Basisklasse definiert + virtual void setValue( const String & aStrg ); + + // Methoden des Objektes + // keine ! + + // Events (C++ --> Java) + //---------------------- + // keine ! + + // Konstruktor + ImpSjJScriptHiddenObject( VCControl* _pControl, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class ImpSjJScriptFileUploadObject : public SjJScriptFileUploadObject, ImpSjJScriptControlBase +{ + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual String getType() const; + + // Methoden des Objektes + // keine ! + + // Events (C++ --> Java) + //---------------------- + // keine ! + + // Konstruktor + ImpSjJScriptFileUploadObject( VCControl* _pControl, SjJSbxObject * p ); +}; + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class ImpSjJScriptFormObject : public SjJScriptFormObject +{ + VCForm* pVCForm; + + public: + // Methoden von Java --> C++ (f"ur Properties) + //-------------------------------------------- + virtual String getName() const; + virtual void setName( const String & aStrg ); + virtual String getValue() const; + virtual String getType() const; + + virtual String getAction() const; + virtual void setAction( const String & sValue ); + virtual String getEncoding() const; + virtual void setEncoding( const String & sValue ); + virtual String getMethod() const; + virtual void setMethod( const String & sValue ); + virtual String getTarget() const; + virtual void setTarget( const String & sValue ); + + // SjJSbxArrayObject-Methoden + INT32 getLength() const; + SjJSbxObject* getElement( INT32 nIndex ) const; + SjJSbxObject* getElement_String( const String & aName ) const; + + // liefert ein Array-Objekt mit Elementen vom Typ JScriptAbstractControlsObject + // yyy Raus zum inkompatiblen + //virtual SjJSbxArrayObject * getElements(); + + // Zugriff ueber den Namen eines Controls (falls ein Name zugeordnet ist) + // yyy Raus zum inkompatiblen + //virtual SjJSbxObject * getElement( const String & aName ); + + // Methoden des Objektes + virtual void submit(); + virtual void reset(); + + // Events (C++ --> Java) + //---------------------- + // Neue Event-Schnittstelle mit Function-Objekten + virtual SjJScriptFunctionObject* getOnSubmit_Fct() const; + virtual void setOnSubmit_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual SjJScriptFunctionObject* getOnReset_Fct() const; + virtual void setOnReset_Fct( SjJScriptFunctionObject* pFunctionObject ); + virtual String getOnSubmit() const; + virtual void setOnSubmit( const String & aSourceStrg ); + void onSubmit(); + virtual String getOnReset() const; + virtual void setOnReset( const String & aSourceStrg ); + void onReset(); + + // Konstruktor + ImpSjJScriptFormObject( VCForm* _pVCForm, SjJSbxObject * p ); +}; + +#endif diff --git a/svx/inc/srchcfg.hxx b/svx/inc/srchcfg.hxx new file mode 100644 index 000000000000..c5e4bd74fe60 --- /dev/null +++ b/svx/inc/srchcfg.hxx @@ -0,0 +1,85 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: srchcfg.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SRCHCFG_HXX +#define _SVX_SRCHCFG_HXX + +#include <unotools/configitem.hxx> +#include <com/sun/star/uno/Sequence.h> +#include "svx/svxdllapi.h" + +//----------------------------------------------------------------------------- +struct SvxSearchConfig_Impl; +struct SvxSearchEngineData +{ + rtl::OUString sEngineName; + + rtl::OUString sAndPrefix; + rtl::OUString sAndSuffix; + rtl::OUString sAndSeparator; + sal_Int32 nAndCaseMatch; + + rtl::OUString sOrPrefix; + rtl::OUString sOrSuffix; + rtl::OUString sOrSeparator; + sal_Int32 nOrCaseMatch; + + rtl::OUString sExactPrefix; + rtl::OUString sExactSuffix; + rtl::OUString sExactSeparator; + sal_Int32 nExactCaseMatch; + + SvxSearchEngineData() : + nAndCaseMatch(0), + nOrCaseMatch(0), + nExactCaseMatch(0){} + + sal_Bool operator==(const SvxSearchEngineData& rData); +}; +class SVX_DLLPUBLIC SvxSearchConfig : public utl::ConfigItem +{ + SvxSearchConfig_Impl* pImpl; + +public: + SvxSearchConfig(sal_Bool bEnableNotify = sal_True); + virtual ~SvxSearchConfig(); + + void Load(); + virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); + + sal_uInt16 Count(); + const SvxSearchEngineData& GetData(sal_uInt16 nPos); + const SvxSearchEngineData* GetData(const rtl::OUString& rEngineName); + void SetData(const SvxSearchEngineData& rData); + void RemoveData(const rtl::OUString& rEngineName); +}; + +#endif + diff --git a/svx/inc/srchdlg.hxx b/svx/inc/srchdlg.hxx new file mode 100644 index 000000000000..cd4006e86690 --- /dev/null +++ b/svx/inc/srchdlg.hxx @@ -0,0 +1,319 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: srchdlg.hxx,v $ + * $Revision: 1.18 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SRCHDLG_HXX +#define _SVX_SRCHDLG_HXX + +// include --------------------------------------------------------------- + + +#include <svtools/stdctrl.hxx> +#ifndef _COMBOBOX_HXX //autogen +#include <vcl/combobox.hxx> +#endif +#ifndef _EDIT_HXX //autogen +#include <vcl/edit.hxx> +#endif +#ifndef _LSTBOX_HXX //autogen +#include <vcl/lstbox.hxx> +#endif +#ifndef _BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#ifndef _GROUP_HXX //autogen +#include <vcl/group.hxx> +#endif +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#ifndef _DIALOG_HXX //autogen +#include <vcl/dialog.hxx> +#endif +#include <sfx2/childwin.hxx> +#include <sfx2/basedlgs.hxx> +#include <svl/svarray.hxx> +#define _SVSTDARR_STRINGSDTOR +#include <svl/svstdarr.hxx> +#include <svtools/svmedit.hxx> +#include <sfx2/srchdefs.hxx> +#include "svx/svxdllapi.h" + + +// forward --------------------------------------------------------------- + +class SvxSearchItem; +class MoreButton; +class SfxStyleSheetBasePool; +class SvxJSearchOptionsPage; +class SvxSearchController; + +struct SearchDlg_Impl; + +#ifndef NO_SVX_SEARCH + +// struct SearchAttrItem ------------------------------------------------- + +struct SearchAttrItem +{ + USHORT nSlot; + SfxPoolItem* pItem; +}; + +// class SearchAttrItemList ---------------------------------------------- + +SV_DECL_VARARR_VISIBILITY(SrchAttrItemList, SearchAttrItem, 8, 8, SVX_DLLPUBLIC) + +class SVX_DLLPUBLIC SearchAttrItemList : private SrchAttrItemList +{ +public: + SearchAttrItemList() {} + SearchAttrItemList( const SearchAttrItemList& rList ); + ~SearchAttrItemList(); + + void Put( const SfxItemSet& rSet ); + SfxItemSet& Get( SfxItemSet& rSet ); + void Clear(); + USHORT Count() const { return SrchAttrItemList::Count(); } + SearchAttrItem& operator[](USHORT nPos) const + { return SrchAttrItemList::operator[]( nPos ); } + SearchAttrItem& GetObject( USHORT nPos ) const + { return SrchAttrItemList::GetObject( nPos ); } + + // der Pointer auf das Item wird nicht kopiert!!! (also nicht l"oschen) + void Insert( const SearchAttrItem& rItem ) + { SrchAttrItemList::Insert( rItem, SrchAttrItemList::Count() ); } + // l"oscht die Pointer auf die Items + void Remove( USHORT nPos, USHORT nLen = 1 ); +}; + +#ifndef SV_NODIALOG + +// class SvxSearchDialogWrapper ------------------------------------------ + +#include <sfx2/layout.hxx> +#include <sfx2/layout-pre.hxx> + +class SvxSearchDialog; +class SVX_DLLPUBLIC SvxSearchDialogWrapper : public SfxChildWindow +{ + SvxSearchDialog *dialog; +public: + SvxSearchDialogWrapper( Window*pParent, USHORT nId, + SfxBindings* pBindings, SfxChildWinInfo* pInfo ); + + ~SvxSearchDialogWrapper (); + SvxSearchDialog *getDialog (); + SFX_DECL_CHILDWINDOW(SvxSearchDialogWrapper); +}; + +// class SvxSearchDialog ------------------------------------------------- + +/* + {k:\svx\prototyp\dialog\srchdlg.hxx} + + [Beschreibung] + In diesem Modeless-Dialog werden die Attribute einer Suche eingestellt + und damit eine Suche gestartet. Es sind mehrere Sucharten + ( Suchen, Alle suchen, Ersetzen, Alle ersetzen ) m"oglich. + + [Items] + <SvxSearchItem><SID_ATTR_SEARCH> +*/ + +class SvxSearchDialog : public SfxModelessDialog +{ +friend class SvxSearchController; +friend class SvxSearchDialogWrapper; +friend class SvxJSearchOptionsDialog; + +public: + SvxSearchDialog( Window* pParent, SfxBindings& rBind ); + SvxSearchDialog( Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind ); + ~SvxSearchDialog(); + + virtual BOOL Close(); + + // Window + virtual void Activate(); + + void GetSearchItems( SfxItemSet& rSet ); + void GetReplaceItems( SfxItemSet& rSet ); + + const SearchAttrItemList* GetSearchItemList() const + { return pSearchList; } + const SearchAttrItemList* GetReplaceItemList() const + { return pReplaceList; } + + inline BOOL HasSearchAttributes() const; + inline BOOL HasReplaceAttributes() const; + + PushButton& GetReplaceBtn() { return aReplaceBtn; } + + INT32 GetTransliterationFlags() const; + +private: + FixedText aSearchText; + ComboBox aSearchLB; + ListBox aSearchTmplLB; + FixedInfo aSearchAttrText; + + FixedText aReplaceText; + ComboBox aReplaceLB; + ListBox aReplaceTmplLB; + FixedInfo aReplaceAttrText; + + PushButton aSearchBtn; + PushButton aSearchAllBtn; + FixedLine aSearchCmdLine; + PushButton aReplaceBtn; + PushButton aReplaceAllBtn; + + FixedLine aSearchComponentFL; + PushButton aSearchComponent1PB; + PushButton aSearchComponent2PB; + + CheckBox aMatchCaseCB; + CheckBox aWordBtn; + + FixedLine aButtonsFL; + MoreButton* pMoreBtn; + HelpButton aHelpBtn; + CancelButton aCloseBtn; + + FixedLine aOptionsFL; + CheckBox aSelectionBtn; + CheckBox aBackwardsBtn; + CheckBox aRegExpBtn; + CheckBox aSimilarityBox; + PushButton aSimilarityBtn; + CheckBox aLayoutBtn; + CheckBox aNotesBtn; + CheckBox aJapMatchFullHalfWidthCB; + CheckBox aJapOptionsCB; + PushButton aJapOptionsBtn; + + PushButton aAttributeBtn; + PushButton aFormatBtn; + PushButton aNoFormatBtn; + + FixedLine aCalcFL; + FixedText aCalcSearchInFT; + ListBox aCalcSearchInLB; + FixedText aCalcSearchDirFT; + RadioButton aRowsBtn; + RadioButton aColumnsBtn; + CheckBox aAllSheetsCB; + + SfxBindings& rBindings; + BOOL bWriter; + BOOL bSearch; + BOOL bFormat; + USHORT nOptions; + FASTBOOL bSet; + FASTBOOL bReadOnly; + FASTBOOL bConstruct; + ULONG nModifyFlag; + String aStylesStr; + String aLayoutStr; + LocalizedString aCalcStr; + + SvStringsDtor aSearchStrings; + SvStringsDtor aReplaceStrings; + + SearchDlg_Impl* pImpl; + SearchAttrItemList* pSearchList; + SearchAttrItemList* pReplaceList; + SvxSearchItem* pSearchItem; + + SvxSearchController* pSearchController; + SvxSearchController* pOptionsController; + SvxSearchController* pFamilyController; + SvxSearchController* pSearchSetController; + SvxSearchController* pReplaceSetController; + + mutable INT32 nTransliterationFlags; + +#ifdef _SVX_SRCHDLG_CXX + DECL_LINK( ModifyHdl_Impl, ComboBox* pEdit ); + DECL_LINK( FlagHdl_Impl, Control* pCtrl ); + DECL_LINK( CommandHdl_Impl, Button* pBtn ); + DECL_LINK( TemplateHdl_Impl, Button* ); + DECL_LINK( FocusHdl_Impl, Control* ); + DECL_LINK( LoseFocusHdl_Impl, Control* ); + DECL_LINK( FormatHdl_Impl, Button* ); + DECL_LINK( NoFormatHdl_Impl, Button* ); + DECL_LINK( AttributeHdl_Impl, Button* ); + DECL_LINK( TimeoutHdl_Impl, Timer* ); + + void Construct_Impl(); + void InitControls_Impl(); + void CalculateDelta_Impl(); + void Init_Impl( int bHasItemSet ); + void InitAttrList_Impl( const SfxItemSet* pSSet, + const SfxItemSet* pRSet ); + void Remember_Impl( const String &rStr,BOOL bSearch ); + void PaintAttrText_Impl(); + String& BuildAttrText_Impl( String& rStr, BOOL bSrchFlag ) const; + + void TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool ); + void EnableControls_Impl( const USHORT nFlags ); + void EnableControl_Impl( Control* pCtrl ); + void SetItem_Impl( const SvxSearchItem* pItem ); + + void SetModifyFlag_Impl( const Control* pCtrl ); + void SaveToModule_Impl(); + + void ApplyTransliterationFlags_Impl( INT32 nSettings ); +#endif +}; + +#include <sfx2/layout-post.hxx> + +inline BOOL SvxSearchDialog::HasSearchAttributes() const +{ + int bLen = aSearchAttrText.GetText().Len(); + return ( aSearchAttrText.IsEnabled() && bLen ); +} + +inline BOOL SvxSearchDialog::HasReplaceAttributes() const +{ + int bLen = aReplaceAttrText.GetText().Len(); + return ( aReplaceAttrText.IsEnabled() && bLen ); +} + + +////////////////////////////////////////////////////////////////////// + + +#endif // SV_NODIALOG +#endif // NO_SVX_SEARCH + + +#endif + diff --git a/svx/inc/srchitem.hxx b/svx/inc/srchitem.hxx new file mode 100644 index 000000000000..c31cdfb25fc5 --- /dev/null +++ b/svx/inc/srchitem.hxx @@ -0,0 +1,37 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: srchitem.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SRCHITEM_HXX +#define _SVX_SRCHITEM_HXX + +#include <sfx2/srchitem.hxx> + +#endif + + diff --git a/svx/inc/svdglob.hxx b/svx/inc/svdglob.hxx new file mode 100644 index 000000000000..4526579d0658 --- /dev/null +++ b/svx/inc/svdglob.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdglob.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDGLOB_HXX +#define _SVDGLOB_HXX + +#include <tools/contnr.hxx> + +#include <tools/resid.hxx> +#include <tools/string.hxx> + +#include <svx/svxdllapi.h> + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class Link; +class ResMgr; +class SdrEngineDefaults; +class ImpSdrStrCache; + +//************************************************************ +// Defines +//************************************************************ + +// Den zur App passenden Resourcemanager holen +ResMgr* ImpGetResMgr(); + +class SdrResId: ResId { +public: + SdrResId(USHORT nId): ResId(nId,*ImpGetResMgr()) {} +}; + +// ResourceCache fuer haeuffig benoetigte Strings +// gecachet werden globale String-Resourcen mit den +// IDs von SDR_StringCacheBegin (256) bis +// SDR_StringCacheEnd (weiss ich grad' nicht). +// Hierzu siehe auch SvdStr.Hrc +SVX_DLLPUBLIC String ImpGetResStr(sal_uInt16 nResID); + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDGLOB_HXX + diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx new file mode 100644 index 000000000000..e424b4b9305e --- /dev/null +++ b/svx/inc/svdibrow.hxx @@ -0,0 +1,147 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdibrow.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDIBROW_HXX +#define _SVDIBROW_HXX + +#include <svtools/brwbox.hxx> +#include <vcl/edit.hxx> +#include <vcl/floatwin.hxx> + +class SfxItemSet; +class ImpItemListRow; +class BrowserMouseEvent; + +class _SdrItemBrowserControl: public BrowseBox +{ +friend class ImpItemEdit; + Container aList; + long nAktPaintRow; + Edit* pEditControl; + XubString aWNamMerk; + Link aEntryChangedHdl; + Link aSetDirtyHdl; + ImpItemListRow* pAktChangeEntry; + long nLastWhichOfs; + USHORT nLastWhich; + USHORT nLastWhichOben; + USHORT nLastWhichUnten; + FASTBOOL bWhichesButNames; + FASTBOOL bDontHideIneffectiveItems; + FASTBOOL bDontSortItems; + FASTBOOL bShowWhichIds; + FASTBOOL bShowRealValues; +private: +#if _SOLAR__PRIVATE + void ImpCtor(); + void ImpSetEntry(const ImpItemListRow& rEntry, ULONG nEntryNum); + ImpItemListRow* ImpGetEntry(ULONG nPos) const { return (ImpItemListRow*)aList.GetObject(nPos); } + void ImpSaveWhich(); + void ImpRestoreWhich(); +#endif // __PRIVATE +protected: + virtual long GetRowCount() const; + virtual BOOL SeekRow(long nRow); + virtual void PaintField(OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId) const; + virtual void DoubleClick(const BrowserMouseEvent&); + virtual void KeyInput(const KeyEvent& rEvt); + virtual void Select(); + virtual void SetDirty(); // wird z.B. bei Modusumschaltungen gerufen + virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex); + virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint); +public: + _SdrItemBrowserControl(Window* pParent, WinBits nBits=WB_3DLOOK|WB_BORDER|WB_TABSTOP); + virtual ~_SdrItemBrowserControl(); + void Clear(); + void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL); + ULONG GetCurrentPos() const; + USHORT GetCurrentWhich() const; + virtual FASTBOOL BegChangeEntry(ULONG nPos); + virtual FASTBOOL EndChangeEntry(); + virtual void BrkChangeEntry(); + + /** GetCellText returns the text at the given position + @param _nRow + the number of the row + @param _nColId + the ID of the column + @return + the text out of the cell + */ + virtual String GetCellText(long _nRow, USHORT _nColId) const; + + const ImpItemListRow* GetAktChangeEntry() const { return pAktChangeEntry; } + XubString GetNewEntryValue() const { return pEditControl->GetText(); } + void SetEntryChangedHdl(const Link& rLink) { aEntryChangedHdl=rLink; } + const Link& GetEntryChangedHdl() const { return aEntryChangedHdl; } + void SetSetDirtyHdl(const Link& rLink) { aSetDirtyHdl=rLink; } + const Link& GetSetDirtyHdl() const { return aSetDirtyHdl; } +}; + +#define WB_STDSIZEABLEDOCKWIN (WB_STDDOCKWIN|WB_3DLOOK|WB_CLOSEABLE|WB_SIZEMOVE) +#define WB_STDSIZEABLEFLOATWIN (WB_STDFLOATWIN|WB_3DLOOK|WB_CLOSEABLE|WB_SIZEMOVE) + +class _SdrItemBrowserWindow: public FloatingWindow { + _SdrItemBrowserControl aBrowse; +public: + _SdrItemBrowserWindow(Window* pParent, WinBits nBits=WB_STDSIZEABLEDOCKWIN); + virtual ~_SdrItemBrowserWindow(); + virtual void Resize(); + virtual void GetFocus(); + void Clear() { aBrowse.Clear(); } + void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL) { aBrowse.SetAttributes(pAttr,p2ndSet); } + void SetFloatingMode(FASTBOOL /*bOn*/) {} + const _SdrItemBrowserControl& GetBrowserControl() const { return aBrowse; } + _SdrItemBrowserControl& GetBrowserControl() { return aBrowse; } +}; + +class SdrView; + +class SdrItemBrowser: public _SdrItemBrowserWindow { + Timer aIdleTimer; + SdrView* pView; + FASTBOOL bDirty; +private: + static Window* ImpGetViewWin(SdrView& rView); + DECL_LINK(IdleHdl,Timer*); + DECL_LINK(ChangedHdl,_SdrItemBrowserControl*); + DECL_LINK(SetDirtyHdl,_SdrItemBrowserControl*); +public: + SdrItemBrowser(SdrView& rView); + void ForceParent(); + void SetView(SdrView& rView) { pView=&rView; ForceParent(); SetDirty(); } + void SetDirty(); + void Undirty(); + void ForceUndirty() { if (bDirty) Undirty(); } +}; + +#endif //_SVDIBROW_HXX + + diff --git a/svx/inc/svditer.hxx b/svx/inc/svditer.hxx new file mode 100644 index 000000000000..92325f281c92 --- /dev/null +++ b/svx/inc/svditer.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svditer.hxx,v $ + * $Revision: 1.9.246.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDITER_HXX +#define _SVDITER_HXX + +#include <sal/types.h> +#include <tools/list.hxx> +#include "svx/svxdllapi.h" + +class SdrObjList; +class SdrObject; +class SdrMarkList; + +// SdrObjListIter methods: +// IM_FLAT : Flach ueber die Liste +// IM_DEEPWITHGROUPS : Mit rekursivem Abstieg, Next() liefert auch Gruppenobjekte +// IM_DEEPNOGROUPS : Mit rekursivem Abstieg, Next() liefert keine Gruppenobjekte +enum SdrIterMode { IM_FLAT, IM_DEEPWITHGROUPS, IM_DEEPNOGROUPS}; + +class SVX_DLLPUBLIC SdrObjListIter +{ + List maObjList; + sal_uInt32 mnIndex; + BOOL mbReverse; + + void ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMode eMode, BOOL bUseZOrder); + void ImpProcessMarkList(const SdrMarkList& rMarkList, SdrIterMode eMode); + void ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, BOOL bUseZOrder); + +public: + SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode = IM_DEEPNOGROUPS, BOOL bReverse = FALSE); + /** This variant lets the user choose the order in which to travel over + the objects. + @param bUseZOrder + When <TRUE/> then the z-order defines the order of iteration. + Otherwise the navigation position as returned by + SdrObject::GetNavigationPosition() is used. + */ + SdrObjListIter(const SdrObjList& rObjList, BOOL bUseZOrder, SdrIterMode eMode = IM_DEEPNOGROUPS, BOOL bReverse = FALSE); + + /* SJ: the following function can now be used with every + SdrObject and is no longer limited to group objects */ + SdrObjListIter(const SdrObject& rObj, SdrIterMode eMode = IM_DEEPNOGROUPS, BOOL bReverse = FALSE); + + /** Iterates over a list of marked objects received from the SdrMarkView. */ + SdrObjListIter(const SdrMarkList& rMarkList, SdrIterMode eMode = IM_DEEPNOGROUPS, BOOL bReverse = FALSE); + + void Reset() { mnIndex = (mbReverse ? maObjList.Count() : 0L); } + BOOL IsMore() const { return (mbReverse ? mnIndex != 0 : ( mnIndex < maObjList.Count())); } + SdrObject* Next() { return (SdrObject*)maObjList.GetObject(mbReverse ? --mnIndex : mnIndex++); } + + sal_uInt32 Count() { return maObjList.Count(); } +}; + +#endif //_SVDITER_HXX + diff --git a/svx/inc/svdpomv.hxx b/svx/inc/svdpomv.hxx new file mode 100644 index 000000000000..8ff09cc19e7c --- /dev/null +++ b/svx/inc/svdpomv.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdpomv.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#error dieser Header entfaellt nun! + +#ifndef _SVDPOMV_HXX +#define _SVDPOMV_HXX + +#include <svx/svdmrkv.hxx> + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@@ @@@@ @@ @@ @@ @@ @@ @@@@ @@@@@ @@ @@ @@ @@ @@ @@@@@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@@@@ @@ @@ @@ @@@@ @@@@@@@ @@@@@@ @@@@@ @@@@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@ @@@@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SdrPolyMarkView: public SdrMarkView { +private: +#ifndef _SVDRAW_HXX + void ImpClearVars(); +#endif +public: + SdrPolyMarkView(SdrModel* pModel1, OutputDevice* pOut = 0L); + ~SdrPolyMarkView(); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDPOMV_HXX + diff --git a/svx/inc/svdshort.hxx b/svx/inc/svdshort.hxx new file mode 100644 index 000000000000..dfe5bc1d9179 --- /dev/null +++ b/svx/inc/svdshort.hxx @@ -0,0 +1,94 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdshort.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#error svdshort wird nicht mehr verwendet! + +#ifndef _SVDSHORT_HXX +#define _SVDSHORT_HXX + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef Weg_Mit_Den_Doofen_Abkuerzungen + // Statistik - Stand 02-03-1995 + // Haeufigkeit Ersparnis +#define SdrHelpLineKind SdrFLK /* HL ist schon besetzt */ +#define SdrHelpLineList SdrFLL /* HL ist schon besetzt */ +#define SdrHelpLine SdrFL /* HL ist schon besetzt */ +#define SdrObjTransformInfoRec SdrTI +#define SdrDragCrook SdrDC +#define SdrDragMirror SdrDI +#define SdrDragMovHdl SdrDH +#define SdrDragResize SdrDZ +#define SdrDragRotate SdrDR +#define SdrDragShear SdrDE +#define SdrDragMove SdrDM +#define SdrCreateCmd SdrCC +#define SdrUndoAttrObj SdrAU +#define SdrObjKind SdrOK +#define SdrUndoGroup SdrUG +#define SdrUndoAction SdrUA +#define SdrAttrObj SdrAO +#define SdrGrafObj SdrGO +#define SdrMarkList SdrML +#define SdrHdlList SdrHL +#define SdrLayerAdmin SdrLA +#define SdrObjUserCall SdrUC +#define SdrObjUnknown SdrUO +#define SdrExchangeView SdrXV +#define SdrCreateView SdrCV +#define SdrOle2Obj SdrOO +#define SdrObjGeoData SdrGD +#define SdrDragView SdrDV +#define SdrSnapView SdrSV +#define SdrObjList SdrOL +#define SdrEdgeObj SdrEO +#define SdrCircObj SdrCO +#define SdrObjGroup SdrOG +#define SdrPage SdrPg +#define SdrObjEditView SdrOV +#define SdrModel SdrMD +#define SdrEditView SdrEV +#define SdrPaintView SdrNV +#define SdrPolyObj SdrPO +#define SdrRectObj SdrRO +#define SdrTextObj SdrTO +#define SdrMarkView SdrMV +#define SdrPathObj SdrBO +#define SdrPageView SdrPV +#define SdrDragStat SdrDS +#define SdrVirtObj SdrVO +#define SdrObject SdrO + +#endif + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDSHORT_HXX + diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc new file mode 100644 index 000000000000..280a9dba6122 --- /dev/null +++ b/svx/inc/svdstr.hrc @@ -0,0 +1,792 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdstr.hrc,v $ + * $Revision: 1.18.212.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#define SDR_ResourceBegin 2560 + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Achtung: Alle Strings zwischen SDR_StringCacheBegin und +// SDR_StringCacheEnd muessen buendig aneinander liegen. +//BFS06#define SDR_StringCacheBegin (SDR_ResourceBegin) + +#define STR_ObjNameBegin (SDR_ResourceBegin) +#define STR_ObjNameSingulNONE (STR_ObjNameBegin + 0) +#define STR_ObjNamePluralNONE (STR_ObjNameBegin + 1) +#define STR_ObjNameSingulGRUP (STR_ObjNameBegin + 2) +#define STR_ObjNamePluralGRUP (STR_ObjNameBegin + 3) +#define STR_ObjNameSingulGRUPEMPTY (STR_ObjNameBegin + 4) +#define STR_ObjNamePluralGRUPEMPTY (STR_ObjNameBegin + 5) +#define STR_ObjNameSingulTable (STR_ObjNameBegin + 6) +#define STR_ObjNamePluralTable (STR_ObjNameBegin + 7) +#define STR_ObjNameSingulLINE (STR_ObjNameBegin + 8) +#define STR_ObjNameSingulLINE_Hori (STR_ObjNameBegin + 9) +#define STR_ObjNameSingulLINE_Vert (STR_ObjNameBegin + 10) +#define STR_ObjNameSingulLINE_Diag (STR_ObjNameBegin + 11) +#define STR_ObjNamePluralLINE (STR_ObjNameBegin + 12) +#define STR_ObjNameSingulRECT (STR_ObjNameBegin + 13) +#define STR_ObjNamePluralRECT (STR_ObjNameBegin + 14) +#define STR_ObjNameSingulQUAD (STR_ObjNameBegin + 15) +#define STR_ObjNamePluralQUAD (STR_ObjNameBegin + 16) +#define STR_ObjNameSingulPARAL (STR_ObjNameBegin + 17) +#define STR_ObjNamePluralPARAL (STR_ObjNameBegin + 18) +#define STR_ObjNameSingulRAUTE (STR_ObjNameBegin + 19) +#define STR_ObjNamePluralRAUTE (STR_ObjNameBegin + 20) +#define STR_ObjNameSingulRECTRND (STR_ObjNameBegin + 21) +#define STR_ObjNamePluralRECTRND (STR_ObjNameBegin + 22) +#define STR_ObjNameSingulQUADRND (STR_ObjNameBegin + 23) +#define STR_ObjNamePluralQUADRND (STR_ObjNameBegin + 24) +#define STR_ObjNameSingulPARALRND (STR_ObjNameBegin + 25) +#define STR_ObjNamePluralPARALRND (STR_ObjNameBegin + 26) +#define STR_ObjNameSingulRAUTERND (STR_ObjNameBegin + 27) +#define STR_ObjNamePluralRAUTERND (STR_ObjNameBegin + 28) +#define STR_ObjNameSingulCIRC (STR_ObjNameBegin + 29) +#define STR_ObjNamePluralCIRC (STR_ObjNameBegin + 30) +#define STR_ObjNameSingulSECT (STR_ObjNameBegin + 31) +#define STR_ObjNamePluralSECT (STR_ObjNameBegin + 32) +#define STR_ObjNameSingulCARC (STR_ObjNameBegin + 33) +#define STR_ObjNamePluralCARC (STR_ObjNameBegin + 34) +#define STR_ObjNameSingulCCUT (STR_ObjNameBegin + 35) +#define STR_ObjNamePluralCCUT (STR_ObjNameBegin + 36) +#define STR_ObjNameSingulCIRCE (STR_ObjNameBegin + 37) +#define STR_ObjNamePluralCIRCE (STR_ObjNameBegin + 38) +#define STR_ObjNameSingulSECTE (STR_ObjNameBegin + 39) +#define STR_ObjNamePluralSECTE (STR_ObjNameBegin + 40) +#define STR_ObjNameSingulCARCE (STR_ObjNameBegin + 41) +#define STR_ObjNamePluralCARCE (STR_ObjNameBegin + 42) +#define STR_ObjNameSingulCCUTE (STR_ObjNameBegin + 43) +#define STR_ObjNamePluralCCUTE (STR_ObjNameBegin + 44) +#define STR_ObjNameSingulPOLY (STR_ObjNameBegin + 45) +#define STR_ObjNameSingulPOLY_PntAnz (STR_ObjNameBegin + 46) +#define STR_ObjNamePluralPOLY (STR_ObjNameBegin + 47) +#define STR_ObjNameSingulPLIN (STR_ObjNameBegin + 48) +#define STR_ObjNameSingulPLIN_PntAnz (STR_ObjNameBegin + 49) +#define STR_ObjNamePluralPLIN (STR_ObjNameBegin + 50) +#define STR_ObjNameSingulPATHLINE (STR_ObjNameBegin + 51) +#define STR_ObjNamePluralPATHLINE (STR_ObjNameBegin + 52) +#define STR_ObjNameSingulPATHFILL (STR_ObjNameBegin + 53) +#define STR_ObjNamePluralPATHFILL (STR_ObjNameBegin + 54) +#define STR_ObjNameSingulFREELINE (STR_ObjNameBegin + 55) +#define STR_ObjNamePluralFREELINE (STR_ObjNameBegin + 56) +#define STR_ObjNameSingulFREEFILL (STR_ObjNameBegin + 57) +#define STR_ObjNamePluralFREEFILL (STR_ObjNameBegin + 58) +#define STR_ObjNameSingulCOMBLINE (STR_ObjNameBegin + 59) +#define STR_ObjNamePluralCOMBLINE (STR_ObjNameBegin + 60) +#define STR_ObjNameSingulCOMBFILL (STR_ObjNameBegin + 61) +#define STR_ObjNamePluralCOMBFILL (STR_ObjNameBegin + 62) +#define STR_ObjNameSingulNATSPLN (STR_ObjNameBegin + 63) +#define STR_ObjNamePluralNATSPLN (STR_ObjNameBegin + 64) +#define STR_ObjNameSingulPERSPLN (STR_ObjNameBegin + 65) +#define STR_ObjNamePluralPERSPLN (STR_ObjNameBegin + 66) +#define STR_ObjNameSingulTEXT (STR_ObjNameBegin + 67) +#define STR_ObjNamePluralTEXT (STR_ObjNameBegin + 68) +#define STR_ObjNameSingulTEXTLNK (STR_ObjNameBegin + 69) +#define STR_ObjNamePluralTEXTLNK (STR_ObjNameBegin + 70) +#define STR_ObjNameSingulFITTEXT (STR_ObjNameBegin + 71) +#define STR_ObjNamePluralFITTEXT (STR_ObjNameBegin + 72) +#define STR_ObjNameSingulFITALLTEXT (STR_ObjNameBegin + 73) +#define STR_ObjNamePluralFITALLTEXT (STR_ObjNameBegin + 74) +#define STR_ObjNameSingulTITLETEXT (STR_ObjNameBegin + 75) +#define STR_ObjNamePluralTITLETEXT (STR_ObjNameBegin + 76) +#define STR_ObjNameSingulOUTLINETEXT (STR_ObjNameBegin + 77) +#define STR_ObjNamePluralOUTLINETEXT (STR_ObjNameBegin + 78) +#define STR_ObjNameSingulGRAF (STR_ObjNameBegin + 79) +#define STR_ObjNamePluralGRAF (STR_ObjNameBegin + 80) +#define STR_ObjNameSingulGRAFLNK (STR_ObjNameBegin + 81) +#define STR_ObjNamePluralGRAFLNK (STR_ObjNameBegin + 82) +#define STR_ObjNameSingulGRAFNONE (STR_ObjNameBegin + 83) +#define STR_ObjNamePluralGRAFNONE (STR_ObjNameBegin + 84) +#define STR_ObjNameSingulGRAFNONELNK (STR_ObjNameBegin + 85) +#define STR_ObjNamePluralGRAFNONELNK (STR_ObjNameBegin + 86) +#define STR_ObjNameSingulGRAFMTF (STR_ObjNameBegin + 87) +#define STR_ObjNamePluralGRAFMTF (STR_ObjNameBegin + 88) +#define STR_ObjNameSingulGRAFMTFLNK (STR_ObjNameBegin + 89) +#define STR_ObjNamePluralGRAFMTFLNK (STR_ObjNameBegin + 90) +#define STR_ObjNameSingulGRAFBMP (STR_ObjNameBegin + 91) +#define STR_ObjNamePluralGRAFBMP (STR_ObjNameBegin + 92) +#define STR_ObjNameSingulGRAFBMPLNK (STR_ObjNameBegin + 93) +#define STR_ObjNamePluralGRAFBMPLNK (STR_ObjNameBegin + 94) +#define STR_ObjNameSingulGRAFMAC (STR_ObjNameBegin + 95) +#define STR_ObjNamePluralGRAFMAC (STR_ObjNameBegin + 96) +#define STR_ObjNameSingulGRAFMACLNK (STR_ObjNameBegin + 97) +#define STR_ObjNamePluralGRAFMACLNK (STR_ObjNameBegin + 98) +#define STR_ObjNameSingulOLE2 (STR_ObjNameBegin + 99) +#define STR_ObjNamePluralOLE2 (STR_ObjNameBegin +100) +#define STR_ObjNameSingulOLE2LNK (STR_ObjNameBegin +101) +#define STR_ObjNamePluralOLE2LNK (STR_ObjNameBegin +102) +#define STR_ObjOLE2NamePrefix (STR_ObjNameBegin +103) +#define STR_ObjNameSingulFrame (STR_ObjNameBegin +104) +#define STR_ObjNamePluralFrame (STR_ObjNameBegin +105) +#define STR_ObjFrameNamePrefix (STR_ObjNameBegin +106) +#define STR_ObjNameSingulEDGE (STR_ObjNameBegin +107) +#define STR_ObjNamePluralEDGE (STR_ObjNameBegin +108) +#define STR_ObjNameSingulCAPTION (STR_ObjNameBegin +109) +#define STR_ObjNamePluralCAPTION (STR_ObjNameBegin +110) +#define STR_ObjNameSingulPAGE (STR_ObjNameBegin +111) +#define STR_ObjNamePluralPAGE (STR_ObjNameBegin +112) +#define STR_ObjNameSingulMEASURE (STR_ObjNameBegin +113) +#define STR_ObjNamePluralMEASURE (STR_ObjNameBegin +114) +#define STR_ObjNamePlural (STR_ObjNameBegin +115) +#define STR_ObjNameNoObj (STR_ObjNameBegin +116) +#define STR_ObjNameAnd (STR_ObjNameBegin +117) +#define STR_ObjNameSingulPlural (STR_ObjNameBegin +118) +#define STR_ObjNameSingulUno (STR_ObjNameBegin +119) +#define STR_ObjNamePluralUno (STR_ObjNameBegin +120) + +// Neu ab 537: Namen fuer 3D-Objekte +#define STR_ObjNameSingulCube3d (STR_ObjNameBegin + 121) +#define STR_ObjNamePluralCube3d (STR_ObjNameBegin + 122) +#define STR_ObjNameSingulExtrude3d (STR_ObjNameBegin + 123) +#define STR_ObjNamePluralExtrude3d (STR_ObjNameBegin + 124) +#define STR_ObjNameSingulLabel3d (STR_ObjNameBegin + 125) +#define STR_ObjNamePluralLabel3d (STR_ObjNameBegin + 126) +#define STR_ObjNameSingulLathe3d (STR_ObjNameBegin + 127) +#define STR_ObjNamePluralLathe3d (STR_ObjNameBegin + 128) +#define STR_ObjNameSingulObj3d (STR_ObjNameBegin + 129) +#define STR_ObjNamePluralObj3d (STR_ObjNameBegin + 130) +//BFS01#define STR_ObjNameSingulPoly3d (STR_ObjNameBegin + 131) +#define STR_ObjNamePluralPoly3d (STR_ObjNameBegin + 132) +#define STR_ObjNameSingulScene3d (STR_ObjNameBegin + 133) +#define STR_ObjNamePluralScene3d (STR_ObjNameBegin + 134) +#define STR_ObjNameSingulSphere3d (STR_ObjNameBegin + 135) +#define STR_ObjNamePluralSphere3d (STR_ObjNameBegin + 136) + +#define STR_ObjNameSingulGRAFBMPTRANS (STR_ObjNameBegin + 137) +#define STR_ObjNameSingulGRAFBMPTRANSLNK (STR_ObjNameBegin + 138) + +#define STR_ObjNamePluralGRAFBMPTRANS (STR_ObjNameBegin + 139) +#define STR_ObjNamePluralGRAFBMPTRANSLNK (STR_ObjNameBegin + 140) + +#define STR_ObjNameSingulCUSTOMSHAPE (STR_ObjNameBegin + 141) +#define STR_ObjNamePluralCUSTOMSHAPE (STR_ObjNameBegin + 142) + +#define STR_ObjNameSingulMEDIA (STR_ObjNameBegin + 143) +#define STR_ObjNamePluralMEDIA (STR_ObjNameBegin + 144) + +#define STR_ObjNameEnd (STR_ObjNamePluralMEDIA) + +#define STR_EditBegin (STR_ObjNameEnd+1) +#define STR_EditWithCopy (STR_EditBegin + 0) +#define STR_EditPosSize (STR_EditBegin + 1) +#define STR_EditDelete (STR_EditBegin + 2) +#define STR_EditMovToTop (STR_EditBegin + 3) +#define STR_EditMovToBtm (STR_EditBegin + 4) +#define STR_EditPutToTop (STR_EditBegin + 5) +#define STR_EditPutToBtm (STR_EditBegin + 6) +#define STR_EditRevOrder (STR_EditBegin + 7) +#define STR_EditMove (STR_EditBegin + 8) +#define STR_EditResize (STR_EditBegin + 9) +#define STR_EditRotate (STR_EditBegin + 10) +#define STR_EditMirrorHori (STR_EditBegin + 11) +#define STR_EditMirrorVert (STR_EditBegin + 12) +#define STR_EditMirrorDiag (STR_EditBegin + 13) +#define STR_EditMirrorFree (STR_EditBegin + 14) +#define STR_EditShear (STR_EditBegin + 15) +#define STR_EditCrook (STR_EditBegin + 16) +#define STR_EditCrookContortion (STR_EditBegin + 17) +#define STR_EditDistort (STR_EditBegin + 18) +#define STR_EditRipUp (STR_EditBegin + 19) +#define STR_EditSetPointsSmooth (STR_EditBegin + 20) +#define STR_EditSetSegmentsKind (STR_EditBegin + 21) +#define STR_EditShut (STR_EditBegin + 22) +#define STR_EditSetGlueEscDir (STR_EditBegin + 23) +#define STR_EditSetGluePercent (STR_EditBegin + 24) +#define STR_EditSetGlueAlign (STR_EditBegin + 25) +#define STR_EditGroup (STR_EditBegin + 26) +#define STR_EditUngroup (STR_EditBegin + 27) +#define STR_EditSetAttributes (STR_EditBegin + 28) +#define STR_EditSetStylesheet (STR_EditBegin + 29) +#define STR_EditDelStylesheet (STR_EditBegin + 30) +#define STR_EditConvToPoly (STR_EditBegin + 31) +#define STR_EditConvToPolys (STR_EditBegin + 32) +#define STR_EditConvToCurve (STR_EditBegin + 33) +#define STR_EditConvToCurves (STR_EditBegin + 34) +#define STR_EditAlign (STR_EditBegin + 35) +#define STR_EditAlignVTop (STR_EditBegin + 36) +#define STR_EditAlignVBottom (STR_EditBegin + 37) +#define STR_EditAlignVCenter (STR_EditBegin + 38) +#define STR_EditAlignHLeft (STR_EditBegin + 39) +#define STR_EditAlignHRight (STR_EditBegin + 40) +#define STR_EditAlignHCenter (STR_EditBegin + 41) +#define STR_EditAlignCenter (STR_EditBegin + 42) +#define STR_EditTransform (STR_EditBegin + 43) +#define STR_EditCombine_PolyPoly (STR_EditBegin + 44) +#define STR_EditCombine_OnePoly (STR_EditBegin + 45) +#define STR_EditDismantle_Polys (STR_EditBegin + 46) +#define STR_EditDismantle_Lines (STR_EditBegin + 47) +#define STR_EditImportMtf (STR_EditBegin + 48) +#define STR_EditImportSGV (STR_EditBegin + 49) +#define STR_EditImportHPGL (STR_EditBegin + 50) +#define STR_EditImportDXF (STR_EditBegin + 51) +#define STR_EditConvToContour (STR_EditBegin + 52) +#define STR_EditConvToContours (STR_EditBegin + 53) +#define STR_EditMergeMergePoly (STR_EditBegin + 54) +#define STR_EditMergeSubstractPoly (STR_EditBegin + 55) +#define STR_EditMergeIntersectPoly (STR_EditBegin + 56) +#define STR_DistributeMarkedObjects (STR_EditBegin + 57) +#define STR_EditEnd (STR_DistributeMarkedObjects) + +#define STR_ExchangeBegin (STR_EditEnd+1) +#define STR_ExchangePaste (STR_ExchangeBegin +0) +#define STR_ExchangeClpCut (STR_ExchangeBegin +1) +#define STR_ExchangeClpPaste (STR_ExchangeBegin +2) +#define STR_ExchangeDD (STR_ExchangeBegin +3) +#define STR_ExchangeDDPaste (STR_ExchangeBegin +4) +#define STR_ExchangeEnd (STR_ExchangeDDPaste) + +#define STR_DragBegin (STR_ExchangeEnd+1) +#define STR_DragInsertPoint (STR_DragBegin + 0) +#define STR_DragInsertGluePoint (STR_DragBegin + 1) +#define STR_DragMethMovHdl (STR_DragBegin + 2) +#define STR_DragMethObjOwn (STR_DragBegin + 3) +#define STR_DragMethMove (STR_DragBegin + 4) +#define STR_DragMethResize (STR_DragBegin + 5) +#define STR_DragMethRotate (STR_DragBegin + 6) +#define STR_DragMethMirrorHori (STR_DragBegin + 7) +#define STR_DragMethMirrorVert (STR_DragBegin + 8) +#define STR_DragMethMirrorDiag (STR_DragBegin + 9) +#define STR_DragMethMirrorFree (STR_DragBegin +10) +#define STR_DragMethShear (STR_DragBegin +11) +#define STR_DragMethCrook (STR_DragBegin +12) +#define STR_DragMethCrookContortion (STR_DragBegin +13) +#define STR_DragMethDistort (STR_DragBegin +14) +#define STR_DragRectEckRad (STR_DragBegin +15) +#define STR_DragPathObj (STR_DragBegin +16) +#define STR_DragRectResize (STR_DragBegin +17) +#define STR_DragCaptFram (STR_DragBegin +18) +#define STR_DragCaptTail (STR_DragBegin +19) +#define STR_DragCircAngle (STR_DragBegin +20) +#define STR_DragEdgeTail (STR_DragBegin +21) +#define STR_DragMethGradient (STR_DragBegin +22) +#define STR_DragMethTransparence (STR_DragBegin +23) +#define STR_DragMethCrop (STR_DragBegin +24) +#define STR_DragEnd (STR_DragMethCrop) + +#define STR_ViewBegin (STR_DragEnd+1) +#define STR_ViewTextEdit (STR_ViewBegin + 0) +#define STR_ViewMarked (STR_ViewBegin + 1) +#define STR_ViewMarkedPoint (STR_ViewBegin + 2) +#define STR_ViewMarkedPoints (STR_ViewBegin + 3) +#define STR_ViewMarkedGluePoint (STR_ViewBegin + 4) +#define STR_ViewMarkedGluePoints (STR_ViewBegin + 5) +#define STR_ViewMarkObjs (STR_ViewBegin + 6) +#define STR_ViewMarkMoreObjs (STR_ViewBegin + 7) +#define STR_ViewMarkPoints (STR_ViewBegin + 8) +#define STR_ViewMarkMorePoints (STR_ViewBegin + 9) +#define STR_ViewMarkGluePoints (STR_ViewBegin +10) +#define STR_ViewMarkMoreGluePoints (STR_ViewBegin +11) +#define STR_ViewCreateObj (STR_ViewBegin +12) +#define STR_ViewEnd (STR_ViewCreateObj) + +#define STR_UndoBegin (STR_ViewEnd+1) +#define STR_UndoInsertObj (STR_UndoBegin + 0) +#define STR_UndoCopyObj (STR_UndoBegin + 1) +#define STR_UndoObjOrdNum (STR_UndoBegin + 2) +#define STR_UndoObjSetText (STR_UndoBegin + 3) + +#define STR_UndoNewPage (STR_UndoBegin + 4) +#define STR_UndoDelPage (STR_UndoBegin + 5) +#define STR_UndoCopPage (STR_UndoBegin + 6) +#define STR_UndoMovPage (STR_UndoBegin + 7) + +#define STR_UndoNewPageMasterDscr (STR_UndoBegin + 8) +#define STR_UndoDelPageMasterDscr (STR_UndoBegin + 9) +#define STR_UndoMovPageMasterDscr (STR_UndoBegin +10) +#define STR_UndoChgPageMasterDscr (STR_UndoBegin +11) + +#define STR_UndoMergeModel (STR_UndoBegin +12) + +#define STR_UndoNewLayer (STR_UndoBegin +13) +#define STR_UndoDelLayer (STR_UndoBegin +14) +#define STR_UndoMovLayer (STR_UndoBegin +15) + +// --> OD 2009-07-09 #i73249# +#define STR_UndoObjName (STR_UndoBegin +16) +#define STR_UndoObjTitle (STR_UndoBegin +17) +#define STR_UndoObjDescription (STR_UndoBegin +18) +// <-- +#define STR_UndoEnd (STR_UndoObjDescription) + + +#define STR_LayerBegin (STR_UndoEnd+1) +#define STR_StandardLayerName (STR_LayerBegin +0) +#define STR_LayerEnd (STR_StandardLayerName) + + +#define STR_ItemBegin (STR_LayerEnd+1) +#define STR_ItemValBegin (STR_ItemBegin) +#define STR_ItemValON (STR_ItemValBegin + 0) +#define STR_ItemValOFF (STR_ItemValBegin + 1) +#define STR_ItemValYES (STR_ItemValBegin + 2) +#define STR_ItemValNO (STR_ItemValBegin + 3) +#define STR_ItemValCAPTIONTYPE1 (STR_ItemValBegin + 4) +#define STR_ItemValCAPTIONTYPE2 (STR_ItemValBegin + 5) +#define STR_ItemValCAPTIONTYPE3 (STR_ItemValBegin + 6) +#define STR_ItemValCAPTIONTYPE4 (STR_ItemValBegin + 7) +#define STR_ItemValCAPTIONESCHORI (STR_ItemValBegin + 8) +#define STR_ItemValCAPTIONESCVERT (STR_ItemValBegin + 9) +#define STR_ItemValCAPTIONESCBESTFIT (STR_ItemValBegin + 10) +#define STR_ItemValFITTOSIZENONE (STR_ItemValBegin + 11) +#define STR_ItemValFITTOSIZEPROP (STR_ItemValBegin + 12) +#define STR_ItemValFITTOSIZEALLLINES (STR_ItemValBegin + 13) +#define STR_ItemValFITTOSIZERESIZEAT (STR_ItemValBegin + 14) +#define STR_ItemValTEXTVADJTOP (STR_ItemValBegin + 15) +#define STR_ItemValTEXTVADJCENTER (STR_ItemValBegin + 16) +#define STR_ItemValTEXTVADJBOTTOM (STR_ItemValBegin + 17) +#define STR_ItemValTEXTVADJBLOCK (STR_ItemValBegin + 18) +#define STR_ItemValTEXTVADJSTRETCH (STR_ItemValBegin + 19) +#define STR_ItemValTEXTHADJLEFT (STR_ItemValBegin + 20) +#define STR_ItemValTEXTHADJCENTER (STR_ItemValBegin + 21) +#define STR_ItemValTEXTHADJRIGHT (STR_ItemValBegin + 22) +#define STR_ItemValTEXTHADJBLOCK (STR_ItemValBegin + 23) +#define STR_ItemValTEXTHADJSTRETCH (STR_ItemValBegin + 24) +#define STR_ItemValTEXTANI_NONE (STR_ItemValBegin + 25) +#define STR_ItemValTEXTANI_BLINK (STR_ItemValBegin + 26) +#define STR_ItemValTEXTANI_SCROLL (STR_ItemValBegin + 27) +#define STR_ItemValTEXTANI_ALTERNATE (STR_ItemValBegin + 28) +#define STR_ItemValTEXTANI_SLIDE (STR_ItemValBegin + 29) +#define STR_ItemValTEXTANI_LEFT (STR_ItemValBegin + 30) +#define STR_ItemValTEXTANI_RIGHT (STR_ItemValBegin + 31) +#define STR_ItemValTEXTANI_UP (STR_ItemValBegin + 32) +#define STR_ItemValTEXTANI_DOWN (STR_ItemValBegin + 33) +#define STR_ItemValEDGE_ORTHOLINES (STR_ItemValBegin + 34) +#define STR_ItemValEDGE_THREELINES (STR_ItemValBegin + 35) +#define STR_ItemValEDGE_ONELINE (STR_ItemValBegin + 36) +#define STR_ItemValEDGE_BEZIER (STR_ItemValBegin + 37) +#define STR_ItemValMEASURE_STD (STR_ItemValBegin + 38) +#define STR_ItemValMEASURE_RADIUS (STR_ItemValBegin + 39) +#define STR_ItemValMEASURE_TEXTHAUTO (STR_ItemValBegin + 40) +#define STR_ItemValMEASURE_TEXTLEFTOUTSIDE (STR_ItemValBegin + 41) +#define STR_ItemValMEASURE_TEXTINSIDE (STR_ItemValBegin + 42) +#define STR_ItemValMEASURE_TEXTRIGHTOUTSID (STR_ItemValBegin + 43) +#define STR_ItemValMEASURE_TEXTVAUTO (STR_ItemValBegin + 44) +#define STR_ItemValMEASURE_ABOVE (STR_ItemValBegin + 45) +#define STR_ItemValMEASURETEXT_BREAKEDLINE (STR_ItemValBegin + 46) +#define STR_ItemValMEASURE_BELOW (STR_ItemValBegin + 47) +#define STR_ItemValMEASURETEXT_VERTICALCEN (STR_ItemValBegin + 48) +#define STR_ItemValCIRC_FULL (STR_ItemValBegin + 49) +#define STR_ItemValCIRC_SECT (STR_ItemValBegin + 50) +#define STR_ItemValCIRC_CUT (STR_ItemValBegin + 51) +#define STR_ItemValCIRC_ARC (STR_ItemValBegin + 52) +#define STR_ItemValEnd (STR_ItemValCIRC_ARC) + +#define STR_ItemNamBegin (STR_ItemValEnd+1) +#define STR_ItemNam_SHADOW (STR_ItemNamBegin + 0) +#define STR_ItemNam_SHADOWCOLOR (STR_ItemNamBegin + 1) +#define STR_ItemNam_SHADOWXDIST (STR_ItemNamBegin + 2) +#define STR_ItemNam_SHADOWYDIST (STR_ItemNamBegin + 3) +#define STR_ItemNam_SHADOWTRANSPARENCE (STR_ItemNamBegin + 4) +#define STR_ItemNam_SHADOW3D (STR_ItemNamBegin + 5) +#define STR_ItemNam_SHADOWPERSP (STR_ItemNamBegin + 6) +//BFS01#define STR_ItemNam_SHADOWRESERVE1 (STR_ItemNamBegin + 7) +//BFS01#define STR_ItemNam_SHADOWRESERVE2 (STR_ItemNamBegin + 8) +//BFS01#define STR_ItemNam_SHADOWRESERVE3 (STR_ItemNamBegin + 9) +//BFS01#define STR_ItemNam_SHADOWRESERVE4 (STR_ItemNamBegin + 10) +//BFS01#define STR_ItemNam_SHADOWRESERVE5 (STR_ItemNamBegin + 11) +//BFS01#define STR_ItemNamSET_SHADOW (STR_ItemNamBegin + 12) +#define STR_ItemNam_CAPTIONTYPE (STR_ItemNamBegin + 13) +#define STR_ItemNam_CAPTIONFIXEDANGLE (STR_ItemNamBegin + 14) +#define STR_ItemNam_CAPTIONANGLE (STR_ItemNamBegin + 15) +#define STR_ItemNam_CAPTIONGAP (STR_ItemNamBegin + 16) +#define STR_ItemNam_CAPTIONESCDIR (STR_ItemNamBegin + 17) +#define STR_ItemNam_CAPTIONESCISREL (STR_ItemNamBegin + 18) +#define STR_ItemNam_CAPTIONESCREL (STR_ItemNamBegin + 19) +#define STR_ItemNam_CAPTIONESCABS (STR_ItemNamBegin + 20) +#define STR_ItemNam_CAPTIONLINELEN (STR_ItemNamBegin + 21) +#define STR_ItemNam_CAPTIONFITLINELEN (STR_ItemNamBegin + 22) +//BFS01#define STR_ItemNam_CAPTIONRESERVE1 (STR_ItemNamBegin + 23) +//BFS01#define STR_ItemNam_CAPTIONRESERVE2 (STR_ItemNamBegin + 24) +//BFS01#define STR_ItemNam_CAPTIONRESERVE3 (STR_ItemNamBegin + 25) +//BFS01#define STR_ItemNam_CAPTIONRESERVE4 (STR_ItemNamBegin + 26) +//BFS01#define STR_ItemNam_CAPTIONRESERVE5 (STR_ItemNamBegin + 27) +//BFS01#define STR_ItemNamSET_CAPTION (STR_ItemNamBegin + 28) +//BFS01#define STR_ItemNamSET_OUTLINER (STR_ItemNamBegin + 29) + +#define STR_ItemNam_ECKENRADIUS (STR_ItemNamBegin + 30) +#define STR_ItemNam_TEXT_LEFTDIST (STR_ItemNamBegin + 31) +#define STR_ItemNam_TEXT_RIGHTDIST (STR_ItemNamBegin + 32) +#define STR_ItemNam_TEXT_UPPERDIST (STR_ItemNamBegin + 33) +#define STR_ItemNam_TEXT_LOWERDIST (STR_ItemNamBegin + 34) +#define STR_ItemNam_TEXT_AUTOGROWHEIGHT (STR_ItemNamBegin + 35) +#define STR_ItemNam_TEXT_MINFRAMEHEIGHT (STR_ItemNamBegin + 36) +#define STR_ItemNam_TEXT_MAXFRAMEHEIGHT (STR_ItemNamBegin + 37) +#define STR_ItemNam_TEXT_AUTOGROWWIDTH (STR_ItemNamBegin + 38) +#define STR_ItemNam_TEXT_MINFRAMEWIDTH (STR_ItemNamBegin + 39) +#define STR_ItemNam_TEXT_MAXFRAMEWIDTH (STR_ItemNamBegin + 40) +#define STR_ItemNam_TEXT_VERTADJUST (STR_ItemNamBegin + 41) +#define STR_ItemNam_TEXT_HORZADJUST (STR_ItemNamBegin + 42) +#define STR_ItemNam_TEXT_FITTOSIZE (STR_ItemNamBegin + 43) +#define STR_ItemNam_GRAFRED (STR_ItemNamBegin + 44) +#define STR_ItemNam_GRAFGREEN (STR_ItemNamBegin + 45) +#define STR_ItemNam_GRAFBLUE (STR_ItemNamBegin + 46) +#define STR_ItemNam_GRAFLUMINANCE (STR_ItemNamBegin + 47) +#define STR_ItemNam_GRAFCONTRAST (STR_ItemNamBegin + 48) +#define STR_ItemNam_GRAFGAMMA (STR_ItemNamBegin + 49) +#define STR_ItemNam_GRAFTRANSPARENCE (STR_ItemNamBegin + 50) +#define STR_ItemNam_GRAFINVERT (STR_ItemNamBegin + 51) +#define STR_ItemNam_GRAFMODE (STR_ItemNamBegin + 52) +#define STR_ItemNam_GRAFRESERVE2 (STR_ItemNamBegin + 53) +#define STR_ItemNam_GRAFRESERVE3 (STR_ItemNamBegin + 54) +#define STR_ItemNam_GRAFRESERVE4 (STR_ItemNamBegin + 55) +#define STR_ItemNam_GRAFRESERVE5 (STR_ItemNamBegin + 56) +#define STR_ItemNam_GRAFRESERVE6 (STR_ItemNamBegin + 57) +#define STR_ItemNam_RESERVE19 (STR_ItemNamBegin + 58) +#define STR_ItemNamSET_MISC (STR_ItemNamBegin + 59) +#define STR_ItemNam_OBJMOVEPROTECT (STR_ItemNamBegin + 60) +#define STR_ItemNam_OBJSIZEPROTECT (STR_ItemNamBegin + 61) +#define STR_ItemNam_OBJPRINTABLE (STR_ItemNamBegin + 62) +#define STR_ItemNam_LAYERID (STR_ItemNamBegin + 63) +#define STR_ItemNam_LAYERNAME (STR_ItemNamBegin + 64) +#define STR_ItemNam_OBJECTNAME (STR_ItemNamBegin + 65) +#define STR_ItemNam_STARTANGLE (STR_ItemNamBegin + 66) +#define STR_ItemNam_ENDANGLE (STR_ItemNamBegin + 67) +#define STR_ItemNam_POSITIONX (STR_ItemNamBegin + 68) +#define STR_ItemNam_POSITIONY (STR_ItemNamBegin + 69) +#define STR_ItemNam_SIZEWIDTH (STR_ItemNamBegin + 70) +#define STR_ItemNam_SIZEHEIGHT (STR_ItemNamBegin + 71) +#define STR_ItemNam_ROTATEANGLE (STR_ItemNamBegin + 72) +#define STR_ItemNam_SHEARANGLE (STR_ItemNamBegin + 73) +#define STR_ItemNamEnd (STR_ItemNam_SHEARANGLE) +#define STR_ItemEnd STR_ItemNamEnd + +// 64 Resource-Id's reserviert fuer kompatible Erweiterungen +//BFS06#define STR_SvDraw_CacheReserve_Begin (STR_ItemEnd+1) +//BFS06#define STR_SvDraw_CacheReserve_End (STR_SvDraw_CacheReserve_Begin+63) +//BFS06#define SDR_StringCacheEnd (STR_SvDraw_CacheReserve_Begin-1) + +//BFS06#define STR_ErrorBegin (STR_SvDraw_CacheReserve_End+1) +//BFS06#define STR_ErrorBegin (STR_ItemEnd+1) +//BFS06#define STR_SvDraw_ErrorReserve_Begin (STR_ErrorBegin + 2) +// hier ist Platz fuer 30 Eintraege +//BFS06#define STR_SvDraw_ErrorReserve_End (STR_SvDraw_ErrorReserve_Begin + 29) +//BFS06#define STR_ErrorEnd STR_SvDraw_ErrorReserve_End +//BFS06#define STR_ErrorEnd (STR_ErrorBegin + 2) + +// 22-05-98: 2 Eintraege fuer die Bitmaps von der StrErrorReserve abgeknapst +//BFS06#define BMAP_Begin (STR_ErrorEnd+1) +#define BMAP_Begin (STR_ItemEnd+1) +#define BMAP_GrafikEi (BMAP_Begin +0) +#define BMAP_GrafikDe (BMAP_Begin +1) +#define BMAP_End (BMAP_GrafikDe) + +// Strings fuer den Vorlagen-Dialog +#define SIP_Begin (BMAP_End) + +#define SIP_UNKNOWN_ATTR (SIP_Begin + 0) +#define SIP_XA_LINESTYLE (SIP_Begin + 1) +#define SIP_XA_LINEDASH (SIP_Begin + 2) +#define SIP_XA_LINEWIDTH (SIP_Begin + 3) +#define SIP_XA_LINECOLOR (SIP_Begin + 4) +#define SIP_XA_LINESTART (SIP_Begin + 5) +#define SIP_XA_LINEEND (SIP_Begin + 6) +#define SIP_XA_LINESTARTWIDTH (SIP_Begin + 7) +#define SIP_XA_LINEENDWIDTH (SIP_Begin + 8) +#define SIP_XA_LINESTARTCENTER (SIP_Begin + 9) +#define SIP_XA_LINEENDCENTER (SIP_Begin + 10) +#define SIP_XA_LINETRANSPARENCE (SIP_Begin + 11) +#define SIP_XA_LINEJOINT (SIP_Begin + 12) +#define SIP_XA_LINERESERVED2 (SIP_Begin + 13) +#define SIP_XA_LINERESERVED3 (SIP_Begin + 14) +#define SIP_XA_LINERESERVED4 (SIP_Begin + 15) +#define SIP_XA_LINERESERVED5 (SIP_Begin + 16) +#define SIP_XA_LINERESERVED_LAST (SIP_Begin + 17) +#define SIP_XATTRSET_LINE (SIP_Begin + 18) +#define SIP_XA_FILLSTYLE (SIP_Begin + 19) +#define SIP_XA_FILLCOLOR (SIP_Begin + 20) +#define SIP_XA_FILLGRADIENT (SIP_Begin + 21) +#define SIP_XA_FILLHATCH (SIP_Begin + 22) +#define SIP_XA_FILLBITMAP (SIP_Begin + 23) +#define SIP_XA_FILLTRANSPARENCE (SIP_Begin + 24) +#define SIP_XA_GRADIENTSTEPCOUNT (SIP_Begin + 25) +#define SIP_XA_FILLBMP_TILE (SIP_Begin + 26) +#define SIP_XA_FILLBMP_POS (SIP_Begin + 27) +#define SIP_XA_FILLBMP_SIZEX (SIP_Begin + 28) +#define SIP_XA_FILLBMP_SIZEY (SIP_Begin + 29) +#define SIP_XA_FILLFLOATTRANSPARENCE (SIP_Begin + 30) +#define SIP_XA_SECONDARYFILLCOLOR (SIP_Begin + 31) +#define SIP_XA_FILLBMP_SIZELOG (SIP_Begin + 32) +#define SIP_XA_FILLBMP_TILEOFFSETX (SIP_Begin + 33) +#define SIP_XA_FILLBMP_TILEOFFSETY (SIP_Begin + 34) +#define SIP_XA_FILLBMP_STRETCH (SIP_Begin + 35) +#define SIP_XA_FILLRESERVED3 (SIP_Begin + 36) +#define SIP_XA_FILLRESERVED4 (SIP_Begin + 37) +#define SIP_XA_FILLRESERVED5 (SIP_Begin + 38) +#define SIP_XA_FILLRESERVED6 (SIP_Begin + 39) +#define SIP_XA_FILLRESERVED7 (SIP_Begin + 40) +#define SIP_XA_FILLRESERVED8 (SIP_Begin + 41) +#define SIP_XA_FILLBMP_POSOFFSETX (SIP_Begin + 42) +#define SIP_XA_FILLBMP_POSOFFSETY (SIP_Begin + 43) +#define SIP_XA_FILLBACKGROUND (SIP_Begin + 44) +#define SIP_XA_FILLRESERVED10 (SIP_Begin + 45) +#define SIP_XA_FILLRESERVED11 (SIP_Begin + 46) +#define SIP_XA_FILLRESERVED_LAST (SIP_Begin + 47) +#define SIP_XATTRSET_FILL (SIP_Begin + 48) +#define SIP_XA_FORMTXTSTYLE (SIP_Begin + 49) +#define SIP_XA_FORMTXTADJUST (SIP_Begin + 50) +#define SIP_XA_FORMTXTDISTANCE (SIP_Begin + 51) +#define SIP_XA_FORMTXTSTART (SIP_Begin + 52) +#define SIP_XA_FORMTXTMIRROR (SIP_Begin + 53) +#define SIP_XA_FORMTXTOUTLINE (SIP_Begin + 54) +#define SIP_XA_FORMTXTSHADOW (SIP_Begin + 55) +#define SIP_XA_FORMTXTSHDWCOLOR (SIP_Begin + 56) +#define SIP_XA_FORMTXTSHDWXVAL (SIP_Begin + 57) +#define SIP_XA_FORMTXTSHDWYVAL (SIP_Begin + 58) +#define SIP_XA_FORMTXTSTDFORM (SIP_Begin + 59) +#define SIP_XA_FORMTXTHIDEFORM (SIP_Begin + 60) +#define SIP_XA_FORMTXTSHDWTRANSP (SIP_Begin + 61) +#define SIP_XA_FTRESERVED2 (SIP_Begin + 62) +#define SIP_XA_FTRESERVED3 (SIP_Begin + 63) +#define SIP_XA_FTRESERVED4 (SIP_Begin + 64) +#define SIP_XA_FTRESERVED5 (SIP_Begin + 65) +#define SIP_XA_FTRESERVED_LAST (SIP_Begin + 66) +//BFS01#define SIP_XATTRSET_TEXT (SIP_Begin + 67) +#define SIP_SA_SHADOW (SIP_Begin + 68) +#define SIP_SA_SHADOWCOLOR (SIP_Begin + 69) +#define SIP_SA_SHADOWXDIST (SIP_Begin + 70) +#define SIP_SA_SHADOWYDIST (SIP_Begin + 71) +#define SIP_SA_SHADOWTRANSPARENCE (SIP_Begin + 72) +#define SIP_SA_SHADOW3D (SIP_Begin + 73) +#define SIP_SA_SHADOWPERSP (SIP_Begin + 74) +//BFS01#define SIP_SA_SHADOWRESERVE1 (SIP_Begin + 75) +//BFS01#define SIP_SA_SHADOWRESERVE2 (SIP_Begin + 76) +//BFS01#define SIP_SA_SHADOWRESERVE3 (SIP_Begin + 77) +//BFS01#define SIP_SA_SHADOWRESERVE4 (SIP_Begin + 78) +//BFS01#define SIP_SA_SHADOWRESERVE5 (SIP_Begin + 79) +//BFS01#define SIP_SDRATTRSET_SHADOW (SIP_Begin + 80) +#define SIP_SA_CAPTIONTYPE (SIP_Begin + 81) +#define SIP_SA_CAPTIONFIXEDANGLE (SIP_Begin + 82) +#define SIP_SA_CAPTIONANGLE (SIP_Begin + 83) +#define SIP_SA_CAPTIONGAP (SIP_Begin + 84) +#define SIP_SA_CAPTIONESCDIR (SIP_Begin + 85) +#define SIP_SA_CAPTIONESCISREL (SIP_Begin + 86) +#define SIP_SA_CAPTIONESCREL (SIP_Begin + 87) +#define SIP_SA_CAPTIONESCABS (SIP_Begin + 88) +#define SIP_SA_CAPTIONLINELEN (SIP_Begin + 89) +#define SIP_SA_CAPTIONFITLINELEN (SIP_Begin + 90) +//BFS01#define SIP_SA_CAPTIONRESERVE1 (SIP_Begin + 91) +//BFS01#define SIP_SA_CAPTIONRESERVE2 (SIP_Begin + 92) +//BFS01#define SIP_SA_CAPTIONRESERVE3 (SIP_Begin + 93) +//BFS01#define SIP_SA_CAPTIONRESERVE4 (SIP_Begin + 94) +//BFS01#define SIP_SA_CAPTIONRESERVE5 (SIP_Begin + 95) +//BFS01#define SIP_SDRATTRSET_CAPTION (SIP_Begin + 96) +//BFS01#define SIP_SDRATTRSET_OUTLINER (SIP_Begin + 97) +#define SIP_SA_ECKENRADIUS (SIP_Begin + 98) +#define SIP_SA_TEXT_MINFRAMEHEIGHT (SIP_Begin + 99) +#define SIP_SA_TEXT_AUTOGROWHEIGHT (SIP_Begin + 100) +#define SIP_SA_TEXT_FITTOSIZE (SIP_Begin + 101) +#define SIP_SA_TEXT_LEFTDIST (SIP_Begin + 102) +#define SIP_SA_TEXT_RIGHTDIST (SIP_Begin + 103) +#define SIP_SA_TEXT_UPPERDIST (SIP_Begin + 104) +#define SIP_SA_TEXT_LOWERDIST (SIP_Begin + 105) +#define SIP_SA_TEXT_VERTADJUST (SIP_Begin + 106) +#define SIP_SA_TEXT_MAXFRAMEHEIGHT (SIP_Begin + 107) +#define SIP_SA_TEXT_MINFRAMEWIDTH (SIP_Begin + 108) +#define SIP_SA_TEXT_MAXFRAMEWIDTH (SIP_Begin + 109) +#define SIP_SA_TEXT_AUTOGROWWIDTH (SIP_Begin + 110) +#define SIP_SA_TEXT_HORZADJUST (SIP_Begin + 111) +#define SIP_SA_TEXT_ANIKIND (SIP_Begin + 112) +#define SIP_SA_TEXT_ANIDIRECTION (SIP_Begin + 113) +#define SIP_SA_TEXT_ANISTARTINSIDE (SIP_Begin + 114) +#define SIP_SA_TEXT_ANISTOPINSIDE (SIP_Begin + 115) +#define SIP_SA_TEXT_ANICOUNT (SIP_Begin + 116) +#define SIP_SA_TEXT_ANIDELAY (SIP_Begin + 117) +#define SIP_SA_TEXT_ANIAMOUNT (SIP_Begin + 118) +#define SIP_SA_TEXT_CONTOURFRAME (SIP_Begin + 119) +#define SIP_SA_CUSTOMSHAPE_ADJUSTMENT (SIP_Begin + 120) +#define SIP_SA_XMLATTRIBUTES (SIP_Begin + 121) +#define SIP_SA_TEXT_USEFIXEDCELLHEIGHT (SIP_Begin + 122) +#define SIP_SA_WORDWRAP (SIP_Begin + 123) +#define SIP_SA_AUTOGROWSIZE (SIP_Begin + 124) +#define SIP_SA_RESERVE18 (SIP_Begin + 125) +#define SIP_SA_RESERVE19 (SIP_Begin + 126) +//BFS01#define SIP_SDRATTRSET_MISC (SIP_Begin + 127) +#define SIP_SA_EDGEKIND (SIP_Begin + 128) +#define SIP_SA_EDGENODE1HORZDIST (SIP_Begin + 129) +#define SIP_SA_EDGENODE1VERTDIST (SIP_Begin + 130) +#define SIP_SA_EDGENODE2HORZDIST (SIP_Begin + 131) +#define SIP_SA_EDGENODE2VERTDIST (SIP_Begin + 132) +#define SIP_SA_EDGENODE1GLUEDIST (SIP_Begin + 133) +#define SIP_SA_EDGENODE2GLUEDIST (SIP_Begin + 134) +#define SIP_SA_EDGELINEDELTAANZ (SIP_Begin + 135) +#define SIP_SA_EDGELINE1DELTA (SIP_Begin + 136) +#define SIP_SA_EDGELINE2DELTA (SIP_Begin + 137) +#define SIP_SA_EDGELINE3DELTA (SIP_Begin + 138) +//BFS01#define SIP_SA_EDGERESERVE02 (SIP_Begin + 139) +//BFS01#define SIP_SA_EDGERESERVE03 (SIP_Begin + 140) +//BFS01#define SIP_SA_EDGERESERVE04 (SIP_Begin + 141) +//BFS01#define SIP_SA_EDGERESERVE05 (SIP_Begin + 142) +//BFS01#define SIP_SA_EDGERESERVE06 (SIP_Begin + 143) +//BFS01#define SIP_SA_EDGERESERVE07 (SIP_Begin + 144) +//BFS01#define SIP_SA_EDGERESERVE08 (SIP_Begin + 145) +//BFS01#define SIP_SA_EDGERESERVE09 (SIP_Begin + 146) +//BFS01#define SIP_SDRATTRSET_EDGE (SIP_Begin + 147) +#define SIP_SA_MEASUREKIND (SIP_Begin + 148) +#define SIP_SA_MEASURETEXTHPOS (SIP_Begin + 149) +#define SIP_SA_MEASURETEXTVPOS (SIP_Begin + 150) +#define SIP_SA_MEASURELINEDIST (SIP_Begin + 151) +#define SIP_SA_MEASUREHELPLINEOVERHANG (SIP_Begin + 152) +#define SIP_SA_MEASUREHELPLINEDIST (SIP_Begin + 153) +#define SIP_SA_MEASUREHELPLINE1LEN (SIP_Begin + 154) +#define SIP_SA_MEASUREHELPLINE2LEN (SIP_Begin + 155) +#define SIP_SA_MEASUREBELOWREFEDGE (SIP_Begin + 156) +#define SIP_SA_MEASURETEXTROTA90 (SIP_Begin + 157) +#define SIP_SA_MEASURETEXTUPSIDEDOWN (SIP_Begin + 158) +#define SIP_SA_MEASUREOVERHANG (SIP_Begin + 159) +#define SIP_SA_MEASUREUNIT (SIP_Begin + 160) +#define SIP_SA_MEASURESCALE (SIP_Begin + 161) +#define SIP_SA_MEASURESHOWUNIT (SIP_Begin + 162) +#define SIP_SA_MEASUREFORMATSTRING (SIP_Begin + 163) +#define SIP_SA_MEASURETEXTAUTOANGLE (SIP_Begin + 164) +#define SIP_SA_MEASURETEXTAUTOANGLEVIEW (SIP_Begin + 165) +#define SIP_SA_MEASURETEXTISFIXEDANGLE (SIP_Begin + 166) +#define SIP_SA_MEASURETEXTFIXEDANGLE (SIP_Begin + 167) +#define SIP_SA_MEASUREDECIMALPLACES (SIP_Begin + 168) +#define SIP_SA_MEASURERESERVE05 (SIP_Begin + 169) +#define SIP_SA_MEASURERESERVE06 (SIP_Begin + 170) +#define SIP_SA_MEASURERESERVE07 (SIP_Begin + 171) +//BFS01#define SIP_SDRATTRSET_MEASURE (SIP_Begin + 172) +#define SIP_SA_CIRCKIND (SIP_Begin + 173) +#define SIP_SA_CIRCSTARTANGLE (SIP_Begin + 174) +#define SIP_SA_CIRCENDANGLE (SIP_Begin + 175) +#define SIP_SA_CIRCRESERVE0 (SIP_Begin + 176) +#define SIP_SA_CIRCRESERVE1 (SIP_Begin + 177) +#define SIP_SA_CIRCRESERVE2 (SIP_Begin + 178) +#define SIP_SA_CIRCRESERVE3 (SIP_Begin + 179) +//BFS01#define SIP_SDRATTRSET_CIRC (SIP_Begin + 180) +#define SIP_SA_OBJMOVEPROTECT (SIP_Begin + 181) +#define SIP_SA_OBJSIZEPROTECT (SIP_Begin + 182) +#define SIP_SA_OBJPRINTABLE (SIP_Begin + 183) +#define SIP_SA_LAYERID (SIP_Begin + 184) +#define SIP_SA_LAYERNAME (SIP_Begin + 185) +#define SIP_SA_OBJECTNAME (SIP_Begin + 186) +#define SIP_SA_ALLPOSITIONX (SIP_Begin + 187) +#define SIP_SA_ALLPOSITIONY (SIP_Begin + 188) +#define SIP_SA_ALLSIZEWIDTH (SIP_Begin + 189) +#define SIP_SA_ALLSIZEHEIGHT (SIP_Begin + 190) +#define SIP_SA_ONEPOSITIONX (SIP_Begin + 191) +#define SIP_SA_ONEPOSITIONY (SIP_Begin + 192) +#define SIP_SA_ONESIZEWIDTH (SIP_Begin + 193) +#define SIP_SA_ONESIZEHEIGHT (SIP_Begin + 194) +#define SIP_SA_LOGICSIZEWIDTH (SIP_Begin + 195) +#define SIP_SA_LOGICSIZEHEIGHT (SIP_Begin + 196) +#define SIP_SA_ROTATEANGLE (SIP_Begin + 197) +#define SIP_SA_SHEARANGLE (SIP_Begin + 198) +#define SIP_SA_MOVEX (SIP_Begin + 199) +#define SIP_SA_MOVEY (SIP_Begin + 200) +#define SIP_SA_RESIZEXONE (SIP_Begin + 201) +#define SIP_SA_RESIZEYONE (SIP_Begin + 202) +#define SIP_SA_ROTATEONE (SIP_Begin + 203) +#define SIP_SA_HORZSHEARONE (SIP_Begin + 204) +#define SIP_SA_VERTSHEARONE (SIP_Begin + 205) +#define SIP_SA_RESIZEXALL (SIP_Begin + 206) +#define SIP_SA_RESIZEYALL (SIP_Begin + 207) +#define SIP_SA_ROTATEALL (SIP_Begin + 208) +#define SIP_SA_HORZSHEARALL (SIP_Begin + 209) +#define SIP_SA_VERTSHEARALL (SIP_Begin + 210) +#define SIP_SA_TRANSFORMREF1X (SIP_Begin + 211) +#define SIP_SA_TRANSFORMREF1Y (SIP_Begin + 212) +#define SIP_SA_TRANSFORMREF2X (SIP_Begin + 213) +#define SIP_SA_TRANSFORMREF2Y (SIP_Begin + 214) +#define SIP_EE_PARA_HYPHENATE (SIP_Begin + 215) +#define SIP_EE_PARA_BULLETSTATE (SIP_Begin + 216) +#define SIP_EE_PARA_OUTLLRSPACE (SIP_Begin + 217) +#define SIP_EE_PARA_OUTLLEVEL (SIP_Begin + 218) +#define SIP_EE_PARA_BULLET (SIP_Begin + 219) +#define SIP_EE_PARA_LRSPACE (SIP_Begin + 220) +#define SIP_EE_PARA_ULSPACE (SIP_Begin + 221) +#define SIP_EE_PARA_SBL (SIP_Begin + 222) +#define SIP_EE_PARA_JUST (SIP_Begin + 223) +#define SIP_EE_PARA_TABS (SIP_Begin + 224) +#define SIP_EE_CHAR_COLOR (SIP_Begin + 225) +#define SIP_EE_CHAR_FONTINFO (SIP_Begin + 226) +#define SIP_EE_CHAR_FONTHEIGHT (SIP_Begin + 227) +#define SIP_EE_CHAR_FONTWIDTH (SIP_Begin + 228) +#define SIP_EE_CHAR_WEIGHT (SIP_Begin + 229) +#define SIP_EE_CHAR_UNDERLINE (SIP_Begin + 230) +#define SIP_EE_CHAR_OVERLINE (SIP_Begin + 231) +#define SIP_EE_CHAR_STRIKEOUT (SIP_Begin + 232) +#define SIP_EE_CHAR_ITALIC (SIP_Begin + 233) +#define SIP_EE_CHAR_OUTLINE (SIP_Begin + 234) +#define SIP_EE_CHAR_SHADOW (SIP_Begin + 235) +#define SIP_EE_CHAR_ESCAPEMENT (SIP_Begin + 236) +#define SIP_EE_CHAR_PAIRKERNING (SIP_Begin + 237) +#define SIP_EE_CHAR_KERNING (SIP_Begin + 238) +#define SIP_EE_CHAR_WLM (SIP_Begin + 239) +#define SIP_EE_FEATURE_TAB (SIP_Begin + 240) +#define SIP_EE_FEATURE_LINEBR (SIP_Begin + 241) +#define SIP_EE_FEATURE_NOTCONV (SIP_Begin + 242) +#define SIP_EE_FEATURE_FIELD (SIP_Begin + 243) + +#define SIP_SA_GRAFRED (SIP_Begin + 244) +#define SIP_SA_GRAFGREEN (SIP_Begin + 245) +#define SIP_SA_GRAFBLUE (SIP_Begin + 246) +#define SIP_SA_GRAFLUMINANCE (SIP_Begin + 247) +#define SIP_SA_GRAFCONTRAST (SIP_Begin + 248) +#define SIP_SA_GRAFGAMMA (SIP_Begin + 249) +#define SIP_SA_GRAFTRANSPARENCE (SIP_Begin + 250) +#define SIP_SA_GRAFINVERT (SIP_Begin + 251) +#define SIP_SA_GRAFMODE (SIP_Begin + 252) +#define SIP_SA_GRAFCROP (SIP_Begin + 253) +#define SIP_SA_GRAFRESERVE3 (SIP_Begin + 254) +#define SIP_SA_GRAFRESERVE4 (SIP_Begin + 255) +#define SIP_SA_GRAFRESERVE5 (SIP_Begin + 256) +#define SIP_SA_GRAFRESERVE6 (SIP_Begin + 257) +//BFS01#define SIP_SDRATTRSET_GRAF (SIP_Begin + 258) + +#define SIP_SA_MARKERS (SIP_Begin + 258) +#define SIP_SA_FINE_MARKERS (SIP_Begin + 260) + +// #100499# +#define BMP_SVXOLEOBJ (SIP_Begin + 261) + +// #101928# +#define SIP_SA_ACCESSIBILITY_MARKERS (SIP_Begin + 262) + +#define STR_TABLE_ATTR (SIP_Begin + 263) +#define STR_TABLE_AUTOFMT (SIP_Begin + 264) +#define STR_TABLE_INSCOL (SIP_Begin + 265) +#define STR_TABLE_INSROW (SIP_Begin + 266) +#define STR_UNDO_COL_DELETE (SIP_Begin + 267) +#define STR_UNDO_ROW_DELETE (SIP_Begin + 268) +#define STR_TABLE_SPLIT (SIP_Begin + 269) +#define STR_TABLE_MERGE (SIP_Begin + 270) +#define STR_TABLE_NUMFORMAT (SIP_Begin + 271) +#define STR_TABLE_DISTRIBUTE_ROWS (SIP_Begin + 272) +#define STR_TABLE_DISTRIBUTE_COLUMNS (SIP_Begin + 273) +#define STR_TABLE_STYLE (SIP_Begin + 274) +#define STR_TABLE_STYLE_SETTINGS (SIP_Begin + 275) +#define SIP_SA_CROP_MARKERS (SIP_Begin + 276) +#define SIP_SA_CROP_FINE_MARKERS (SIP_Begin + 277) +#define SIP_SA_ACCESSIBILITY_CROP_MARKERS (SIP_Begin + 278) + +#define SIP_End (SIP_SA_ACCESSIBILITY_CROP_MARKERS) + +#define SDR_ResourceEnd (SIP_End) + +//////////////////////////////////////////////////////////////////////////////////////////////////// + diff --git a/svx/inc/svdviter.hxx b/svx/inc/svdviter.hxx new file mode 100644 index 000000000000..16ab018dc851 --- /dev/null +++ b/svx/inc/svdviter.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdviter.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDVITER_HXX +#define _SVDVITER_HXX + +#include <tools/solar.h> +#include <sal/types.h> +#include "svx/svxdllapi.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class OutputDevice; +class Window; +class SdrView; +class SdrPageView; +class SdrModel; +class SdrPage; +class SdrObject; +class SetOfByte; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrViewIter +{ + const SdrModel* mpModel; + const SdrPage* mpPage; + const SdrObject* mpObject; + SdrView* mpAktView; + + sal_uInt32 mnListenerNum; + sal_uInt32 mnPageViewNum; + sal_uInt32 mnOutDevNum; + + // bitfield + unsigned mbNoMasterPage : 1; + +private: + SVX_DLLPRIVATE void ImpInitVars(); + SVX_DLLPRIVATE SdrView* ImpFindView(); + SVX_DLLPRIVATE SdrPageView* ImpFindPageView(); + SVX_DLLPRIVATE OutputDevice* ImpFindOutDev(); + SVX_DLLPRIVATE Window* ImpFindWindow(); + SVX_DLLPRIVATE sal_Bool ImpCheckPageView(SdrPageView* pPV) const; + +public: + SdrViewIter(const SdrModel* pModel); + SdrViewIter(const SdrPage* pPage, sal_Bool bNoMasterPage = sal_False); + SdrViewIter(const SdrObject* pObject, sal_Bool bNoMasterPage = sal_False); + + SdrView* FirstView(); + SdrView* NextView(); + + SdrPageView* FirstPageView(); + SdrPageView* NextPageView(); + + OutputDevice* FirstOutDev(); + OutputDevice* NextOutDev(); + + Window* FirstWindow(); + Window* NextWindow(); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef _JUST_DESCRIPTION + +Mit dieser Klasse kann man rausbekommen: +- SdrView* First/NextView() + - Alle Views in denen ein Models dargestellt wird + - Alle Views in denen eine bestimme Page sichtbar ist (ww. auch als MasterPage) + - Alle Views in denen ein bestimmes Objekt sichtbar ist (ww. auch auf MasterPage) +- SdrPageView* First/NextPageView() + - Alle PageViews in denen ein Models dargestellt wird + - Alle PageViews in denen eine bestimme Page sichtbar ist (ww. auch als MasterPage) + - Alle PageViews in denen ein bestimmes Objekt sichtbar ist (ww. auch auf MasterPage) +- OutputDevice* First/NextOutDev() + - Alle OutputDevices in denen ein Models dargestellt wird + - Alle OutputDevices in denen eine bestimme Page sichtbar ist (ww. auch als MasterPage) + - Alle OutputDevices in denen ein bestimmes Objekt sichtbar ist (ww. auch auf MasterPage) +- Window* First/NextWindow() + - Alle Windows in denen ein Models dargestellt wird + - Alle Windows in denen eine bestimme Page sichtbar ist (auch als MasterPage) + - Alle Windows in denen ein bestimmes Objekt sichtbar ist (auch auf MasterPage) +Ob die Auswahl auf ein(e) bestimmte(s) Page/Objekt beschraenkt wird, bestimmt man +durch die Wahl des Konstruktors. + +Es werden u.a. auch berueksichtigt: +- Layer Sichtbarkeitsstatus +- Visible Layer von MasterPages +- Mehrfachlayer bei Gruppenobjekten + +Es wird nicht berueksichtigt: +- Ob die Pages/Objekte wirklich schon gepaintet wurden oder noch ein Invalidate ansteht, ... +- Ob die Pages/Objekte in einem Window im sichtbaren Bereich liegen + +#endif // _JUST_DESCRIPTION + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDVITER_HXX + diff --git a/svx/inc/svimbase.hxx b/svx/inc/svimbase.hxx new file mode 100644 index 000000000000..ab7c5d6556d0 --- /dev/null +++ b/svx/inc/svimbase.hxx @@ -0,0 +1,219 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svimbase.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVIMBASE_HXX +#define _SVIMBASE_HXX + +#include <vcl/bitmap.hxx> +#include <vcl/salbtype.hxx> + + +// ----------- +// - Defines - +// ----------- + +#ifdef WIN +#define _SVHUGE huge +#else +#define _SVHUGE +#endif + +// ---------------- +// - SimDepthType - +// ---------------- + +enum SimDepthType +{ + SIM_DEPTH_1, + SIM_DEPTH_4, + SIM_DEPTH_8, + SIM_DEPTH_24 +}; + +// ------------ +// - SimColor - +// ------------ + +struct SimColor +{ + BYTE cBlue; + BYTE cGreen; + BYTE cRed; +}; + +// ------------------------------------------------------------------------ + +inline BOOL operator==( const SimColor& rCol1, const SimColor& rCol2 ) +{ + return ( ( rCol1.cRed == rCol2.cRed ) && + ( rCol1.cGreen == rCol2.cGreen ) && + ( rCol1.cBlue == rCol2.cBlue ) ); +} + +// -------------- +// - SimPalette - +// -------------- + +struct SimPalette +{ + ULONG nColors; + SimColor aColorArray[ 256 ]; +}; + +// --------------- +// - SvImageBase - +// --------------- + +class SfxViewFrame; +class SfxProgress; + +class SvImageBase +{ +private: + + Bitmap aOutBitmap; + HPBYTE pArray1; + HPBYTE pArray2; + HPBYTE pArray3; + HPBYTE pArray4; + HPBYTE pOrgArray; + HPBYTE pDestArray; + SimPalette* pPal1; + SimPalette* pPal2; + SimPalette* pPal3; + SimPalette* pPal4; + ULONG nWidth1; + ULONG nWidth2; + ULONG nWidth3; + ULONG nWidth4; + ULONG nHeight1; + ULONG nHeight2; + ULONG nHeight3; + ULONG nHeight4; + ULONG nAlignedWidth1; + ULONG nAlignedWidth2; + ULONG nAlignedWidth3; + ULONG nAlignedWidth4; + ULONG nWhichOrg; + SimDepthType eOrgDepth; + SimDepthType eUndoDepth; + SimDepthType eRedoDepth; + BOOL bIsUndo; + BOOL bIsRedo; + BOOL bCreateUndo; + BOOL bValid; + BOOL bDitherAll; + + HPBYTE BitmapToArray24( const Bitmap& rBitmap, ULONG* pWidth, + ULONG* pHeight, ULONG* pAlignedWidth, + SfxViewFrame *pFrame = NULL ); + BOOL Array24ToBitmap( HPBYTE pArray, Bitmap &rBitmap, + const ULONG nWidth, const ULONG nHeight, + const ULONG nColorCount = 256, + ULONG nLast = 0, SfxProgress* pProgress = NULL ); + + Bitmap CreateSaveBitmap( const SimDepthType eDepth, SfxViewFrame *pFrame = NULL ); + + HPBYTE CreateArray24( ULONG nWidth, ULONG nHeight ); + void DeleteArray( HPBYTE pArray ); + + SvImageBase(const SvImageBase& rSvImageBase); + const SvImageBase& operator=(const SvImageBase& rSvImageBase); + +public: + + SvImageBase(); + SvImageBase( const Bitmap& rBitmap, + const ULONG nColorCount = 256, + ULONG nLast = 0, SfxProgress* pProgress = NULL ); + ~SvImageBase(); + + BOOL IsValid() { return bValid; } + + ULONG GetOrgWidth() const { return nWhichOrg == 1 ? nWidth1 : nWidth2; } + ULONG GetDestWidth() const { return nWhichOrg == 1 ? nWidth2 : nWidth1; } + + ULONG GetOrgHeight() const { return nWhichOrg == 1 ? nHeight1 : nHeight2; } + ULONG GetDestHeight() const { return nWhichOrg == 1 ? nHeight2 : nHeight1; } + + ULONG GetOrgAlignedWidth() const { return nWhichOrg == 1 ? nAlignedWidth1 : nAlignedWidth2; } + ULONG GetDestAlignedWidth() const { return nWhichOrg == 1 ? nAlignedWidth2 : nAlignedWidth1; } + + ULONG GetOrgAlignedSize() const { return GetOrgAlignedWidth() * GetOrgHeight(); } + ULONG GetDestAlignedSize() const { return GetDestAlignedWidth() * GetDestHeight(); } + + // Farbtiefe des Ausgangsbildes ermitteln und setzen + SimDepthType GetDepth() const { return eOrgDepth; } + void SetDepth( const SimDepthType eDepth ) { eOrgDepth = eDepth; } + + // Farbtiefen nach Undo und Redo ermitteln und setzen + SimDepthType GetUndoDepth() const { return eUndoDepth; } + void SetUndoDepth(const SimDepthType eDepth) { eUndoDepth = eDepth; } + + SimDepthType GetRedoDepth() const { return eRedoDepth; } + void SetRedoDepth(const SimDepthType eDepth) { eRedoDepth = eDepth; } + + // Vor- und Ruecklauf der Bildverarbeitung + BOOL BeginProcessing( BOOL bUndo = TRUE ); + void EndProcessing(); + + BOOL BeginProcessingExt(ULONG nWidth, ULONG nHeight, BOOL bUndo = TRUE); + void EndProcessingExt() { EndProcessing(); } + + // Zeiger auf Arrays zur Verfuegung stellen + HPBYTE GetOrgPointer() { return pOrgArray; } + HPBYTE GetDestPointer() { return pDestArray; } + + // DIB-Erzeugung fuer Anzeige + BOOL CreateOutBitmap( const ULONG nColorCount = 256, ULONG nLast = 0, + SfxProgress* pProgress = NULL ); + + // Undo-Verwaltung + BOOL DoUndo( SfxProgress* pProgress = NULL ); + BOOL DoRedo( SfxProgress* pProgress = NULL ); + + // DIB-Rueckgabe fuer Anzeige + const Bitmap& GetOutBitmap() const; + + // DIB-Rueckgabe fuer Speicherung + Bitmap GetSaveBitmap(); + + // Palette besorgen + SimPalette* GetOrgPalette() const { return nWhichOrg == 1 ? pPal1 : pPal2; } + SimPalette* GetDestPalette() const { return nWhichOrg == 1 ? pPal2 : pPal1; } +}; + +// ---------------- +// - DitherBitmap - +// ---------------- + +BOOL DitherBitmap( Bitmap& rBitmap, BOOL bDitherAlways = FALSE ); + +#endif // _SVIMBASE_HXX diff --git a/svx/inc/svx/AccessibleComponentBase.hxx b/svx/inc/svx/AccessibleComponentBase.hxx new file mode 100644 index 000000000000..b58e651edc49 --- /dev/null +++ b/svx/inc/svx/AccessibleComponentBase.hxx @@ -0,0 +1,150 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleComponentBase.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_EXTENDED_COMPONENT_BASE_HXX +#define _SVX_ACCESSIBILITY_ACCESSIBLE_EXTENDED_COMPONENT_BASE_HXX + + +#include <com/sun/star/accessibility/XAccessible.hpp> +#include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp> +#include <com/sun/star/awt/XFocusListener.hpp> +#include "svx/svxdllapi.h" + +namespace accessibility { + +/** @descr + This base class provides (will provice) a base implementation of the + <type>XAccessibleComponent</type> and the + <type>XAccessibleExtendedComponent</type> for all shapes. For + more detailed documentation about the methods refer to the interface + descriptions of <type>XAccessible</type>, + <type>XAccessibleContext</type>, <type>XInterface</type>, + <type>XServiceInfo</type>, and <type>XTypeProvider</type>. +*/ +class SVX_DLLPUBLIC AccessibleComponentBase + : public ::com::sun::star::accessibility::XAccessibleExtendedComponent +{ +public: + //===== internal ======================================================== + AccessibleComponentBase (void); + virtual ~AccessibleComponentBase (void); + + + //===== XAccessibleComponent ================================================ + + /** The default implementation uses the result of + <member>getBounds</member> to determine whether the given point lies + inside this object. + */ + virtual sal_Bool SAL_CALL containsPoint ( + const ::com::sun::star::awt::Point& aPoint) + throw (::com::sun::star::uno::RuntimeException); + + /** The default implementation returns an empty reference. + */ + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible > SAL_CALL + getAccessibleAtPoint ( + const ::com::sun::star::awt::Point& aPoint) + throw (::com::sun::star::uno::RuntimeException); + + /** The default implementation returns an empty rectangle. + */ + virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds (void) + throw (::com::sun::star::uno::RuntimeException); + + /** The default implementation uses the result of + <member>getBounds</member> to determine the location. + */ + virtual ::com::sun::star::awt::Point SAL_CALL getLocation (void) + throw (::com::sun::star::uno::RuntimeException); + + /** The default implementation returns an empty position, i.e. the + * result of the default constructor of <type>com::sun::star::awt::Point</type>. + */ + virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen (void) + throw (::com::sun::star::uno::RuntimeException); + + /** The default implementation uses the result of + <member>getBounds</member> to determine the size. + */ + virtual ::com::sun::star::awt::Size SAL_CALL getSize (void) + throw (::com::sun::star::uno::RuntimeException); + + /** The default implementation ignores this call. + */ + virtual void SAL_CALL addFocusListener ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XFocusListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + + /** The default implementation ignores this call. + */ + virtual void SAL_CALL removeFocusListener (const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XFocusListener >& xListener ) + throw (::com::sun::star::uno::RuntimeException); + + /** The default implementation does nothing. + */ + virtual void SAL_CALL grabFocus (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Returns black as the default foreground color. + */ + virtual sal_Int32 SAL_CALL getForeground (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Returns white as the default background color. + */ + virtual sal_Int32 SAL_CALL getBackground (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== XAccessibleExtendedComponent ==================================== + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL + getFont (void) + throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getTitledBorderText (void) + throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getToolTipText (void) + throw (::com::sun::star::uno::RuntimeException); + + + //===== XTypeProvider =================================================== + + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL + getTypes (void) + throw (::com::sun::star::uno::RuntimeException); + +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/AccessibleContextBase.hxx b/svx/inc/svx/AccessibleContextBase.hxx new file mode 100644 index 000000000000..009c9b4fa619 --- /dev/null +++ b/svx/inc/svx/AccessibleContextBase.hxx @@ -0,0 +1,405 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleContextBase.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_CONTEXT_BASE_HXX +#define _SVX_ACCESSIBILITY_ACCESSIBLE_CONTEXT_BASE_HXX + +#include <svx/ChildrenManager.hxx> +#include <com/sun/star/accessibility/XAccessible.hpp> +#include <com/sun/star/accessibility/XAccessibleContext.hpp> +#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp> +#include <com/sun/star/accessibility/XAccessibleStateSet.hpp> +#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp> +#include <com/sun/star/accessibility/AccessibleEventObject.hpp> +#include <com/sun/star/accessibility/AccessibleEventId.hpp> +#ifndef _COM_SUN_STAR_ACCESSIBILITY_IllegalAccessibleComponentStateException_HPP_ +#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp> +#endif +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/lang/XComponent.hpp> +#include <cppuhelper/weak.hxx> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/lang/IndexOutOfBoundsException.hpp> +#include <com/sun/star/lang/DisposedException.hpp> +#include <osl/mutex.hxx> +#include <cppuhelper/compbase4.hxx> +#include "svx/svxdllapi.h" + + +namespace accessibility { + +struct MutexOwner {mutable ::osl::Mutex maMutex;}; + +/** @descr + This base class provides an implementation of the + <type>AccessibleContext</type> service. Appart from the + <type>XXAccessible<type> and <type>XAccessibleContextContext</type> + interfaces it supports the <type>XServiceInfo</type> interface. +*/ +class SVX_DLLPUBLIC AccessibleContextBase + : public MutexOwner, + public cppu::WeakComponentImplHelper4< + ::com::sun::star::accessibility::XAccessible, + ::com::sun::star::accessibility::XAccessibleContext, + ::com::sun::star::accessibility::XAccessibleEventBroadcaster, + ::com::sun::star::lang::XServiceInfo + > +{ +public: + + //===== internal ======================================================== + + /** The origin of the accessible name or description. + */ + enum StringOrigin { + ManuallySet, + FromShape, + AutomaticallyCreated, + NotSet + }; + + AccessibleContextBase ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible>& rxParent, + const sal_Int16 aRole); + virtual ~AccessibleContextBase (void); + + + /** Call all accessiblity event listeners to inform them about the + specified event. + @param aEventId + Id of the event type. + @param rNewValue + New value of the modified attribute. Pass empty structure if + not applicable. + @param rOldValue + Old value of the modified attribute. Pass empty structure if + not applicable. + */ + void CommitChange (sal_Int16 aEventId, + const ::com::sun::star::uno::Any& rNewValue, + const ::com::sun::star::uno::Any& rOldValue); + + /** Set a new description and, provided that the new name differs from + the old one, broadcast an accessibility event. + @param rsDescription + The new description. + @param eDescriptionOrigin + The origin of the description. This is used to determine + whether the given description overrules the existing one. An + origin with a lower numerical value overrides one with a higher + value. + */ + void SetAccessibleDescription ( + const ::rtl::OUString& rsDescription, + StringOrigin eDescriptionOrigin) + throw (::com::sun::star::uno::RuntimeException); + + /** Set a new description and, provided that the new name differs from + the old one, broadcast an accessibility event. + @param rsName + The new name. + @param eNameOrigin + The origin of the name. This is used to determine whether the + given name overrules the existing one. An origin with a lower + numerical value overrides one with a higher value. + */ + void SetAccessibleName ( + const ::rtl::OUString& rsName, + StringOrigin eNameOrigin) + throw (::com::sun::star::uno::RuntimeException); + + /** Set the specified state (turn it on) and send events to all + listeners to inform them of the change. + + @param aState + The state to turn on. + + @return + If the specified state changed its value due to this call + <TRUE/> is returned, otherwise <FALSE/>. + */ + virtual sal_Bool SetState (sal_Int16 aState); + + /** Reset the specified state (turn it off) and send events to all + listeners to inform them of the change. + + @param aState + The state to turn off. + + @return + If the specified state changed its value due to this call + <TRUE/> is returned, otherwise <FALSE/>. + */ + virtual sal_Bool ResetState (sal_Int16 aState); + + /** Return the state of the specified state. + + @param aState + The state for which to return its value. + + @return + A value of <TRUE/> indicates that the state is set. A <FALSE/> + value indicates an unset state. + */ + sal_Bool GetState (sal_Int16 aState); + + /** Replace the current relation set with the specified one. Send + events for relations that are not in both sets. + + @param rRelationSet + The new relation set that replaces the old one. + */ + virtual void SetRelationSet ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleRelationSet>& rxRelationSet) + throw (::com::sun::star::uno::RuntimeException); + + + //===== XAccessible ===================================================== + + /// Return the XAccessibleContext. + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL + getAccessibleContext (void) throw (::com::sun::star::uno::RuntimeException); + + + //===== XAccessibleContext ============================================== + + /// Return the number of currently visible children. + virtual sal_Int32 SAL_CALL + getAccessibleChildCount (void) throw (::com::sun::star::uno::RuntimeException); + + /// Return the specified child or throw exception. + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL + getAccessibleChild (sal_Int32 nIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + /// Return a reference to the parent. + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL + getAccessibleParent (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return this objects index among the parents children. + virtual sal_Int32 SAL_CALL + getAccessibleIndexInParent (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return this object's role. + virtual sal_Int16 SAL_CALL + getAccessibleRole (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return this object's description. + virtual ::rtl::OUString SAL_CALL + getAccessibleDescription (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return the object's current name. + virtual ::rtl::OUString SAL_CALL + getAccessibleName (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return NULL to indicate that an empty relation set. + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL + getAccessibleRelationSet (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return the set of current states. + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL + getAccessibleStateSet (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Return the parents locale or throw exception if this object has no + parent yet/anymore. + */ + virtual ::com::sun::star::lang::Locale SAL_CALL + getLocale (void) + throw (::com::sun::star::uno::RuntimeException, + ::com::sun::star::accessibility::IllegalAccessibleComponentStateException); + + //===== XComponent ======================================================== + + using WeakComponentImplHelperBase::addEventListener; + using WeakComponentImplHelperBase::removeEventListener; + + //===== XAccessibleEventBroadcaster ======================================== + + virtual void SAL_CALL + addEventListener ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + removeEventListener ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) + throw (::com::sun::star::uno::RuntimeException); + + + //===== XServiceInfo ==================================================== + + /** Returns an identifier for the implementation of this object. + */ + virtual ::rtl::OUString SAL_CALL + getImplementationName (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Return whether the specified service is supported by this class. + */ + virtual sal_Bool SAL_CALL + supportsService (const ::rtl::OUString& sServiceName) + throw (::com::sun::star::uno::RuntimeException); + + /** Returns a list of all supported services. In this case that is just + the AccessibleContext service. + */ + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL + getSupportedServiceNames (void) + throw (::com::sun::star::uno::RuntimeException); + + + //===== XTypeProvider =================================================== + + /** Returns a sequence of all supported interfaces. + */ + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL + getTypes (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Returns a implementation id. + */ + virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL + getImplementationId (void) + throw (::com::sun::star::uno::RuntimeException); + +protected: + /** The state set. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleStateSet> mxStateSet; + + /** The relation set. Relations can be set or removed by calling the + <member>AddRelation</member> and <member>RemoveRelation</member> methods. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleRelationSet> mxRelationSet; + + // This method is called from the component helper base class while disposing. + virtual void SAL_CALL disposing (void); + + /** Create the accessible object's name. This method may be called more + than once for a single object. + @return + The returned string is a unique (among the accessible object's + siblings) name. + */ + virtual ::rtl::OUString CreateAccessibleName (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Create the accessible object's descriptive string. May be called + more than once. + @return + Descriptive string. Not necessarily unique. + */ + virtual ::rtl::OUString + CreateAccessibleDescription (void) + throw (::com::sun::star::uno::RuntimeException); + + void FireEvent (const ::com::sun::star::accessibility::AccessibleEventObject& aEvent); + + /** Check whether or not the object has been disposed (or is in the + state of beeing disposed). If that is the case then + DisposedException is thrown to inform the (indirect) caller of the + foul deed. + */ + void ThrowIfDisposed (void) + throw (::com::sun::star::lang::DisposedException); + + /** Check whether or not the object has been disposed (or is in the + state of beeing disposed). + + @return sal_True, if the object is disposed or in the course + of being disposed. Otherwise, sal_False is returned. + */ + sal_Bool IsDisposed (void); + + /** sets the role as returned by XaccessibleContext::getAccessibleRole + + <p>Caution: This is only to be used in the construction phase (means within + the ctor or late ctor), <em>never</em> when the object is still alive and part + of an Accessibility hierarchy.</p> + */ + void SetAccessibleRole( sal_Int16 _nRole ); + +private: + /// Reference to the parent object. + ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible> mxParent; + + /** Description of this object. This is not a constant because it can + be set from the outside. Furthermore, it changes according the the + draw page's display mode. + */ + ::rtl::OUString msDescription; + + /** The origin of the description is used to determine whether new + descriptions given to the SetAccessibleDescription is ignored or + whether that replaces the old value in msDescription. + */ + StringOrigin meDescriptionOrigin; + + /** Name of this object. It changes according the the draw page's + display mode. + */ + ::rtl::OUString msName; + + /** The origin of the name is used to determine whether new + name given to the SetAccessibleName is ignored or + whether that replaces the old value in msName. + */ + StringOrigin meNameOrigin; + + /** client id in the AccessibleEventNotifier queue + */ + sal_uInt32 mnClientId; + + /** This is the role of this object. + */ + sal_Int16 maRole; +}; + +} + +#endif diff --git a/svx/inc/svx/AccessibleControlShape.hxx b/svx/inc/svx/AccessibleControlShape.hxx new file mode 100644 index 000000000000..82a56aafb2bf --- /dev/null +++ b/svx/inc/svx/AccessibleControlShape.hxx @@ -0,0 +1,219 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleControlShape.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_CONTROL_SHAPE_HXX +#define _SVX_ACCESSIBILITY_ACCESSIBLE_CONTROL_SHAPE_HXX + +#include <svx/AccessibleShape.hxx> + +#include <com/sun/star/accessibility/XAccessibleAction.hpp> +#include <com/sun/star/accessibility/XAccessibleEventListener.hpp> +#include <com/sun/star/util/XModeChangeBroadcaster.hpp> +#include <com/sun/star/container/XContainerListener.hpp> +#include <cppuhelper/implbase3.hxx> +#include <comphelper/uno3.hxx> + +namespace com { namespace sun { namespace star { namespace awt { + class XControl; +} } } } + +namespace comphelper +{ + class OWrappedAccessibleChildrenManager; +} + +class SdrObject; +namespace accessibility { + + typedef ::cppu::ImplHelper4 < ::com::sun::star::beans::XPropertyChangeListener + , ::com::sun::star::util::XModeChangeListener + , ::com::sun::star::container::XContainerListener + , ::com::sun::star::accessibility::XAccessibleEventListener + > AccessibleControlShape_Base; +/** @descr +*/ +class AccessibleControlShape + :public AccessibleShape + ,public AccessibleControlShape_Base +{ +public: + //===== internal ======================================================== + AccessibleControlShape( + const AccessibleShapeInfo& rShapeInfo, + const AccessibleShapeTreeInfo& rShapeTreeInfo); + virtual ~AccessibleControlShape( ); + +protected: + //--- XAccessible ---------------------------------------- + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext( ) throw(::com::sun::star::uno::RuntimeException); + + //--- XAccessibleComponent ------------------------------- + /// forward the focus to the contained control(in alive mode) + virtual void SAL_CALL grabFocus( ) throw(::com::sun::star::uno::RuntimeException); + + //--- XAccessibleContext --------------------------------- + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException); + + //--- XServiceInfo --------------------------------------- + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + + //--- XInterface ----------------------------------------- + DECLARE_XINTERFACE( ) + + //--- XTypeProvider -------------------------------------- + DECLARE_XTYPEPROVIDER( ) + + //--- XPropertyChangeListener ---------------------------- + virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException); + + //--- XComponent ----------------------------------------- + virtual void SAL_CALL disposing( ); + + //--- XEventListener ------------------------------------- + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); + + //--- XModeChangeListener -------------------------------- + virtual void SAL_CALL modeChanged( const ::com::sun::star::util::ModeChangeEvent& _rSource ) throw(::com::sun::star::uno::RuntimeException); + + //--- XAccessibleEventListener ---------------------------- + virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); + + //--- document::XEventListener ---------------------------- + using AccessibleShape::notifyEvent; + + // XVclContainerListener + virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + +protected: + /** Initialize a new shape. See the documentation of the base' constructor + for the reason of this method's existence. + */ + virtual void Init( ); + + /// Create a name string that contains the accessible name. + virtual ::rtl::OUString + CreateAccessibleBaseName( ) + throw(::com::sun::star::uno::RuntimeException); + + /** Create a unique name string that contains the accessible name. The + name consists of the base name and the index. + */ + virtual ::rtl::OUString + CreateAccessibleName( ) + throw(::com::sun::star::uno::RuntimeException); + + /// Create a description string that contains the accessible description. + virtual ::rtl::OUString + CreateAccessibleDescription( ) + throw(::com::sun::star::uno::RuntimeException); + +#ifdef DBG_UTIL + /// Set the specified state + virtual sal_Bool SetState( sal_Int16 _nState ); +#endif // DBG_UTIL + + /// (safely) reads the given property from the model of the UNO control + ::rtl::OUString getControlModelStringProperty( const ::rtl::OUString& _rPropertyName ) const SAL_THROW(( )); + + /// ensure that our control model exists(will be retrieved upon need only) + sal_Bool ensureControlModelAccess( ) SAL_THROW(( )); + + /// ensures that we're listening for the given property if(and only if!) necessary + sal_Bool ensureListeningState( const sal_Bool _bCurrentlyListening, const sal_Bool _bNeedNewListening, + const ::rtl::OUString& _rPropertyName ); + + /// starts multiplexing the state changes of our aggregate context + void startStateMultiplexing( ); + /// stops multiplexing the state changes of our aggregate context + void stopStateMultiplexing( ); + + /// retrieves the SdrObject of the shape we represent + SdrObject* getSdrObject( ) const; + + /** adjusts our AccessibleRole, depending on the control type we're working for + + <p>Only to be called during inituialization</p> + */ + void adjustAccessibleRole( ); + + /** initializes composed states of the context + + <p>Some of the states of our inner context need to be propagated to the "composed context", too + (such as "checked" for check boxes). At lifetime, this is done by multiplexing state changes, + at initialization time, this method is used.</p> + */ + void initializeComposedState( ); + +private: + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > + m_xControlModel; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + m_xModelPropsMeta; // cache this for performance reasons + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > + m_xUnoControl; // our UNO control + + ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessibleContext > + m_aControlContext; // the AccessibleContext of the control + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > + m_xControlContextProxy; // the proxy for "aggregating" the AccessibleContext of the control + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider > + m_xControlContextTypeAccess; // cached interface of our aggregate + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > + m_xControlContextComponent; // cached interface of our aggregate + + ::comphelper::OWrappedAccessibleChildrenManager* + m_pChildManager; + + sal_Bool m_bListeningForName : 1; // are we currently listening for changes of the "Name" property? + sal_Bool m_bListeningForDesc : 1; // are we currently listening for changes of the "HelpText" property? + sal_Bool m_bMultiplexingStates : 1; // are we currently multiplexing state changes of the native context? + sal_Bool m_bDisposeNativeContext : 1; // do we need to dispose mxNativeContextComponent? + sal_Bool m_bWaitingForControl : 1; // if we are created before our control exists, we need to wait for it to appear ... + +private: + /** Don't use the default constructor. Use the public constructor that + takes the original shape and the parent as arguments instead. + */ + AccessibleControlShape( ); + + /// Don't use the constructor. not implemented. + AccessibleControlShape(const AccessibleControlShape&); + + /// Don't use the assignment operator. not implemented. + AccessibleControlShape& operator= (const AccessibleControlShape&); +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/AccessibleGraphicShape.hxx b/svx/inc/svx/AccessibleGraphicShape.hxx new file mode 100644 index 000000000000..69508126206d --- /dev/null +++ b/svx/inc/svx/AccessibleGraphicShape.hxx @@ -0,0 +1,126 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleGraphicShape.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_GRAPHIC_SHAPE_HXX +#define _SVX_ACCESSIBILITY_ACCESSIBLE_GRAPHIC_SHAPE_HXX + +#include <svx/AccessibleShape.hxx> +#include <com/sun/star/accessibility/XAccessibleImage.hpp> +#include "svx/svxdllapi.h" + +namespace accessibility { + +/** @descr + This class makes graphic shapes accessible. With respect to its + base class <type>AccessibleShape</type> it supports the additional + <type>XAccessibleImage</type> interface. +*/ +class SVX_DLLPUBLIC AccessibleGraphicShape + : public AccessibleShape, + public ::com::sun::star::accessibility::XAccessibleImage +{ +public: + //===== internal ======================================================== + AccessibleGraphicShape ( + const AccessibleShapeInfo& rShapeInfo, + const AccessibleShapeTreeInfo& rShapeTreeInfo); + + virtual ~AccessibleGraphicShape (void); + + //===== XAccessibleImage ================================================ + + ::rtl::OUString SAL_CALL getAccessibleImageDescription (void) + throw (::com::sun::star::uno::RuntimeException); + + sal_Int32 SAL_CALL getAccessibleImageHeight (void) + throw (::com::sun::star::uno::RuntimeException); + + sal_Int32 SAL_CALL getAccessibleImageWidth (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== XInterface ====================================================== + + virtual com::sun::star::uno::Any SAL_CALL + queryInterface (const com::sun::star::uno::Type & rType) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + acquire (void) + throw (); + + virtual void SAL_CALL + release (void) + throw (); + + //===== XServiceInfo ==================================================== + + /** Returns an identifier for the implementation of this object. + */ + virtual ::rtl::OUString SAL_CALL + getImplementationName (void) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL + getSupportedServiceNames (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== XTypeProvider =================================================== + + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL + getTypes (void) + throw (::com::sun::star::uno::RuntimeException); + +protected: + /// Create a name string that contains the accessible name. + virtual ::rtl::OUString + CreateAccessibleBaseName () + throw (::com::sun::star::uno::RuntimeException); + + /// Create a description string that contains the accessible description. + virtual ::rtl::OUString + CreateAccessibleDescription () + throw (::com::sun::star::uno::RuntimeException); + +private: + /** Don't use the default constructor. Use the public constructor that + takes the original shape and the parent as arguments instead. + */ + SVX_DLLPRIVATE AccessibleGraphicShape (void); + + /// Don't use the constructor. Not yet implemented. + SVX_DLLPRIVATE AccessibleGraphicShape (const AccessibleGraphicShape&); + + /// Don't use the assignment operator. Not yet implemented. + SVX_DLLPRIVATE AccessibleGraphicShape& operator= (const AccessibleGraphicShape&); +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/AccessibleOLEShape.hxx b/svx/inc/svx/AccessibleOLEShape.hxx new file mode 100644 index 000000000000..c0dc76239baf --- /dev/null +++ b/svx/inc/svx/AccessibleOLEShape.hxx @@ -0,0 +1,136 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleOLEShape.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_OLE_SHAPE_HXX +#define _SVX_ACCESSIBILITY_ACCESSIBLE_OLE_SHAPE_HXX + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_MANAGER_HXX +#include <svx/AccessibleShape.hxx> +#endif + +#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_ACTION_HPP_ +#include <com/sun/star/accessibility/XAccessibleAction.hpp> +#endif +#include "svx/svxdllapi.h" + +namespace accessibility { + +/** @descr + This class makes OLE objects accessible. With respect to its + base class <type>AccessibleShape</type> it supports the additional + <type>XAccessibleAction</type> interface. +*/ +class SVX_DLLPUBLIC AccessibleOLEShape + : public AccessibleShape, + public ::com::sun::star::accessibility::XAccessibleAction +{ +public: + //===== internal ======================================================== + AccessibleOLEShape ( + const AccessibleShapeInfo& rShapeInfo, + const AccessibleShapeTreeInfo& rShapeTreeInfo); + virtual ~AccessibleOLEShape (void); + + //===== XAccessibleAction =============================================== + + sal_Int32 SAL_CALL getAccessibleActionCount (void) + throw (::com::sun::star::uno::RuntimeException); + + sal_Bool SAL_CALL doAccessibleAction (sal_Int32 nIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::uno::RuntimeException); + + ::rtl::OUString SAL_CALL getAccessibleActionDescription (sal_Int32 nIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::uno::RuntimeException); + + ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleKeyBinding> SAL_CALL getAccessibleActionKeyBinding ( + sal_Int32 nIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::uno::RuntimeException); + + //===== XInterface ====================================================== + + virtual com::sun::star::uno::Any SAL_CALL + queryInterface (const com::sun::star::uno::Type & rType) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + acquire (void) + throw (); + + virtual void SAL_CALL + release (void) + throw (); + + //===== XServiceInfo ==================================================== + + virtual ::rtl::OUString SAL_CALL + getImplementationName (void) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL + getSupportedServiceNames (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== XTypeProvider =================================================== + + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL + getTypes (void) + throw (::com::sun::star::uno::RuntimeException); + +protected: + /// Create a name string that contains the accessible name. + virtual ::rtl::OUString + CreateAccessibleBaseName () + throw (::com::sun::star::uno::RuntimeException); + + /// Create a description string that contains the accessible description. + virtual ::rtl::OUString + CreateAccessibleDescription () + throw (::com::sun::star::uno::RuntimeException); + +private: + /** Don't use the default constructor. Use the public constructor that + takes the original shape and the parent as arguments instead. + */ + SVX_DLLPRIVATE AccessibleOLEShape (void); + + /// Don't use the constructor. Not yet implemented. + SVX_DLLPRIVATE AccessibleOLEShape (const AccessibleOLEShape&); + + /// Don't use the assignment operator. Not yet implemented. + SVX_DLLPRIVATE AccessibleOLEShape& operator= (const AccessibleOLEShape&); +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/AccessibleShape.hxx b/svx/inc/svx/AccessibleShape.hxx new file mode 100755 index 000000000000..018737934c74 --- /dev/null +++ b/svx/inc/svx/AccessibleShape.hxx @@ -0,0 +1,411 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleShape.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_HXX +#define _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_HXX + +#include <svx/AccessibleContextBase.hxx> +#include <svx/AccessibleComponentBase.hxx> +#include <svx/IAccessibleViewForwarderListener.hxx> +#include <com/sun/star/accessibility/XAccessible.hpp> +#include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp> +#include <com/sun/star/accessibility/AccessibleRole.hpp> +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/lang/XEventListener.hpp> +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <svx/AccessibleTextHelper.hxx> +#include "svx/svxdllapi.h" + +class SdrObject; + +namespace accessibility { + +class AccessibleShapeInfo; +class AccessibleShapeTreeInfo; +class IAccessibleParent; + +/** This base class provides a base implementation for all shapes. For more + detailed documentation about the methods refer to the descriptions of + the implemented interfaces. These are, among others, + <type>XAccessible</type>, <type>XAccessibleContext</type>, + <type>XAccessibleComponent</type> and + <type>XAccessibleExtendedComponent</type>. + + <p>The children of a shape can stem from two sources which, in case of + SVX and SD shapes, are mutually exclusive. This implementation, + however, handles both simultaniously to cope with future extensions or + shapes from other projects. + <ul> + <li>If this shape is a group shape, i.e. a + <type>SvxShapeGroup</type> or a <type>Svx3DSceneObject</type>, it + can have nested shapes.</li> + <li>If this shape is a descendant from <type>SvxShapeText</type> + then the text paragraphs are its children.</li> + </ul> + </p> + + <p>Accessible shapes do not listen for disposing() calls of the UNO + shapes they make accessible. This is the task of their owner, usually a + container, who can then call dispose() at the accessible object.</p> +*/ +class SVX_DLLPUBLIC AccessibleShape + : public AccessibleContextBase, + public AccessibleComponentBase, + public IAccessibleViewForwarderListener, + public ::com::sun::star::document::XEventListener, + public ::com::sun::star::lang::XUnoTunnel +{ +public: + //===== internal ======================================================== + + /** Create a new accessible object that makes the given shape accessible. + @param rShapeInfo + This object contains all information specific to the new + accessible shape. That are e.g. the shape to be made accessible + and the accessible object that will become the parent of the new + object. + @param rShapeTreeInfo + Bundel of information passed to this shape and all of its desendants. + @attention + Always call the <member>init</member> method after creating a + new accessible shape. This is one way to overcome the potential + problem of registering the new object with e.g. event + broadcasters. That would delete the new object if a broadcaster + would not keep a strong reference to the new object. + */ + AccessibleShape ( + const AccessibleShapeInfo& rShapeInfo, + const AccessibleShapeTreeInfo& rShapeTreeInfo); + + /** The destructor releases its children manager and text engine if + still existent. These are responsible to send appropriate events. + */ + virtual ~AccessibleShape (void); + + /** Initialize a new shape. See the documentation of the constructor + for the reason of this method's existence. + */ + virtual void Init (void); + + /** Compare two accessible shapes using object identity + @param rShape + This is the second operand. + @return + Returns true if both shapes are the same object. + */ + virtual bool operator== (const AccessibleShape& rShape); + + /** Set the specified state. If the state is <const>FOCUSED</const> + then, additionally to the inherited functionality, the focus + listeners registered with the <type>XAccessibleComponent</type> + interface are called (if that state really changes). + + @param aState + The state to turn on. + + @return + The returned flag indicates whether the specified state has been + changed (<TRUE/>), i.e. it has formerly not been set. + */ + virtual sal_Bool SetState (sal_Int16 aState); + + /** Reset the specified state. If the state is <const>FOCUSED</const> + then, additionally to the inherited functionality, the focus + listeners registered with the <type>XAccessibleComponent</type> + interface are called (if that state really changes). + + @param aState + The state to turn off. + + @return + The returned flag indicates whether the specified state has been + changed (<TRUE/>), i.e. it has formerly been set. + */ + virtual sal_Bool ResetState (sal_Int16 aState); + + /** Return the state of the specified state. Take the + <const>FOCUSED</const> state from the accessible edit engine. + + @param aState + The state for which to return its value. + @return + A value of <TRUE/> indicates that the state is set. A <FALSE/> + value indicates an unset state or the inability to access the + entity that manages the state set. + + */ + sal_Bool GetState (sal_Int16 aState); + + + //===== XAccessibleContext ============================================== + + /// Return the number of currently visible children. + virtual sal_Int32 SAL_CALL + getAccessibleChildCount (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Return the specified child. + @param nIndex + Index of the requested child. + @return + Reference of the requested child which is the accessible object + of a visible shape. + @raises IndexOutOfBoundsException + Throws an exception if the index is not valid. + */ + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible> SAL_CALL + getAccessibleChild (sal_Int32 nIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + + /// Return the set of current states. + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL + getAccessibleStateSet (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Return this objects index among the parents children. + virtual sal_Int32 SAL_CALL + getAccessibleIndexInParent (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== XAccessibleComponent ============================================ + + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible > SAL_CALL + getAccessibleAtPoint (const ::com::sun::star::awt::Point& aPoint) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds (void) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::awt::Point SAL_CALL getLocation (void) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen (void) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::awt::Size SAL_CALL getSize (void) + throw (::com::sun::star::uno::RuntimeException); + + virtual sal_Int32 SAL_CALL getForeground (void) + throw (::com::sun::star::uno::RuntimeException); + + virtual sal_Int32 SAL_CALL getBackground (void) + throw (::com::sun::star::uno::RuntimeException); + + + + //===== XComponent ======================================================== + + using WeakComponentImplHelperBase::addEventListener; + using WeakComponentImplHelperBase::removeEventListener; + + //===== XAccessibleEventBroadcaster ===================================== + + /** This call is forwarded to a) the base class and b) to the + accessible edit engine if it is present. + + @param rxListener + This listener is informed about accessibility events. + */ + virtual void SAL_CALL + addEventListener ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleEventListener >& rxListener) + throw (::com::sun::star::uno::RuntimeException); + + /** This call is forwarded to a) the base class and b) to the + accessible edit engine if it is present. + + @param rxListener + This listener will not be informed about accessibility events + anymore. + */ + virtual void SAL_CALL + removeEventListener ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleEventListener >& rxListener) + throw (::com::sun::star::uno::RuntimeException); + + + //===== XInterface ====================================================== + + virtual com::sun::star::uno::Any SAL_CALL + queryInterface (const com::sun::star::uno::Type & rType) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL + acquire (void) + throw (); + + virtual void SAL_CALL + release (void) + throw (); + + + //===== XServiceInfo ==================================================== + + /** Returns an identifier for the implementation of this object. + */ + virtual ::rtl::OUString SAL_CALL + getImplementationName (void) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL + getSupportedServiceNames (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== XTypeProvider =================================================== + + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL + getTypes (void) + throw (::com::sun::star::uno::RuntimeException); + + //===== IAccessibleViewForwarderListener ================================ + virtual void ViewForwarderChanged (ChangeType aChangeType, + const IAccessibleViewForwarder* pViewForwarder); + + //===== lang::XEventListener ============================================ + + /** Listen for disposing events of the model. The accessible shape + remains functional when this happens. + */ + virtual void SAL_CALL + disposing (const ::com::sun::star::lang::EventObject& Source) + throw (::com::sun::star::uno::RuntimeException); + + //===== document::XEventListener ======================================== + + virtual void SAL_CALL + notifyEvent (const ::com::sun::star::document::EventObject& rEventObject) + throw (::com::sun::star::uno::RuntimeException); + + + //===== XUnoTunnel ======================================================== + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId() throw(); + static AccessibleShape* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxIFace ) throw(); + sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException); + + //===== Misc ======================================================== + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + GetXShape(); + + /** set the index _nIndex at the accessible shape + @param _nIndex + The new index in parent. + */ + inline void setIndexInParent(sal_Int32 _nIndex) { m_nIndexInParent = _nIndex; } + +protected: + /// Children manager. May be empty if there are no children. + ChildrenManager* mpChildrenManager; + + /// Reference to the actual shape. + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape> mxShape; + + /** Bundle of information passed to all shapes in a document tree. + */ + AccessibleShapeTreeInfo maShapeTreeInfo; + + /** Index that is appended to the object's name to disambiguate between + different names with the otherwise same name. + */ + long mnIndex; + + /** the index in parent. + */ + sal_Int32 m_nIndexInParent; + + /** The accessible text engine. May be NULL if it can not be created. + */ + AccessibleTextHelper* mpText; + + /** This object can be used to modify the child list of our parent. + */ + IAccessibleParent* mpParent; + + /** This object can be removed when we have an extra interface to ask if the shape is selected + */ + SdrObject* m_pShape; + + /** This method is called from the component helper base class while + disposing. + */ + virtual void SAL_CALL disposing (void); + + /** Create a base name string that contains the accessible name. + */ + virtual ::rtl::OUString + CreateAccessibleBaseName (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Create a unique name string that contains the accessible name. The + name consists of the base name and the index. + */ + virtual ::rtl::OUString + CreateAccessibleName (void) + throw (::com::sun::star::uno::RuntimeException); + + /// Create a description string that contains the accessible description. + virtual ::rtl::OUString + CreateAccessibleDescription (void) + throw (::com::sun::star::uno::RuntimeException); + + /** Update the <const>OPAQUE</const> and <const>SELECTED</const> state. + */ + virtual void UpdateStates (void); + +private: + /** Don't use the default constructor. Use the public constructor that + takes the original shape and the parent as arguments instead. + */ + SVX_DLLPRIVATE explicit AccessibleShape (void); + /// Don't use the copy constructor. Is there any use for it? + SVX_DLLPRIVATE explicit AccessibleShape (const AccessibleShape&); + /// Don't use the assignment operator. Do we need this? + SVX_DLLPRIVATE AccessibleShape& operator= (const AccessibleShape&); + + /** Call this method when the title, name, or description of the mxShape + member (may) have been changed. + This method adapts the name and description members of the + AccessibleContextBase base class. + */ + void UpdateNameAndDescription (void); +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/AccessibleShapeInfo.hxx b/svx/inc/svx/AccessibleShapeInfo.hxx new file mode 100644 index 000000000000..855a6d2db5d8 --- /dev/null +++ b/svx/inc/svx/AccessibleShapeInfo.hxx @@ -0,0 +1,112 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleShapeInfo.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_INFO_HXX +#define _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_INFO_HXX + +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/accessibility/XAccessible.hpp> +#include <svx/IAccessibleParent.hxx> +#include "svx/svxdllapi.h" + +namespace accessibility { + +/** @descr + This class is a container for the information specific for a single + shape that is passed to the constructor of that shape. It allows to + separate the class definitions of the shapes from the information + needed on construction. Only the shapes' implementation has to be + adapted to a modified <type>AccessibleShapeInfo</type> definition. + + <p>Note that this class complements the + <type>AccessibleShapeTreeInfo</type> interface which contains + information that is passed to all shapes in a subtree not just to a + single shape. </p> +*/ +class SVX_DLLPUBLIC AccessibleShapeInfo +{ +public: + /** The shape itself for which an accessible object is to be + constructed. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape> mxShape; + + /** The accessible parent object of the shape. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible> mxParent; + + /** This object that may be realized by the same implementation as that + of that of <member>mxParent</member> can be used to modify + parent/child relationships with the shape as initiator. + Note that NULL is a valid value for this member. + */ + IAccessibleParent* mpChildrenManager; + + /** This index is used to disambiguate names of accessible objects. A + value of (the default) -1 leads to the use of the object's z-order + instead. Because that is not a good substitute, better pass an ever + increasing counter. + */ + sal_Int32 mnIndex; + + /** Copy the given values into the members described above. + */ + AccessibleShapeInfo ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape>& rxShape, + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible>& rxParent, + IAccessibleParent* pChildrenManager, + sal_Int32 nIndex = -1); + + /** Copy the given values into the members described above. + The accessible parent implementation object is set to NULL. + */ + AccessibleShapeInfo ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape>& rxShape, + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible>& rxParent, + sal_Int32 nIndex = -1); + + ~AccessibleShapeInfo (void); + + AccessibleShapeInfo (const AccessibleShapeInfo&); +private: + // Don't use these three methods. + SVX_DLLPRIVATE explicit AccessibleShapeInfo (void); + SVX_DLLPRIVATE AccessibleShapeInfo& operator= (const AccessibleShapeInfo&); +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/AccessibleShapeTreeInfo.hxx b/svx/inc/svx/AccessibleShapeTreeInfo.hxx new file mode 100644 index 000000000000..5af035bf27cb --- /dev/null +++ b/svx/inc/svx/AccessibleShapeTreeInfo.hxx @@ -0,0 +1,219 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleShapeTreeInfo.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_TREE_INFO_HXX +#define _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_TREE_INFO_HXX + +#include <com/sun/star/accessibility/XAccessibleComponent.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/document/XEventBroadcaster.hpp> +#include <com/sun/star/frame/XController.hpp> +#include <svx/IAccessibleViewForwarder.hxx> +#include "svx/svxdllapi.h" + +class SdrView; +class Window; + +namespace accessibility { + +/** This class bundles all information that is passed down the tree of + accessible shapes so that each shape has access to that info. + + There are basically four members that can be set and queried: + <ul> + <li>The model broadcaster is used for getting notified about shape + changes. Using this broadcaster makes in unnecessary to register at + each shape seperately.</li> + <li>The view forwarder is responsible for transformation between + coordinate systems and for providing the visible area both with respect + to a specific window.</li> + <li>The SdrView is used for creating accessible edit engines.</li> + <li>The Window is used for creating accessible edit engines.</li> + </ul> +*/ +class SVX_DLLPUBLIC AccessibleShapeTreeInfo +{ +public: + /** Deprecated. Don't use this constructor any more. + */ + AccessibleShapeTreeInfo ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleComponent>& rxDocumentWindow, + const ::com::sun::star::uno::Reference< + ::com::sun::star::document::XEventBroadcaster>& rxBroadcaster); + + /** Use this constructor to create an empty object that is filled later + with more meaningfull data. + */ + AccessibleShapeTreeInfo (void); + + /** Create a copy of the given shape info. + @param rInfo + The shape tree info object to copy. + */ + AccessibleShapeTreeInfo (const AccessibleShapeTreeInfo& rInfo); + + ~AccessibleShapeTreeInfo (void); + + AccessibleShapeTreeInfo& operator= (const AccessibleShapeTreeInfo& rInfo); + + /** Deprecated. Don't use this method. + */ + void SetDocumentWindow (const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleComponent>& rxViewWindow); + /** Deprecated. Don't use this method. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleComponent> + GetDocumentWindow (void) const; + + /** Deprecated. Use the correctly named SetModelBroadcaster method + instead. + */ + void SetControllerBroadcaster (const ::com::sun::star::uno::Reference< + ::com::sun::star::document::XEventBroadcaster>& rxControllerBroadcaster); + /** Deprecated. Use the correctly named GetModelBroadcaster method + instead. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::document::XEventBroadcaster> + GetControllerBroadcaster (void) const; + + /** Set a new broadcaster that sends events indicating shape changes. + The broadcaster usually is or belongs to a document model. + @param rxModelBroadcaster + The new broadcaster. It replaces the current one. An empty + reference may be passed to unset the broadcaster + */ + void SetModelBroadcaster (const ::com::sun::star::uno::Reference< + ::com::sun::star::document::XEventBroadcaster>& rxModelBroadcaster); + + /** Return the current model broadcaster. + @return + The returned reference may be empty if the broadcaster has not + been set or has been set to an empty reference. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::document::XEventBroadcaster> + GetModelBroadcaster (void) const; + + /** Set the view that will be used to construct SvxTextEditSources which + in turn are used to create accessible edit engines. + @param pView + The new SdrView that replaces the current one. A NULL pointer + may be passed to unset the view. + */ + void SetSdrView (SdrView* pView); + + /** Return the current SdrView. + @return + The returned value may be NULL. + */ + SdrView* GetSdrView (void) const; + + /** Set a new controller. This will usually but not necessarily + correspond to the SdrView. + @param rxController + The new controller that replaces the current one. An empty + reference may be passed to unset the controller. + */ + void SetController (const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XController>& rxController); + + /** Return the currently set controller. + @return + The reference to the currently set controller may be empty. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XController> + GetController (void) const; + + /** Set the window that is used to construct SvxTextEditSources which in + turn is used to create accessible edit engines. + */ + void SetWindow (Window* pWindow); + + /** Return the current Window. + @return + The returned value may be NULL. + */ + Window* GetWindow (void) const; + + /** The view forwarder allows the transformation between internal + and pixel coordinates and can be asked for the visible area. + @param pViewForwarder + This view forwarder replaces the current one. + */ + void SetViewForwarder (const IAccessibleViewForwarder* pViewForwarder); + + /** Return the current view forwarder. + @return + The returned pointer may be NULL. + */ + const IAccessibleViewForwarder* GetViewForwarder (void) const; + +private: + /** Deprecated. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleComponent> mxDocumentWindow; + + /** this broadcaster sends events indicating shape changes. + The broadcaster usually is or belongs to a document model. + + This once was named mxControllerBroadcaster. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::document::XEventBroadcaster> mxModelBroadcaster; + + /** This view is necessary to construct an SvxTextEditSource which in + turn is used to create an accessible edit engine. + */ + SdrView* mpView; + + /** The controller is used e.g. for obtaining the selected shapes. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XController> mxController; + + /** This window is necessary to construct an SvxTextEditSource which in + turn is used to create an accessible edit engine. + */ + Window* mpWindow; + + /** The view forwarder allows the transformation between internal + and pixel coordinates and can be asked for the visible area. + */ + const IAccessibleViewForwarder* mpViewForwarder; +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/AccessibleTableShape.hxx b/svx/inc/svx/AccessibleTableShape.hxx new file mode 100644 index 000000000000..2788a3a5d005 --- /dev/null +++ b/svx/inc/svx/AccessibleTableShape.hxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleTableShape.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_TABLE_SHAPE_HXX +#define _SVX_ACCESSIBILITY_ACCESSIBLE_TABLE_SHAPE_HXX + +#include <com/sun/star/table/XTable.hpp> +#include <com/sun/star/accessibility/XAccessibleTable.hpp> +#include <com/sun/star/accessibility/XAccessibleSelection.hpp> +#include <com/sun/star/util/XModifyListener.hpp> + +#include <rtl/ref.hxx> + +#include <cppuhelper/implbase2.hxx> + +#include <svx/AccessibleShape.hxx> + +#include <boost/noncopyable.hpp> + +namespace sdr { namespace table { + class SvxTableController; +} } + +namespace accessibility +{ + class AccessibleTableShapeImpl; + + typedef ::cppu::ImplInheritanceHelper2< AccessibleShape, + ::com::sun::star::accessibility::XAccessibleSelection, + ::com::sun::star::accessibility::XAccessibleTable + > AccessibleTableShape_Base; +/** @descr +*/ +class AccessibleTableShape : boost::noncopyable, public AccessibleTableShape_Base +{ +public: + AccessibleTableShape( const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo ); + virtual ~AccessibleTableShape( ); + + virtual void Init (void); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire( ) throw (); + virtual void SAL_CALL release( ) throw (); + + // XAccessible + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext( ) throw(::com::sun::star::uno::RuntimeException); + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int16 SAL_CALL getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException); + + // XAccessibleTable + virtual sal_Int32 SAL_CALL getAccessibleRowCount() throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getAccessibleColumnCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns( ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCaption( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleSummary( ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // XAccessibleSelection + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL clearAccessibleSelection( ) throw ( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL selectAllAccessibleChildren( ) throw ( ::com::sun::star::uno::RuntimeException ); + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw ( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException ); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL disposing( ); + + using AccessibleShape::disposing; + +protected: + virtual ::rtl::OUString CreateAccessibleBaseName(void) throw (::com::sun::star::uno::RuntimeException); + + sdr::table::SvxTableController* getTableController(); + + void checkCellPosition( sal_Int32 nCol, sal_Int32 nRow ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException ); + void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException ); + +private: + rtl::Reference< AccessibleTableShapeImpl > mxImpl; +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/AccessibleTextHelper.hxx b/svx/inc/svx/AccessibleTextHelper.hxx new file mode 100644 index 000000000000..cd3698472299 --- /dev/null +++ b/svx/inc/svx/AccessibleTextHelper.hxx @@ -0,0 +1,434 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleTextHelper.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSILE_TEXT_HELPER_HXX_ +#define _SVX_ACCESSILE_TEXT_HELPER_HXX_ + +#include <memory> +#include <sal/types.h> +#include <tools/gen.hxx> +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/accessibility/XAccessible.hpp> +#include <com/sun/star/accessibility/XAccessibleContext.hpp> +#include <com/sun/star/accessibility/XAccessibleComponent.hpp> +#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp> +#include "svx/svxdllapi.h" + + +class SvxTextForwarder; +class SvxViewForwarder; +class SvxEditSource; + +namespace accessibility +{ + + class AccessibleTextHelper_Impl; + + /** Helper class for objects containing EditEngine/Outliner text + + This class provides the methods from the XAccessibleContext, + XAccessibleEventBroadcaster and XAccessibleComponent + interfaces, that are common to all accessible objects + containing an edit engine. + + The text contained in the EditEngine/Outliner is presented as + children of this class, namely for every text paragraph a + AccessibleEditableTextPara child object is generated. As this + class manages these children for itself, it has to send out + AccessibleEventId::CHILD events on your + behalf. Thus, you must forward every call to your + addEventListener()/removeEventListener() methods to the + AccessibleTextHelper (methods + AddEventListener/RemoveEventListener), otherwise none or not + every one of your event listener will notice child changes. + + You have to implement the SvxEditSource, SvxTextForwarder, + SvxViewForwarder and SvxEditViewForwarder interfaces in order + to enable your object to cooperate with this + class. SvxTextForwarder encapsulates the fact that text + objects do not necessarily have an EditEngine at their + disposal, SvxViewForwarder and SvxEditViewForwarder do the + same for the document and the edit view. The three mentioned + forwarder objects are not stored by the AccessibleTextHelper, + but fetched every time from the SvxEditSource. So you are best + off making your SvxEditSource::Get*Forwarder methods cache the + current forwarder. + + To support changes in edit mode or conversion of fixed text + into EditEngine text, you can change the SvxEditSource this + class is referring to. This might render all children invalid + and change the child count, since the AccessibleTextHelper + reinitializes itself from scratch. + + This class registers itself at the SvxEditSource as a state + listener and manages the state of its children (i.e. the + paragraphs). See the method documentation of + AccessibleTextHelper::SetEditSource for the expected + events. Generally, be prepared that when sending any of these + events via SvxEditSource::GetBroadcaster() broadcaster, the + AccessibleTextHelper will call the SvxEditSource and their + forwarder to update it's state. Avoid being inconsistent in + the facts you tell in the events, e.g. when sending a + TEXT_HINT_PARAINSERTED event, the + SvxEditSource::GetTextForwarder().GetParagraphCount() should + already include the newly inserted paragraph. + + @attention All public methods must not be called with any + mutex hold, except when calling from the main thread (with + holds the solar mutex), unless stated otherwise. This is + because they themselves might need the solar mutex in addition + to the object mutex, and the ordering of the locking must be: + first solar mutex, then object mutex. Furthermore, state + change events might be fired internally. + + @derive Use this class in an aggregation and forward, or + derive from it and overwrite. If the Remove/AddEventListener + methods are overwritten, make sure FireEvent is adapted, + too. + + @see SvxEditSource + @see SvxTextForwarder + @see SvxViewForwarder + @see SvxEditViewForwarder + */ + class SVX_DLLPUBLIC AccessibleTextHelper + { + + public: + typedef ::std::vector< sal_Int16 > VectorOfStates; + + /** Create accessible text object for given edit source + + @param pEditSource + The edit source to use. Object ownership is transferred + from the caller to the callee. The object listens on the + SvxEditSource for object disposal, so no provisions have + to be taken if the caller destroys the data (e.g. the + model) contained in the given SvxEditSource. + + */ + explicit AccessibleTextHelper( ::std::auto_ptr< SvxEditSource > pEditSource ); + virtual ~AccessibleTextHelper(); + + protected: + + // declared, but not defined + AccessibleTextHelper( const AccessibleTextHelper& ); + // declared, but not defined + AccessibleTextHelper& operator= ( const AccessibleTextHelper& ); + + public: + /** Query the current edit source + + @attention This method returns by reference, so you are + responsible for serialization (typically, you aquired the + solar mutex when calling this method). Thus, the method + should only be called from the main office thread. + + */ + virtual const SvxEditSource& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Set the current edit source + + @attention Might fire state change events, therefore, + don't hold any mutex except solar mutex, which you are + required to lock before. This method should only be called + from the main office thread. + + The EditSource set here is required to broadcast out the + following hints: EDITSOURCE_HINT_PARASMOVED, + EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED, + TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED, + TEXT_HINT_TEXTHEIGHTCHANGED, + TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes + will get noticed by the accessibility object. Further + more, when the corresponding core object or the model is + dying, either the edit source must be set to NULL or it + has to broadcast a SFX_HINT_DYING hint. + + If the SvxEditSource's managed text can change between + edit/non-edit mode (i.e. there are times when + SvxEditSource::GetEditViewForwarder(sal_False) returns + NULL), then the two additional hints are required: + HINT_BEGEDIT and HINT_ENDEDIT. When the + AccessibleTextHelper receives a HINT_BEGEDIT, it expects + the SvxEditSource already in edit mode. On a HINT_ENDEDIT, + edit mode must already been left. The rationale for these + events are the fact that focus and selection have to be + updated in edit mode, and completely relinquished and + reset to the parent (for the focus) in non-edit mode. + + This class does not have a dispose method, since it is not + a UNO component. Nevertheless, it holds C++ references to + several core objects, so you should issue a + SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in + your dispose() method. + + @param pEditSource + The new edit source to set. Object ownership is transferred + from the caller to the callee. + */ + virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ) SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Set the event source + + You should set the event source before registering any + event listener and before requesting any child. Children + of this object receive the event source as their parent + accessible object. That is, the event source is best set + in your object's init method. + + @attention When setting a reference here, you should call + Dispose() when you as the owner are disposing, since until + then this object will hold that reference + + @param rInterface + The interface that should be set as the source for + accessibility events sent by this object. + */ + virtual void SetEventSource( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rInterface ); + + /** Get the event source + + @return the interface that is set as the source for + accessibility events sent by this object. + */ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetEventSource() const; + + /** Set offset of EditEngine/Outliner from parent + + If the origin of the underlying EditEngine/Outliner does + not correspond to the upper left corner of the object + using this class, you have to specify the offset. + + @attention Might fire state change events, therefore, + don't hold any mutex except solar mutex, which you are + required to lock before. This method should only be called + from the main office thread. + + @param rPoint + The offset in screen coordinates (i.e. pixel) + */ + virtual void SetOffset( const Point& rPoint ); + + /** Query offset of EditEngine/Outliner from parent + + @return the offset in screen coordinates (i.e. pixel) + */ + virtual Point GetOffset() const; + + /** Set offset the object adds to all children's indices + + This can be used if the owner of this object has children + handled by itself. Setting an offset different from 0 + leads to this object mimicking that all it's children are + within the range [nOffset, GetChildCount()+nOffset). That + means, GetChild() also expects the index to be in this + range. + + @attention Might fire state change events, therefore, + don't hold any mutex except solar mutex, which you are + required to lock before. This method should only be called + from the main office thread. + + @param nOffset + The offset to add to every children's index. + */ + virtual void SetStartIndex( sal_Int32 nOffset ); + + /** Query offset the object adds to all children's indices + + @return the offset to add to every children's index. + */ + virtual sal_Int32 GetStartIndex() const; + + /** Sets a vector of additional accessible states. + + The states are passed to every created child object + (text paragraph). The state values are defined in + com::sun::star::accessibility::AccessibleStateType. + + This function has to be called before querying for + any children (e.g. with GetChild()). + */ + void SetAdditionalChildStates( const VectorOfStates& rChildStates ); + + /** Returns the additional accessible states for children. + */ + const VectorOfStates& GetAdditionalChildStates() const; + + /** Update the visible children + + @attention Might fire state change events, therefore, + don't hold any mutex except solar mutex, which you are + required to lock before. This method should only be called + from the main office thread. + + This method reevaluates the visibility of all + childrens. Call this method if your visibility state has + changed somehow, e.g. if the visible area has changed and + the AccessibleTextHelper isn't notified internally + (e.g. via TEXT_HINT_VIEWSCROLLED). Normally, there should + not be a need to call this method. + */ + virtual void UpdateChildren() SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Drop all references and enter disposed state + + This method drops all references to external objects (also + the event source reference set via SetEventSource()) and + sets the object into the disposed state (i.e. the methods + return default values or throw a uno::DisposedException + exception). + */ + virtual void Dispose(); + + /** Set the focus state of the accessibility object + + Since this class handles children which also might get the + focus, the user of this class is encouraged to delegate + focus handling. Whenever the focus state of the + surrounding object changes, this method has to be called. + + The protocol of focus handling for a user of this class is + then to call SetFocus() with the appropriate focus state, + and HaveFocus() to determine the focus state you tell the + outside. + + @attention Might fire state change events, therefore, + don't hold any mutex except solar mutex, which you are + required to lock before. This method should only be called + from the main office thread. + + @param bHaveFocus + Whether we got or we lost the focus. Set to sal_True if + focus is gotten, sal_False otherwise. + + @see HaveFocus() + */ + virtual void SetFocus( sal_Bool bHaveFocus = sal_True ) SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Query the focus state of the surrounding object + + If focus handling is delegated to this class, determine + focus state with this method. Be prepared that even if you + set the focus with SetFocus(sal_True), this method might + return sal_False. This is the case if one of the children + actually got the focus. + + @return the state of the focus ownership + */ + virtual sal_Bool HaveFocus() SAL_THROW((::com::sun::star::uno::RuntimeException)); + + /** Call this method to invoke all event listeners with the given event + + @attention Fires state change events, therefore, don't hold any mutex + + @param nEventId + Id of the event to send, @see AccessibleEventId + + @param rNewValue + The value we've changed into + + @param rOldValue + The old value before the change + */ + virtual void FireEvent( const sal_Int16 nEventId, + const ::com::sun::star::uno::Any& rNewValue = ::com::sun::star::uno::Any(), + const ::com::sun::star::uno::Any& rOldValue = ::com::sun::star::uno::Any() ) const; + + /** Call this method to invoke all event listeners with the given event + + @attention Fires state change events, therefore, don't hold any mutex + + @param rEvent + The event to send, @see AccessibleEventObject + + */ + // TODO: make that virtual next time + void FireEvent( const ::com::sun::star::accessibility::AccessibleEventObject& rEvent ) const; + + /** Query select state of the text managed by this object + + @attention Don't call with locked mutexes. You may hold + the solar mutex, but this method aquires it anyway. + + @return sal_True, if the text or parts of it are currently selected + */ + virtual sal_Bool IsSelected() const; + + // XAccessibleContext child handling methods + //----------------------------------------------------------------- + /** Implements getAccessibleChildCount + + @attention Don't call with locked mutexes. You may hold + the solar mutex, but this method aquires it anyway. + */ + virtual sal_Int32 GetChildCount() SAL_THROW((::com::sun::star::uno::RuntimeException)); + /** Implements getAccessibleChild + + @attention Don't call with locked mutexes. You may hold + the solar mutex, but this method aquires it anyway. + */ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetChild( sal_Int32 i ) SAL_THROW((::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)); + + // XAccessibleEventBroadcaster child related methods + //----------------------------------------------------------------- + /** Implements addEventListener + + @attention Don't call with locked mutexes + */ + virtual void AddEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) SAL_THROW((::com::sun::star::uno::RuntimeException)); + /** Implements removeEventListener + + @attention Don't call with locked mutexes + */ + virtual void RemoveEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) SAL_THROW((::com::sun::star::uno::RuntimeException)); + + // XAccessibleComponent child related methods + //----------------------------------------------------------------- + /** Implements getAccessibleAt + + @attention Don't call with locked mutexes. You may hold + the solar mutex, but this method aquires it anyway. + */ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL GetAt( const ::com::sun::star::awt::Point& aPoint ) SAL_THROW((::com::sun::star::uno::RuntimeException)); + + private: + + /// @dyn + const std::auto_ptr< AccessibleTextHelper_Impl > mpImpl; + + }; + +} // end of namespace accessibility + +#endif /* _SVX_ACCESSILE_TEXT_HELPER_HXX_ */ diff --git a/svx/inc/svx/ChildrenManager.hxx b/svx/inc/svx/ChildrenManager.hxx new file mode 100644 index 000000000000..9e1633db58f5 --- /dev/null +++ b/svx/inc/svx/ChildrenManager.hxx @@ -0,0 +1,219 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ChildrenManager.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_CHILDREN_MANAGER_HXX +#define _SVX_ACCESSIBILITY_CHILDREN_MANAGER_HXX + +#include <svx/IAccessibleViewForwarderListener.hxx> +#include <svx/AccessibleShapeTreeInfo.hxx> +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/drawing/XShapes.hpp> +#include <memory> +#include "svx/svxdllapi.h" + +namespace accessibility { + +class AccessibleContextBase; +class AccessibleShape; +class ChildrenManagerImpl; + +/** The <type>AccessibleChildrenManager</type> class acts as a cache of the + accessible objects of the currently visible shapes of a draw page and as + a factory to create the corresponding accessible object for a given + shape. + + <p>There are two sources of shapes. The first is a list of UNO shapes. + It is passes to the constructor and can be re-set with a call to + <member>SetShapeList</member>. Accessibility objects which represent + these shapes are constructed usually on demand. The second source is a + set of single <type>AccessibleShape</type> objects added by calls to + <member>AddAccessibleShape</member>. These are not modified by this + class. They are only copied into the list of visible shapes depending + on their visibility. The later list can be cleared by calling + <member>ClearAccessibleShapeList</member>. The actual set of children + accessible through the <member>GetChildrenCount</member> and + <member>GetChild</member> methods are the accessible objects that lie + completely or partially inside the visible area obtained from the view + forwarder in the shape tree info.</p> + + <p>A children manager registers itself at the broadcaster passed to its + constructor and transforms/forwards the recieved events to the listeners + of the also given context base. The transformation process includes + interpreting a <type>document::XEventListener</type>, the change from + XShape references to the associated XAccessible reference, and the + creation of an XAccessibleEventObject. The event object is then passed + to the <method>fireEvent</method> method of the context and from there + forwarded to all listeners.</p> + + <p>Note that some of the data given to the constructor is passed to the + accessible shape objects created by that child manager which in turn + pass these data to their child managers. The data is thus propagated + down a tree of child managers/accessible shape objects from a top level + class that is usually a document/model. This is the way to give all + accessible objects access to data normally known only to the top level + owner of the shapes.</p> +*/ +class SVX_DLLPUBLIC ChildrenManager + : public IAccessibleViewForwarderListener +{ +public: + /** Create a children manager, which manages the children of the given + parent. The parent is used for creating accessible objects. The + list of shapes for which to create those objects is not derived from + the parent and has to be provided seperately by calling one of the + update methods. + @param rxParent + The parent of the accessible objects which will be created + on demand at some point of time in the future. + @param rxShapeList + List of UNO shapes to manage. + @param rShapeTreeInfo + Bundel of information passed down the shape tree. + @param rContext + An accessible context object that is called for fireing events + for new and deleted children, i.e. that holds a list of + listeners to be informed. + */ + ChildrenManager (const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible>& rxParent, + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes>& rxShapeList, + const AccessibleShapeTreeInfo& rShapeTreeInfo, + AccessibleContextBase& rContext); + + /** If there still are managed children these are marked as DEFUNC and + released. + */ + virtual ~ChildrenManager (void); + + /** Return the number of currently visible accessible children. + @return + If there are no children a 0 is returned. + */ + long GetChildCount (void) const throw (); + + /** Return the requested accessible child or throw and + IndexOutOfBoundsException if the given index is invalid. + @param nIndex + Index of the requested child. Call getChildCount for obtaining + the number of children. + @return + In case of a valid index this method returns a reference to the + requested accessible child. This reference is empty if it has + not been possible to create the accessible object of the + corresponding shape. + @raises + Throws an IndexOutOfBoundsException if the index is not valid. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible> + GetChild (long nIndex) + throw (::com::sun::star::uno::RuntimeException, + ::com::sun::star::lang::IndexOutOfBoundsException); + + /** Update the child manager. Take care of a modified set of children + and modified visible area. This method can optimize the update + process with respect seperate updates of a modified children list + and visible area. + @param bCreateNewObjectsOnDemand + If </true> then accessible objects associated with the visible + shapes are created only when asked for. No event is sent on + creation. If </false> then the accessible objects are created + before this method returns and events are sent to inform the + listeners of the new object. + */ + void Update (bool bCreateNewObjectsOnDemand = true); + + /** Replace the list of UNO shapes by the specified list. + @param xShapeList + The new list of shapes. + */ + void SetShapeList (const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShapes>& xShapeList); + + /** Add an accessible shape. The difference to the UNO shapes in the + list passed to the constructor the specified object does not have to + be created by the shape factory. This gives the caller full control + over object creation. + + @param pShape + This class <em>does</em> take ownership of the argument. + */ + void AddAccessibleShape (std::auto_ptr<AccessibleShape> pShape); + + /** Clear the list of accessible shapes which have been added by + previous calls to <member>AddAccessibleShape</member>. + */ + void ClearAccessibleShapeList (void); + + /** Take a new event shape tree info. Call this method to inform the + children manager of a change of the info bundle. + @param rShapeTreeInfo + The new info that replaces the current one. + */ + void SetInfo (AccessibleShapeTreeInfo& rShapeTreeInfo); + + /** Update the SELECTED and FOCUSED states of all visible children + according to the given selection. This includes setting + <em>and</em> resetting the states. + */ + void UpdateSelection (void); + + /** Return whether one of the shapes managed by this object has + currently the focus. + @return + Returns <true/> when there is a shape that has the focus and + <false/> when there is no such shape. + */ + bool HasFocus (void); + + /** When there is a shape that currently has the focus, + i.e. <member>HasFocus()</member> returns <true/> then remove the + focus from that shape. Otherwise nothing changes. + */ + void RemoveFocus (void); + + //===== IAccessibleViewForwarderListener ================================ + virtual void ViewForwarderChanged (ChangeType aChangeType, + const IAccessibleViewForwarder* pViewForwarder); + +protected: + ChildrenManagerImpl* mpImpl; + +private: + // Don't use the copy constructor or the assignment operator. They are + // not implemented (and are not intended to be). + SVX_DLLPRIVATE ChildrenManager (const ChildrenManager&); + SVX_DLLPRIVATE ChildrenManager& operator= (const ChildrenManager&); +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/EnhancedCustomShapeFunctionParser.hxx b/svx/inc/svx/EnhancedCustomShapeFunctionParser.hxx new file mode 100755 index 000000000000..411a16d60e31 --- /dev/null +++ b/svx/inc/svx/EnhancedCustomShapeFunctionParser.hxx @@ -0,0 +1,217 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: EnhancedCustomShapeFunctionParser.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _ENHANCEDCUSTOMSHAPEFUNCTIONPARSER_HXX +#define _ENHANCEDCUSTOMSHAPEFUNCTIONPARSER_HXX + +#include <sal/config.h> +#include <boost/shared_ptr.hpp> +#include "EnhancedCustomShapeFunctionParser.hxx" +#include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp> +#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp> +#include <vector> + +#include <svx/svxdllapi.h> + +struct EnhancedCustomShapeEquation +{ + sal_Int32 nOperation; + sal_Int32 nPara[ 3 ]; + + EnhancedCustomShapeEquation() : + nOperation ( 0 ) + { + nPara[ 0 ] = nPara[ 1 ] = nPara[ 2 ] = 0; + } +}; + +class EnhancedCustomShape2d; + +namespace EnhancedCustomShape { + +enum ExpressionFunct +{ + FUNC_CONST, + + ENUM_FUNC_PI, + ENUM_FUNC_LEFT, + ENUM_FUNC_TOP, + ENUM_FUNC_RIGHT, + ENUM_FUNC_BOTTOM, + ENUM_FUNC_XSTRETCH, + ENUM_FUNC_YSTRETCH, + ENUM_FUNC_HASSTROKE, + ENUM_FUNC_HASFILL, + ENUM_FUNC_WIDTH, + ENUM_FUNC_HEIGHT, + ENUM_FUNC_LOGWIDTH, + ENUM_FUNC_LOGHEIGHT, + ENUM_FUNC_ADJUSTMENT, + ENUM_FUNC_EQUATION, + + UNARY_FUNC_ABS, + UNARY_FUNC_SQRT, + UNARY_FUNC_SIN, + UNARY_FUNC_COS, + UNARY_FUNC_TAN, + UNARY_FUNC_ATAN, + UNARY_FUNC_NEG, + + BINARY_FUNC_PLUS, + BINARY_FUNC_MINUS, + BINARY_FUNC_MUL, + BINARY_FUNC_DIV, + BINARY_FUNC_MIN, + BINARY_FUNC_MAX, + BINARY_FUNC_ATAN2, + + TERNARY_FUNC_IF +}; + +#define EXPRESSION_FLAG_SUMANGLE_MODE 1 + +SVX_DLLPUBLIC void FillEquationParameter( const com::sun::star::drawing::EnhancedCustomShapeParameter&, const sal_Int32, EnhancedCustomShapeEquation& ); + +class ExpressionNode +{ +public: + virtual ~ExpressionNode(); + + /** Predicate whether this node is constant. + + This predicate returns true, if this node is + neither time- nor ViewInfo dependent. This allows + for certain obtimizations, i.e. not the full + expression tree needs be represented by + ExpressionNodes. + + @returns true, if the note is constant + */ + virtual bool isConstant() const = 0; + + /** Operator to calculate function value. + + This method calculates the function value. + */ + virtual double operator()() const = 0; + + /** Operator to retrieve the type of expression node + */ + virtual ExpressionFunct getType() const = 0; + + /** Operator to retrieve the ms version of expression + */ + virtual com::sun::star::drawing::EnhancedCustomShapeParameter fillNode( + std::vector< EnhancedCustomShapeEquation >& rEquations, ExpressionNode* pOptionalArg, sal_uInt32 nFlags ) = 0; +}; +typedef ::boost::shared_ptr< ExpressionNode > ExpressionNodeSharedPtr; + +/** This exception is thrown, when the arithmetic expression + parser failed to parse a string. + */ +struct ParseError +{ + ParseError() {} + ParseError( const char* ) {} +}; + +class FunctionParser +{ +public: + + /** Parse a string + + The following grammar is accepted by this method: + <code> + + number_digit = '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9' + + number = number number_digit | number_digit + + identifier = 'pi'|'left'|'top'|'right'|'bottom'|'xstretch'|'ystretch'| + 'hasstroke'|'hasfill'|'width'|'height'|'logwidth'|'logheight' + + unary_function = 'abs'|'sqrt'|'sin'|'cos'|'tan'|'atan' + binary_function = 'min'|'max'|'atan2' + ternary_function = 'if' + + function_reference = '?' 'a-z,A-Z,0-9' ' ' + modifier_reference = '$' '0-9' ' ' + + basic_expression = + number | + identifier | + function_reference | + unary_function '(' additive_expression ')' | + binary_function '(' additive_expression ',' additive_expression ')' | + ternary_function '(' additive_expression ',' additive_expression ', + ' additive_expression ')' | '(' additive_expression ')' + + unary_expression = '-' basic_expression + + multiplicative_expression = + basic_expression | + multiplicative_expression '*' basic_expression | + multiplicative_expression '/' basic_expression + + additive_expression = + multiplicative_expression | + additive_expression '+' multiplicative_expression | + additive_expression '-' multiplicative_expression + + </code> + + @param rFunction + The string to parse + + @param rCustoShape + The CustomShape is required for calculation of dynamic values such + "hasstroke", function references and or modifier references ... + + @throws ParseError if an invalid expression is given. + + @return the generated function object. + */ + + SVX_DLLPUBLIC static ExpressionNodeSharedPtr parseFunction( const ::rtl::OUString& rFunction, const EnhancedCustomShape2d& rCustoShape ); + +private: + // disabled constructor/destructor, since this is + // supposed to be a singleton + FunctionParser(); + + // default: disabled copy/assignment + FunctionParser(const FunctionParser&); + FunctionParser& operator=( const FunctionParser& ); +}; + +} + +#endif /* _ENHANCEDCUSTOMSHAPEFUNCTIONPARSER_HXX */ diff --git a/svx/inc/svx/IAccessibleParent.hxx b/svx/inc/svx/IAccessibleParent.hxx new file mode 100644 index 000000000000..014f49e9486e --- /dev/null +++ b/svx/inc/svx/IAccessibleParent.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: IAccessibleParent.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_IACCESSIBLE_PARENT_HXX +#define _SVX_ACCESSIBILITY_IACCESSIBLE_PARENT_HXX + +#include <com/sun/star/uno/RuntimeException.hpp> +#include <com/sun/star/drawing/XShape.hpp> +#include <sal/types.h> + +namespace accessibility { + +class AccessibleShape; +class AccessibleShapeTreeInfo; + +/** This interface contains methods missing from the + <type>XAccessibleContext</type> interface that allow the modification of + parent/child relationship. +*/ +class IAccessibleParent +{ +public: + /** Allow for a virtual destructor. + */ + virtual ~IAccessibleParent (void){}; + + /** A call to this method requests the implementor to replace one child + with another and send the appropriate notifications. That are two + child events: One notifying the removal of the current child and one + about the existence of the new child. The index of the new child is + implementation dependent, i.e. it is not garanteed that the + replacement has the same index as the current child has. + + <p>A default implementation can just use the ShapeTypeHandler::CreateAccessibleObject + to let a factory create the new instance with the parameters given, and then + place the new shape into the own structures.</p> + + @param pCurrentChild + This child is about to be replaced. + + @param _rxShape + The UNO shape which the old and new child represent + + @param _nIndex + The IndexInParent of the old child. Note that the index in + parent of the replacement is not necessarily the same as + that of the current child. + + @param _rShapeTreeInfo + The TreeInfo for the old child. + + @return + If the replacement has taken place successfully <TRUE/> is + returned. If the replacement can not be carried out or an error + occurs that does not result in an exception then <FALSE/> is + returned. + + @raises RuntimeException + in case something went heavily wrong + */ + virtual sal_Bool ReplaceChild ( + AccessibleShape* pCurrentChild, + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rxShape, + const long _nIndex, + const AccessibleShapeTreeInfo& _rShapeTreeInfo + ) throw (::com::sun::star::uno::RuntimeException) = 0; +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/IAccessibleViewForwarder.hxx b/svx/inc/svx/IAccessibleViewForwarder.hxx new file mode 100644 index 000000000000..b4ca06e2b0ef --- /dev/null +++ b/svx/inc/svx/IAccessibleViewForwarder.hxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: IAccessibleViewForwarder.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_IACCESSIBLE_VIEW_FORWARDER_HXX +#define _SVX_ACCESSIBILITY_IACCESSIBLE_VIEW_FORWARDER_HXX + +#include <sal/types.h> +#include <tools/gen.hxx> + + +namespace accessibility { + + + +/** <p>This interface provides the means to transform between internal + coordinates in 100th of mm and screen coordinates without giving direct + access to the underlying view. Each view forwarder represents a + specific real or virtual window. A call to + <method>GetVisibleArea</method> returns the visible rectangle that + corresponds to this window.</p> + + <p>This interface is similar to the <type>SvxViewForwarder</type> but + differs in two important points: Firstly the <member>GetVisArea</member> + method returns a rectangle in internal coordinates and secondly the + transformation methods do not require explicit mapmodes. These have to + be provided implicitely by the classes that implement this + interface. A third, less important, difference are the additional + transfomation methods for sizes. The reasons for their existince are + convenience and improved performance.</p> + + @attention + Note, that modifications of the underlying view that lead to + different transformations between internal and screen coordinates or + change the validity of the forwarder have to be signaled seperately. +*/ +class IAccessibleViewForwarder +{ +public: + virtual ~IAccessibleViewForwarder (void){}; + + /** This method informs you about the state of the forwarder. Do not + use it when the returned value is <false/>. + + @return + Return <true/> if the view forwarder is valid and <false/> else. + */ + virtual sal_Bool IsValid (void) const = 0; + + /** Returns the area of the underlying document that is visible in the + * corresponding window. + + @return + The rectangle of the visible part of the document. The values + are, contrary to the base class, in internal coordinates of + 100th of mm. + */ + virtual Rectangle GetVisibleArea() const = 0; + + /** Transform the specified point from internal coordinates in 100th of + mm to an absolute screen position. + + @param rPoint + Point in internal coordinates (100th of mm). + + @return + The same point but in screen coordinates relative to the upper + left corner of the (current) screen. + */ + virtual Point LogicToPixel (const Point& rPoint) const = 0; + + /** Transform the specified size from internal coordinates in 100th of + mm to a screen oriented pixel size. + + @param rSize + Size in internal coordinates (100th of mm). + + @return + The same size but in screen coordinates. + */ + virtual Size LogicToPixel (const Size& rSize) const = 0; + + /** Transform the specified point from absolute screen coordinates to + internal coordinates (100th of mm). + + @param rPoint + Point in screen coordinates relative to the upper left corner of + the (current) screen. + + @return + The same point but in internal coordinates (100th of mm). + */ + virtual Point PixelToLogic (const Point& rPoint) const = 0; + + /** Transform the specified size from screen coordinates to internal + coordinates (100th of mm). + + @param rSize + Size in screen coordinates. + + @return + The same size but in internal coordinates (100th of mm). + */ + virtual Size PixelToLogic (const Size& rSize) const = 0; +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/IAccessibleViewForwarderListener.hxx b/svx/inc/svx/IAccessibleViewForwarderListener.hxx new file mode 100644 index 000000000000..f72788b16d54 --- /dev/null +++ b/svx/inc/svx/IAccessibleViewForwarderListener.hxx @@ -0,0 +1,77 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: IAccessibleViewForwarderListener.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_IACCESSIBLE_VIEW_FORWARDER_LISTENER_HXX +#define _SVX_ACCESSIBILITY_IACCESSIBLE_VIEW_FORWARDER_LISTENER_HXX + +#include <sal/types.h> +#include <tools/gen.hxx> + + +namespace accessibility { + +class IAccessibleViewForwarder; + +/** <p>The purpose of this interface is to notify a user of an + IAccessibleViewForwarder when that view forwarder changes its + properties. Such a change may be one of the following: + <ul> + <li>Change of the coordinate transformation.</li> + <li>Change of the visible area (which in turn results in a change of the + coordinate transformation.</li> + <li>Change of the validity state of the view forwarder.</li> +*/ +class IAccessibleViewForwarderListener +{ +public: + /** Enumeration of the different change types. + */ + enum ChangeType {TRANSFORMATION, VISIBLE_AREA, STATE}; + + /** This method is called to indicate a change of the specified view + forwarder. + @param aChangeType + The type of the change. TRANSFORMATION indicates a change of + the coordinate transformation with a constant visible area. If + the visible area changes, just use VISIBLE_AREA. This changes + the transformation implicitly. The value STATE indicates a + change of the validity state. Check the IsValid method of the + view forwarder before doing further calls. + @param pViewForwarder + The modified view forwarder. It is specified just in case that + there is more than one view forwarder in use at the same time. + */ + virtual void ViewForwarderChanged (ChangeType aChangeType, + const IAccessibleViewForwarder* pViewForwarder) = 0; +}; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/ShapeTypeHandler.hxx b/svx/inc/svx/ShapeTypeHandler.hxx new file mode 100755 index 000000000000..5b99c246e8ee --- /dev/null +++ b/svx/inc/svx/ShapeTypeHandler.hxx @@ -0,0 +1,240 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ShapeTypeHandler.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_SHAPE_TYPE_HANDLER_HXX +#define _SVX_ACCESSIBILITY_SHAPE_TYPE_HANDLER_HXX + +#include <svx/AccessibleShapeTreeInfo.hxx> +#include <svx/AccessibleShapeInfo.hxx> +#include <svx/AccessibleShape.hxx> +#include <com/sun/star/accessibility/XAccessible.hpp> +#include <com/sun/star/uno/XInterface.hpp> +#include <com/sun/star/drawing/XShape.hpp> +#include <comphelper/stl_types.hxx> +#include <com/sun/star/document/XEventBroadcaster.hpp> +#include "svx/svxdllapi.h" + +#include <rtl/ustring.hxx> +#include <vector> +#include <hash_map> + +namespace accessibility { + +/** Use an integer to represent shape type ids. A ShapeTypeId is unique + inside one project but is not over the project boundaries. +*/ +typedef int ShapeTypeId; + +/** Define the function type for creating accessible objects for given + service names. +*/ +typedef AccessibleShape* (*tCreateFunction) + (const AccessibleShapeInfo& rShapeInfo, + const AccessibleShapeTreeInfo& rShapeTreeInfo, + ShapeTypeId nId); + +/** Each shape type is described by listing its id, its service name and a + function which creates a new accessible object that can represent that + service. The id has to be unique with respect to the create function. +*/ +struct ShapeTypeDescriptor +{ + ShapeTypeId mnShapeTypeId; + rtl::OUString msServiceName; + tCreateFunction maCreateFunction; + ShapeTypeDescriptor ( + ShapeTypeId nId, const rtl::OUString& sName, tCreateFunction aFunction) + : mnShapeTypeId (nId), + msServiceName (sName), + maCreateFunction (aFunction) + {} + ShapeTypeDescriptor (void) + : mnShapeTypeId (-1), + msServiceName (), + maCreateFunction (NULL) + {} +}; + +/** @descr + This class is a singleton that has the purpose to transform between + service names of shapes and associated enum values and to create new + accessible objects for given shapes. +*/ +class SVX_DLLPUBLIC ShapeTypeHandler +{ +public: + enum { UNKNOWN_SHAPE_TYPE = 0 }; + + /** This function returns a reference to the only instance of this class. + Use this instance to retrieve a shape's type and service name. + @return + Returns a reference to a <type>ShapeTypeHandler</type> object. + */ + static ShapeTypeHandler& Instance (void); + + /** Determines the type id of a shape with the given service name. + @param aServiceName + Service name of the shape for which to return the type id. + @return + Returns the type id of the shape with the given service name or + -1 when the service name is not known. + */ + ShapeTypeId GetTypeId (const ::rtl::OUString& aServiceName) const; + + /** Determines the type id of the specified shape. + @param xShape + Reference to the shape for which to return the type id. + @return + Returns the type id of the specified shape or + -1 when the given reference is either not + set or the referenced object does not support the + <type>XShapeDescriptor</type> interface. + */ + ShapeTypeId GetTypeId (const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape>& rxShape) const; + + /** Return the service name of a shape with the specified type. + @param aTypeId + Id of the shape type for which to retrieve the service name. + An unknown shape id results in an empty string. + @return + The returned string contains the service name, with which a + shape of the given type can be created. + */ + const ::rtl::OUString& GetServiceName (ShapeTypeId aTypeId) const; + + /** Create a new accessible object for the given shape. + @param rShapeInfo + Bundle of information passed to the new accessible shape. + @param rShapeTreeInfo + Bundle of information passed down the shape tree. + @return + Pointer to the implementation object that implements the + <code>XAccessible</code> interface. This pointer may be NULL + if the specified shape is of unknown type. + */ + AccessibleShape* + CreateAccessibleObject ( + const AccessibleShapeInfo& rShapeInfo, + const AccessibleShapeTreeInfo& rShapeTreeInfo) const; + + /** Compatibility function. + */ + AccessibleShape* + CreateAccessibleObject ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape>& rxShape, + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible>& rxParent, + const AccessibleShapeTreeInfo& rShapeTreeInfo) const + { + AccessibleShapeInfo aShapeInfo(rxShape, rxParent); + return CreateAccessibleObject (aShapeInfo, rShapeTreeInfo); + } + + /** Add new shape types to the internal tables. Each new shape type is + described by one shape type descriptor. See + <type>ShapeTypeDescriptor</type> for more details. + + @param nDescriptorCount + Number of new shape types. + @param aDescriptorList + Array of new shape type descriptors. + @return + The returned flag indicates whether the specified shape + descriptors have been successfully added. + */ + bool AddShapeTypeList (int nDescriptorCount, + ShapeTypeDescriptor aDescriptorList[]); + + /// get the accessible base name for an object + static ::rtl::OUString CreateAccessibleBaseName ( + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape) + throw (::com::sun::star::uno::RuntimeException); + +protected: + // Declare default constructor, copy constructor, destructor, and + // assignment operation protected so that no one accidentally creates a + // second instance of this singleton class or deletes it. + ShapeTypeHandler (void); + ShapeTypeHandler (const ShapeTypeHandler& aHandler); // never implemented, this is a singleton class + ShapeTypeHandler& operator= (const ShapeTypeHandler& aHandler); // never implemented, this is a singleton class + + /** This destructor is never called at the moment. But because this + class is a singleton this is not a problem. + */ + virtual ~ShapeTypeHandler (void); + +private: + /// Pointer to the only instance of this class. + static ShapeTypeHandler* instance; + + /** List of shape type descriptors. This list is normally build up in + several steps when libraries that implement shapes are loaded and + call the addShapeTypeList method. After that no modifications of + the list take place. + */ + ::std::vector<ShapeTypeDescriptor> maShapeTypeDescriptorList; + + /** This hash map allows the fast look up of a type descriptor for a + given service name. + */ + typedef ::std::hash_map< + ::rtl::OUString,ShapeTypeId, + ::rtl::OUStringHash, + // ::comphelper::UStringHash, + ::comphelper::UStringEqual> tServiceNameToSlotId; + mutable tServiceNameToSlotId maServiceNameToSlotId; + + /** Determine the slot id of the specified shape type. With this id + internal methods can access the associated type descriptor. + @param aServiceName + Service name of the shape for which to return the slot id. + @return + Returns the slot id of the shape with the given service name or + 0 when the service name is not known. + */ + SVX_DLLPRIVATE long GetSlotId (const ::rtl::OUString& aServiceName) const; + + /** Determine the slot id of the specified shape type. With this id + internal methods can access the associated type descriptor. + @param rxShape + Shape for which to return the slot id. + @return + Returns the slot id of the shape with the given service name or + 0 when the service name is not known. + */ + SVX_DLLPRIVATE long GetSlotId (const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape>& rxShape) const; +}; + +} // end of namespace accessible + +#endif diff --git a/svx/inc/svx/SmartTagCtl.hxx b/svx/inc/svx/SmartTagCtl.hxx new file mode 100644 index 000000000000..62cd24df6ff9 --- /dev/null +++ b/svx/inc/svx/SmartTagCtl.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SmartTagCtl.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_SMARTTAGSCONTROL_HXX +#define _SVX_SMARTTAGSCONTROL_HXX + +// include --------------------------------------------------------------- + +#include <tools/link.hxx> +#include <sfx2/mnuitem.hxx> +#include "svx/svxdllapi.h" +#include <com/sun/star/uno/Reference.hxx> + +#include <vector> + +class SfxBindings; +class SvxSmartTagItem; +class PopupMenu; + +namespace com { namespace sun { namespace star { namespace smarttags { + class XSmartTagAction; +} } } } + +namespace com { namespace sun { namespace star { namespace container { + class XStringKeyMap; +} } } } + +// class SvxFontMenuControl ---------------------------------------------- + +class SVX_DLLPUBLIC SvxSmartTagsControl : public SfxMenuControl +{ +private: + PopupMenu* mpMenu; + Menu& mrParent; + const SvxSmartTagItem* mpSmartTagItem; + + struct InvokeAction + { + com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > mxAction; + com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > mxSmartTagProperties; + sal_uInt32 mnActionID; + InvokeAction( com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > xAction, + com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xSmartTagProperties, + sal_uInt32 nActionID ) : mxAction( xAction ), mxSmartTagProperties( xSmartTagProperties ), mnActionID( nActionID ) {} + }; + + std::vector< InvokeAction > maInvokeActions; + + void FillMenu(); + DECL_LINK( MenuSelect, PopupMenu * ); + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + +public: + SvxSmartTagsControl( USHORT nId, Menu&, SfxBindings& ); + ~SvxSmartTagsControl(); + + virtual PopupMenu* GetPopup() const; + SFX_DECL_MENU_CONTROL(); +}; + +#endif diff --git a/svx/inc/svx/SmartTagItem.hxx b/svx/inc/svx/SmartTagItem.hxx new file mode 100644 index 000000000000..a3f040d8d594 --- /dev/null +++ b/svx/inc/svx/SmartTagItem.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SmartTagItem.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SMARTTAGITEM_HXX +#define _SVX_SMARTTAGITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/smarttags/XSmartTagAction.hpp> +#include "svx/svxdllapi.h" + +namespace com { namespace sun { namespace star { namespace container { + class XStringKeyMap; +} } } } + +namespace com { namespace sun { namespace star { namespace text { + class XTextRange; +} } } } + +namespace com { namespace sun { namespace star { namespace frame { + class XController; +} } } } + +// class SvxSmartTagItem ----------------------------------------------------- + +class SVX_DLLPUBLIC SvxSmartTagItem : public SfxPoolItem +{ + const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > > > maActionComponentsSequence; + const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< sal_Int32 > > maActionIndicesSequence; + const com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > > maStringKeyMaps; + const com::sun::star::uno::Reference<com::sun::star::text::XTextRange> mxRange; + const com::sun::star::uno::Reference<com::sun::star::frame::XController> mxController; + const com::sun::star::lang::Locale maLocale; + const rtl::OUString maApplicationName; + const rtl::OUString maRangeText; + +public: + TYPEINFO(); + + SvxSmartTagItem( const USHORT nId, + const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > > >& rActionComponentsSequence, + const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< sal_Int32 > >& rActionIndicesSequence, + const com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > >& rStringKeyMaps, + const com::sun::star::uno::Reference<com::sun::star::text::XTextRange> rRange, + const com::sun::star::uno::Reference<com::sun::star::frame::XController> rController, + const com::sun::star::lang::Locale rLocale, + const rtl::OUString& rApplicationName, + const rtl::OUString& rRangeText ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; // leer + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; // leer + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; // leer + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); // leer + + const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > > >& GetActionComponentsSequence() const { return maActionComponentsSequence; } + const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< sal_Int32 > >& GetActionIndicesSequence() const { return maActionIndicesSequence; } + const com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > >& GetStringKeyMaps() const { return maStringKeyMaps; } + const com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& GetTextRange() const { return mxRange; } + const com::sun::star::uno::Reference<com::sun::star::frame::XController>& GetController() const { return mxController; } + const com::sun::star::lang::Locale& GetLocale() const { return maLocale; } + const rtl::OUString GetApplicationName() const { return maApplicationName; } + const rtl::OUString GetRangeText() const { return maRangeText; } +}; + +#endif // #ifndef _SVX_SMARTTAGITEM_HXX + + diff --git a/svx/inc/svx/SmartTagMgr.hxx b/svx/inc/svx/SmartTagMgr.hxx new file mode 100644 index 000000000000..ef9ed696ba80 --- /dev/null +++ b/svx/inc/svx/SmartTagMgr.hxx @@ -0,0 +1,237 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SmartTagMgr.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SMARTTAGMGR_HXX +#define _SMARTTAGMGR_HXX + +#include <cppuhelper/implbase2.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/util/XModifyListener.hpp> +#include <com/sun/star/util/XChangesListener.hpp> +#include "svx/svxdllapi.h" + +#include <vector> +#include <map> +#include <set> + +namespace com { namespace sun { namespace star { namespace uno { + class XComponentContext; +} } } } + +namespace com { namespace sun { namespace star { namespace smarttags { + class XSmartTagRecognizer; + class XSmartTagAction; +} } } } + +namespace com { namespace sun { namespace star { namespace text { + class XTextMarkup; +} } } } + +namespace com { namespace sun { namespace star { namespace i18n { + class XBreakIterator; +} } } } + +namespace com { namespace sun { namespace star { namespace lang { + struct Locale; + struct EventObject; + struct ChangesEvent; + class XMultiServiceFactory; +} } } } + +namespace com { namespace sun { namespace star { namespace beans { + class XPropertySet; +} } } } + +namespace com { namespace sun { namespace star { namespace frame { + class XController; +} } } } + +/** A reference to a smart tag action + + An action service can support various actions. Therefore an ActionReference + consists of a reference to the service and and index. + */ +struct ActionReference +{ + com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > mxSmartTagAction; + sal_Int32 mnSmartTagIndex; + ActionReference( com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > xSmartTagAction, sal_Int32 nSmartTagIndex ) + : mxSmartTagAction( xSmartTagAction), mnSmartTagIndex( nSmartTagIndex ) {} +}; + +/** The smart tag manager maintains all installed action and recognizer services + + This class organizes the available smarttag libraries and provides access functions + to these libraries. The smart tag manager is a singleton. +*/ +class SVX_DLLPUBLIC SmartTagMgr : public cppu::WeakImplHelper2< ::com::sun::star::util::XModifyListener, + ::com::sun::star::util::XChangesListener > +{ +private: + + const rtl::OUString maApplicationName; + std::vector< com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagRecognizer > > maRecognizerList; + std::vector< com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > > maActionList; + std::set< rtl::OUString > maDisabledSmartTagTypes; + std::multimap < rtl::OUString, ActionReference > maSmartTagMap; + mutable com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > mxBreakIter; + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > mxMSF; + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext> mxContext; + com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > mxConfigurationSettings; + bool mbLabelTextWithSmartTags; + + /** Checks for installed smart tag recognizers/actions and stores them in + maRecognizerList and maActionList. + */ + void LoadLibraries(); + + /** Prepare configuration access. + */ + void PrepareConfiguration( const rtl::OUString& rConfigurationGroupName ); + + /** Reads the configuration data. + */ + void ReadConfiguration( bool bExcludedTypes, bool bRecognize ); + + /** Registeres the smart tag manager as listener at the package manager. + */ + void RegisterListener(); + + /** Sets up a map that maps smart tag type names to actions references. + */ + void AssociateActionsWithRecognizers(); + + void CreateBreakIterator() const; + +public: + + SmartTagMgr( const rtl::OUString& rApplicationName ); + virtual ~SmartTagMgr(); + + /** Triggeres configuration reading, library loading and listener registration + NOTE: MUST BE CALLED AFTER CONSTRUCTION! + */ + void Init( const rtl::OUString& rConfigurationGroupName ); + + /** Dispatches the recognize call to all installed smart tag recognizers + + @param rText + The string to be scanned by the recognizers. + + @param xMarkup + The object allows the recognizers to store any found smart tags. + + @param xController + The current controller of the document. + + @param rLocale + The locale of rText. + + @param nStart + The start offset of the text to be scanned in rText. + + @param nLen + The length of the text to be scanned. + + */ + void Recognize( const rtl::OUString& rText, + const com::sun::star::uno::Reference< com::sun::star::text::XTextMarkup > xMarkup, + const com::sun::star::uno::Reference< com::sun::star::frame::XController > xController, + const com::sun::star::lang::Locale& rLocale, + sal_uInt32 nStart, sal_uInt32 nLen ) const; + + /** Returns all action references associated with a given list of smart tag types + + @param rSmartTagTypes + The list of types + + @param rActionComponentsSequence + Output parameter + + @param rActionIndicesSequence + Output parameter + */ + void GetActionSequences( com::sun::star::uno::Sequence < rtl::OUString >& rSmartTagTypes, + com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > > >& rActionComponentsSequence, + com::sun::star::uno::Sequence < com::sun::star::uno::Sequence< sal_Int32 > >& rActionIndicesSequence ) const; + + /** Returns the caption for a smart tag type. + + @param rSmartTagType + The given smart tag type. + + @param rLocale + The locale. + */ + rtl::OUString GetSmartTagCaption( const rtl::OUString& rSmartTagType, const com::sun::star::lang::Locale& rLocale ) const; + + /** Returns true if the given smart tag type is enabled. + */ + bool IsSmartTagTypeEnabled( const rtl::OUString& rSmartTagType ) const; + + /** Enable or disable smart tags. + */ + bool IsLabelTextWithSmartTags() const { return mbLabelTextWithSmartTags; } + + /** Returns the number of registered recognizers. + */ + sal_uInt32 NumberOfRecognizers() const { return maRecognizerList.size(); } + + /** Returns a recognizer. + */ + com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagRecognizer > + GetRecognizer( sal_uInt32 i ) const { return maRecognizerList[i]; } + + /** Is smart tag recognization active? + */ + bool IsSmartTagsEnabled() const { return 0 != NumberOfRecognizers() && + IsLabelTextWithSmartTags(); } + + /** Writes configuration settings. + */ + void WriteConfiguration( const bool* bLabelTextWithSmartTags, + const std::vector< rtl::OUString >* pDisabledTypes ) const; + + /** Returns the name of the application this instance has been created by. + */ + const rtl::OUString GetApplicationName() const { return maApplicationName; } + + // ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::util::XModifyListener + virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::util::XChangesListener + virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw(::com::sun::star::uno::RuntimeException); +}; + +#endif diff --git a/svx/inc/svx/SpellDialogChildWindow.hxx b/svx/inc/svx/SpellDialogChildWindow.hxx new file mode 100644 index 000000000000..bf5c4c3c2476 --- /dev/null +++ b/svx/inc/svx/SpellDialogChildWindow.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SpellDialogChildWindow.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_SPELL_DIALOG_CHILD_WINDOW_HXX +#define SVX_SPELL_DIALOG_CHILD_WINDOW_HXX + +#include <sfx2/childwin.hxx> +#include <svx/SpellPortions.hxx> +#include "svx/svxdllapi.h" +#include <vcl/image.hxx> + +class AbstractSpellDialog; + +namespace svx { + +/** The child window wrapper of the actual spellin dialog. To use the + spelling dialog in an application you have to do the ususal things: + <ol> + <li>Call this class' RegisterChildWindow() method with the module + as second argument that you want the dialog included in.</li> + <li>In the SFX_IMPL_INTERFACE implementation of the view shell + that wants to use the dialog call SFX_CHILDWINDOW_REGISTRATION() + with the id returned by this class' GetChildWindowId() + method.</li> + <li>Include the item associated with this child window to the SDI + description of the view shell.</li> + </ol> +*/ +class SVX_DLLPUBLIC SpellDialogChildWindow + : public SfxChildWindow +{ + friend class SpellDialog; + AbstractSpellDialog* m_pAbstractSpellDialog; +public: + SpellDialogChildWindow ( + Window*pParent, + USHORT nId, + SfxBindings* pBindings, + SfxChildWinInfo* pInfo); + virtual ~SpellDialogChildWindow (); + +protected: + /** This abstract method has to be defined by a derived class. It + returns the next wrong sentence. + @return + returns an empty vector if no error could be found + */ + virtual SpellPortions GetNextWrongSentence (void) = 0; + + /** This abstract method applies the changes made in the spelling dialog + to the document. + The dialog always updates its settings when it gets the focus. The document + can rely on the fact that the methods ApplyChangedSentence() is called for the + position that the last GetNextWrongSentence() returned. + */ + virtual void ApplyChangedSentence(const SpellPortions& rChanged) = 0; + /** This methods determines whether the application supports AutoCorrection + */ + virtual bool HasAutoCorrection(); + /** This method adds a word pair to the AutoCorrection - if available + */ + virtual void AddAutoCorrection(const String& rOld, const String& rNew, LanguageType eLanguage); + /** Return the sfx bindings for this child window. They are + retrieved from the dialog so they do not have to be stored in + this class as well. The bindings may be necessary to be used + by the abstract methods. + */ + /** This method determines if grammar checking is supported + */ + virtual bool HasGrammarChecking(); + /** determines if grammar checking is switched on + */ + virtual bool IsGrammarChecking(); + /** switches grammar checking on/off + */ + virtual void SetGrammarChecking(bool bOn); + + SfxBindings& GetBindings (void) const; + /** Set the spell dialog into the 'resume' state. This method should be called + to notify the SpellDialog about changes in the document that invalidate the + current state which results in disabling most of the dialog controls and presenting + a "Resume" button that initiates a reinitialization. + */ + void InvalidateSpellDialog(); + /** Notifies the ChildWindow about the get focus event. The ChildWindow should no check if + the spelling dialog should be set to the 'Resume' state by calling InvalidateSpellDialog() + */ + virtual void GetFocus() = 0; + /** Notifies the ChildWindow about the lose focus event. The ChildWindow should use it to save + the current selection/state. + */ + virtual void LoseFocus() = 0; +}; + +} // end of namespace ::svx + +#endif diff --git a/svx/inc/svx/SpellPortions.hxx b/svx/inc/svx/SpellPortions.hxx new file mode 100644 index 000000000000..97c79998a536 --- /dev/null +++ b/svx/inc/svx/SpellPortions.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SpellPortions.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_SPELL_PORTIONS_HXX +#define SVX_SPELL_PORTIONS_HXX + +#include <i18npool/lang.h> +#include <rtl/ustring.hxx> +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/linguistic2/SingleProofreadingError.hpp> +#include <com/sun/star/linguistic2/XProofreader.hpp> +#include <vector> + +namespace com{ namespace sun{ namespace star{ namespace linguistic2{ + class XSpellAlternatives; +}}}} + +namespace svx{ +/** contains a portion of text that has the same language attributes applied + and belongs to the same script type. + */ +struct SpellPortion +{ + /** contains the text of the portion. + */ + rtl::OUString sText; + /** Marks the portion as field, footnote symbol or any other special content that + should be protected against unintentional deletion. + */ + bool bIsField; + /** Marks the portion hidden content that should not be touched by spell checking + and not be removed like redlines. The creator of the portions has to take care + for them. + */ + bool bIsHidden; + /** contains the language applied to the text. It has to match the script type. + */ + LanguageType eLanguage; + /** for wrong words this reference is filled with the error informations otherwise + it's an empty reference + */ + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellAlternatives> xAlternatives; + /** determines whether the error type is a grammar error + */ + bool bIsGrammarError; + /** contains the grammar error information + */ + com::sun::star::linguistic2::SingleProofreadingError aGrammarError; + /** provides access to the grammar checker interface + */ + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XProofreader > xGrammarChecker; + /** marks portion as to-be-ignored. This is a return parameter. + */ + /** contains the proposed dialog title if the proof reading component provides one. + */ + rtl::OUString sDialogTitle; + + bool bIgnoreThisError; + SpellPortion() : + bIsField(false), + bIsHidden(false), + eLanguage(LANGUAGE_DONTKNOW), + bIsGrammarError(false), + bIgnoreThisError(false) + { + aGrammarError.nErrorStart = aGrammarError.nErrorLength = aGrammarError.nErrorType = 0; + } +}; +typedef std::vector<SpellPortion> SpellPortions; +}//namespace svx +#endif diff --git a/svx/inc/svx/SvxShapeTypes.hxx b/svx/inc/svx/SvxShapeTypes.hxx new file mode 100644 index 000000000000..cf5ec424f792 --- /dev/null +++ b/svx/inc/svx/SvxShapeTypes.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SvxShapeTypes.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_ACCESSIBILITY_SVX_SHAPE_TYPES_HXX +#define _SVX_ACCESSIBILITY_SVX_SHAPE_TYPES_HXX + +#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_HXX +#include <svx/ShapeTypeHandler.hxx> +#endif +#include <com/sun/star/accessibility/XAccessible.hpp> + +namespace accessibility { + +/** Register the SVX draw shape types with the ShapeTypeHandler singleton. + This method is usually called from the shape type handler constructor. +*/ +void RegisterDrawShapeTypes (void); + +/** Enum describing all shape types known in the SVX project. +*/ +enum SvxShapeTypes +{ + DRAWING_RECTANGLE = 1, + DRAWING_ELLIPSE, + DRAWING_CONTROL, + DRAWING_CONNECTOR, + DRAWING_MEASURE, + DRAWING_LINE, + DRAWING_POLY_POLYGON, + DRAWING_POLY_LINE, + DRAWING_OPEN_BEZIER, + DRAWING_CLOSED_BEZIER, + DRAWING_OPEN_FREEHAND, + DRAWING_CLOSED_FREEHAND, + DRAWING_POLY_POLYGON_PATH, + DRAWING_POLY_LINE_PATH, + DRAWING_GRAPHIC_OBJECT, + DRAWING_GROUP, + DRAWING_TEXT, + DRAWING_OLE, + DRAWING_PAGE, + DRAWING_CAPTION, + DRAWING_FRAME, + DRAWING_PLUGIN, + DRAWING_APPLET, + DRAWING_3D_SCENE, + DRAWING_3D_CUBE, + DRAWING_3D_SPHERE, + DRAWING_3D_LATHE, + DRAWING_3D_EXTRUDE, + DRAWING_CUSTOM, + DRAWING_TABLE, /* = 30 */ + DRAWING_MEDIA, /* = 31 */ + DRAWING_END = DRAWING_MEDIA +}; + +/** List of shape type descriptors corresponding to the + <type>SvxShapeTypes</type> enum. +*/ +extern ShapeTypeDescriptor aSvxShapeTypeList[]; + +} // end of namespace accessibility + +#endif diff --git a/svx/inc/svx/adjitem.hxx b/svx/inc/svx/adjitem.hxx new file mode 100644 index 000000000000..b29a356ded63 --- /dev/null +++ b/svx/inc/svx/adjitem.hxx @@ -0,0 +1,150 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: adjitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ADJITEM_HXX +#define _SVX_ADJITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include <svx/svxenum.hxx> + +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include <svx/eeitem.hxx> +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxAdjustItem --------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt die Zeilenausrichtung. +*/ +#define ADJUST_LASTBLOCK_VERSION ((USHORT)0x0001) + +class SVX_DLLPUBLIC SvxAdjustItem : public SfxEnumItemInterface +{ + BOOL bLeft : 1; + BOOL bRight : 1; + BOOL bCenter : 1; + BOOL bBlock : 1; + + // nur aktiv, wenn bBlock + BOOL bOneBlock : 1; + BOOL bLastCenter : 1; + BOOL bLastBlock : 1; + + friend SvStream& operator<<( SvStream&, SvxAdjustItem& ); //$ ostream +public: + TYPEINFO(); + + SvxAdjustItem( const SvxAdjust eAdjst /*= SVX_ADJUST_LEFT*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + virtual USHORT GetValueCount() const; + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual USHORT GetEnumValue() const; + virtual void SetEnumValue( USHORT nNewVal ); + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + inline void SetOneWord( const SvxAdjust eType ) + { + bOneBlock = eType == SVX_ADJUST_BLOCK; + } + + inline void SetLastBlock( const SvxAdjust eType ) + { + bLastBlock = eType == SVX_ADJUST_BLOCK; + bLastCenter = eType == SVX_ADJUST_CENTER; + } + + inline void SetAdjust( const SvxAdjust eType ) + { + bLeft = eType == SVX_ADJUST_LEFT; + bRight = eType == SVX_ADJUST_RIGHT; + bCenter = eType == SVX_ADJUST_CENTER; + bBlock = eType == SVX_ADJUST_BLOCK; + } + + inline SvxAdjust GetLastBlock() const + { + SvxAdjust eRet = SVX_ADJUST_LEFT; + + if ( bLastBlock ) + eRet = SVX_ADJUST_BLOCK; + else if( bLastCenter ) + eRet = SVX_ADJUST_CENTER; + return eRet; + } + + inline SvxAdjust GetOneWord() const + { + SvxAdjust eRet = SVX_ADJUST_LEFT; + + if ( bBlock && bOneBlock ) + eRet = SVX_ADJUST_BLOCK; + return eRet; + } + + inline SvxAdjust GetAdjust() const + { + SvxAdjust eRet = SVX_ADJUST_LEFT; + + if ( bRight ) + eRet = SVX_ADJUST_RIGHT; + else if ( bCenter ) + eRet = SVX_ADJUST_CENTER; + else if ( bBlock ) + eRet = SVX_ADJUST_BLOCK; + return eRet; + } +}; + +#endif + diff --git a/svx/inc/svx/akrnitem.hxx b/svx/inc/svx/akrnitem.hxx new file mode 100644 index 000000000000..cd581ced8cfa --- /dev/null +++ b/svx/inc/svx/akrnitem.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: akrnitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_AKRNITEM_HXX +#define _SVX_AKRNITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxAutoKernItem ------------------------------------------------- + +/* + [Beschreibung] + Attribut fuer Pair-Kerning. +*/ + +class SVX_DLLPUBLIC SvxAutoKernItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxAutoKernItem( const BOOL bAutoKern /*= FALSE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxAutoKernItem& operator=(const SvxAutoKernItem& rAutoKern) + { + SetValue( rAutoKern.GetValue() ); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/algitem.hxx b/svx/inc/svx/algitem.hxx new file mode 100644 index 000000000000..71900afca1ab --- /dev/null +++ b/svx/inc/svx/algitem.hxx @@ -0,0 +1,205 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: algitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ALGITEM_HXX +#define _SVX_ALGITEM_HXX + +// include --------------------------------------------------------------- + +#include <svx/svxids.hrc> +#include <svl/poolitem.hxx> +#include <svl/eitem.hxx> +#include <svx/svxenum.hxx> +#include "svx/svxdllapi.h" + +class SvStream; + +//------------------------------------------------------------------------ + + + +class SVX_DLLPUBLIC SvxHorJustifyItem: public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxHorJustifyItem( const USHORT nId ); + + SvxHorJustifyItem( + const SvxCellHorJustify eJustify /*= SVX_HOR_JUSTIFY_STANDARD*/, + const USHORT nId ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual USHORT GetValueCount() const; + virtual String GetValueText( USHORT nVal ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + + inline SvxHorJustifyItem& operator=(const SvxHorJustifyItem& rHorJustify) + { + SetValue( rHorJustify.GetValue() ); + return *this; + } +}; + + +//------------------------------------------------------------------------ + + +class SVX_DLLPUBLIC SvxVerJustifyItem: public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxVerJustifyItem( const USHORT nId ); + + SvxVerJustifyItem( + const SvxCellVerJustify eJustify /*= SVX_VER_JUSTIFY_STANDARD*/, + const USHORT nId ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual USHORT GetValueCount() const; + virtual String GetValueText( USHORT nVal ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + + inline SvxVerJustifyItem& operator=(const SvxVerJustifyItem& rVerJustify) + { + SetValue( rVerJustify.GetValue() ); + return *this; + } +}; + + +//------------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxOrientationItem: public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxOrientationItem( + const SvxCellOrientation eOrientation /*= SVX_ORIENTATION_STANDARD*/, + const USHORT nId ); + + SvxOrientationItem( + INT32 nRotation, BOOL bStacked, + const USHORT nId ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual USHORT GetValueCount() const; + virtual String GetValueText( USHORT nVal ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + + inline SvxOrientationItem& operator=(const SvxOrientationItem& rOrientation) + { + SetValue( rOrientation.GetValue() ); + return *this; + } + + /** Returns TRUE, if the item represents STACKED state. */ + BOOL IsStacked() const; + /** Returns the rotation this item represents (returns nStdAngle for STANDARD and STACKED state). */ + INT32 GetRotation( INT32 nStdAngle = 0 ) const; + /** Fills this item according to passed item values. */ + void SetFromRotation( INT32 nRotation, BOOL bStacked ); +}; + +//------------------------------------------------------------------------ + +class SVX_DLLPUBLIC SvxMarginItem: public SfxPoolItem +{ + INT16 nLeftMargin; + INT16 nTopMargin; + INT16 nRightMargin; + INT16 nBottomMargin; +public: + TYPEINFO(); + SvxMarginItem( const USHORT nId ); + SvxMarginItem( INT16 nLeft, INT16 nTop /*= 0*/, + INT16 nRight /*= 0*/, INT16 nBottom /*= 0*/, + const USHORT nId ); + SvxMarginItem( const SvxMarginItem& ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + INT16 GetLeftMargin() const {return nLeftMargin; } + BOOL SetLeftMargin(INT16 nLeft); + INT16 GetTopMargin() const {return nTopMargin; } + BOOL SetTopMargin(INT16 nTop); + INT16 GetRightMargin() const {return nRightMargin; } + BOOL SetRightMargin(INT16 nRight); + INT16 GetBottomMargin() const {return nBottomMargin; } + BOOL SetBottomMargin(INT16 nBottom); + + inline SvxMarginItem& operator=(const SvxMarginItem& rMargin) + { + nLeftMargin = rMargin.nLeftMargin; + nTopMargin = rMargin.nTopMargin; + nRightMargin = rMargin.nRightMargin; + nBottomMargin = rMargin.nBottomMargin; + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/blnkitem.hxx b/svx/inc/svx/blnkitem.hxx new file mode 100644 index 000000000000..1c4c3eb3985d --- /dev/null +++ b/svx/inc/svx/blnkitem.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: blnkitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_BLNKITEM_HXX +#define _SVX_BLNKITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxBlinkItem ------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt, ob geblinkt werden soll. +*/ + +class SVX_DLLPUBLIC SvxBlinkItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxBlinkItem( const BOOL bBlink /*= FALSE*/, const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxBlinkItem& operator=(const SvxBlinkItem& rBlink) { + SetValue(rBlink.GetValue()); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/bmpmask.hxx b/svx/inc/svx/bmpmask.hxx new file mode 100644 index 000000000000..a1e5f9bafcad --- /dev/null +++ b/svx/inc/svx/bmpmask.hxx @@ -0,0 +1,203 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: bmpmask.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _BMPMASK_HXX_ +#define _BMPMASK_HXX_ + +#include <sfx2/ctrlitem.hxx> +#include <sfx2/dockwin.hxx> +#include <vcl/toolbox.hxx> +#include <vcl/fixed.hxx> +#include <vcl/group.hxx> +#include <vcl/graph.hxx> +#include "svx/svxdllapi.h" + +#include <svx/dlgctrl.hxx> + +/************************************************************************* +|* +|* class SvxBmpMaskSelectItem +|* +\************************************************************************/ +class SvxBmpMask; + +class SvxBmpMaskSelectItem : public SfxControllerItem +{ +private: + SvxBmpMask &rBmpMask; + +protected: + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + +public: + SvxBmpMaskSelectItem( USHORT nId, SvxBmpMask& rMask, + SfxBindings& rBindings ); +}; + +/************************************************************************* +|* +|* Ableitung vom SfxChildWindow als 'Beh"alter' f"ur Float +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxBmpMaskChildWindow : public SfxChildWindow +{ + public: + SvxBmpMaskChildWindow( Window*, + USHORT, SfxBindings*, + SfxChildWinInfo* ); + + SFX_DECL_CHILDWINDOW(SvxBmpMaskChildWindow); +}; + +/************************************************************************* +|* +|* class SvxBmpMask +|* +\************************************************************************/ + +class MaskData; +class MaskSet; +class ColorWindow; + +class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow +{ + friend class MaskData; + friend class MaskSet; + + Window* pParentWin; + Size aLastSize; + ToolBox aTbxPipette; + ColorWindow* pCtlPipette; + PushButton aBtnExec; + FixedLine aGrpQ; + + CheckBox aCbx1; + MaskSet* pQSet1; + MetricField aSp1; + ColorLB aLbColor1; + + CheckBox aCbx2; + MaskSet* pQSet2; + MetricField aSp2; + ColorLB aLbColor2; + + CheckBox aCbx3; + MaskSet* pQSet3; + MetricField aSp3; + ColorLB aLbColor3; + + CheckBox aCbx4; + MaskSet* pQSet4; + MetricField aSp4; + ColorLB aLbColor4; + + MaskData* pData; + CheckBox aCbxTrans; + ColorLB aLbColorTrans; + FixedText aFt1; + FixedText aFt2; + FixedText aFt3; + const XColorTable* pColTab; + Color aPipetteColor; + SvxBmpMaskSelectItem aSelItem; + + Image maImgPipette; + Image maImgPipetteH; + + virtual BOOL Close(); + +#ifdef BMPMASK_PRIVATE + + USHORT InitColorArrays( Color* pSrcCols, Color* pDstCols, + ULONG* pTols ); + + Bitmap ImpMask( const Bitmap& rBitmap ); + BitmapEx ImpMask( const BitmapEx& rBitmapEx ); + GDIMetaFile ImpMask( const GDIMetaFile& rMtf ); + Animation ImpMask( const Animation& rAnimation ); + BitmapEx ImpMaskTransparent( const BitmapEx& rBitmapEx, + const Color& rColor, + const long nTol ); + BitmapEx ImpReplaceTransparency( const BitmapEx& rBmpEx, + const Color& rColor ); + Animation ImpReplaceTransparency( const Animation& rAnim, + const Color& rColor ); + GDIMetaFile ImpReplaceTransparency( const GDIMetaFile& rMtf, + const Color& rColor ); + +#endif // BMPMASK_PRIVATE + +public: + + SvxBmpMask( SfxBindings *pBindinx, + SfxChildWindow *pCW, + Window* pParent, + const ResId& rResId ); + ~SvxBmpMask(); + + void SetColor( const Color& rColor ); + void PipetteClicked(); + + BOOL NeedsColorTable() const; + void SetColorTable( const XColorTable* pColorTable ); + + void SetExecState( BOOL bEnable ); + + Graphic Mask( const Graphic& rGraphic ); + + BOOL IsEyedropping() const; + + void onSelect( MaskSet* pSet ); + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + void ApplyStyle(); + +private: + + /** Set names for accessible objects. This is necessary for objects + like the source color checkboxes which initially have no name and + for which the description would be read by AT. + */ + SVX_DLLPRIVATE void SetAccessibleNames (void); +}; + +/************************************************************************* +|* +|* Defines +|* +\************************************************************************/ + +#define SVXBMPMASK() ( (SvxBmpMask*) ( SfxViewFrame::Current()->GetChildWindow( \ + SvxBmpMaskChildWindow::GetChildWindowId() )-> \ + GetWindow() ) ) + +#endif // _BMPMASK_HXX_ + diff --git a/svx/inc/svx/borderline.hxx b/svx/inc/svx/borderline.hxx new file mode 100644 index 000000000000..77fae1f676d0 --- /dev/null +++ b/svx/inc/svx/borderline.hxx @@ -0,0 +1,137 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: borderline.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_BORDERLINE_HXX +#define SVX_BORDERLINE_HXX + +#include <tools/color.hxx> +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + +// Line defaults in twips (former Writer defaults): + +#define DEF_LINE_WIDTH_0 1 +#define DEF_LINE_WIDTH_1 20 +#define DEF_LINE_WIDTH_2 50 +#define DEF_LINE_WIDTH_3 80 +#define DEF_LINE_WIDTH_4 100 +#define DEF_LINE_WIDTH_5 10 + +#define DEF_MAX_LINE_WIDHT DEF_LINE_WIDTH_4 +#define DEF_MAX_LINE_DIST DEF_LINE_WIDTH_2 + +#define DEF_DOUBLE_LINE0_OUT DEF_LINE_WIDTH_0 +#define DEF_DOUBLE_LINE0_IN DEF_LINE_WIDTH_0 +#define DEF_DOUBLE_LINE0_DIST DEF_LINE_WIDTH_1 + +#define DEF_DOUBLE_LINE1_OUT DEF_LINE_WIDTH_1 +#define DEF_DOUBLE_LINE1_IN DEF_LINE_WIDTH_1 +#define DEF_DOUBLE_LINE1_DIST DEF_LINE_WIDTH_1 + +#define DEF_DOUBLE_LINE2_OUT DEF_LINE_WIDTH_2 +#define DEF_DOUBLE_LINE2_IN DEF_LINE_WIDTH_2 +#define DEF_DOUBLE_LINE2_DIST DEF_LINE_WIDTH_2 + +#define DEF_DOUBLE_LINE3_OUT DEF_LINE_WIDTH_2 +#define DEF_DOUBLE_LINE3_IN DEF_LINE_WIDTH_1 +#define DEF_DOUBLE_LINE3_DIST DEF_LINE_WIDTH_2 + +#define DEF_DOUBLE_LINE4_OUT DEF_LINE_WIDTH_1 +#define DEF_DOUBLE_LINE4_IN DEF_LINE_WIDTH_2 +#define DEF_DOUBLE_LINE4_DIST DEF_LINE_WIDTH_1 + +#define DEF_DOUBLE_LINE5_OUT DEF_LINE_WIDTH_3 +#define DEF_DOUBLE_LINE5_IN DEF_LINE_WIDTH_2 +#define DEF_DOUBLE_LINE5_DIST DEF_LINE_WIDTH_2 + +#define DEF_DOUBLE_LINE6_OUT DEF_LINE_WIDTH_2 +#define DEF_DOUBLE_LINE6_IN DEF_LINE_WIDTH_3 +#define DEF_DOUBLE_LINE6_DIST DEF_LINE_WIDTH_2 + +#define DEF_DOUBLE_LINE7_OUT DEF_LINE_WIDTH_0 +#define DEF_DOUBLE_LINE7_IN DEF_LINE_WIDTH_0 +#define DEF_DOUBLE_LINE7_DIST DEF_LINE_WIDTH_2 + +#define DEF_DOUBLE_LINE8_OUT DEF_LINE_WIDTH_1 +#define DEF_DOUBLE_LINE8_IN DEF_LINE_WIDTH_0 +#define DEF_DOUBLE_LINE8_DIST DEF_LINE_WIDTH_2 + +#define DEF_DOUBLE_LINE9_OUT DEF_LINE_WIDTH_2 +#define DEF_DOUBLE_LINE9_IN DEF_LINE_WIDTH_0 +#define DEF_DOUBLE_LINE9_DIST DEF_LINE_WIDTH_2 + +#define DEF_DOUBLE_LINE10_OUT DEF_LINE_WIDTH_3 +#define DEF_DOUBLE_LINE10_IN DEF_LINE_WIDTH_0 +#define DEF_DOUBLE_LINE10_DIST DEF_LINE_WIDTH_2 + +// ============================================================================ + +class SVX_DLLPUBLIC SvxBorderLine +{ +protected: + Color aColor; + USHORT nOutWidth; + USHORT nInWidth; + USHORT nDistance; + +public: + SvxBorderLine( const Color *pCol = 0, USHORT nOut = 0, USHORT nIn = 0, USHORT nDist = 0 ); + SvxBorderLine( const SvxBorderLine& r ); + + SvxBorderLine& operator=( const SvxBorderLine& r ); + + const Color& GetColor() const { return aColor; } + USHORT GetOutWidth() const { return nOutWidth; } + USHORT GetInWidth() const { return nInWidth; } + USHORT GetDistance() const { return nDistance; } + + void SetColor( const Color &rColor ) { aColor = rColor; } + void SetOutWidth( USHORT nNew ) { nOutWidth = nNew; } + void SetInWidth( USHORT nNew ) { nInWidth = nNew; } + void SetDistance( USHORT nNew ) { nDistance = nNew; } + void ScaleMetrics( long nMult, long nDiv ); + + BOOL operator==( const SvxBorderLine &rCmp ) const; + + String GetValueString( SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, + const IntlWrapper* pIntl, + BOOL bMetricStr = FALSE ) const; + + bool HasPriority( const SvxBorderLine& rOtherLine ) const; + + bool isEmpty() const { return (0 == nOutWidth && 0 == nInWidth && 0 == nDistance); } + bool isDouble() const { return (0 != nOutWidth && 0 != nInWidth); } + sal_uInt16 getWidth() const { return nOutWidth + nInWidth + nDistance; } +}; + +// ============================================================================ + +#endif + diff --git a/svx/inc/svx/boxitem.hxx b/svx/inc/svx/boxitem.hxx new file mode 100644 index 000000000000..4b45eb0377c8 --- /dev/null +++ b/svx/inc/svx/boxitem.hxx @@ -0,0 +1,229 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: boxitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_BOXITEM_HXX +#define _SVX_BOXITEM_HXX + +#include <svl/poolitem.hxx> +#include <svx/borderline.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +namespace rtl { class OUString; } + +// class SvxBoxItem ------------------------------------------------------ + +/* +[Beschreibung] +Dieses Item beschreibt ein Umrandungsattribut (alle vier Kanten und +Abstand nach innen. +*/ + +#define BOX_LINE_TOP ((USHORT)0) +#define BOX_LINE_BOTTOM ((USHORT)1) +#define BOX_LINE_LEFT ((USHORT)2) +#define BOX_LINE_RIGHT ((USHORT)3) + +#define BOX_4DISTS_VERSION ((USHORT)1) + +class SVX_DLLPUBLIC SvxBoxItem : public SfxPoolItem +{ + SvxBorderLine *pTop, + *pBottom, + *pLeft, + *pRight; + USHORT nTopDist, + nBottomDist, + nLeftDist, + nRightDist; + +public: + TYPEINFO(); + + SvxBoxItem( const USHORT nId ); + SvxBoxItem( const SvxBoxItem &rCpy ); + ~SvxBoxItem(); + SvxBoxItem &operator=( const SvxBoxItem& rBox ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual int ScaleMetrics( long nMult, long nDiv ); + virtual int HasMetrics() const; + + const SvxBorderLine* GetTop() const { return pTop; } + const SvxBorderLine* GetBottom() const { return pBottom; } + const SvxBorderLine* GetLeft() const { return pLeft; } + const SvxBorderLine* GetRight() const { return pRight; } + + const SvxBorderLine* GetLine( USHORT nLine ) const; + + //Die Pointer werden kopiert! + void SetLine( const SvxBorderLine* pNew, USHORT nLine ); + + USHORT GetDistance( USHORT nLine ) const; + USHORT GetDistance() const; + + void SetDistance( USHORT nNew, USHORT nLine ); + inline void SetDistance( USHORT nNew ); + + //Breite der Linien plus Zwischenraum plus Abstand nach innen. + //JP 09.06.99: bIgnoreLine = TRUE -> Distance auch returnen, wenn + // keine Line gesetzt ist + USHORT CalcLineSpace( USHORT nLine, BOOL bIgnoreLine = FALSE ) const; +}; + +inline void SvxBoxItem::SetDistance( USHORT nNew ) +{ + nTopDist = nBottomDist = nLeftDist = nRightDist = nNew; +} + +// class SvxBoxInfoItem -------------------------------------------------- + +/* +[Beschreibung] +Noch ein Item fuer die Umrandung. Dieses Item hat lediglich SS-Funktionalitaet. +Einerseits wird dem allgemeinen Dialog mit diesem Item mitgeteilt, welche +Moeglichkeiten er anbieten soll. +Andererseits werden ueber dieses Attribut ggf. die BorderLines fuer die +horizontalen und vertikalen innerern Linien transportiert. +*/ + +#define BOXINFO_LINE_HORI ((USHORT)0) +#define BOXINFO_LINE_VERT ((USHORT)1) + +#define VALID_TOP 0x01 +#define VALID_BOTTOM 0x02 +#define VALID_LEFT 0x04 +#define VALID_RIGHT 0x08 +#define VALID_HORI 0x10 +#define VALID_VERT 0x20 +#define VALID_DISTANCE 0x40 +#define VALID_DISABLE 0x80 + +class SVX_DLLPUBLIC SvxBoxInfoItem : public SfxPoolItem +{ + SvxBorderLine* pHori; //innere horizontale Linie + SvxBorderLine* pVert; //innere vertikale Linie + + bool mbEnableHor; /// true = Enable inner horizonal line. + bool mbEnableVer; /// true = Enable inner vertical line. + + /* + z.Z. nur fuer StarWriter: Abstand nach innen von SvxBoxItem. + Wenn der Abstand gewuenscht ist, so muss das Feld fuer den Abstand vom + Dialog freigeschaltet werden. nDefDist ist als Defaultwert anzusehen. + Wenn irgendeine Linie eingeschalt ist oder wird, so muss dieser + Abstand defaultet werden. bMinDist gibt an, ob der Wert durch den + Anwender unterschritten werden darf. Mit nDist wird der aktuelle + Abstand von der App zum Dialog und zurueck transportiert. + */ + + BOOL bDist :1; // TRUE, Abstand freischalten. + BOOL bMinDist :1; // TRUE, Abstand darf nicht unterschritten werden. + + BYTE nValidFlags; // 0000 0000 + // VALID_TOP + // VALID_BOTTOM + // VALID_LEFT + // VALID_RIGHT + // VALID_HORI + // VALID_VERT + // VALID_DIST + // VALID_DISABLE + + USHORT nDefDist; // Der Default- bzw. Minimalabstand. + +public: + TYPEINFO(); + + SvxBoxInfoItem( const USHORT nId ); + SvxBoxInfoItem( const SvxBoxInfoItem &rCpy ); + ~SvxBoxInfoItem(); + SvxBoxInfoItem &operator=( const SvxBoxInfoItem &rCpy ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual int ScaleMetrics( long nMult, long nDiv ); + virtual int HasMetrics() const; + + const SvxBorderLine* GetHori() const { return pHori; } + const SvxBorderLine* GetVert() const { return pVert; } + + //Die Pointer werden kopiert! + void SetLine( const SvxBorderLine* pNew, USHORT nLine ); + + BOOL IsTable() const { return mbEnableHor && mbEnableVer; } + void SetTable( BOOL bNew ) { mbEnableHor = mbEnableVer = bNew; } + + inline bool IsHorEnabled() const { return mbEnableHor; } + inline void EnableHor( bool bEnable ) { mbEnableHor = bEnable; } + inline bool IsVerEnabled() const { return mbEnableVer; } + inline void EnableVer( bool bEnable ) { mbEnableVer = bEnable; } + + BOOL IsDist() const { return bDist; } + void SetDist( BOOL bNew ) { bDist = bNew; } + BOOL IsMinDist() const { return bMinDist; } + void SetMinDist( BOOL bNew ) { bMinDist = bNew; } + USHORT GetDefDist() const { return nDefDist; } + void SetDefDist( USHORT nNew ) { nDefDist = nNew; } + + BOOL IsValid( BYTE nValid ) const + { return ( nValidFlags & nValid ) == nValid; } + void SetValid( BYTE nValid, BOOL bValid = TRUE ) + { bValid ? ( nValidFlags |= nValid ) + : ( nValidFlags &= ~nValid ); } + void ResetFlags(); +}; +#endif + diff --git a/svx/inc/svx/brkitem.hxx b/svx/inc/svx/brkitem.hxx new file mode 100644 index 000000000000..f2241fc08d60 --- /dev/null +++ b/svx/inc/svx/brkitem.hxx @@ -0,0 +1,109 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: brkitem.hxx,v $ + * $Revision: 1.4.216.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_BRKITEM_HXX +#define _SVX_BRKITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include <svx/svxenum.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +namespace rtl +{ + class OUString; +} + +// class SvxFmtBreakItem ------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt ein Umbruch-Attribut + Automatisch?, Seiten- oder Spaltenumbruch, davor oder danach? +*/ +#define FMTBREAK_NOAUTO ((USHORT)0x0001) + +class SVX_DLLPUBLIC SvxFmtBreakItem : public SfxEnumItem +{ +public: + TYPEINFO(); + + inline SvxFmtBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/, + const USHORT nWhich ); + inline SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ); + inline SvxFmtBreakItem& operator=( const SvxFmtBreakItem& rCpy ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + virtual String GetValueTextByPos( USHORT nPos ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create( SvStream&, USHORT ) const; + virtual USHORT GetValueCount() const; + + // MS VC4.0 kommt durcheinander + void SetValue( USHORT nNewVal ) + {SfxEnumItem::SetValue(nNewVal); } + SvxBreak GetBreak() const { return SvxBreak( GetValue() ); } + void SetBreak( const SvxBreak eNew ) + { SetValue( (USHORT)eNew ); } +}; + + +inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxBreak eBreak, + const USHORT _nWhich ) : + SfxEnumItem( _nWhich, (USHORT)eBreak ) +{} + +inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ) : + SfxEnumItem( rBreak ) +{} + +inline SvxFmtBreakItem& SvxFmtBreakItem::operator=( + const SvxFmtBreakItem& rBreak ) +{ + SetValue( rBreak.GetValue() ); + return *this; +} + +#endif + diff --git a/svx/inc/svx/brshitem.hxx b/svx/inc/svx/brshitem.hxx new file mode 100644 index 000000000000..7952ae3ec2ff --- /dev/null +++ b/svx/inc/svx/brshitem.hxx @@ -0,0 +1,148 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: brshitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_BRSHITEM_HXX +#define _SVX_BRSHITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include <vcl/wall.hxx> +#include <tools/link.hxx> +#include "svx/svxdllapi.h" + +// class SvxBrushItem ---------------------------------------------------- + +class Graphic; +class GraphicObject; +class SfxObjectShell; +class CntWallpaperItem; +namespace rtl +{ + class OUString; +} + +#define BRUSH_GRAPHIC_VERSION ((USHORT)0x0001) + +enum SvxGraphicPosition +{ + GPOS_NONE, + GPOS_LT, GPOS_MT, GPOS_RT, + GPOS_LM, GPOS_MM, GPOS_RM, + GPOS_LB, GPOS_MB, GPOS_RB, + GPOS_AREA, GPOS_TILED +}; + +#define PARA_DEST_PARA 0 +#define PARA_DEST_CHAR 1 + +class SvxBrushItem_Impl; +class SVX_DLLPUBLIC SvxBrushItem : public SfxPoolItem +{ + Color aColor; + SvxBrushItem_Impl* pImpl; + String* pStrLink; + String* pStrFilter; + SvxGraphicPosition eGraphicPos; + BOOL bLoadAgain; + + void ApplyGraphicTransparency_Impl(); + DECL_STATIC_LINK( SvxBrushItem, DoneHdl_Impl, void *); + // wird nur von Create benutzt + SvxBrushItem( SvStream& rStrm, + USHORT nVersion, USHORT nWhich ); + +public: + TYPEINFO(); + + SvxBrushItem( USHORT nWhich ); + SvxBrushItem( const Color& rColor, USHORT nWhich ); + + SvxBrushItem( const Graphic& rGraphic, + SvxGraphicPosition ePos, USHORT nWhich ); + SvxBrushItem( const GraphicObject& rGraphicObj, + SvxGraphicPosition ePos, USHORT nWhich ); + SvxBrushItem( const String& rLink, const String& rFilter, + SvxGraphicPosition ePos, USHORT nWhich ); + SvxBrushItem( const SvxBrushItem& ); + SvxBrushItem( const CntWallpaperItem&, USHORT nWhich ); + + ~SvxBrushItem(); + +public: + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; + virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + const Color& GetColor() const { return aColor; } + Color& GetColor() { return aColor; } + void SetColor( const Color& rCol) { aColor = rCol; } + + void SetDoneLink( const Link& rLink ); + + SvxGraphicPosition GetGraphicPos() const { return eGraphicPos; } + + void PurgeGraphic() const; + void PurgeMedium() const; + + const Graphic* GetGraphic( SfxObjectShell* pSh = 0) const; + const GraphicObject* GetGraphicObject( SfxObjectShell* pSh = 0) const; + const String* GetGraphicLink() const { return pStrLink; } + const String* GetGraphicFilter() const { return pStrFilter; } + + void SetGraphicPos( SvxGraphicPosition eNew ); + void SetGraphic( const Graphic& rNew ); + void SetGraphicObject( const GraphicObject& rNewObj ); + void SetGraphicLink( const String& rNew ); + void SetGraphicFilter( const String& rNew ); + + SvxBrushItem& operator=( const SvxBrushItem& rItem); + + //static void InitSfxLink(); + static SvxGraphicPosition WallpaperStyle2GraphicPos( WallpaperStyle eStyle ); + static WallpaperStyle GraphicPos2WallpaperStyle( SvxGraphicPosition ePos ); + CntWallpaperItem* CreateCntWallpaperItem() const; +}; + +#endif // #ifndef _SVX_BRSHITEM_HXX + diff --git a/svx/inc/svx/camera3d.hxx b/svx/inc/svx/camera3d.hxx new file mode 100644 index 000000000000..829ba26f2b83 --- /dev/null +++ b/svx/inc/svx/camera3d.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: camera3d.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _CAMERA3D_HXX +#define _CAMERA3D_HXX + +#include <svx/viewpt3d.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Kamera-Ableitung +|* +\************************************************************************/ + +class SVX_DLLPUBLIC Camera3D : public Viewport3D +{ + protected: + basegfx::B3DPoint aResetPos; + basegfx::B3DPoint aResetLookAt; + double fResetFocalLength; + double fResetBankAngle; + + basegfx::B3DPoint aPosition; + basegfx::B3DPoint aLookAt; + double fFocalLength; + double fBankAngle; + + FASTBOOL bAutoAdjustProjection; + + public: + Camera3D(const basegfx::B3DPoint& rPos, const basegfx::B3DPoint& rLookAt, + double fFocalLen = 35.0, double fBankAng = 0); + Camera3D(); + + // Anfangswerte wieder herstellen + void Reset(); + + void SetDefaults(const basegfx::B3DPoint& rPos, const basegfx::B3DPoint& rLookAt, + double fFocalLen = 35.0, double fBankAng = 0); + + void SetViewWindow(double fX, double fY, double fW, double fH); + + void SetPosition(const basegfx::B3DPoint& rNewPos); + const basegfx::B3DPoint& GetPosition() const { return aPosition; } + void SetLookAt(const basegfx::B3DPoint& rNewLookAt); + const basegfx::B3DPoint& GetLookAt() const { return aLookAt; } + void SetPosAndLookAt(const basegfx::B3DPoint& rNewPos, const basegfx::B3DPoint& rNewLookAt); + + // Brennweite in mm + void SetFocalLength(double fLen); + void SetFocalLengthWithCorrect(double fLen); + double GetFocalLength() const { return fFocalLength; } + + // Neigung links/rechts + void SetBankAngle(double fAngle); + double GetBankAngle() const { return fBankAngle; } + + // Um die Kameraposition drehen, LookAt wird dabei veraendert + void Rotate(double fHAngle, double fVAngle); + + // Um den Blickpunkt drehen, Position wird dabei veraendert + void RotateAroundLookAt(double fHAngle, double fVAngle); + + void SetAutoAdjustProjection(FASTBOOL bAdjust = TRUE) + { bAutoAdjustProjection = bAdjust; } + FASTBOOL IsAutoAdjustProjection() const { return bAutoAdjustProjection; } +}; + +#endif // _CAMERA3D_HXX diff --git a/svx/inc/svx/charmap.hxx b/svx/inc/svx/charmap.hxx new file mode 100644 index 000000000000..304e67c5a5f0 --- /dev/null +++ b/svx/inc/svx/charmap.hxx @@ -0,0 +1,143 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: charmap.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CHARMAP_HXX +#define _SVX_CHARMAP_HXX + +// include --------------------------------------------------------------- + +#include <vcl/ctrl.hxx> +#include <vcl/metric.hxx> +#include <vcl/scrbar.hxx> +#include <map> +#include <tools/shl.hxx> //add CHINA001 +#include <tools/debug.hxx> //add CHINA001 +#include "svx/svxdllapi.h" + +// define ---------------------------------------------------------------- + +#define COLUMN_COUNT 16 +#define ROW_COUNT 8 + +namespace svx +{ + struct SvxShowCharSetItem; + class SvxShowCharSetVirtualAcc; +} + +// class SvxShowCharSet -------------------------------------------------- + +class SVX_DLLPUBLIC SvxShowCharSet : public Control +{ +public: + SvxShowCharSet( Window* pParent, const ResId& rResId ); + ~SvxShowCharSet(); + + void SetFont( const Font& rFont ); + + void SelectCharacter( sal_uInt32 cNew, BOOL bFocus = FALSE ); + sal_UCS4 GetSelectCharacter() const; + + Link GetDoubleClickHdl() const { return aDoubleClkHdl; } + void SetDoubleClickHdl( const Link& rLink ) { aDoubleClkHdl = rLink; } + Link GetSelectHdl() const { return aSelectHdl; } + void SetSelectHdl( const Link& rHdl ) { aSelectHdl = rHdl; } + Link GetHighlightHdl() const { return aHighHdl; } + void SetHighlightHdl( const Link& rHdl ) { aHighHdl = rHdl; } + Link GetPreSelectHdl() const { return aHighHdl; } + void SetPreSelectHdl( const Link& rHdl ) { aPreSelectHdl = rHdl; } + static sal_uInt32& getSelectedChar(); + +#ifdef _SVX_CHARMAP_CXX_ + ::svx::SvxShowCharSetItem* ImplGetItem( int _nPos ); + int FirstInView( void) const; + int LastInView( void) const; + int PixelToMapIndex( const Point&) const; + void SelectIndex( int index, BOOL bFocus = FALSE ); + void DeSelect(); + inline sal_Bool IsSelected(USHORT _nPos) const { return _nPos == nSelectedIndex; } + inline USHORT GetSelectIndexId() const { return sal::static_int_cast<USHORT>(nSelectedIndex); } + USHORT GetRowPos(USHORT _nPos) const; + USHORT GetColumnPos(USHORT _nPos) const; + + void ImplFireAccessibleEvent( short nEventId, + const ::com::sun::star::uno::Any& rOldValue, + const ::com::sun::star::uno::Any& rNewValue ); + ScrollBar* getScrollBar(); + void ReleaseAccessible(); + sal_Int32 getMaxCharCount() const; +#endif // _SVX_CHARMAP_CXX_ + +protected: + virtual void Paint( const Rectangle& ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void Command( const CommandEvent& rCEvt ); + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void GetFocus(); + virtual void LoseFocus(); + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); + + + +private: + typedef ::std::map<sal_Int32, ::svx::SvxShowCharSetItem*> ItemsMap; + ItemsMap m_aItems; + Link aDoubleClkHdl; + Link aSelectHdl; + Link aHighHdl; + Link aPreSelectHdl; + ::svx::SvxShowCharSetVirtualAcc* m_pAccessible; + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xAccessible; + long nX; + long nY; + BOOL bDrag; + + sal_Int32 nSelectedIndex; + + FontCharMap maFontCharMap; + ScrollBar aVscrollSB; + Size aOrigSize; + Point aOrigPos; + +private: + void DrawChars_Impl( int n1, int n2); + void InitSettings( BOOL bForeground, BOOL bBackground); + // abstraction layers are: Unicode<->MapIndex<->Pixel + Point MapIndexToPixel( int) const; + DECL_LINK( VscrollHdl, ScrollBar* ); +}; + +#endif + diff --git a/svx/inc/svx/charreliefitem.hxx b/svx/inc/svx/charreliefitem.hxx new file mode 100644 index 000000000000..95685902ad9c --- /dev/null +++ b/svx/inc/svx/charreliefitem.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: charreliefitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CHARRELIEFITEM_HXX +#define _SVX_CHARRELIEFITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include <vcl/fntstyle.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxCharRotateItem ---------------------------------------------- + +/* [Description] + + This item defines a character relief and has currently the values + emboss, relief. + +*/ + +class SVX_DLLPUBLIC SvxCharReliefItem : public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxCharReliefItem( FontRelief eValue /*= RELIEF_NONE*/, + const sal_uInt16 nId ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual USHORT GetValueCount() const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * = 0 ) const; + + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId ) const; + + inline SvxCharReliefItem& operator=( const SvxCharReliefItem& rItem ) + { + SetValue( rItem.GetValue() ); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/charrotateitem.hxx b/svx/inc/svx/charrotateitem.hxx new file mode 100644 index 000000000000..62bae4b7caa5 --- /dev/null +++ b/svx/inc/svx/charrotateitem.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: charrotateitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CHARROTATEITEM_HXX +#define _SVX_CHARROTATEITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxCharRotateItem ---------------------------------------------- + +/* [Description] + + This item defines a character rotation value (0,1 degree). Currently + character can only be rotated 90,0 and 270,0 degrees. + The flag FitToLine defines only a UI-Information - + if true it must also create a SvxCharScaleItem. + +*/ + +class SVX_DLLPUBLIC SvxCharRotateItem : public SfxUInt16Item +{ + sal_Bool bFitToLine; +public: + TYPEINFO(); + + SvxCharRotateItem( sal_uInt16 nValue /*= 0*/, + sal_Bool bFitIntoLine /*= sal_False*/, + const sal_uInt16 nId ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * = 0 ) const; + + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId ) const; + + inline SvxCharRotateItem& operator=( const SvxCharRotateItem& rItem ) + { + SetValue( rItem.GetValue() ); + SetFitToLine( rItem.IsFitToLine() ); + return *this; + } + + virtual int operator==( const SfxPoolItem& ) const; + + // our currently only degree values + void SetTopToBotton() { SetValue( 2700 ); } + void SetBottomToTop() { SetValue( 900 ); } + sal_Bool IsTopToBotton() const { return 2700 == GetValue(); } + sal_Bool IsBottomToTop() const { return 900 == GetValue(); } + + sal_Bool IsFitToLine() const { return bFitToLine; } + void SetFitToLine( sal_Bool b ) { bFitToLine = b; } +}; + +#endif + diff --git a/svx/inc/svx/charscaleitem.hxx b/svx/inc/svx/charscaleitem.hxx new file mode 100644 index 000000000000..ed957424731c --- /dev/null +++ b/svx/inc/svx/charscaleitem.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: charscaleitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CHARSCALEITEM_HXX +#define _SVX_CHARSCALEITEM_HXX + +// include --------------------------------------------------------------- + +#ifndef _SFXENUMITEM_HXX +#include <svl/intitem.hxx> +#endif +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxCharScaleItem ---------------------------------------------- + +/* [Description] + + This item defines a character scaling factor as percent value. + A value of 100 is identical to 100% and means normal width + A value of 50 is identical to 50% and means 1/2 width. + +*/ + +class SVX_DLLPUBLIC SvxCharScaleWidthItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + + SvxCharScaleWidthItem( sal_uInt16 nValue /*= 100*/, + const sal_uInt16 nId ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * = 0 ) const; + + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId ) const; + + inline SvxCharScaleWidthItem& operator=(const SvxCharScaleWidthItem& rItem ) + { + SetValue( rItem.GetValue() ); + return *this; + } + +}; + +#endif + diff --git a/svx/inc/svx/checklbx.hxx b/svx/inc/svx/checklbx.hxx new file mode 100644 index 000000000000..a2bd8ea2e65c --- /dev/null +++ b/svx/inc/svx/checklbx.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: checklbx.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CHECKLBX_HXX +#define _SVX_CHECKLBX_HXX + +// include --------------------------------------------------------------- + + +#include <svtools/svtreebx.hxx> +#include <svtools/svlbitm.hxx> + +#ifndef _LSTBOX_HXX //autogen +#include <vcl/lstbox.hxx> +#endif +#include "svx/svxdllapi.h" + +// class SvxCheckListBox ------------------------------------------------- + +class SVX_DLLPUBLIC SvxCheckListBox : public SvTreeListBox +{ + using Window::GetText; + +private: + SvLBoxButtonData* pCheckButton; + +#ifdef _SVX_CHECKLBX_CXX + SVX_DLLPRIVATE void Init_Impl(); +#endif + + using SvTreeListBox::InsertEntry; + // Avoid ambiguity with new InsertEntry: + virtual SvLBoxEntry* InsertEntry( const XubString& rText, SvLBoxEntry* pParent, + BOOL bChildsOnDemand, + ULONG nPos, void* pUserData, + SvLBoxButtonKind eButtonKind ); + +public: + SvxCheckListBox( Window* pParent, WinBits nWinStyle = 0 ); + SvxCheckListBox( Window* pParent, const ResId& rResId ); + SvxCheckListBox( Window* pParent, const ResId& rResId, + const Image& rNormalStaticImage, + const Image& rHighContrastStaticImage ); + ~SvxCheckListBox(); + + void InsertEntry ( const String& rStr, + USHORT nPos = LISTBOX_APPEND, + void* pUserData = NULL, + SvLBoxButtonKind eButtonKind = + SvLBoxButtonKind_enabledCheckbox ); + void RemoveEntry ( USHORT nPos ); + + void SelectEntryPos ( USHORT nPos, BOOL bSelect = TRUE ); + USHORT GetSelectEntryPos () const; + + String GetText ( USHORT nPos ) const; + USHORT GetCheckedEntryCount() const; + void CheckEntryPos ( USHORT nPos, BOOL bCheck = TRUE ); + BOOL IsChecked ( USHORT nPos ) const; + void ToggleCheckButton ( SvLBoxEntry* pEntry ); + + void* SetEntryData ( USHORT nPos, void* pNewData ); + void* GetEntryData ( USHORT nPos ) const; + + virtual void MouseButtonDown ( const MouseEvent& rMEvt ); + virtual void KeyInput ( const KeyEvent& rKEvt ); +}; + + +#endif + diff --git a/svx/inc/svx/cmapitem.hxx b/svx/inc/svx/cmapitem.hxx new file mode 100644 index 000000000000..cec4d6e538c6 --- /dev/null +++ b/svx/inc/svx/cmapitem.hxx @@ -0,0 +1,95 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: cmapitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CMAPITEM_HXX +#define _SVX_CMAPITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include <svx/svxenum.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxCaseMapItem -------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt die Schrift-Ausrichtung (Versalien, Kapitaelchen,...). +*/ + +class SVX_DLLPUBLIC SvxCaseMapItem : public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxCaseMapItem( const SvxCaseMap eMap /*= SVX_CASEMAP_NOT_MAPPED*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual USHORT GetValueCount() const; + + // MS VC4.0 kommt durcheinander + void SetValue( USHORT nNewVal ) + {SfxEnumItem::SetValue(nNewVal); } + + inline SvxCaseMapItem& operator=(const SvxCaseMapItem& rMap) + { + SetValue( rMap.GetValue() ); + return *this; + } + + // enum cast + SvxCaseMap GetCaseMap() const + { return (SvxCaseMap)GetValue(); } + void SetCaseMap( SvxCaseMap eNew ) + { SetValue( (USHORT)eNew ); } + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +#endif + diff --git a/svx/inc/svx/cntritem.hxx b/svx/inc/svx/cntritem.hxx new file mode 100644 index 000000000000..da5d48bf06ea --- /dev/null +++ b/svx/inc/svx/cntritem.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: cntritem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ITEM_HXX +#define _SVX_ITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxContourItem -------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt, ob Konturschrift eingestellt ist. +*/ + +class SVX_DLLPUBLIC SvxContourItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxContourItem( const BOOL bContoured /*= FALSE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxContourItem& operator=(const SvxContourItem& rCont) + { + SetValue(rCont.GetValue()); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/colrctrl.hxx b/svx/inc/svx/colrctrl.hxx new file mode 100644 index 000000000000..9a908afa4588 --- /dev/null +++ b/svx/inc/svx/colrctrl.hxx @@ -0,0 +1,148 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: colrctrl.hxx,v $ + * $Revision: 1.3.76.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_COLRCTRL_HXX +#define _SVX_COLRCTRL_HXX + +#include <sfx2/dockwin.hxx> +#include <sfx2/childwin.hxx> +#include <svtools/valueset.hxx> +#include <svtools/transfer.hxx> +#include <svl/lstner.hxx> +#include "svx/svxdllapi.h" + +class XColorTable; +class SvData; + +/************************************************************************* +|* +|* SvxColorValueSet +|* +\************************************************************************/ + +class SvxColorValueSet : public ValueSet, public DragSourceHelper +{ + using ValueSet::StartDrag; + +private: + + BOOL bLeft; + Point aDragPosPixel; + +protected: + + void DoDrag(); + + // ValueSet + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void Command(const CommandEvent& rCEvt ); + + // DragSourceHelper + virtual void StartDrag( sal_Int8 nAction, const Point& rPtPixel ); + + DECL_STATIC_LINK(SvxColorValueSet, ExecDragHdl, void*); + +public: + SvxColorValueSet( Window* pParent, WinBits nWinStyle = WB_ITEMBORDER ); + SvxColorValueSet( Window* pParent, const ResId& rResId ); + + BOOL IsLeftButton() const { return bLeft; } +}; + +/************************************************************************* +|* +|* Ableitung vom SfxChildWindow als "Behaelter" fuer Controller +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxColorChildWindow : public SfxChildWindow +{ + public: + SvxColorChildWindow( Window*, USHORT, SfxBindings*, + SfxChildWinInfo* ); + + SFX_DECL_CHILDWINDOW(SvxColorChildWindow); +}; + +/************************************************************************* +|* +|* SvxColorDockingWindow +|* +\************************************************************************/ + +class SvxColorDockingWindow : public SfxDockingWindow, public SfxListener +{ + friend class SvxColorChildWindow; + +private: + XColorTable* pColorTable; + SvxColorValueSet aColorSet; + USHORT nLeftSlot; + USHORT nRightSlot; + USHORT nCols; + USHORT nLines; + long nCount; + Size aColorSize; + Size aItemSize; + +//#if 0 // _SOLAR__PRIVATE + void FillValueSet(); + void SetSize(); + DECL_LINK( SelectHdl, void * ); + + /** This function is called when the window gets the focus. It grabs + the focus to the color value set so that it can be controlled with + the keyboard. + */ + virtual void GetFocus (void); +//#endif + +protected: + virtual BOOL Close(); + virtual void Resize(); + virtual void Resizing( Size& rSize ); + +public: + SvxColorDockingWindow( SfxBindings* pBindings, + SfxChildWindow *pCW, + Window* pParent, + const ResId& rResId ); + ~SvxColorDockingWindow(); + + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + + void SetSlotIDs( USHORT nLeft, USHORT nRight ) + { nLeftSlot = nLeft; nRightSlot = nRight; } + + virtual long Notify( NotifyEvent& rNEvt ); +}; + +#endif + diff --git a/svx/inc/svx/colritem.hxx b/svx/inc/svx/colritem.hxx new file mode 100644 index 000000000000..aea4918850d3 --- /dev/null +++ b/svx/inc/svx/colritem.hxx @@ -0,0 +1,103 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: colritem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_COLRITEM_HXX +#define _SVX_COLRITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#ifndef _SV_COLOR_HXX //autogen +#include <tools/color.hxx> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxColorItem ---------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt eine Farbe. +*/ + +#define VERSION_USEAUTOCOLOR 1 + +class SVX_DLLPUBLIC SvxColorItem : public SfxPoolItem +{ +private: + Color mColor; + +public: + TYPEINFO(); + + SvxColorItem( const USHORT nId ); + SvxColorItem( const Color& aColor, const USHORT nId ); + SvxColorItem( SvStream& rStrm, const USHORT nId ); + SvxColorItem( const SvxColorItem& rCopy ); + ~SvxColorItem(); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + + inline SvxColorItem& operator=(const SvxColorItem& rColor) + { + SetValue( rColor.GetValue() ); + return *this; + } + + const Color& GetValue() const + { + return mColor; + } + void SetValue( const Color& rNewCol ); + +}; + +#endif + diff --git a/svx/inc/svx/contdlg.hxx b/svx/inc/svx/contdlg.hxx new file mode 100644 index 000000000000..625f10af397d --- /dev/null +++ b/svx/inc/svx/contdlg.hxx @@ -0,0 +1,145 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: contdlg.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _CONTDLG_HXX_ +#define _CONTDLG_HXX_ + +#include <sfx2/basedlgs.hxx> +#include <sfx2/ctrlitem.hxx> +#include <sfx2/childwin.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Ableitung vom SfxChildWindow als "Behaelter" fuer Float +|* +\************************************************************************/ + +class Graphic; + +class SVX_DLLPUBLIC SvxContourDlgChildWindow : public SfxChildWindow +{ + public: + + SvxContourDlgChildWindow( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); + + SFX_DECL_CHILDWINDOW( SvxContourDlgChildWindow ); + + static void UpdateContourDlg( const Graphic& rGraphic, BOOL bGraphicLinked, + const PolyPolygon* pPolyPoly = NULL, + void* pEditingObj = NULL ); +}; + +#ifndef _REDUCED_ContourDlg_HXX_ +#define _REDUCED_CONTDLG_HXX_ + +class SvxSuperContourDlg; + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SvxContourDlgItem : public SfxControllerItem +{ + SvxSuperContourDlg& rDlg; + +protected: + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + +public: + + SvxContourDlgItem( USHORT nId, SvxSuperContourDlg& rDlg, SfxBindings& rBindings ); +}; + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxContourDlg : public SfxFloatingWindow +{ + using Window::Update; + + SvxSuperContourDlg* pSuperClass; + +//#if 0 // _SOLAR__PRIVATE + +protected: + + void SetSuperClass( SvxSuperContourDlg& rSuperClass ) { pSuperClass = &rSuperClass; } + +//#endif // __PRIVATE + +public: + + SvxContourDlg( SfxBindings *pBindings, SfxChildWindow *pCW, + Window* pParent, const ResId& rResId ); + ~SvxContourDlg(); + + void SetExecState( BOOL bEnable ); + + void SetGraphic( const Graphic& rGraphic ); + void SetGraphicLinked( BOOL bLinked ); + const Graphic& GetGraphic() const; + BOOL IsGraphicChanged() const; + + void SetPolyPolygon( const PolyPolygon& rPolyPoly ); + PolyPolygon GetPolyPolygon(); + + void SetEditingObject( void* pObj ); + const void* GetEditingObject() const; + + void Update( const Graphic& rGraphic, BOOL bGraphicLinked, + const PolyPolygon* pPolyPoly = NULL, void* pEditingObj = NULL ); + + static PolyPolygon CreateAutoContour( const Graphic& rGraphic, + const Rectangle* pRect = NULL, + const ULONG nFlags = 0L ); + static void ScaleContour( PolyPolygon& rContour, const Graphic& rGraphic, + const MapUnit eUnit, const Size& rDisplaySize ); +}; + +/************************************************************************* +|* +|* Defines +|* +\************************************************************************/ + +#define SVXCONTOURDLG() ( (SvxContourDlg*) ( SfxViewFrame::Current()->GetChildWindow( \ + SvxContourDlgChildWindow::GetChildWindowId() )-> \ + GetWindow() ) ) + +#endif // _REDUCED_CONTDLG_HXX_ +#endif // _CONTDLG_HXX_ + diff --git a/svx/inc/svx/crsditem.hxx b/svx/inc/svx/crsditem.hxx new file mode 100644 index 000000000000..945ae086f36e --- /dev/null +++ b/svx/inc/svx/crsditem.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: crsditem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CRSDITEM_HXX +#define _SVX_CRSDITEM_HXX + +// include --------------------------------------------------------------- + +#include <vcl/vclenum.hxx> +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxCrossedOutItem ----------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt, ob und wie durchstrichen ist. +*/ + +class SVX_DLLPUBLIC SvxCrossedOutItem : public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxCrossedOutItem( const FontStrikeout eSt /*= STRIKEOUT_NONE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual USHORT GetValueCount() const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + // MS VC4.0 kommt durcheinander + void SetValue( USHORT nNewVal ) + {SfxEnumItem::SetValue(nNewVal); } + + virtual int HasBoolValue() const; + virtual BOOL GetBoolValue() const; + virtual void SetBoolValue( BOOL bVal ); + + inline SvxCrossedOutItem& operator=(const SvxCrossedOutItem& rCross) + { + SetValue( rCross.GetValue() ); + return *this; + } + + // enum cast + FontStrikeout GetStrikeout() const + { return (FontStrikeout)GetValue(); } + void SetStrikeout( FontStrikeout eNew ) + { SetValue( (USHORT)eNew ); } +}; + +#endif // #ifndef _SVX_CRSDITEM_HXX + diff --git a/svx/inc/svx/cscoitem.hxx b/svx/inc/svx/cscoitem.hxx new file mode 100644 index 000000000000..120fe62a0ea2 --- /dev/null +++ b/svx/inc/svx/cscoitem.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: cscoitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_CSCOITEM_HXX +#define _SVX_CSCOITEM_HXX + +// include --------------------------------------------------------------- + +#include <tools/string.hxx> +#include <svx/colritem.hxx> +#include "svx/svxdllapi.h" + +// class SvxCharSetColorItem --------------------------------------------- + +/* [Beschreibung] + + PB: wird nur intern im Reader des Writers benoetigt +*/ + +class SVX_DLLPUBLIC SvxCharSetColorItem : public SvxColorItem +{ + rtl_TextEncoding eFrom; +public: + TYPEINFO(); + + SvxCharSetColorItem( const USHORT nId ); + SvxCharSetColorItem( const Color& aColor, const rtl_TextEncoding eFrom, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + + inline rtl_TextEncoding& GetCharSet() { return eFrom; } + inline rtl_TextEncoding GetCharSet() const { return eFrom; } + + inline SvxCharSetColorItem& operator=(const SvxCharSetColorItem& rColor) + { + SetValue( rColor.GetValue() ); + eFrom = rColor.GetCharSet(); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/ctredlin.hxx b/svx/inc/svx/ctredlin.hxx new file mode 100644 index 000000000000..a56e0ed29867 --- /dev/null +++ b/svx/inc/svx/ctredlin.hxx @@ -0,0 +1,434 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ctredlin.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_CTREDLIN_HXX +#define _SVX_CTREDLIN_HXX + +#ifndef _MOREBTN_HXX //autogen +#include <vcl/morebtn.hxx> +#endif +#ifndef _COMBOBOX_HXX //autogen +#include <vcl/combobox.hxx> +#endif +#include <svtools/headbar.hxx> +#include <svtools/svtabbx.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/tabpage.hxx> +#include <vcl/field.hxx> +#include <vcl/fixed.hxx> + +#ifndef _SVX_SIMPTABL +#include <svx/simptabl.hxx> +#endif +#include <vcl/tabctrl.hxx> +#include <tools/datetime.hxx> +#include <svtools/txtcmp.hxx> +#include "svx/svxdllapi.h" + +#define FLT_DATE_BEFORE 0 +#define FLT_DATE_SINCE 1 +#define FLT_DATE_EQUAL 2 +#define FLT_DATE_NOTEQUAL 3 +#define FLT_DATE_BETWEEN 4 +#define FLT_DATE_SAVE 5 + + +// Struct fuer Datums-Sortierung + +class SVX_DLLPUBLIC RedlinData +{ +public: + RedlinData(); + virtual ~RedlinData(); + BOOL bDisabled; + DateTime aDateTime; + void* pData; +}; + +class SvxRedlinEntry : public SvLBoxEntry +{ +public: + SvxRedlinEntry(); + virtual ~SvxRedlinEntry(); +}; + +// Klasse fuer die Darstellung von schriftabhaengigen Strings +class SvLBoxColorString : public SvLBoxString +{ +private: + + Color aPrivColor; + +public: + SvLBoxColorString( SvLBoxEntry*,USHORT nFlags,const XubString& rStr, + const Color& rCol); + SvLBoxColorString(); + ~SvLBoxColorString(); + + void Paint( const Point&, SvLBox& rDev, USHORT nFlags,SvLBoxEntry* ); + SvLBoxItem* Create() const; +}; + +class SVX_DLLPUBLIC SvxRedlinTable : public SvxSimpleTable +{ + using SvTabListBox::InsertEntry; + +private: + + BOOL bIsCalc; + USHORT nDatePos; + BOOL bAuthor; + BOOL bDate; + BOOL bComment; + USHORT nDaTiMode; + DateTime aDaTiFirst; + DateTime aDaTiLast; + DateTime aDaTiFilterFirst; + DateTime aDaTiFilterLast; + String aAuthor; + Color aEntryColor; + String aCurEntry; + utl::TextSearch* pCommentSearcher; + Link aColCompareLink; + +protected: + + virtual StringCompare ColCompare(SvLBoxEntry*,SvLBoxEntry*); + virtual void InitEntry(SvLBoxEntry*,const XubString&,const Image&,const Image&,SvLBoxButtonKind); + + + +public: + + SvxRedlinTable( Window* pParent,WinBits nBits ); + SvxRedlinTable( Window* pParent,const ResId& rResId); + ~SvxRedlinTable(); + + // For FilterPage only { + void SetFilterDate(BOOL bFlag=TRUE); + void SetDateTimeMode(USHORT nMode); + void SetFirstDate(const Date&); + void SetLastDate(const Date&); + void SetFirstTime(const Time&); + void SetLastTime(const Time&); + void SetFilterAuthor(BOOL bFlag=TRUE); + void SetAuthor(const String &); + void SetFilterComment(BOOL bFlag=TRUE); + void SetCommentParams( const utl::SearchParam* pSearchPara ); + + void UpdateFilterTest(); + // } For FilterPage only + + void SetCalcView(BOOL bFlag=TRUE); + BOOL IsValidCalcEntry(const String& ,RedlinData *pUserData); + BOOL IsValidWriterEntry(const String& ,RedlinData *pUserData); + + // keine NULL-Ptr. ueberpruefung { + BOOL IsValidEntry(const String* pAuthor,const DateTime *pDateTime,const String* pComment); + BOOL IsValidEntry(const String* pAuthor,const DateTime *pDateTime); + BOOL IsValidComment(const String* pComment); + // } + + SvLBoxEntry* InsertEntry(const String& ,RedlinData *pUserData, + SvLBoxEntry* pParent=NULL,ULONG nPos=LIST_APPEND); + + SvLBoxEntry* InsertEntry(const String& ,RedlinData *pUserData,const Color&, + SvLBoxEntry* pParent=NULL,ULONG nPos=LIST_APPEND); + + + virtual SvLBoxEntry* CreateEntry() const; + + void SetColCompareHdl(const Link& rLink ) { aColCompareLink = rLink; } + const Link& GetColCompareHdl() const { return aColCompareLink; } + + +}; + +//================================================================== +// Filter- Tabpage +//================================================================== +class SVX_DLLPUBLIC SvxTPFilter: public TabPage +{ +private: + + Link aReadyLink; + Link aModifyLink; + Link aModifyDateLink; + Link aModifyAuthorLink; + Link aModifyRefLink; + Link aRefLink; + Link aModifyComLink; + + SvxRedlinTable* pRedlinTable; + CheckBox aCbDate; + ListBox aLbDate; + DateField aDfDate; + TimeField aTfDate; + ImageButton aIbClock; + FixedText aFtDate2; + DateField aDfDate2; + TimeField aTfDate2; + ImageButton aIbClock2; + CheckBox aCbAuthor; + ListBox aLbAuthor; + CheckBox aCbRange; + Edit aEdRange; + PushButton aBtnRange; + ListBox aLbAction; + CheckBox aCbComment; + Edit aEdComment; + String aActionStr; + String aRangeStr; + String aStrMyName; + BOOL bModified; + + DECL_LINK( SelDateHdl, ListBox* ); + DECL_LINK( RowEnableHdl, CheckBox* ); + DECL_LINK( TimeHdl, ImageButton* ); + DECL_LINK( ModifyHdl, void* ); + DECL_LINK( ModifyDate, void* ); + DECL_LINK( RefHandle, PushButton* ); + + +protected: + + void ShowDateFields(USHORT nKind); + void EnableDateLine1(BOOL bFlag); + void EnableDateLine2(BOOL bFlag); + +public: + SvxTPFilter( Window * pParent); + + virtual void DeactivatePage(); + void SetRedlinTable(SvxRedlinTable*); + + String GetMyName() const; + Date GetFirstDate() const; + void SetFirstDate(const Date &aDate); + Time GetFirstTime() const; + void SetFirstTime(const Time &aTime); + + Date GetLastDate() const; + void SetLastDate(const Date &aDate); + Time GetLastTime() const; + void SetLastTime(const Time &aTime); + + void SetDateMode(USHORT nMode); + USHORT GetDateMode(); + + void ClearAuthors(); + void InsertAuthor( const String& rString, USHORT nPos = LISTBOX_APPEND ); + USHORT GetSelectedAuthorPos(); + String GetSelectedAuthor()const; + void SelectedAuthorPos(USHORT nPos); + USHORT SelectAuthor(const String& aString); + void SetComment(const String &rComment); + String GetComment()const; + + + // Methoden fuer Calc { + void SetRange(const String& rString); + String GetRange() const; + void HideRange(BOOL bHide=TRUE); + void DisableRange(BOOL bFlag=TRUE); + void SetFocusToRange(); + // } Methoden fuer Calc + + void HideClocks(BOOL bHide=TRUE); + void DisableRef(BOOL bFlag); + + BOOL IsDate(); + BOOL IsAuthor(); + BOOL IsRange(); + BOOL IsAction(); + BOOL IsComment(); + + void ShowAction(BOOL bShow=TRUE); + + void CheckDate(BOOL bFlag=TRUE); + void CheckAuthor(BOOL bFlag=TRUE); + void CheckRange(BOOL bFlag=TRUE); + void CheckAction(BOOL bFlag=TRUE); + void CheckComment(BOOL bFlag=TRUE); + + ListBox* GetLbAction(); + + void SetReadyHdl( const Link& rLink ) { aReadyLink= rLink; } + const Link& GetReadyHdl() const { return aReadyLink; } + + void SetModifyHdl( const Link& rLink ) { aModifyLink = rLink; } + const Link& GetModifyHdl() const { return aModifyLink; } + + void SetModifyDateHdl( const Link& rLink ) { aModifyDateLink = rLink; } + const Link& GetModifyDateHdl() const { return aModifyDateLink; } + + void SetModifyAuthorHdl( const Link& rLink ) { aModifyAuthorLink = rLink; } + const Link& GetModifyAuthorHdl() const { return aModifyAuthorLink; } + + void SetModifyCommentHdl(const Link& rLink ) { aModifyComLink = rLink; } + const Link& GetModifyCommentHdl() const { return aModifyComLink; } + + + // Methoden fuer Calc { + void SetModifyRangeHdl( const Link& rLink ) { aModifyRefLink = rLink; } + const Link& GetModifyRangeHdl() const { return aModifyRefLink; } + + void SetRefHdl( const Link& rLink ) { aRefLink = rLink; } + const Link& GetRefHdl() const { return aRefLink; } + + void Enable( bool bEnable = true, bool bChild = true ); + void Disable( bool bChild = true ); + + // } Methoden fuer Calc +}; + + +//================================================================== +// View- Tabpage +//================================================================== + +class SVX_DLLPUBLIC SvxTPView: public TabPage +{ +private: + + Link AcceptClickLk; + Link AcceptAllClickLk; + Link RejectClickLk; + Link RejectAllClickLk; + Link UndoClickLk; + + SvxRedlinTable aViewData; + PushButton PbAccept; + PushButton PbReject; + PushButton PbAcceptAll; + PushButton PbRejectAll; + PushButton PbUndo; + String aTitle1; + String aTitle2; + String aTitle3; + String aTitle4; + String aTitle5; + String aStrMyName; + long nDistance; + Size aMinSize; + + DECL_LINK( PbClickHdl, PushButton* ); + + +protected: + + void Resize(); + +public: + SvxTPView( Window * pParent); + + String GetMyName() const; + + void InsertWriterHeader(); + void InsertCalcHeader(); + SvxRedlinTable* GetTableControl(); + + void EnableAccept(BOOL nFlag=TRUE); + void EnableAcceptAll(BOOL nFlag=TRUE); + void EnableReject(BOOL nFlag=TRUE); + void EnableRejectAll(BOOL nFlag=TRUE); + void EnableUndo(BOOL nFlag=TRUE); + + void DisableAccept() {EnableAccept(FALSE);} + void DisableAcceptAll() {EnableAcceptAll(FALSE);} + void DisableReject() {EnableReject(FALSE);} + void DisableRejectAll() {EnableRejectAll(FALSE);} + void DisableUndo() {EnableUndo(FALSE);} + + void ShowUndo(BOOL nFlag=TRUE); + void HideUndo() {ShowUndo(FALSE);} + BOOL IsUndoVisible(); + + Size GetMinSizePixel(); + + void SetAcceptClickHdl( const Link& rLink ) { AcceptClickLk = rLink; } + const Link& GetAcceptClickHdl() const { return AcceptClickLk; } + + void SetAcceptAllClickHdl( const Link& rLink ) { AcceptAllClickLk = rLink; } + const Link& GetAcceptAllClickHdl() const { return AcceptAllClickLk; } + + void SetRejectClickHdl( const Link& rLink ) { RejectClickLk = rLink; } + const Link& GetRejectClickHdl() const { return RejectClickLk; } + + void SetRejectAllClickHdl( const Link& rLink ) { RejectAllClickLk = rLink; } + const Link& GetRejectAllClickHdl() const { return RejectAllClickLk; } + + void SetUndoClickHdl( const Link& rLink ) { UndoClickLk = rLink; } + const Link& GetUndoAllClickHdl() const { return UndoClickLk; } +}; + +//================================================================== +// Redlining - Control (Accept- Changes) +//================================================================== + +class SVX_DLLPUBLIC SvxAcceptChgCtr : public Control +{ +private: + + Link aMinSizeLink; + TabControl aTCAccept; + SvxTPFilter* pTPFilter; + SvxTPView* pTPView; + Size aMinSize; + +protected: + + virtual void Resize(); + +public: + SvxAcceptChgCtr( Window* pParent, WinBits nWinStyle = 0 ); + SvxAcceptChgCtr( Window* pParent, const ResId& rResId ); + + ~SvxAcceptChgCtr(); + + Size GetMinSizePixel() const; + + void ShowFilterPage(); + void ShowViewPage(); + + BOOL IsFilterPageVisible(); + BOOL IsViewPageVisible(); + + SvxTPFilter* GetFilterPage(); + SvxTPView* GetViewPage(); + SvxRedlinTable* GetViewTable(); + + void SetMinSizeHdl( const Link& rLink ) { aMinSizeLink= rLink; } + const Link& GetMinSizeHdl() const { return aMinSizeLink; } +}; + + +#endif // _SVX_CTREDLIN_HXX + diff --git a/svx/inc/svx/cube3d.hxx b/svx/inc/svx/cube3d.hxx new file mode 100644 index 000000000000..3985ab6ca594 --- /dev/null +++ b/svx/inc/svx/cube3d.hxx @@ -0,0 +1,101 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: cube3d.hxx,v $ + * $Revision: 1.4.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_CUBE3D_HXX +#define _E3D_CUBE3D_HXX + +#include <svx/obj3d.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* | +|* 3D-Quader erzeugen; aPos: Zentrum oder links, unten, hinten |__ +|* (abhaengig von bPosIsCenter) / +|* Mit nSideFlags kann angegeben werden, ob nur ein Teil der +|* Quaderflaechen erzeugt werden kann; die entsprechenden Bits +|* sind in dem enum definiert. Das Flag bDblSided legt fest, +|* ob die erzeugten Flaechen doppelseitig sind (nur sinnvoll, +|* wenn nicht alle Flaechen erzeugt wurden). +|* +\************************************************************************/ + +enum { CUBE_BOTTOM = 0x0001, CUBE_BACK = 0x0002, CUBE_LEFT = 0x0004, + CUBE_TOP = 0x0008, CUBE_RIGHT = 0x0010, CUBE_FRONT = 0x0020, + CUBE_FULL = 0x003F, CUBE_OPEN_TB = 0x0036, CUBE_OPEN_LR = 0x002B, + CUBE_OPEN_FB = 0x001D }; + +class SVX_DLLPUBLIC E3dCubeObj : public E3dCompoundObject +{ +private: + // Zur Geometrieerzeugung eines Cubes notwendige + // #110094# DrawContact section + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + // Parameter + basegfx::B3DPoint aCubePos; + basegfx::B3DVector aCubeSize; + UINT16 nSideFlags; + + // BOOLeans + unsigned bPosIsCenter : 1; + +protected: + void SetDefaultAttributes(E3dDefaultAttributes& rDefault); + +public: + TYPEINFO(); + E3dCubeObj(E3dDefaultAttributes& rDefault, basegfx::B3DPoint aPos, const basegfx::B3DVector& r3DSize); + E3dCubeObj(); + + virtual UINT16 GetObjIdentifier() const; + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + virtual void operator=(const SdrObject&); + + // Lokale Parameter setzen mit Geometrieneuerzeugung + void SetCubePos(const basegfx::B3DPoint& rNew); + const basegfx::B3DPoint& GetCubePos() { return aCubePos; } + + void SetCubeSize(const basegfx::B3DVector& rNew); + const basegfx::B3DVector& GetCubeSize() { return aCubeSize; } + + void SetPosIsCenter(BOOL bNew); + BOOL GetPosIsCenter() { return (BOOL)bPosIsCenter; } + + void SetSideFlags(UINT16 nNew); + UINT16 GetSideFlags() { return nSideFlags; } + + // TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert". + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; +}; + +#endif // _E3D_CUBE3D_HXX diff --git a/svx/inc/svx/dataaccessdescriptor.hxx b/svx/inc/svx/dataaccessdescriptor.hxx new file mode 100644 index 000000000000..335adc3f50db --- /dev/null +++ b/svx/inc/svx/dataaccessdescriptor.hxx @@ -0,0 +1,167 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dataaccessdescriptor.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_DATACCESSDESCRIPTOR_HXX_ +#define _SVX_DATACCESSDESCRIPTOR_HXX_ + +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include "svx/svxdllapi.h" + +//........................................................................ +namespace svx +{ +//........................................................................ + + class ODADescriptorImpl; + + //==================================================================== + //= DataAccessDescriptorProperty + //==================================================================== + enum DataAccessDescriptorProperty + { + daDataSource, /// data source name (string) + daDatabaseLocation, /// database file URL (string) + daConnectionResource, /// database driver URL (string) + daConnection, /// connection (XConnection) + + daCommand, /// command (string) + daCommandType, /// command type (long) + daEscapeProcessing, /// escape processing (boolean) + daFilter, /// additional filter (string) + daCursor, /// the cursor (XResultSet) + + daColumnName, /// column name (string) + daColumnObject, /// column object (XPropertySet) + + daSelection, /// selection (sequence< any >) + daBookmarkSelection, /// selection are bookmarks? (boolean) + + daComponent /// component name (XContent) + }; + + //==================================================================== + //= ODataAccessDescriptor + //==================================================================== + /** class encapsulating the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> service. + */ + class SVX_DLLPUBLIC ODataAccessDescriptor + { + protected: + ODADescriptorImpl* m_pImpl; + + public: + ODataAccessDescriptor(); + ODataAccessDescriptor( const ODataAccessDescriptor& _rSource ); + ODataAccessDescriptor( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rValues ); + ODataAccessDescriptor( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rValues ); + + // allows to construct a descriptor from an Any containing either an XPropertySet or a property value sequence + ODataAccessDescriptor( const ::com::sun::star::uno::Any& _rValues ); + + const ODataAccessDescriptor& operator=(const ODataAccessDescriptor& _rSource); + + ~ODataAccessDescriptor(); + + /** returns the descriptor as property set + <p>If you call this method more than once, without writing any values between both calls, the same object + is returned. If you wrote values, a new object is returned.</p> + */ + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > + createPropertySet(); + /** returns the descriptor as property value sequence + <p>If you call this method more than once, without writing any values between both calls, the same object + is returned. If you wrote values, a new object is returned.</p> + */ + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > + createPropertyValueSequence(); + + /** returns the descriptor as Any sequence + <p>If you call this method more than once, without writing any values between both calls, the same object + is returned. If you wrote values, a new object is returned.</p> + */ + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > + createAnySequence(); + + /** initialized the descriptor from the property set given + <p>If <arg>_bClear</arg> is <TRUE/>, the descriptor will clear all it's current settings before + initializing with the new ones.</p> + */ + void initializeFrom( + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxValues, + sal_Bool _bClear = sal_True); + + /** initialized the descriptor from the property values given + <p>If <arg>_bClear</arg> is <TRUE/>, the descriptor will clear all it's current settings before + initializing with the new ones.</p> + */ + void initializeFrom( + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rValues, + sal_Bool _bClear = sal_True); + + /// checks whether or not a given property is present in the descriptor + sal_Bool has(DataAccessDescriptorProperty _eWhich) const; + + /** erases the given property from the descriptor + */ + void erase(DataAccessDescriptorProperty _eWhich); + + /** empties the descriptor + */ + void clear(); + + /// return the value of a given property + const ::com::sun::star::uno::Any& operator [] ( DataAccessDescriptorProperty _eWhich ) const; + + /** return the (modifiable) value of a given property + <p>This operator is not allowed to be called if the descriptor is readonly.</p> + */ + ::com::sun::star::uno::Any& operator [] ( DataAccessDescriptorProperty _eWhich ); + + + /** returns either the data source name if given or the database location + */ + ::rtl::OUString getDataSource() const; + + + /** set the data source name, if it is not file URL + @param _sDataSourceNameOrLocation + the data source name or database location + */ + void setDataSource(const ::rtl::OUString& _sDataSourceNameOrLocation); + }; + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // _SVX_DATACCESSDESCRIPTOR_HXX_ + + diff --git a/svx/inc/svx/databaselocationinput.hxx b/svx/inc/svx/databaselocationinput.hxx new file mode 100644 index 000000000000..650aa26bb857 --- /dev/null +++ b/svx/inc/svx/databaselocationinput.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: databaselocationinput.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_DATABASELOCATIONINPUT_HXX +#define SVX_DATABASELOCATIONINPUT_HXX + +#include "svx/svxdllapi.h" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +class PushButton; +class String; +namespace svt { class OFileURLControl; } +namespace comphelper { class ComponentContext; } + +#include <memory> + +//........................................................................ +namespace svx +{ +//........................................................................ + + //==================================================================== + //= DatabaseLocationInputController + //==================================================================== + class DatabaseLocationInputController_Impl; + /** helper class to control controls needed to input a database location + + If you allow, in your dialog, to save a database document, then you usually + have a OFileURLControl for inputting the actual location, and a push button + to browse for a location. + + This helper class controls such two UI elements. + */ + class SVX_DLLPUBLIC DatabaseLocationInputController + { + public: + DatabaseLocationInputController( + const ::comphelper::ComponentContext& _rContext, + ::svt::OFileURLControl& _rLocationInput, + PushButton& _rBrowseButton + ); + ~DatabaseLocationInputController(); + + /** sets the given URL at the input control, after translating it into a system path + */ + void setURL( const String& _rURL ); + + /** returns the current database location, in form of an URL (not a system path) + */ + String getURL() const; + + /** prepares committing the database location entered in the input field + + Effectively, this method checks whether the file in the location already + exists, and if so, it asks the user whether to overwrite it. + + If the method is called multiple times, this check only happens when the location + changed since the last call. + */ + bool prepareCommit(); + + private: + ::std::auto_ptr< DatabaseLocationInputController_Impl > + m_pImpl; + }; + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // SVX_DATABASELOCATIONINPUT_HXX diff --git a/svx/inc/svx/dbaexchange.hxx b/svx/inc/svx/dbaexchange.hxx new file mode 100644 index 000000000000..abd9ec7e8012 --- /dev/null +++ b/svx/inc/svx/dbaexchange.hxx @@ -0,0 +1,302 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dbaexchange.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_DBAEXCHANGE_HXX_ +#define _SVX_DBAEXCHANGE_HXX_ + +#include <svtools/transfer.hxx> +#include <comphelper/stl_types.hxx> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/sdbc/XConnection.hpp> +#include <svx/dataaccessdescriptor.hxx> +#include <com/sun/star/uno/Sequence.hxx> +#include "svx/svxdllapi.h" + +//........................................................................ +namespace svx +{ +//........................................................................ + +// column transfer formats +#define CTF_FIELD_DESCRIPTOR 0x0001 // the field descriptor format +#define CTF_CONTROL_EXCHANGE 0x0002 // the control exchange format +#define CTF_COLUMN_DESCRIPTOR 0x0004 // data access descriptor for a column + + //==================================================================== + //= OColumnTransferable + //==================================================================== + class SVX_DLLPUBLIC OColumnTransferable : public TransferableHelper + { + protected: + ODataAccessDescriptor m_aDescriptor; + ::rtl::OUString m_sCompatibleFormat; + sal_Int32 m_nFormatFlags; + + public: + /** construct the transferable + */ + OColumnTransferable( + const ::rtl::OUString& _rDatasource + ,const ::rtl::OUString& _rConnectionResource + ,const sal_Int32 _nCommandType + ,const ::rtl::OUString& _rCommand + ,const ::rtl::OUString& _rFieldName + ,sal_Int32 _nFormats + ); + + /** construct the transferable from a data access descriptor + + Note that some of the aspects, in particular all which cannot be represented + as string, can only be transported via the CTF_COLUMN_DESCRIPTOR format. + + @param _rDescriptor + The descriptor for the column. It must contain at least + <ul><li>information sufficient to create a connection, that is, either one of DataSource, DatabaseLocation, + ConnectionResource, and daConnection</li> + <li>a Command</li> + <li>a CommandType</li> + <li>a ColumnName or ColumnObject</li> + </ul> + */ + OColumnTransferable( + const ODataAccessDescriptor& _rDescriptor, + sal_Int32 _nFormats + ); + + /** construct the transferable from a DatabaseForm component and a field name + + @param _rxForm + the form which is bound to the data source which's field is to be dragged + + @param _rFieldName + the name of the field to be dragged + + @param _rxColumn + the column object. Won't be used if <arg>_nFormats</arg> does not include the CTF_COLUMN_DESCRIPTOR + flag.<br/> + May be <NULL/>. + + @param _rxConnection + the connection the column belongs to. Won't be used if <arg>_nFormats</arg> does not include the CTF_COLUMN_DESCRIPTOR + flag.<br/> + May be <NULL/>. + + @param _nFormats + supported formats. Must be a combination of the CTF_XXX flags + */ + OColumnTransferable( + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxForm, + const ::rtl::OUString& _rFieldName, + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn, + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, + sal_Int32 _nFormats + ); + + /** checks whether or not a column descriptor can be extracted from the data flavor vector given + @param _rFlavors + available flavors + @param _nFormats + formats to accept + */ + static sal_Bool canExtractColumnDescriptor(const DataFlavorExVector& _rFlavors, sal_Int32 _nFormats); + + /** extracts a column descriptor from the transferable given + */ + static sal_Bool extractColumnDescriptor( + const TransferableDataHelper& _rData + ,::rtl::OUString& _rDatasource + ,::rtl::OUString& _rDatabaseLocation + ,::rtl::OUString& _rConnectionResource + ,sal_Int32& _nCommandType + ,::rtl::OUString& _rCommand + ,::rtl::OUString& _rFieldName + ); + + /** extracts a column descriptor from the transferable given + */ + static ODataAccessDescriptor + extractColumnDescriptor(const TransferableDataHelper& _rData); + + /** adds the data contained in the object to the given data container + <p>This method helps you treating this class as simple container class:<br/> + At the moment, it is a data container and a transferable. + Using <method>addDataToContainer</method>, you can treat the class as dumb data container, + doing the Drag'n'Drop with a <type>TransferDataContainer</type> instance (which may contain + additional formats)</p> + @TODO + split this class into a two separate classes: one for the data container aspect, one for + the transfer aspect + */ + void addDataToContainer( TransferDataContainer* _pContainer ); + + protected: + // TransferableHelper overridables + virtual void AddSupportedFormats(); + virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + + static sal_uInt32 getDescriptorFormatId(); + + private: + SVX_DLLPRIVATE void implConstruct( + const ::rtl::OUString& _rDatasource + ,const ::rtl::OUString& _rConnectionResource + ,const sal_Int32 _nCommandType + ,const ::rtl::OUString& _rCommand + ,const ::rtl::OUString& _rFieldName + ); + }; + + //==================================================================== + //= ODataAccessObjectTransferable + //==================================================================== + /** class for transfering data access objects (tables, queries, statements ...) + */ + class SVX_DLLPUBLIC ODataAccessObjectTransferable : public TransferableHelper + { + ODataAccessDescriptor m_aDescriptor; + ::rtl::OUString m_sCompatibleObjectDescription; + // needed to provide a SOT_FORMATSTR_ID_SBA_DATAEXCHANGE format + + public: + /** should be used copying and the connection is needed. + @param _rDatasource + The data source name. + @param _nCommandType + The kind of command. @see com.sun.star.sdbc.CommandType + @param _rCommand + The command, either a name of a table or query or a SQL statement. + */ + ODataAccessObjectTransferable( + const ::rtl::OUString& _rDatasourceOrLocation + ,const ::rtl::OUString& _rConnectionResource + ,const sal_Int32 _nCommandType + ,const ::rtl::OUString& _rCommand + ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection + ); + + /** should be used when copying a query object and no connection is available. + @param _rDatasource + The data source name. + @param _nCommandType + The kind of command. @see com.sun.star.sdbc.CommandType + @param _rCommand + The command, either a name of a table or query or a SQL statement. + */ + ODataAccessObjectTransferable( + const ::rtl::OUString& _rDatasourceOrLocation + ,const ::rtl::OUString& _rConnectionResource + ,const sal_Int32 _nCommandType + ,const ::rtl::OUString& _rCommand + ); + + /** with this ctor, only the object descriptor format will be provided + */ + ODataAccessObjectTransferable( + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxLivingForm + ); + + /** checks whether or not an object descriptor can be extracted from the data flavor vector given + @param _rFlavors + available flavors + @param _nFormats + formats to accept + */ + static sal_Bool canExtractObjectDescriptor(const DataFlavorExVector& _rFlavors); + + /** extracts a object descriptor from the transferable given + */ + static ODataAccessDescriptor + extractObjectDescriptor(const TransferableDataHelper& _rData); + + protected: + virtual void AddSupportedFormats(); + virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + virtual void ObjectReleased(); + + protected: + const ODataAccessDescriptor& getDescriptor() const { return m_aDescriptor; } + ODataAccessDescriptor& getDescriptor() { return m_aDescriptor; } + protected: + void addCompatibleSelectionDescription( + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& _rSelRows + ); + // normally, a derived class could simply access getDescriptor[daSelection] and place the sequence therein + // but unfortunately, we have this damned compatible format, and this can't be accessed in + // derived classes (our class is the only one which should be contaminated with this) + + private: + SVX_DLLPRIVATE void construct( const ::rtl::OUString& _rDatasourceOrLocation + ,const ::rtl::OUString& _rConnectionResource + ,const sal_Int32 _nCommandType + ,const ::rtl::OUString& _rCommand + ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection + ,sal_Bool _bAddCommand + ,const ::rtl::OUString& _sActiveCommand); + }; + + //==================================================================== + //= OMultiColumnTransferable + //==================================================================== + /** class for transfering multiple columns + */ + class SVX_DLLPUBLIC OMultiColumnTransferable : public TransferableHelper + { + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aDescriptors; + + public: + OMultiColumnTransferable(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aDescriptors); + + void push_back(ODataAccessDescriptor& _aDescriptor); + + /** checks whether or not an object descriptor can be extracted from the data flavor vector given + @param _rFlavors + available flavors + @param _nFormats + formats to accept + */ + static sal_Bool canExtractDescriptor(const DataFlavorExVector& _rFlavors); + + /** extracts a object descriptor from the transferable given + */ + static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > extractDescriptor(const TransferableDataHelper& _rData); + + protected: + virtual void AddSupportedFormats(); + virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + virtual void ObjectReleased(); + static sal_uInt32 getDescriptorFormatId(); + }; + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // _SVX_DBAEXCHANGE_HXX_ + diff --git a/svx/inc/svx/dbaobjectex.hxx b/svx/inc/svx/dbaobjectex.hxx new file mode 100644 index 000000000000..356d2d74f1b1 --- /dev/null +++ b/svx/inc/svx/dbaobjectex.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dbaobjectex.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_DBAOBJECTEX_HXX +#define SVX_DBAOBJECTEX_HXX + +#include <svtools/transfer.hxx> +#include <comphelper/stl_types.hxx> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/sdbc/XConnection.hpp> +#include <com/sun/star/ucb/XContent.hpp> +#include <svx/dataaccessdescriptor.hxx> +#include <com/sun/star/uno/Sequence.hxx> +#include "svx/svxdllapi.h" + +//........................................................................ +namespace svx +{ +//........................................................................ + + //==================================================================== + //= OComponentTransferable + //==================================================================== + class SVX_DLLPUBLIC OComponentTransferable : public TransferableHelper + { + protected: + ODataAccessDescriptor m_aDescriptor; + + public: + /** construct the transferable + */ + OComponentTransferable( + const ::rtl::OUString& _rDatasourceOrLocation + ,const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent + ); + + /** checks whether or not a component descriptor can be extracted from the data flavor vector given + @param _rFlavors + available flavors + */ + static sal_Bool canExtractComponentDescriptor(const DataFlavorExVector& _rFlavors,sal_Bool _bForm ); + + /** extracts a component descriptor from the transferable given + */ + static sal_Bool extractComponentDescriptor( + const TransferableDataHelper& _rData + ,sal_Bool _bExtractForm + ,::rtl::OUString& _rDatasourceOrLocation + ,::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent + ); + + /** extracts a component descriptor from the transferable given + */ + static ODataAccessDescriptor + extractComponentDescriptor(const TransferableDataHelper& _rData); + + protected: + // TransferableHelper overridables + virtual void AddSupportedFormats(); + virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + + static sal_uInt32 getDescriptorFormatId(sal_Bool _bExtractForm); + }; + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // SVX_DBAOBJECTEX_HXX + diff --git a/svx/inc/svx/dbcharsethelper.hxx b/svx/inc/svx/dbcharsethelper.hxx new file mode 100755 index 000000000000..444538db33f0 --- /dev/null +++ b/svx/inc/svx/dbcharsethelper.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dbcharsethelper.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_DBCHARSETHELPER_HXX +#define SVX_DBCHARSETHELPER_HXX +#include "svx/svxdllapi.h" +#include "svx/dbtoolsclient.hxx" + +//........................................................................ +namespace svxform +{ +//........................................................................ + + //==================================================================== + //= ODataAccessCharsetHelper + //==================================================================== + class SVX_DLLPUBLIC ODataAccessCharsetHelper : public ODbtoolsClient + { + protected: + mutable ::rtl::Reference< ::connectivity::simple::IDataAccessCharSet > m_xCharsetHelper; + + protected: + virtual bool ensureLoaded() const; + + public: + ODataAccessCharsetHelper( ); + + inline sal_Int32 getSupportedTextEncodings( ::std::vector< rtl_TextEncoding >& _rEncs ) const + { + if ( ensureLoaded() ) + return m_xCharsetHelper->getSupportedTextEncodings( _rEncs ); + return 0; + } + }; + +//........................................................................ +} // namespace svxform +//........................................................................ + +#endif // SVX_DBCHARSETCLIENT_HXX + + diff --git a/svx/inc/svx/dbtoolsclient.hxx b/svx/inc/svx/dbtoolsclient.hxx new file mode 100755 index 000000000000..ff606c99da7e --- /dev/null +++ b/svx/inc/svx/dbtoolsclient.hxx @@ -0,0 +1,238 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dbtoolsclient.hxx,v $ + * $Revision: 1.18 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_DBTOOLSCLIENT_HXX +#define SVX_DBTOOLSCLIENT_HXX + +#include <connectivity/virtualdbtools.hxx> +#include <osl/mutex.hxx> +#include <osl/module.h> +#include <tools/solar.h> +#include <unotools/sharedunocomponent.hxx> +#include "svx/svxdllapi.h" + +//........................................................................ +namespace svxform +{ +//........................................................................ + + typedef ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XConnection > SharedConnection; + + //==================================================================== + //= ODbtoolsClient + //==================================================================== + /** base class for classes which want to use dbtools features with load-on-call + of the dbtools lib. + */ + class SVX_DLLPUBLIC ODbtoolsClient + { + private: + static ::osl::Mutex s_aMutex; + static sal_Int32 s_nClients; + static oslModule s_hDbtoolsModule; + static ::connectivity::simple::createDataAccessToolsFactoryFunction + s_pFactoryCreationFunc; + //add by BerryJia for fixing Bug97420 Time:2002-9-12-11:00(PRC time) + mutable BOOL m_bCreateAlready; + + private: + mutable ::rtl::Reference< ::connectivity::simple::IDataAccessToolsFactory > m_xDataAccessFactory; + + protected: + ODbtoolsClient(); + virtual ~ODbtoolsClient(); + + virtual bool ensureLoaded() const; + + protected: + const ::rtl::Reference< ::connectivity::simple::IDataAccessToolsFactory >& + getFactory() const { return m_xDataAccessFactory; } + + private: + static void registerClient(); + static void revokeClient(); + }; + + //==================================================================== + //= OStaticDataAccessTools + //==================================================================== + class SVX_DLLPUBLIC OStaticDataAccessTools : public ODbtoolsClient + { + protected: + mutable ::rtl::Reference< ::connectivity::simple::IDataAccessTools > m_xDataAccessTools; + + protected: + virtual bool ensureLoaded() const; + + public: + OStaticDataAccessTools(); + + const ::rtl::Reference< ::connectivity::simple::IDataAccessTools >& getDataAccessTools() const { return m_xDataAccessTools; } + + // ------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> getNumberFormats( + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConn, + sal_Bool _bAllowDefault + ) const; + + // ------------------------------------------------ + sal_Int32 getDefaultNumberFormat( + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xColumn, + const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes >& _xTypes, + const ::com::sun::star::lang::Locale& _rLocale ); + + // ------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection_withFeedback( + const ::rtl::OUString& _rDataSourceName, + const ::rtl::OUString& _rUser, + const ::rtl::OUString& _rPwd, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory + ) const SAL_THROW ( (::com::sun::star::sdbc::SQLException) ); + + // ------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> connectRowset( + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory, + sal_Bool _bSetAsActiveConnection + ) const SAL_THROW ( ( ::com::sun::star::sdbc::SQLException + , ::com::sun::star::lang::WrappedTargetException + , ::com::sun::star::uno::RuntimeException) ); + + // ------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getRowSetConnection( + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet) + const SAL_THROW ( (::com::sun::star::uno::RuntimeException) ); + + // ------------------------------------------------ + void TransferFormComponentProperties( + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxOld, + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxNew, + const ::com::sun::star::lang::Locale& _rLocale + ) const; + + // ------------------------------------------------ + ::rtl::OUString quoteName( + const ::rtl::OUString& _rQuote, + const ::rtl::OUString& _rName + ) const; + + // ------------------------------------------------ + ::rtl::OUString composeTableNameForSelect( + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xTable + ) const; + + // ------------------------------------------------ + ::com::sun::star::sdb::SQLContext prependContextInfo( + ::com::sun::star::sdbc::SQLException& _rException, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext, + const ::rtl::OUString& _rContextDescription, + const ::rtl::OUString& _rContextDetails + ) const; + + // ------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource( + const ::rtl::OUString& _rsRegisteredName, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory + ) const; + + // ------------------------------------------------ + /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::INSERT + @param _rxCursorSet the property set + */ + sal_Bool canInsert(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const; + + // ------------------------------------------------ + /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::UPDATE + @param _rxCursorSet the property set + */ + sal_Bool canUpdate(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const; + + // ------------------------------------------------ + /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::DELETE + @param _rxCursorSet the property set + */ + sal_Bool canDelete(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const; + + // ------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > + getFieldsByCommandDescriptor( + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, + const sal_Int32 _nCommandType, + const ::rtl::OUString& _rCommand, + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxKeepFieldsAlive, + ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL + ) SAL_THROW( ( ) ); + + // ------------------------------------------------ + ::com::sun::star::uno::Sequence< ::rtl::OUString > + getFieldNamesByCommandDescriptor( + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, + const sal_Int32 _nCommandType, + const ::rtl::OUString& _rCommand, + ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL + ) SAL_THROW( ( ) ); + + // ------------------------------------------------ + bool isEmbeddedInDatabase( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent, + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxActualConnection + ); + + // ------------------------------------------------ + bool isEmbeddedInDatabase( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent + ); + }; + + //==================================================================== + //= DBToolsObjectFactory + //==================================================================== + class SVX_DLLPUBLIC DBToolsObjectFactory : public ODbtoolsClient + { + public: + DBToolsObjectFactory(); + ~DBToolsObjectFactory(); + + // ------------------------------------------------ + ::std::auto_ptr< ::dbtools::FormattedColumnValue > createFormattedColumnValue( + const ::comphelper::ComponentContext& _rContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet, + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn + ); + }; + +//........................................................................ +} // namespace svxform +//........................................................................ + +#endif // SVX_DBTOOLSCLIENT_HXX + + diff --git a/svx/inc/svx/def3d.hxx b/svx/inc/svx/def3d.hxx new file mode 100644 index 000000000000..4c67a969e925 --- /dev/null +++ b/svx/inc/svx/def3d.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: def3d.hxx,v $ + * $Revision: 1.3.226.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_DEF3D_HXX +#define _SVX_DEF3D_HXX + +#ifndef _INC_MATH +#include <math.h> +#endif +#include <tools/solar.h> + +const double fPiDiv180 = 0.01745329251994; +const double EPSILON = 1e-06; + +#define DEG2RAD(fAngle) (fPiDiv180 * (fAngle)) + +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +//+++ 3D-Hilfsfunktionen +++++++++++++++++++++++++++++++++++++++++++++++++ +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +enum E3dDragConstraint { E3DDRAG_CONSTR_X = 0x0001, + E3DDRAG_CONSTR_Y = 0x0002, + E3DDRAG_CONSTR_Z = 0x0004, + E3DDRAG_CONSTR_XY = 0x0003, + E3DDRAG_CONSTR_XZ = 0x0005, + E3DDRAG_CONSTR_YZ = 0x0006, + E3DDRAG_CONSTR_XYZ = 0x0007 +}; + +#endif diff --git a/svx/inc/svx/deflt3d.hxx b/svx/inc/svx/deflt3d.hxx new file mode 100644 index 000000000000..e8993b6d7fba --- /dev/null +++ b/svx/inc/svx/deflt3d.hxx @@ -0,0 +1,138 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: deflt3d.hxx,v $ + * $Revision: 1.3.216.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_DEFLT3D_HXX +#define _E3D_DEFLT3D_HXX + +#include <basegfx/point/b3dpoint.hxx> +#include <basegfx/vector/b3dvector.hxx> +#include "svx/svxdllapi.h" +#include <tools/color.hxx> + +/************************************************************************* +|* +|* Klasse zum verwalten der 3D-Default Attribute +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dDefaultAttributes +{ +private: + // Compound-Objekt + Color aDefaultAmbientColor; + BOOL bDefaultCreateNormals; + BOOL bDefaultCreateTexture; + + // Cube-Objekt + basegfx::B3DPoint aDefaultCubePos; + basegfx::B3DVector aDefaultCubeSize; + UINT16 nDefaultCubeSideFlags; + BOOL bDefaultCubePosIsCenter; + + // Sphere-Objekt + basegfx::B3DPoint aDefaultSphereCenter; + basegfx::B3DVector aDefaultSphereSize; + + // Lathe-Objekt + long nDefaultLatheEndAngle; + BOOL bDefaultLatheSmoothed; + BOOL bDefaultLatheSmoothFrontBack; + BOOL bDefaultLatheCharacterMode; + BOOL bDefaultLatheCloseFront; + BOOL bDefaultLatheCloseBack; + + // Extrude-Objekt + BOOL bDefaultExtrudeSmoothed; + BOOL bDefaultExtrudeSmoothFrontBack; + BOOL bDefaultExtrudeCharacterMode; + BOOL bDefaultExtrudeCloseFront; + BOOL bDefaultExtrudeCloseBack; + +public: + // Konstruktor + E3dDefaultAttributes(); + + // Defaults zuruecksetzen + void Reset(); + + // Getter/Setter fuer Default-Werte aller 3D-Objekte + // Compound-Objekt + const Color& GetDefaultAmbientColor() { return aDefaultAmbientColor; } + void SetDefaultAmbientColor(const Color& rNew) { aDefaultAmbientColor = rNew; } + + BOOL GetDefaultCreateNormals() const { return bDefaultCreateNormals; } + void SetDefaultCreateNormals(const BOOL bNew) { bDefaultCreateNormals = bNew; } + BOOL GetDefaultCreateTexture() const { return bDefaultCreateTexture; } + void SetDefaultCreateTexture(const BOOL bNew) { bDefaultCreateTexture = bNew; } + + // Cube-Objekt + const basegfx::B3DPoint& GetDefaultCubePos() { return aDefaultCubePos; } + void SetDefaultCubePos(const basegfx::B3DPoint& rNew) { aDefaultCubePos = rNew; } + const basegfx::B3DVector& GetDefaultCubeSize() { return aDefaultCubeSize; } + void SetDefaultCubeSize(const basegfx::B3DVector& rNew) { aDefaultCubeSize = rNew; } + UINT16 GetDefaultCubeSideFlags() const { return nDefaultCubeSideFlags; } + void SetDefaultCubeSideFlags(const UINT16 nNew) { nDefaultCubeSideFlags = nNew; } + BOOL GetDefaultCubePosIsCenter() const { return bDefaultCubePosIsCenter; } + void SetDefaultCubePosIsCenter(const BOOL bNew) { bDefaultCubePosIsCenter = bNew; } + + // Sphere-Objekt + const basegfx::B3DPoint& GetDefaultSphereCenter() { return aDefaultSphereCenter; } + void SetDefaultSphereCenter(const basegfx::B3DPoint& rNew) { aDefaultSphereCenter = rNew; } + const basegfx::B3DVector& GetDefaultSphereSize() { return aDefaultSphereSize; } + void SetDefaultSphereSize(const basegfx::B3DPoint& rNew) { aDefaultSphereSize = rNew; } + + // Lathe-Objekt + long GetDefaultLatheEndAngle() const { return nDefaultLatheEndAngle; } + void SetDefaultLatheEndAngle(const long nNew) { nDefaultLatheEndAngle = nNew; } + BOOL GetDefaultLatheSmoothed() const { return bDefaultLatheSmoothed; } + void SetDefaultLatheSmoothed(const BOOL bNew) { bDefaultLatheSmoothed = bNew; } + BOOL GetDefaultLatheSmoothFrontBack() const { return bDefaultLatheSmoothFrontBack; } + void SetDefaultLatheSmoothFrontBack(const BOOL bNew) { bDefaultLatheSmoothFrontBack = bNew; } + BOOL GetDefaultLatheCharacterMode() const { return bDefaultLatheCharacterMode; } + void SetDefaultLatheCharacterMode(const BOOL bNew) { bDefaultLatheCharacterMode = bNew; } + BOOL GetDefaultLatheCloseFront() const { return bDefaultLatheCloseFront; } + void SetDefaultLatheCloseFront(const BOOL bNew) { bDefaultLatheCloseFront = bNew; } + BOOL GetDefaultLatheCloseBack() const { return bDefaultLatheCloseBack; } + void SetDefaultLatheCloseBack(const BOOL bNew) { bDefaultLatheCloseBack = bNew; } + + // Extrude-Objekt + BOOL GetDefaultExtrudeSmoothed() const { return bDefaultExtrudeSmoothed; } + void SetDefaultExtrudeSmoothed(const BOOL bNew) { bDefaultExtrudeSmoothed = bNew; } + BOOL GetDefaultExtrudeSmoothFrontBack() const { return bDefaultExtrudeSmoothFrontBack; } + void SetDefaultExtrudeSmoothFrontBack(const BOOL bNew) { bDefaultExtrudeSmoothFrontBack = bNew; } + BOOL GetDefaultExtrudeCharacterMode() const { return bDefaultExtrudeCharacterMode; } + void SetDefaultExtrudeCharacterMode(const BOOL bNew) { bDefaultExtrudeCharacterMode = bNew; } + BOOL GetDefaultExtrudeCloseFront() const { return bDefaultExtrudeCloseFront; } + void SetDefaultExtrudeCloseFront(const BOOL bNew) { bDefaultExtrudeCloseFront = bNew; } + BOOL GetDefaultExtrudeCloseBack() const { return bDefaultExtrudeCloseBack; } + void SetDefaultExtrudeCloseBack(const BOOL bNew) { bDefaultExtrudeCloseBack = bNew; } +}; + +#endif // _E3D_DEFLT3D_HXX diff --git a/svx/inc/svx/dialmgr.hxx b/svx/inc/svx/dialmgr.hxx new file mode 100644 index 000000000000..e2ba9c3b1e0e --- /dev/null +++ b/svx/inc/svx/dialmgr.hxx @@ -0,0 +1,52 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dialmgr.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DIALMGR_HXX +#define _SVX_DIALMGR_HXX + +// include --------------------------------------------------------------- + +#include <tools/resid.hxx> +#include "svx/svxdllapi.h" + +// forward --------------------------------------------------------------- + +class ResMgr; +struct SVX_DLLPUBLIC DialogsResMgr +{ + static ResMgr* GetResMgr(); +}; + +#define DIALOG_MGR() (*DialogsResMgr::GetResMgr()) +#define SVX_RES(i) ResId(i,DIALOG_MGR()) +#define SVX_RESSTR(i) UniString(ResId(i,DIALOG_MGR())) +#define SVX_RESSSTR(i) String(ResId(i,DIALOG_MGR())) + +#endif + diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc new file mode 100644 index 000000000000..c7cddf48e27c --- /dev/null +++ b/svx/inc/svx/dialogs.hrc @@ -0,0 +1,1147 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dialogs.hrc,v $ + * $Revision: 1.15 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DIALOGS_HRC +#define _SVX_DIALOGS_HRC + +// include ------------------------------------------------------------------ + +#include <svx/svxids.hrc> +#include <sfx2/dialogs.hrc> + +// Resource-Id's ------------------------------------------------------------ + +// Bitte FIRSTFREE pflegen!!! (gilt nicht f"ur Strings) +#define RID_SVX_FIRSTFREE 305 + +// some strings also used in CUI +#define RID_SVXSTR_PAPERBIN (RID_SVX_START + 145) +#define RID_SVXSTR_PAPERBIN_SETTINGS (RID_SVX_START + 149) +#define RID_SVXERRCTX (RID_SVX_START + 351) +#define RID_SVXSTR_COLOR (RID_SVX_START + 179) +#define RID_SVXSTR_TRANSPARENT (RID_SVX_START + 190) +#define RID_SVXSTR_AUTOMATIC (RID_SVX_START + 841) +#define RID_SVXSTR_INVISIBLE (RID_SVX_START + 178) +#define RID_SVXSTR_NONE (RID_SVX_START + 183) +#define RID_SVXSTR_SOLID (RID_SVX_START + 160) +#define RID_SVXSTR_LINEEND (RID_SVX_START + 237) +#define RID_SVXSTR_GRADIENT (RID_SVX_START + 161) +#define RID_SVXSTR_HATCH (RID_SVX_START + 180) +#define RID_SVXSTR_BITMAP (RID_SVX_START + 167) +#define RID_SVXSTR_LINESTYLE (RID_SVX_START + 173) +#define RID_SVXSTR_FIELDUNIT_TABLE (RID_SVX_START + 311) +#define RID_SVXSTR_COLOR_USER (RID_SVX_START + 250) + +// factory IDs of tabpages implemented in CUI +#define RID_SVXPAGE_CHAR_TWOLINES (RID_SVX_START + 242) +#define RID_SVXPAGE_EXT_PARAGRAPH (RID_SVX_START + 7) +#define RID_SVXPAGE_GRFCROP (RID_SVX_START + 238) +#define RID_SVXPAGE_CHAR_NAME (RID_SVX_START + 239) +#define RID_SVXPAGE_CHAR_EFFECTS (RID_SVX_START + 240) +#define RID_SVXPAGE_CHAR_POSITION (RID_SVX_START + 241) +#define RID_SVXPAGE_STD_PARAGRAPH (RID_SVX_START + 6) +#define RID_SVXPAGE_ALIGN_PARAGRAPH (RID_SVX_START + 187) +#define RID_SVXPAGE_PARA_ASIAN (RID_SVX_START + 245) +#define RID_SVXPAGE_TABULATOR (RID_SVX_START + 2) +#define RID_SFXPAGE_DBREGISTER (RID_OFA_START + 123) +#define RID_SVXPAGE_NUMBERFORMAT (RID_SVX_START + 41) +#define RID_SVXPAGE_ALIGNMENT (RID_SVX_START + 90) +#define RID_SVXPAGE_BORDER (RID_SVX_START + 5) +#define RID_SVXPAGE_BACKGROUND (RID_SVX_START + 1) +#define RID_SVXPAGE_PAGE (RID_SVX_START + 25) +#define RID_SVXPAGE_LINE (RID_SVX_START + 51) +#define RID_SVXPAGE_AREA (RID_SVX_START + 56) +#define RID_SVXPAGE_SHADOW (RID_SVX_START + 61) +#define RID_SVXPAGE_TRANSPARENCE (RID_SVX_START + 54) +#define RID_SVXPAGE_TEXTATTR (RID_SVX_START + 153) +#define RID_SVXPAGE_TEXTANIMATION (RID_SVX_START + 184) +#define RID_SVXPAGE_MEASURE (RID_SVX_START + 161) +#define RID_SVXPAGE_CONNECTION (RID_SVX_START + 191) +#define RID_SVXPAGE_LINE_DEF (RID_SVX_START + 52) +#define RID_SVXPAGE_LINEEND_DEF (RID_SVX_START + 53) +#define RID_SVXPAGE_NUM_OPTIONS (RID_SVX_START + 219) +#define RID_SVXPAGE_NUM_POSITION (RID_SVX_START + 220) +#define RID_SVXPAGE_PICK_SINGLE_NUM (RID_SVX_START + 215) +#define RID_SVXPAGE_PICK_BULLET (RID_SVX_START + 216) +#define RID_SVXPAGE_PICK_NUM (RID_SVX_START + 217) +#define RID_SVXPAGE_PICK_BMP (RID_SVX_START + 218) +#define RID_SVXPAGE_CAPTION (RID_SVX_START + 150) +#define RID_SVXPAGE_SWPOSSIZE (RID_SVX_START + 288) +#define RID_SVXPAGE_POSITION_SIZE (RID_SVX_START + 87) +#define RID_SVXPAGE_EVENTASSIGN (RID_SVX_START + 303) +#define RID_SVXPAGE_HATCH (RID_SVX_START + 57) +#define RID_SVXPAGE_BITMAP (RID_SVX_START + 58) +#define RID_SVXPAGE_GRADIENT (RID_SVX_START + 59) +#define RID_SVXPAGE_ANGLE (RID_SVX_START + 48) +#define RID_SVXPAGE_SLANT (RID_SVX_START + 49) +#define RID_SVXPAGE_DISTRIBUTE (RID_SVX_START + 236) +#define RID_SVXPAGE_IMPROVEMENT (RID_SVX_START + 302) +#define RID_SVXPAGE_MACROASSIGN (RID_SVX_START + 296) + + +// why extra defines for pages that already exist? +#define RID_SCH_TransformTabDLG_SVXPAGE_ANGLE (RID_SVX_START + 998) +#define RID_SCH_TransformTabDLG_SVXPAGE_SLANT (RID_SVX_START + 999) + +// ID of tabpages implemented in SVX, but used in CUI +#define RID_SVXPAGE_GRID (RID_SVX_START + 152) + +// factory IDs of dialogs implemented in CUI +#define RID_SVX_GRFFILTER_DLG_SEPIA (RID_SVX_START + 334) +#define RID_SVX_GRFFILTER_DLG_POSTER (RID_SVX_START + 335) +#define RID_SVX_GRFFILTER_DLG_MOSAIC (RID_SVX_START + 332) +#define RID_SVX_GRFFILTER_DLG_SOLARIZE (RID_SVX_START + 333) +#define RID_SVX_GRFFILTER_DLG_EMBOSS (RID_SVX_START + 336) +#define RID_SVXDLG_SEARCHFORMAT (RID_SVX_START + 21) +#define RID_SVXDLG_CHARMAP ( RID_SVX_START + 10 ) +#define RID_SVXDLG_POSTIT ( RID_SVX_START + 8 ) + +// only needed for layout: +#define RID_SVXDLG_ZOOM ( RID_SVX_START + 0 ) + +// IDs of options pages of applications +#define RID_SW_TP_MAILCONFIG (RID_OFA_START + 102) +#define RID_SW_TP_STD_FONT_CJK (RID_OFA_START + 247) +#define RID_SW_TP_STD_FONT_CTL (RID_OFA_START + 251) +#define RID_SW_TP_OPTLOAD_PAGE (RID_OFA_START + 214) +#define RID_SW_TP_CONTENT_OPT (RID_OFA_START + 206) +#define RID_SW_TP_OPTSHDWCRSR (RID_OFA_START + 211) +#define RID_SW_TP_STD_FONT (RID_OFA_START + 208) +#define RID_SW_TP_OPTPRINT_PAGE (RID_OFA_START + 209) +#define RID_SW_TP_OPTTABLE_PAGE (RID_OFA_START + 210) +#define RID_SW_TP_REDLINE_OPT (RID_OFA_START + 212) +#define RID_SW_TP_OPTCOMPATIBILITY_PAGE (RID_OFA_START + 255) +#define RID_SW_TP_HTML_CONTENT_OPT (RID_OFA_START + 240) +#define RID_SW_TP_HTML_OPTPRINT_PAGE (RID_OFA_START + 242) +#define RID_SW_TP_HTML_OPTTABLE_PAGE (RID_OFA_START + 243) +#define RID_SW_TP_HTML_OPTGRID_PAGE (RID_OFA_START + 244) +#define RID_SW_TP_HTML_OPTSHDWCRSR (RID_OFA_START + 246) +#define RID_SW_TP_BACKGROUND (RID_OFA_START + 217) +#define RID_SW_TP_OPTCAPTION_PAGE (RID_OFA_START + 256) +#define SID_SC_TP_LAYOUT (RID_OFA_START + 218) +#define SID_SC_TP_CONTENT (RID_OFA_START + 219) +#define SID_SC_TP_INPUT (RID_OFA_START + 220) +#define SID_SC_TP_GRID (RID_OFA_START + 221) +#define SID_SC_TP_USERLISTS (RID_OFA_START + 222) +#define SID_SC_TP_CALC (RID_OFA_START + 223) +#define SID_SC_TP_CHANGES (RID_OFA_START + 224) +#define RID_SC_TP_PRINT (RID_OFA_START + 248) +#define SID_SI_TP_PRINT (RID_OFA_START + 236) +#define SID_SI_TP_CONTENTS (RID_OFA_START + 232) +#define SID_SI_TP_SNAP (RID_OFA_START + 234) +#define SID_SI_TP_MISC (RID_OFA_START + 237) +#define SID_SD_TP_PRINT (RID_OFA_START + 220) +#define SID_SD_TP_CONTENTS (RID_OFA_START + 225) +#define SID_SD_TP_SNAP (RID_OFA_START + 227) +#define SID_SD_TP_MISC (RID_OFA_START + 231) +#define RID_OFA_TP_INTERNATIONAL_SD (RID_OFA_START + 253) +#define RID_OFA_TP_INTERNATIONAL_IMPR (RID_OFA_START + 254) +#define RID_OFA_TP_INTERNATIONAL (RID_OFA_START + 252) // calc + +//--------------------------------------------------------------------- +// ResId's fuer die Zeichen-TabPages +#define RID_SVXPAGE_CHAR_STD (RID_SVX_START + 3) +#define RID_SVXPAGE_CHAR_EXT (RID_SVX_START + 4) + +// moved ids +8 ... +17 to "ModalDialog" resource ids + +// ResId fuer den Suchen/Ersetzen-Dialog +#define RID_SVXDLG_SEARCH (RID_SVX_START + 20) + +// ResId fuer die PageDialog +#define RID_SVXPAGE_FOOTER (RID_SVX_START + 26) +#define RID_SVXPAGE_HEADER (RID_SVX_START + 27) +#define RID_SVXQBX_DELETE_HEADFOOT (RID_SVX_START + 28) + +// ResId fuer die Linguistik-Dialoge +#define RID_SVXDLG_HYPHENATE (RID_SVX_START + 30) +#define RID_SVXDLG_THESAURUS (RID_SVX_START + 31) +#define RID_SVXDLG_THES_LANGUAGE (RID_SVX_START + 38) + +// ResIds fuer HM-QueryBoxen und Error-Strings +#define RID_SVXQB_THESAURUS (RID_SVX_START + 33) +#define RID_SVXQB_CONTINUE (RID_SVX_START + 34) +#define RID_SVXQB_BODYTEXT (RID_SVX_START + 35) +#define RID_SVXQB_SPECIAL (RID_SVX_START + 36) +#define RID_SVXQB_SPECIAL_FORCED (RID_SVX_START + 37) +// + 38 ist vergeben, siehe RID_SVXDLG_THES_LANGUAGE +#define RID_SVXQB_BW_CONTINUE (RID_SVX_START + 39) + +// ResId's fuer Dialoge aus StarDraw +#define RID_SVXPAGE_POSITION (RID_SVX_START + 46) +#define RID_SVXPAGE_SIZE (RID_SVX_START + 47) +#define RID_SVXSW_FRAMEPOSITIONS (RID_SVX_START + 289) + +#define RID_SVXIL_FRAME (RID_SVX_START + 65) +#define RID_SVXIL_FRAME_HC (RID_SVX_START + 66) + +#define RID_SVXDLG_3D (RID_SVX_START + 70) +#define RID_SVXPAGE_LIGHT3D (RID_SVX_START + 71) +#define RID_SVXPAGE_3DATTR (RID_SVX_START + 72) +#define RID_SVXFLOAT_3D (RID_SVX_START + 209) + +#define RID_SVXIMAGE_LIGHT_ON (RID_SVX_START + 210) +#define RID_SVXIMAGE_LIGHT_OFF (RID_SVX_START + 211) +#define RID_SVXIMAGE_LIGHT_ON_H (RID_SVX_START + 212) +#define RID_SVXIMAGE_LIGHT_OFF_H (RID_SVX_START + 213) +#define RID_SVXIMAGE_COLORDLG (RID_SVX_START + 214) +#define RID_SVXIMAGE_COLORDLG_H (RID_SVX_START + 215) + +#define RID_SVXFLOAT3D_FAVORITE (RID_SVX_START + 73) +#define RID_SVXFLOAT3D_FIX_X (RID_SVX_START + 74) +#define RID_SVXFLOAT3D_FIX_Y (RID_SVX_START + 75) +#define RID_SVXFLOAT3D_FIX_Z (RID_SVX_START + 76) +#define RID_SVXFLOAT3D_FIX_R (RID_SVX_START + 77) +#define RID_SVXFLOAT3D_FIX_G (RID_SVX_START + 78) +#define RID_SVXFLOAT3D_FIX_B (RID_SVX_START + 84) + +// Ids fuer FrameBitmaps durch ImageList ersetzt +// 67 bis 72 frei + +// ResId fuer den Gitter- und Raster-Dialog +#define RID_SVXDLG_GRID (RID_SVX_START + 79) + +// ResId's fuer FontMenu-Controls +#define RID_MN_FONTSIZE (RID_SVX_START + 80) + +// ResId's fuer Undo-TbxControls +#define RID_SVXTBX_UNDO (RID_SVX_START + 81) + +// ResId fuer Zoom-Popup-Menue +#define RID_SVXMNU_ZOOM (RID_SVX_START + 82) + +// ResId fuer Funktions-Popup-Menue +#define RID_SVXMNU_PSZ_FUNC (RID_SVX_START + 83) +#define RID_SVXMNU_XMLSECSTATBAR (RID_SVX_START + 84) + +// ResId fuer Position- und Size-Bitmap +#define RID_SVXBMP_POSITION (RID_SVX_START + 85) +#define RID_SVXBMP_SIZE (RID_SVX_START + 86) + +#define RID_SVXBMP_SIGNET (RID_SVX_START + 87) +#define RID_SVXBMP_SIGNET_H (RID_SVX_START + 88) +#define RID_SVXBMP_SIGNET_BROKEN (RID_SVX_START + 89) +#define RID_SVXBMP_SIGNET_BROKEN_H (RID_SVX_START + 90) +#define RID_SVXBMP_SIGNET_NOTVALIDATED (RID_SVX_START + 91) +#define RID_SVXBMP_SIGNET_NOTVALIDATED_H (RID_SVX_START + 92) + +#define RID_SVXBMP_SLIDERBUTTON (RID_SVX_START + 67) +#define RID_SVXBMP_SLIDERDECREASE (RID_SVX_START + 68) +#define RID_SVXBMP_SLIDERINCREASE (RID_SVX_START + 69) +#define RID_SVXBMP_SLIDERBUTTON_HC (RID_SVX_START + 70) +#define RID_SVXBMP_SLIDERDECREASE_HC (RID_SVX_START + 71) +#define RID_SVXBMP_SLIDERINCREASE_HC (RID_SVX_START + 72) + +// Resource mit Bitmaps fuer die CheckListBox +#define RID_CHECKLISTBOX_BITMAPS (RID_SVX_START + 91) + +// Menu fuers Lineal +#define RID_SVXMN_RULER (RID_SVX_START + 92) + +// FontWork-Dialog +#define RID_SVXDLG_FONTWORK (RID_SVX_START + 93) + +// FontWork-ValueSet-Bitmaps +#define RID_SVXBMP_FONTWORK_FORM1 (RID_SVX_START + 94) +#define RID_SVXBMP_FONTWORK_FORM2 (RID_SVX_START + 95) +#define RID_SVXBMP_FONTWORK_FORM3 (RID_SVX_START + 96) +#define RID_SVXBMP_FONTWORK_FORM4 (RID_SVX_START + 97) +#define RID_SVXBMP_FONTWORK_FORM5 (RID_SVX_START + 98) +#define RID_SVXBMP_FONTWORK_FORM6 (RID_SVX_START + 99) +#define RID_SVXBMP_FONTWORK_FORM7 (RID_SVX_START + 100) +#define RID_SVXBMP_FONTWORK_FORM8 (RID_SVX_START + 101) +#define RID_SVXBMP_FONTWORK_FORM9 (RID_SVX_START + 102) +#define RID_SVXBMP_FONTWORK_FORM10 (RID_SVX_START + 103) +#define RID_SVXBMP_FONTWORK_FORM11 (RID_SVX_START + 104) +#define RID_SVXBMP_FONTWORK_FORM12 (RID_SVX_START + 105) + +#define RID_SVXBMP_SHADOW_XDIST (RID_SVX_START + 110) +#define RID_SVXBMP_SHADOW_YDIST (RID_SVX_START + 111) +#define RID_SVXBMP_SHADOW_ANGLE (RID_SVX_START + 112) +#define RID_SVXBMP_SHADOW_SIZE (RID_SVX_START + 113) + +#define RID_SVXCTRL_COLOR (RID_SVX_START + 117) + +// fuer ToolboxControl-Style +#define RID_SVXTBX_STYLE (RID_SVX_START + 120) + +#define RID_SVXDLG_HYPERLINK (RID_SVX_START + 140) +#define RID_SVXDLG_PASSWORD (RID_SVX_START + 141) + +// ResId fuer InternetPage +#define RID_SVXPAGE_INTERNET (RID_SVX_START + 154) + +//InetDlg +#define RID_SVXPAGE_INET_CACHE (RID_SVX_START + 158) +#define RID_SVXPAGE_INET_TYPE (RID_SVX_START + 159) + +#define RID_SVXPAGE_BROWSER_OTHER (RID_SVX_START + 202) +#define RID_CACHE_EXTRA_DLG (RID_SVX_START + 203) + +// OnlineRegistration +#define RID_SVXDLG_REGISTER (RID_SVX_START + 193) +#define RID_SVXPAGE_REGISTER_1 (RID_SVX_START + 194) +#define RID_SVXPAGE_REGISTER_2 (RID_SVX_START + 195) +#define RID_SVXPAGE_REGISTER_3 (RID_SVX_START + 196) +#define RID_SVXPAGE_REGISTER_4 (RID_SVX_START + 197) +#define RID_SVXPAGE_REGISTER_5 (RID_SVX_START + 198) +#define RID_SVXPAGE_REGISTER_6 (RID_SVX_START + 199) + +// 3D-Entfernung/Perspektive Bitmaps +#define RID_SVXBMP_3D_DISTANCE_01 (RID_SVX_START + 162) +#define RID_SVXBMP_3D_DISTANCE_02 (RID_SVX_START + 163) +#define RID_SVXBMP_3D_DISTANCE_03 (RID_SVX_START + 164) +#define RID_SVXBMP_3D_DISTANCE_04 (RID_SVX_START + 165) +#define RID_SVXBMP_3D_DISTANCE_05 (RID_SVX_START + 166) +#define RID_SVXBMP_3D_DISTANCE_06 (RID_SVX_START + 167) +#define RID_SVXBMP_3D_DISTANCE_07 (RID_SVX_START + 168) +#define RID_SVXBMP_3D_DISTANCE_08 (RID_SVX_START + 169) +#define RID_SVXBMP_3D_DISTANCE_09 (RID_SVX_START + 170) +#define RID_SVXBMP_3D_DISTANCE_10 (RID_SVX_START + 171) + +#define RID_SVXBMP_3D_FOCAL_LENGTH_01 (RID_SVX_START + 172) +#define RID_SVXBMP_3D_FOCAL_LENGTH_02 (RID_SVX_START + 173) +#define RID_SVXBMP_3D_FOCAL_LENGTH_03 (RID_SVX_START + 174) +#define RID_SVXBMP_3D_FOCAL_LENGTH_04 (RID_SVX_START + 175) +#define RID_SVXBMP_3D_FOCAL_LENGTH_05 (RID_SVX_START + 176) +#define RID_SVXBMP_3D_FOCAL_LENGTH_06 (RID_SVX_START + 177) +#define RID_SVXBMP_3D_FOCAL_LENGTH_07 (RID_SVX_START + 178) +#define RID_SVXBMP_3D_FOCAL_LENGTH_08 (RID_SVX_START + 179) +#define RID_SVXBMP_3D_FOCAL_LENGTH_09 (RID_SVX_START + 180) +#define RID_SVXBMP_3D_FOCAL_LENGTH_10 (RID_SVX_START + 181) + +// fuer ToolboxControls Alignment und Drawobjekte +#define RID_SVXTBX_DRAW (RID_SVX_START + 189) +#define RID_SVXTBX_ALIGNMENT (RID_SVX_START + 190) + +// Ids fuer Autokorrektur +#define RID_SVX_AUTOCORR (RID_SVX_START + 192) + +// Auswahl ext. Linguitik +#define RID_SVX_OPT_EXT_LINGU (RID_SVX_START + 193) + +// TabPage und Dialog f"ur LDAP-Server +#define RID_SVXPAGE_LDAP (RID_SVX_START + 204) +#define RID_SVXDLG_LDAP (RID_SVX_START + 205) + +// Dialog fuer Funktionen +#define RID_SVXDLG_CALCFUNC (RID_SVX_START + 206) + +// QueryBox for Exit Recovery Wizard +#define RID_SVXQB_EXIT_RECOVERY (RID_SVX_START + 215) + +// ResId fuer den ImportGraphic-Dialog +#define RID_SVXRES_IMPORTGRAPHIC (RID_SVX_START + 499) + + +#define RID_SVXCTRL_RECTBTNS (RID_SVX_START + 226) + +// ResId's f???r Hyperlink-Dialog-Tabpages + +// ResId's for Starone impl. bitmaps +#define RID_UNODRAW_OBJECTS (RID_SVX_START + 233) +#define RID_UNODRAW_OLE2 (RID_SVX_START + 234) +#define RID_UNODRAW_GRAPHICS (RID_SVX_START + 235) + +#define RID_SVXIMG_NOTCHECKED (RID_SVX_START + 243) +#define RID_SVXIMG_CHECKED (RID_SVX_START + 244) + +#define RID_SVXDLG_RUBY (RID_SVX_START + 247) + +#define RID_SVXBMP_FONTWORK_FORM1_H (RID_SVX_START + 260) +#define RID_SVXBMP_FONTWORK_FORM2_H (RID_SVX_START + 261) +#define RID_SVXBMP_FONTWORK_FORM3_H (RID_SVX_START + 262) +#define RID_SVXBMP_FONTWORK_FORM4_H (RID_SVX_START + 263) +#define RID_SVXBMP_FONTWORK_FORM5_H (RID_SVX_START + 264) +#define RID_SVXBMP_FONTWORK_FORM6_H (RID_SVX_START + 265) +#define RID_SVXBMP_FONTWORK_FORM7_H (RID_SVX_START + 266) +#define RID_SVXBMP_FONTWORK_FORM8_H (RID_SVX_START + 267) +#define RID_SVXBMP_FONTWORK_FORM9_H (RID_SVX_START + 268) +#define RID_SVXBMP_FONTWORK_FORM10_H (RID_SVX_START + 269) +#define RID_SVXBMP_FONTWORK_FORM11_H (RID_SVX_START + 270) +#define RID_SVXBMP_FONTWORK_FORM12_H (RID_SVX_START + 271) +#define RID_SVXIMG_GRAF_RED_H (RID_SVX_START + 276) +#define RID_SVXIMG_GRAF_GREEN_H (RID_SVX_START + 277) +#define RID_SVXIMG_GRAF_BLUE_H (RID_SVX_START + 278) +#define RID_SVXIMG_GRAF_LUMINANCE_H (RID_SVX_START + 279) +#define RID_SVXIMG_GRAF_CONTRAST_H (RID_SVX_START + 280) +#define RID_SVXIMG_GRAF_GAMMA_H (RID_SVX_START + 281) +#define RID_SVXIMG_GRAF_TRANSPARENCE_H (RID_SVX_START + 282) +#define RID_SVXIMG_CHECKED_H (RID_SVX_START + 285) + +#define RID_SVXDLG_TEXTCONTROL_CHARATTR (RID_SVX_START + 286) +#define RID_SVXDLG_TEXTCONTROL_PARAATTR (RID_SVX_START + 287) + +// !!! please update RID_SVX_FIRSTFREE !!! see line 46 + +// Strings ------------------------------------------------------------------ + + +// Strings fuer die Sprachen (HM-Abhaengig) +#define RID_SVXSTR_LANGUAGE_BEGIN (RID_SVX_START + 0) +#define RID_SVXSTR_LANGUAGE_ALL (RID_SVX_START + 15) + +// Messages im DBMgr-Bereich +#define RID_SVXSTR_DBINI (RID_SVX_START + 60) +#define RID_SVXSTR_DBDRV (RID_SVX_START + 61) +#define RID_SVXSTR_NODBDRV (RID_SVX_START + 62) +#define RID_SVXSTR_DBCANTOPEN (RID_SVX_START + 63) +#define RID_SVXSTR_DBINACTIVE (RID_SVX_START + 64) +#define RID_SVXSTR_SELECT (RID_SVX_START + 65) +#define RID_SVXSTR_DESELECT (RID_SVX_START + 66) +#define RID_SVXSTR_MERGE (RID_SVX_START + 67) +#define RID_SVXSTR_INSERT (RID_SVX_START + 68) +#define RID_SVXSTR_NOSELECT (RID_SVX_START + 69) +#define RID_SVXSTR_CANT_OPEN_DB (RID_SVX_START + 70) +#define RID_SVXSTR_INVALID_RECORD (RID_SVX_START + 71) +#define RID_SVXSTR_NOSET_MATCHING (RID_SVX_START + 72) + +// Strings aus dem Suchen-Dialog +#define RID_SVXSTR_SEARCH_STYLES (RID_SVX_START + 80) +#define RID_SVXSTR_SEARCH (RID_SVX_START + 81) +#define RID_SVXSTR_REPLACE (RID_SVX_START + 82) + +// Strings fuer die HM-Strings +#define RID_SVXSTR_HMSTATUS_BEGIN (RID_SVX_START + 90) +#define RID_SVXSTR_HMSTATUS_OK (RID_SVX_START + 90) +#define RID_SVXSTR_HMSTATUS_DONTUSE (RID_SVX_START + 91) +#define RID_SVXSTR_HMSTATUS_WRONG (RID_SVX_START + 92) +#define RID_SVXSTR_HMSTATUS_CAPERROR (RID_SVX_START + 93) +#define RID_SVXSTR_HMERR_CHECKINSTALL (RID_SVX_START + 94) +#define RID_SVXSTR_HMERR_ADDWORD (RID_SVX_START + 95) +#define RID_SVXSTR_HMSTATUS_INVALID_LANG (RID_SVX_START + 96) + +// paper formats +#define RID_SVXSTR_PAPER_A0 (RID_SVX_START + 100) +#define RID_SVXSTR_PAPER_A1 (RID_SVX_START + 101) +#define RID_SVXSTR_PAPER_A2 (RID_SVX_START + 102) +#define RID_SVXSTR_PAPER_A3 (RID_SVX_START + 103) +#define RID_SVXSTR_PAPER_A4 (RID_SVX_START + 104) +#define RID_SVXSTR_PAPER_A5 (RID_SVX_START + 105) +#define RID_SVXSTR_PAPER_B4_ISO (RID_SVX_START + 106) +#define RID_SVXSTR_PAPER_B5_ISO (RID_SVX_START + 107) +#define RID_SVXSTR_PAPER_LETTER (RID_SVX_START + 108) +#define RID_SVXSTR_PAPER_LEGAL (RID_SVX_START + 109) +#define RID_SVXSTR_PAPER_TABLOID (RID_SVX_START + 110) +#define RID_SVXSTR_PAPER_USER (RID_SVX_START + 111) +#define RID_SVXSTR_PAPER_B6_ISO (RID_SVX_START + 112) +#define RID_SVXSTR_PAPER_C4 (RID_SVX_START + 113) +#define RID_SVXSTR_PAPER_C5 (RID_SVX_START + 114) +#define RID_SVXSTR_PAPER_C6 (RID_SVX_START + 115) +#define RID_SVXSTR_PAPER_C65 (RID_SVX_START + 116) +#define RID_SVXSTR_PAPER_DL (RID_SVX_START + 117) +#define RID_SVXSTR_PAPER_DIA (RID_SVX_START + 118) +#define RID_SVXSTR_PAPER_SCREEN (RID_SVX_START + 119) +#define RID_SVXSTR_PAPER_C (RID_SVX_START + 120) +#define RID_SVXSTR_PAPER_D (RID_SVX_START + 121) +#define RID_SVXSTR_PAPER_E (RID_SVX_START + 122) +#define RID_SVXSTR_PAPER_EXECUTIVE (RID_SVX_START + 123) +#define RID_SVXSTR_PAPER_LEGAL2 (RID_SVX_START + 124) +#define RID_SVXSTR_PAPER_MONARCH (RID_SVX_START + 125) +#define RID_SVXSTR_PAPER_COM675 (RID_SVX_START + 126) +#define RID_SVXSTR_PAPER_COM9 (RID_SVX_START + 127) +#define RID_SVXSTR_PAPER_COM10 (RID_SVX_START + 128) +#define RID_SVXSTR_PAPER_COM11 (RID_SVX_START + 129) +#define RID_SVXSTR_PAPER_COM12 (RID_SVX_START + 130) +#define RID_SVXSTR_PAPER_KAI16 (RID_SVX_START + 131) +#define RID_SVXSTR_PAPER_KAI32 (RID_SVX_START + 132) +#define RID_SVXSTR_PAPER_KAI32BIG (RID_SVX_START + 133) +#define RID_SVXSTR_PAPER_B4_JIS (RID_SVX_START + 134) +#define RID_SVXSTR_PAPER_B5_JIS (RID_SVX_START + 135) +#define RID_SVXSTR_PAPER_B6_JIS (RID_SVX_START + 136) + +#define RID_SVXSTR_FULLSIZE (RID_SVX_START + 144) + +// ResIds fuer die verschiedenen Strings des PageDlgs +#define RID_SVXSTR_CALC_PAGE (RID_SVX_START + 146) +#define RID_SVXSTR_DRAW_PAGE (RID_SVX_START + 147) + +// HM_ERR +#define RID_SVXSTR_HMERR_THESAURUS (RID_SVX_START + 150) +#define RID_SVXSTR_HMERR_HYPH (RID_SVX_START + 151) + +// Strings der ToolBox-Controls aus tbcontrl.cxx +#define RID_SVXSTR_FILLPATTERN (RID_SVX_START + 191) +#define RID_SVXSTR_FRAME (RID_SVX_START + 192) +#define RID_SVXSTR_FRAME_COLOR (RID_SVX_START + 194) +#define RID_SVXSTR_FRAME_STYLE (RID_SVX_START + 195) +#define RID_SVXSTR_EXTRAS_CHARBACKGROUND (RID_SVX_START + 196) +#define RID_SVXSTR_CLEARFORM (RID_SVX_START + 197) +#define RID_SVXSTR_MORE (RID_SVX_START + 198) + + +// Strings der UndoTbxControls +#define RID_SVXSTR_UNDO (RID_SVX_START + 200) +#define RID_SVXSTR_REDO (RID_SVX_START + 201) +#define RID_SVXSTR_ACTION (RID_SVX_START + 202) +#define RID_SVXSTR_ACTIONS (RID_SVX_START + 203) + +// Strings fuer Insert/Overwrite +#define RID_SVXSTR_INSERT_TEXT (RID_SVX_START + 210) +#define RID_SVXSTR_OVERWRITE_TEXT (RID_SVX_START + 211) + +// Strings fuer Selection Mode +#define RID_SVXSTR_SELMODE_STD (RID_SVX_START + 212) +#define RID_SVXSTR_SELMODE_ER (RID_SVX_START + 213) +#define RID_SVXSTR_SELMODE_ERG (RID_SVX_START + 214) + +#define RID_SVXSTR_XMLSEC_SIG_OK (RID_SVX_START + 222) +#define RID_SVXSTR_XMLSEC_SIG_OK_NO_VERIFY (RID_SVX_START + 223) +#define RID_SVXSTR_XMLSEC_SIG_NOT_OK (RID_SVX_START + 224) +#define RID_SVXSTR_XMLSEC_NO_SIG (RID_SVX_START + 225) +#define RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG (RID_SVX_START + 226) + +// weitere ID bei 219 + +// String-ResId fuer den ImportGraphic-Dialog +#define RID_SVXSTR_ALL_FILES (RID_SVX_START + 241) + +// Strings des Lineals +#define RID_SVXSTR_RULER_START (RID_SVX_START + 245) +#define RID_SVXSTR_RULER_TAB_LEFT (RID_SVX_START + 245) +#define RID_SVXSTR_RULER_TAB_RIGHT (RID_SVX_START + 246) +#define RID_SVXSTR_RULER_TAB_DECIMAL (RID_SVX_START + 247) +#define RID_SVXSTR_RULER_TAB_CENTER (RID_SVX_START + 248) + +// File-/Grafik-Link String, Dialog Name +#define RID_SVXSTR_FILELINK (RID_SVX_START + 255) +#define RID_SVXSTR_GRAFIKLINK (RID_SVX_START + 256) +#define RID_SVXSTR_EDITGRFLINK (RID_SVX_START + 257) +#define RID_SVXSTR_GRFLINKPROGRESS (RID_SVX_START + 258) +#define RID_SVXGRF_GRAPHICLOAD (RID_SVX_START + 259) + +// Schlie"ssen (im TabDialog Line/Area) +#define RID_SVXSTR_CLOSE (RID_SVX_START + 260) + +// FontWork-ValueSet-Strings +#define RID_SVXSTR_FONTWORK_FORM1 (RID_SVX_START + 261) +#define RID_SVXSTR_FONTWORK_FORM2 (RID_SVX_START + 262) +#define RID_SVXSTR_FONTWORK_FORM3 (RID_SVX_START + 263) +#define RID_SVXSTR_FONTWORK_FORM4 (RID_SVX_START + 264) +#define RID_SVXSTR_FONTWORK_FORM5 (RID_SVX_START + 265) +#define RID_SVXSTR_FONTWORK_FORM6 (RID_SVX_START + 266) +#define RID_SVXSTR_FONTWORK_FORM7 (RID_SVX_START + 267) +#define RID_SVXSTR_FONTWORK_FORM8 (RID_SVX_START + 268) +#define RID_SVXSTR_FONTWORK_FORM9 (RID_SVX_START + 269) +#define RID_SVXSTR_FONTWORK_FORM10 (RID_SVX_START + 270) +#define RID_SVXSTR_FONTWORK_FORM11 (RID_SVX_START + 271) +#define RID_SVXSTR_FONTWORK_FORM12 (RID_SVX_START + 272) +#define RID_SVXSTR_FONTWORK_UNDOCREATE (RID_SVX_START + 273) + +// Farben-Strings +#define RID_SVXSTR_BLACK (RID_SVX_START + 275) +#define RID_SVXSTR_BLUE (RID_SVX_START + 276) +#define RID_SVXSTR_GREEN (RID_SVX_START + 277) +#define RID_SVXSTR_CYAN (RID_SVX_START + 278) +#define RID_SVXSTR_RED (RID_SVX_START + 279) +#define RID_SVXSTR_MAGENTA (RID_SVX_START + 280) +#define RID_SVXSTR_BROWN (RID_SVX_START + 281) +#define RID_SVXSTR_GREY (RID_SVX_START + 282) +#define RID_SVXSTR_LIGHTGREY (RID_SVX_START + 283) +#define RID_SVXSTR_LIGHTBLUE (RID_SVX_START + 284) +#define RID_SVXSTR_LIGHTGREEN (RID_SVX_START + 285) +#define RID_SVXSTR_LIGHTCYAN (RID_SVX_START + 286) +#define RID_SVXSTR_LIGHTRED (RID_SVX_START + 287) +#define RID_SVXSTR_LIGHTMAGENTA (RID_SVX_START + 288) +#define RID_SVXSTR_YELLOW (RID_SVX_START + 289) +#define RID_SVXSTR_WHITE (RID_SVX_START + 290) +#define RID_SVXSTR_BLUEGREY (RID_SVX_START + 291) +#define RID_SVXSTR_ORANGE (RID_SVX_START + 292) + +// Linienenden-Strings +#define RID_SVXSTR_ARROW (RID_SVX_START + 300) +#define RID_SVXSTR_SQUARE (RID_SVX_START + 301) +#define RID_SVXSTR_CIRCLE (RID_SVX_START + 302) + +#define RID_SVXSTR_TRANSPARENCE (RID_SVX_START + 305) +#define RID_SVXSTR_CENTERED (RID_SVX_START + 306) +#define RID_SVXSTR_NOTCENTERED (RID_SVX_START + 307) + +// String-Arrays +#define RID_SVXSTR_TEXTENCODING_TABLE (RID_SVX_START + 312) + +// Hyperlink-Dlg +#define RID_SVXMN_HYPERLINK (RID_SVX_START + 321) +// Hyperlink-QueryBoxen +#define RID_SVXQB_NOCONNECT (RID_SVX_START + 322) +#define RID_SVXQB_DONTEXIST (RID_SVX_START + 323) +//color configuration + +// Graphic filter +#define RID_SVX_GRFFILTER_START (RID_SVX_START + 330) +#define RID_SVXTBX_GRFFILTER (RID_SVX_START + 331) + +#define RID_SVXERRCODE (RID_SVX_START + 350) + +// gallery +#define RID_SVX_GALLERY_START (RID_SVX_START + 360) +#define RID_SVX_GALLERY_END (RID_SVX_START + 410) + +#define RID_SVXSTR_MEM_ERROR (RID_SVX_START + 415) +#define RID_SVXSTR_DLG_TITLE_INFO (RID_SVX_START + 416) + +// Define - Bereich fuer BmpMaskierung +// !!! aus diesem Bereich keine Defines benutzen !!! +#define RID_SVX_BMPMASK_START (RID_SVX_START + 420) +#define RID_SVX_BMPMASK_END (RID_SVX_START + 440) + +// Define - Bereich fuer IMAP-Editor +// !!! aus diesem Bereich keine Defines benutzen !!! +#define RID_SVX_IMAP_START (RID_SVX_START + 450) +#define RID_SVX_IMAP_END (RID_SVX_START + 460) + +// Define - Bereich fuer Contour-Editor +// !!! aus diesem Bereich keine Defines benutzen !!! +#define RID_SVX_CONTOUR_START (RID_SVX_START + 461) +#define RID_SVX_CONTOUR_END (RID_SVX_START + 471) + +#define RID_SVXIMG_GRAF_RED (RID_SVX_START + 472) +#define RID_SVXIMG_GRAF_GREEN (RID_SVX_START + 473) +#define RID_SVXIMG_GRAF_BLUE (RID_SVX_START + 474) +#define RID_SVXIMG_GRAF_LUMINANCE (RID_SVX_START + 475) +#define RID_SVXIMG_GRAF_CONTRAST (RID_SVX_START + 476) +#define RID_SVXIMG_GRAF_GAMMA (RID_SVX_START + 477) +#define RID_SVXIMG_GRAF_TRANSPARENCE (RID_SVX_START + 478) + +#define RID_SVX_RELOAD_NORMAL (RID_SVX_START + 480) +#define RID_SVX_RELOAD_SPECIAL (RID_SVX_START + 481) + +// Defines fuer die 3D-Engine +#define RID_SVX_3D_UNDO_EXCHANGE_PASTE (RID_SVX_START + 489) +#define RID_SVX_3D_CREATE_LATHE (RID_SVX_START + 490) +#define RID_SVX_3D_UNDO_SEGMENTS (RID_SVX_START + 491) +#define RID_SVX_3D_UNDO_DEEPTH (RID_SVX_START + 492) +#define RID_SVX_3D_UNDO_FOCAL (RID_SVX_START + 493) +#define RID_SVX_3D_UNDO_CAMPOS (RID_SVX_START + 494) +#define RID_SVX_3D_UNDO_ROTATE (RID_SVX_START + 495) +#define RID_SVX_3D_UNDO_EXTRUDE (RID_SVX_START + 496) +#define RID_SVX_3D_UNDO_LATHE (RID_SVX_START + 497) +#define RID_SVX_3D_UNDO_BREAK_LATHE (RID_SVX_START + 498) +#define RID_SVX_3D_UNDO_ATTRIBUTES (RID_SVX_START + 499) + +#define RID_STR_FULLNUMS_START (RID_SVX_START + 500)//? +#define RID_STR_FULLNUMS_1 (RID_STR_FULLNUMS_START )//? +#define RID_STR_FULLNUMS_2 (RID_STR_FULLNUMS_START + 1)//? +#define RID_STR_FULLNUMS_3 (RID_STR_FULLNUMS_START + 2)//? +#define RID_STR_FULLNUMS_4 (RID_STR_FULLNUMS_START + 3)//? +#define RID_STR_FULLNUMS_5 (RID_STR_FULLNUMS_START + 4)//? +#define RID_STR_FULLNUMS_6 (RID_STR_FULLNUMS_START + 5)//? +#define RID_STR_FULLNUMS_7 (RID_STR_FULLNUMS_START + 6)//? +#define RID_STR_FULLNUMS_8 (RID_STR_FULLNUMS_START + 7)//? +#define RID_STR_FULLNUMS_7_HTML (RID_SVX_START + 510)//? + +// RID_SVX_END == (RID_SVX_START + 499) !!! +// am besten ab 520 frei (RB) +// seit der Erfindung eigener Resourcen fuer jedes Projekt kann es hier keine +// Obergrenze geben (abgesehen von USHRT_MAX) (os) +#define RID_STR_BULLET_THEME (RID_SVX_START + 508) + + +// ResIds for graphics drawmode +#define RID_SVXSTR_GRAFMODE_STANDARD (RID_SVX_START + 520) +#define RID_SVXSTR_GRAFMODE_GREYS (RID_SVX_START + 521) +#define RID_SVXSTR_GRAFMODE_MONO (RID_SVX_START + 522) +#define RID_SVXSTR_GRAFMODE_WATERMARK (RID_SVX_START + 523) + + +// Strings for Plugin-Filedialog +#define STR_INSERT_VIDEO_EXTFILTER_IVF (RID_SVX_START + 524) +#define STR_INSERT_VIDEO_EXTFILTER_AVI (RID_SVX_START + 525) +#define STR_INSERT_VIDEO_EXTFILTER_MOV (RID_SVX_START + 526) +#define STR_INSERT_VIDEO_EXTFILTER_MPEG (RID_SVX_START + 527) +#define STR_EXTFILTER_ALL (RID_SVX_START + 528) +#define STR_INSERT_SOUND_TITLE (RID_SVX_START + 529) +#define STR_INSERT_VIDEO_TITLE (RID_SVX_START + 530) + +#define RID_SVXSTR_BACKGROUND (RID_SVX_START + 531) + +// BM: some additional standard colors +#define RID_SVXSTR_VIOLET (RID_SVX_START + 540) +#define RID_SVXSTR_BORDEAUX (RID_SVX_START + 541) +#define RID_SVXSTR_PALE_YELLOW (RID_SVX_START + 542) +#define RID_SVXSTR_PALE_GREEN (RID_SVX_START + 543) +#define RID_SVXSTR_DKVIOLET (RID_SVX_START + 544) +#define RID_SVXSTR_SALMON (RID_SVX_START + 545) +#define RID_SVXSTR_SEABLUE (RID_SVX_START + 546) +#define RID_SVXSTR_COLOR_SUN (RID_SVX_START + 547) + +// JP: string resource ids for table-autoformat-names, used in SW/SC +// !!! Urgent: the order of Ids is persistent. New Ids have to append !!! +#define RID_SVXSTR_TBLAFMT_BEGIN (RID_SVX_START + 560) +#define RID_SVXSTR_TBLAFMT_3D RID_SVXSTR_TBLAFMT_BEGIN +#define RID_SVXSTR_TBLAFMT_BLACK1 (RID_SVX_START + 561) +#define RID_SVXSTR_TBLAFMT_BLACK2 (RID_SVX_START + 562) +#define RID_SVXSTR_TBLAFMT_BLUE (RID_SVX_START + 563) +#define RID_SVXSTR_TBLAFMT_BROWN (RID_SVX_START + 564) +#define RID_SVXSTR_TBLAFMT_CURRENCY (RID_SVX_START + 565) +#define RID_SVXSTR_TBLAFMT_CURRENCY_3D (RID_SVX_START + 566) +#define RID_SVXSTR_TBLAFMT_CURRENCY_GRAY (RID_SVX_START + 567) +#define RID_SVXSTR_TBLAFMT_CURRENCY_LAVENDER (RID_SVX_START + 568) +#define RID_SVXSTR_TBLAFMT_CURRENCY_TURQUOISE (RID_SVX_START + 569) +#define RID_SVXSTR_TBLAFMT_GRAY (RID_SVX_START + 570) +#define RID_SVXSTR_TBLAFMT_GREEN (RID_SVX_START + 571) +#define RID_SVXSTR_TBLAFMT_LAVENDER (RID_SVX_START + 572) +#define RID_SVXSTR_TBLAFMT_RED (RID_SVX_START + 573) +#define RID_SVXSTR_TBLAFMT_TURQUOISE (RID_SVX_START + 574) +#define RID_SVXSTR_TBLAFMT_YELLOW (RID_SVX_START + 575) +#define RID_SVXSTR_TBLAFMT_END (RID_SVX_START + 576) + +// string resources for XLineJoint item +#define RID_SVXSTR_LINEJOINT_NONE RID_SVXSTR_NONE +#define RID_SVXSTR_LINEJOINT_MIDDLE (RID_SVX_START + 589 ) +#define RID_SVXSTR_LINEJOINT_BEVEL (RID_SVX_START + 590 ) +#define RID_SVXSTR_LINEJOINT_MITER (RID_SVX_START + 591 ) +#define RID_SVXSTR_LINEJOINT_ROUND (RID_SVX_START + 592 ) + +// Default-Color-Names +#define RID_SVXSTR_BLACK_DEF (RID_SVX_START + 595) +#define RID_SVXSTR_BLUE_DEF (RID_SVX_START + 596) +#define RID_SVXSTR_GREEN_DEF (RID_SVX_START + 597) +#define RID_SVXSTR_CYAN_DEF (RID_SVX_START + 598) +#define RID_SVXSTR_RED_DEF (RID_SVX_START + 599) +#define RID_SVXSTR_MAGENTA_DEF (RID_SVX_START + 600) +#define RID_SVXSTR_BROWN_DEF (RID_SVX_START + 601) +#define RID_SVXSTR_GREY_DEF (RID_SVX_START + 602) +#define RID_SVXSTR_LIGHTGREY_DEF (RID_SVX_START + 603) +#define RID_SVXSTR_LIGHTBLUE_DEF (RID_SVX_START + 604) +#define RID_SVXSTR_LIGHTGREEN_DEF (RID_SVX_START + 605) +#define RID_SVXSTR_LIGHTCYAN_DEF (RID_SVX_START + 606) +#define RID_SVXSTR_LIGHTRED_DEF (RID_SVX_START + 607) +#define RID_SVXSTR_LIGHTMAGENTA_DEF (RID_SVX_START + 608) +#define RID_SVXSTR_YELLOW_DEF (RID_SVX_START + 609) +#define RID_SVXSTR_WHITE_DEF (RID_SVX_START + 610) +#define RID_SVXSTR_BLUEGREY_DEF (RID_SVX_START + 611) +#define RID_SVXSTR_ORANGE_DEF (RID_SVX_START + 612) +#define RID_SVXSTR_VIOLET_DEF (RID_SVX_START + 613) +#define RID_SVXSTR_BORDEAUX_DEF (RID_SVX_START + 614) +#define RID_SVXSTR_PALE_YELLOW_DEF (RID_SVX_START + 615) +#define RID_SVXSTR_PALE_GREEN_DEF (RID_SVX_START + 616) +#define RID_SVXSTR_DKVIOLET_DEF (RID_SVX_START + 617) +#define RID_SVXSTR_SALMON_DEF (RID_SVX_START + 618) +#define RID_SVXSTR_SEABLUE_DEF (RID_SVX_START + 619) +#define RID_SVXSTR_COLOR_SUN_DEF (RID_SVX_START + 620) +#define RID_SVXSTR_COLOR_CHART (RID_SVX_START + 621) +#define RID_SVXSTR_COLOR_CHART_DEF (RID_SVX_START + 622) + +// Default-Gradient-Names +#define RID_SVXSTR_GRDT0_DEF (RID_SVX_START + 631) +#define RID_SVXSTR_GRDT1_DEF (RID_SVX_START + 632) +#define RID_SVXSTR_GRDT2_DEF (RID_SVX_START + 633) +#define RID_SVXSTR_GRDT3_DEF (RID_SVX_START + 634) +#define RID_SVXSTR_GRDT4_DEF (RID_SVX_START + 635) +#define RID_SVXSTR_GRDT5_DEF (RID_SVX_START + 636) +#define RID_SVXSTR_GRDT6_DEF (RID_SVX_START + 637) +#define RID_SVXSTR_GRDT7_DEF (RID_SVX_START + 638) +#define RID_SVXSTR_GRDT8_DEF (RID_SVX_START + 639) +#define RID_SVXSTR_GRDT9_DEF (RID_SVX_START + 640) +#define RID_SVXSTR_GRDT0 (RID_SVX_START + 641) +#define RID_SVXSTR_GRDT1 (RID_SVX_START + 642) +#define RID_SVXSTR_GRDT2 (RID_SVX_START + 643) +#define RID_SVXSTR_GRDT3 (RID_SVX_START + 644) +#define RID_SVXSTR_GRDT4 (RID_SVX_START + 645) +#define RID_SVXSTR_GRDT5 (RID_SVX_START + 646) +#define RID_SVXSTR_GRDT6 (RID_SVX_START + 647) +#define RID_SVXSTR_GRDT7 (RID_SVX_START + 648) +#define RID_SVXSTR_GRDT8 (RID_SVX_START + 649) +#define RID_SVXSTR_GRDT9 (RID_SVX_START + 650) +#define RID_SVXSTR_GRDT_DEF_START RID_SVXSTR_GRDT0_DEF +#define RID_SVXSTR_GRDT_DEF_END RID_SVXSTR_GRDT9_DEF +#define RID_SVXSTR_GRDT_START RID_SVXSTR_GRDT0 +#define RID_SVXSTR_GRDT_END RID_SVXSTR_GRDT9 + +// Default-Hatch-Names +#define RID_SVXSTR_HATCH0_DEF (RID_SVX_START + 661) +#define RID_SVXSTR_HATCH1_DEF (RID_SVX_START + 662) +#define RID_SVXSTR_HATCH2_DEF (RID_SVX_START + 663) +#define RID_SVXSTR_HATCH3_DEF (RID_SVX_START + 664) +#define RID_SVXSTR_HATCH4_DEF (RID_SVX_START + 665) +#define RID_SVXSTR_HATCH5_DEF (RID_SVX_START + 666) +#define RID_SVXSTR_HATCH6_DEF (RID_SVX_START + 667) +#define RID_SVXSTR_HATCH7_DEF (RID_SVX_START + 668) +#define RID_SVXSTR_HATCH8_DEF (RID_SVX_START + 669) +#define RID_SVXSTR_HATCH9_DEF (RID_SVX_START + 670) +#define RID_SVXSTR_HATCH10_DEF (RID_SVX_START + 671) +#define RID_SVXSTR_HATCH0 (RID_SVX_START + 672) +#define RID_SVXSTR_HATCH1 (RID_SVX_START + 673) +#define RID_SVXSTR_HATCH2 (RID_SVX_START + 674) +#define RID_SVXSTR_HATCH3 (RID_SVX_START + 675) +#define RID_SVXSTR_HATCH4 (RID_SVX_START + 676) +#define RID_SVXSTR_HATCH5 (RID_SVX_START + 677) +#define RID_SVXSTR_HATCH6 (RID_SVX_START + 678) +#define RID_SVXSTR_HATCH7 (RID_SVX_START + 679) +#define RID_SVXSTR_HATCH8 (RID_SVX_START + 680) +#define RID_SVXSTR_HATCH9 (RID_SVX_START + 681) +#define RID_SVXSTR_HATCH10 (RID_SVX_START + 682) +#define RID_SVXSTR_HATCH_DEF_START RID_SVXSTR_HATCH0_DEF +#define RID_SVXSTR_HATCH_DEF_END RID_SVXSTR_HATCH10_DEF +#define RID_SVXSTR_HATCH_START RID_SVXSTR_HATCH0 +#define RID_SVXSTR_HATCH_END RID_SVXSTR_HATCH10 + +// strings for error messsages of OpenGraphics dialog +#define RID_SVXSTR_GRFILTER_OPENERROR (RID_SVX_START + 683) +#define RID_SVXSTR_GRFILTER_IOERROR (RID_SVX_START + 684) +#define RID_SVXSTR_GRFILTER_FORMATERROR (RID_SVX_START + 685) +#define RID_SVXSTR_GRFILTER_VERSIONERROR (RID_SVX_START + 686) +#define RID_SVXSTR_GRFILTER_FILTERERROR (RID_SVX_START + 687) +#define RID_SVXSTR_GRFILTER_TOOBIG (RID_SVX_START + 688) + +// Default-Bitmap-Names +#define RID_SVXSTR_BMP0_DEF (RID_SVX_START + 691) +#define RID_SVXSTR_BMP1_DEF (RID_SVX_START + 692) +#define RID_SVXSTR_BMP2_DEF (RID_SVX_START + 693) +#define RID_SVXSTR_BMP3_DEF (RID_SVX_START + 694) +#define RID_SVXSTR_BMP4_DEF (RID_SVX_START + 695) +#define RID_SVXSTR_BMP5_DEF (RID_SVX_START + 696) +#define RID_SVXSTR_BMP6_DEF (RID_SVX_START + 697) +#define RID_SVXSTR_BMP7_DEF (RID_SVX_START + 698) +#define RID_SVXSTR_BMP8_DEF (RID_SVX_START + 699) +#define RID_SVXSTR_BMP9_DEF (RID_SVX_START + 700) +#define RID_SVXSTR_BMP10_DEF (RID_SVX_START + 701) +#define RID_SVXSTR_BMP11_DEF (RID_SVX_START + 702) +#define RID_SVXSTR_BMP12_DEF (RID_SVX_START + 703) +#define RID_SVXSTR_BMP13_DEF (RID_SVX_START + 704) +#define RID_SVXSTR_BMP14_DEF (RID_SVX_START + 705) +#define RID_SVXSTR_BMP15_DEF (RID_SVX_START + 706) +#define RID_SVXSTR_BMP16_DEF (RID_SVX_START + 707) +#define RID_SVXSTR_BMP17_DEF (RID_SVX_START + 708) +#define RID_SVXSTR_BMP18_DEF (RID_SVX_START + 709) +#define RID_SVXSTR_BMP19_DEF (RID_SVX_START + 710) +#define RID_SVXSTR_BMP20_DEF (RID_SVX_START + 711) +#define RID_SVXSTR_BMP21_DEF (RID_SVX_START + 712) +#define RID_SVXSTR_BMP0 (RID_SVX_START + 713) +#define RID_SVXSTR_BMP1 (RID_SVX_START + 714) +#define RID_SVXSTR_BMP2 (RID_SVX_START + 715) +#define RID_SVXSTR_BMP3 (RID_SVX_START + 716) +#define RID_SVXSTR_BMP4 (RID_SVX_START + 717) +#define RID_SVXSTR_BMP5 (RID_SVX_START + 718) +#define RID_SVXSTR_BMP6 (RID_SVX_START + 719) +#define RID_SVXSTR_BMP7 (RID_SVX_START + 720) +#define RID_SVXSTR_BMP8 (RID_SVX_START + 721) +#define RID_SVXSTR_BMP9 (RID_SVX_START + 722) +#define RID_SVXSTR_BMP10 (RID_SVX_START + 723) +#define RID_SVXSTR_BMP11 (RID_SVX_START + 724) +#define RID_SVXSTR_BMP12 (RID_SVX_START + 725) +#define RID_SVXSTR_BMP13 (RID_SVX_START + 726) +#define RID_SVXSTR_BMP14 (RID_SVX_START + 727) +#define RID_SVXSTR_BMP15 (RID_SVX_START + 728) +#define RID_SVXSTR_BMP16 (RID_SVX_START + 729) +#define RID_SVXSTR_BMP17 (RID_SVX_START + 730) +#define RID_SVXSTR_BMP18 (RID_SVX_START + 731) +#define RID_SVXSTR_BMP19 (RID_SVX_START + 732) +#define RID_SVXSTR_BMP20 (RID_SVX_START + 733) +#define RID_SVXSTR_BMP21 (RID_SVX_START + 734) +#define RID_SVXSTR_BMP_DEF_START RID_SVXSTR_BMP0_DEF +#define RID_SVXSTR_BMP_DEF_END RID_SVXSTR_BMP21_DEF +#define RID_SVXSTR_BMP_START RID_SVXSTR_BMP0 +#define RID_SVXSTR_BMP_END RID_SVXSTR_BMP21 + +// Default-Linestyle-Names +#define RID_SVXSTR_DASH0_DEF (RID_SVX_START + 740) +#define RID_SVXSTR_DASH1_DEF (RID_SVX_START + 741) +#define RID_SVXSTR_DASH2_DEF (RID_SVX_START + 742) +#define RID_SVXSTR_DASH3_DEF (RID_SVX_START + 743) +#define RID_SVXSTR_DASH4_DEF (RID_SVX_START + 744) +#define RID_SVXSTR_DASH5_DEF (RID_SVX_START + 745) +#define RID_SVXSTR_DASH6_DEF (RID_SVX_START + 746) +#define RID_SVXSTR_DASH7_DEF (RID_SVX_START + 747) +#define RID_SVXSTR_DASH8_DEF (RID_SVX_START + 748) +#define RID_SVXSTR_DASH9_DEF (RID_SVX_START + 749) +#define RID_SVXSTR_DASH10_DEF (RID_SVX_START + 750) +#define RID_SVXSTR_DASH11_DEF (RID_SVX_START + 751) +#define RID_SVXSTR_DASH0 (RID_SVX_START + 752) +#define RID_SVXSTR_DASH1 (RID_SVX_START + 753) +#define RID_SVXSTR_DASH2 (RID_SVX_START + 754) +#define RID_SVXSTR_DASH3 (RID_SVX_START + 755) +#define RID_SVXSTR_DASH4 (RID_SVX_START + 756) +#define RID_SVXSTR_DASH5 (RID_SVX_START + 757) +#define RID_SVXSTR_DASH6 (RID_SVX_START + 758) +#define RID_SVXSTR_DASH7 (RID_SVX_START + 759) +#define RID_SVXSTR_DASH8 (RID_SVX_START + 760) +#define RID_SVXSTR_DASH9 (RID_SVX_START + 761) +#define RID_SVXSTR_DASH10 (RID_SVX_START + 762) +#define RID_SVXSTR_DASH11 (RID_SVX_START + 763) +#define RID_SVXSTR_DASH_DEF_START RID_SVXSTR_DASH0_DEF +#define RID_SVXSTR_DASH_DEF_END RID_SVXSTR_DASH11_DEF +#define RID_SVXSTR_DASH_START RID_SVXSTR_DASH0 +#define RID_SVXSTR_DASH_END RID_SVXSTR_DASH11 + +// Default-Line-End-Names +#define RID_SVXSTR_LEND0_DEF (RID_SVX_START + 770) +#define RID_SVXSTR_LEND1_DEF (RID_SVX_START + 771) +#define RID_SVXSTR_LEND2_DEF (RID_SVX_START + 772) +#define RID_SVXSTR_LEND3_DEF (RID_SVX_START + 773) +#define RID_SVXSTR_LEND4_DEF (RID_SVX_START + 774) +#define RID_SVXSTR_LEND5_DEF (RID_SVX_START + 775) +#define RID_SVXSTR_LEND6_DEF (RID_SVX_START + 776) +#define RID_SVXSTR_LEND7_DEF (RID_SVX_START + 777) +#define RID_SVXSTR_LEND8_DEF (RID_SVX_START + 778) +#define RID_SVXSTR_LEND9_DEF (RID_SVX_START + 779) +#define RID_SVXSTR_LEND10_DEF (RID_SVX_START + 780) +#define RID_SVXSTR_LEND11_DEF (RID_SVX_START + 781) +#define RID_SVXSTR_LEND0 (RID_SVX_START + 782) +#define RID_SVXSTR_LEND1 (RID_SVX_START + 783) +#define RID_SVXSTR_LEND2 (RID_SVX_START + 784) +#define RID_SVXSTR_LEND3 (RID_SVX_START + 785) +#define RID_SVXSTR_LEND4 (RID_SVX_START + 786) +#define RID_SVXSTR_LEND5 (RID_SVX_START + 787) +#define RID_SVXSTR_LEND6 (RID_SVX_START + 788) +#define RID_SVXSTR_LEND7 (RID_SVX_START + 789) +#define RID_SVXSTR_LEND8 (RID_SVX_START + 790) +#define RID_SVXSTR_LEND9 (RID_SVX_START + 791) +#define RID_SVXSTR_LEND10 (RID_SVX_START + 792) +#define RID_SVXSTR_LEND11 (RID_SVX_START + 793) +#define RID_SVXSTR_LEND_DEF_START RID_SVXSTR_LEND0_DEF +#define RID_SVXSTR_LEND_DEF_END RID_SVXSTR_LEND11_DEF +#define RID_SVXSTR_LEND_START RID_SVXSTR_LEND0 +#define RID_SVXSTR_LEND_END RID_SVXSTR_LEND11 + +#define RID_SVXSTR_QRY_PRINT_TITLE (RID_SVX_START + 802) +#define RID_SVXSTR_QRY_PRINT_MSG (RID_SVX_START + 803) +#define RID_SVXSTR_QRY_PRINT_ALL (RID_SVX_START + 804) +#define RID_SVXSTR_QRY_PRINT_SELECTION (RID_SVX_START + 805) + +// strings for error messsages in dictionary updates +#define RID_SVXSTR_DIC_ERR_UNKNOWN (RID_SVX_START + 810) +#define RID_SVXSTR_DIC_ERR_FULL (RID_SVX_START + 811) +#define RID_SVXSTR_DIC_ERR_READONLY (RID_SVX_START + 812) + +// strings for graphic attributes/undo +#define RID_SVXSTR_GRAFCROP (RID_SVX_START + 820) +#define RID_SVXSTR_UNDO_GRAFMODE (RID_SVX_START + 821) +#define RID_SVXSTR_UNDO_GRAFRED (RID_SVX_START + 822) +#define RID_SVXSTR_UNDO_GRAFGREEN (RID_SVX_START + 823) +#define RID_SVXSTR_UNDO_GRAFBLUE (RID_SVX_START + 824) +#define RID_SVXSTR_UNDO_GRAFLUMINANCE (RID_SVX_START + 825) +#define RID_SVXSTR_UNDO_GRAFCONTRAST (RID_SVX_START + 826) +#define RID_SVXSTR_UNDO_GRAFGAMMA (RID_SVX_START + 827) +#define RID_SVXSTR_UNDO_GRAFTRANSPARENCY (RID_SVX_START + 828) +#define RID_SVXSTR_UNDO_GRAFCROP (RID_SVXSTR_GRAFCROP) + +// listbox control for UNDO and REDO +#define RID_SVXTBX_UNDO_REDO_CTRL (RID_SVX_START + 845) +#define RID_SVXSTR_NUM_UNDO_ACTIONS (RID_SVX_START + 846) +#define RID_SVXSTR_NUM_REDO_ACTIONS (RID_SVX_START + 847) +#define RID_SVXSTR_NUM_UNDO_ACTION (RID_SVX_START + 848) +#define RID_SVXSTR_NUM_REDO_ACTION (RID_SVX_START + 849) + +// Default-transparence-gradient-names +#define RID_SVXSTR_TRASNGR0_DEF (RID_SVX_START + 850) +#define RID_SVXSTR_TRASNGR0 (RID_SVX_START + 851) +#define RID_SVXSTR_TRASNGR_DEF_START RID_SVXSTR_TRASNGR0_DEF +#define RID_SVXSTR_TRASNGR_DEF_END RID_SVXSTR_TRASNGR0_DEF +#define RID_SVXSTR_TRASNGR_START RID_SVXSTR_TRASNGR0 +#define RID_SVXSTR_TRASNGR_END RID_SVXSTR_TRASNGR0 + +#define RID_SVXSTR_BORDER_CONTROL (RID_SVX_START + 852) + +// Accessibility strings. The actual string ids are defined in +// svx/inc/accessibility.hrc, the strings are defined in +// svx/source/accessibility/accessibility.src +#define RID_SVXSTR_ACCESSIBILITY_START (RID_SVX_START + 860) +#define RID_SVXSTR_ACCESSIBILITY_END (RID_SVX_START + 950) + +// 984: free +#define RID_SVXFLOAT_EXTRUSION_DIRECTION (RID_SVX_START + 985) + +#define RID_SVX_EXTRUSION_BAR (RID_SVX_START + 986) +#define RID_SVX_FONTWORK_BAR (RID_SVX_START + 987) + +#define RID_SVXFLOAT_EXTRUSION_DEPTH (RID_SVX_START + 988) +#define RID_SVXFLOAT_EXTRUSION_LIGHTING (RID_SVX_START + 989) +#define RID_SVXFLOAT_EXTRUSION_SURFACE (RID_SVX_START + 990) +#define RID_SVXSTR_EXTRUSION_COLOR (RID_SVX_START + 991) + +#define RID_SVXSTR_DEPTH_0 (RID_SVX_START + 992) +#define RID_SVXSTR_DEPTH_1 (RID_SVX_START + 993) +#define RID_SVXSTR_DEPTH_2 (RID_SVX_START + 994) +#define RID_SVXSTR_DEPTH_3 (RID_SVX_START + 995) +#define RID_SVXSTR_DEPTH_4 (RID_SVX_START + 996) + +#define RID_SVXSTR_DEPTH_0_INCH (RID_SVX_START + 997) +#define RID_SVXSTR_DEPTH_1_INCH (RID_SVX_START + 998) +#define RID_SVXSTR_DEPTH_2_INCH (RID_SVX_START + 999) +#define RID_SVXSTR_DEPTH_3_INCH (RID_SVX_START + 1000) +#define RID_SVXSTR_DEPTH_4_INCH (RID_SVX_START + 1001) + +#define RID_SVXFLOAT_FONTWORK_ALIGNMENT (RID_SVX_START + 1002) +#define RID_SVXFLOAT_FONTWORK_CHARSPACING (RID_SVX_START + 1003) + +/* #i35426# DR 2004-10-19: (RID_SVX_START+1002) and (RID_SVX_START+1003) are + already used for RID_SVXFLOAT_FONTWORK_ALIGNMENT and + RID_SVXFLOAT_FONTWORK_CHARSPACING above. But these IDs describe floating + windows, and the following IDs are for strings, so this is no conflict. */ +#define RID_SVXSTR_PAGES (RID_SVX_START + 1002) + +#define RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE (RID_SVX_START + 1118) +#define RID_SVXSTR_UNDO_APPLY_FONTWORK_SAME_LETTER_HEIGHT (RID_SVX_START + 1119) +#define RID_SVXSTR_UNDO_APPLY_FONTWORK_ALIGNMENT (RID_SVX_START + 1120) +#define RID_SVXSTR_UNDO_APPLY_FONTWORK_KERN_CHARACTER_PAIRS (RID_SVX_START + 1121) +#define RID_SVXSTR_UNDO_APPLY_FONTWORK_CHARACTER_SPACING (RID_SVX_START + 1122) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ON_OFF (RID_SVX_START + 1123) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_DOWN (RID_SVX_START + 1124) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_UP (RID_SVX_START + 1125) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_LEFT (RID_SVX_START + 1126) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_RIGHT (RID_SVX_START + 1127) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_DEPTH (RID_SVX_START + 1128) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ORIENTATION (RID_SVX_START + 1129) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_PROJECTION (RID_SVX_START + 1130) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_LIGHTING (RID_SVX_START + 1131) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_BRIGHTNESS (RID_SVX_START + 1132) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_SURFACE (RID_SVX_START + 1133) +#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_COLOR (RID_SVX_START + 1134) + +#define RID_SVXSTR_SELMODE_BLK (RID_SVX_START + 1167) +#define RID_SVXSTR_STYLEFAMILY_TABLEDESIGN (RID_SVX_START + 1168) + // if you add here, remember to adjust RID_SVXSTR_NEXTFREE + +#define RID_SVXSTR_BULLET_DESCRIPTIONS (RID_SVX_START + 1138)//? +#define RID_SVXSTR_SINGLENUM_DESCRIPTIONS (RID_SVX_START + 1146)//? +#define RID_SVXSTR_OUTLINENUM_DESCRIPTIONS (RID_SVX_START + 1154)//? +#define RID_SVXSTR_BULLET_DESCRIPTION_0 (RID_SVXSTR_BULLET_DESCRIPTIONS + 0)//? +#define RID_SVXSTR_BULLET_DESCRIPTION_1 (RID_SVXSTR_BULLET_DESCRIPTIONS + 1)//? +#define RID_SVXSTR_BULLET_DESCRIPTION_2 (RID_SVXSTR_BULLET_DESCRIPTIONS + 2)//? +#define RID_SVXSTR_BULLET_DESCRIPTION_3 (RID_SVXSTR_BULLET_DESCRIPTIONS + 3)//? +#define RID_SVXSTR_BULLET_DESCRIPTION_4 (RID_SVXSTR_BULLET_DESCRIPTIONS + 4)//? +#define RID_SVXSTR_BULLET_DESCRIPTION_5 (RID_SVXSTR_BULLET_DESCRIPTIONS + 5)//? +#define RID_SVXSTR_BULLET_DESCRIPTION_6 (RID_SVXSTR_BULLET_DESCRIPTIONS + 6)//? +#define RID_SVXSTR_BULLET_DESCRIPTION_7 (RID_SVXSTR_BULLET_DESCRIPTIONS + 7)//? +#define RID_SVXSTR_SINGLENUM_DESCRIPTION_0 (RID_SVXSTR_SINGLENUM_DESCRIPTIONS + 0)//? +#define RID_SVXSTR_SINGLENUM_DESCRIPTION_1 (RID_SVXSTR_SINGLENUM_DESCRIPTIONS + 1)//? +#define RID_SVXSTR_SINGLENUM_DESCRIPTION_2 (RID_SVXSTR_SINGLENUM_DESCRIPTIONS + 2)//? +#define RID_SVXSTR_SINGLENUM_DESCRIPTION_3 (RID_SVXSTR_SINGLENUM_DESCRIPTIONS + 3)//? +#define RID_SVXSTR_SINGLENUM_DESCRIPTION_4 (RID_SVXSTR_SINGLENUM_DESCRIPTIONS + 4)//? +#define RID_SVXSTR_SINGLENUM_DESCRIPTION_5 (RID_SVXSTR_SINGLENUM_DESCRIPTIONS + 5)//? +#define RID_SVXSTR_SINGLENUM_DESCRIPTION_6 (RID_SVXSTR_SINGLENUM_DESCRIPTIONS + 6)//? +#define RID_SVXSTR_SINGLENUM_DESCRIPTION_7 (RID_SVXSTR_SINGLENUM_DESCRIPTIONS + 7)//? +#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_0 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 0)//? +#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_1 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 1)//? +#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_2 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 2)//? +#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_3 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 3)//? +#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_4 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 4)//? +#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_5 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 5)//? +#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_6 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 6)//? +#define RID_SVXSTR_OUTLINENUM_DESCRIPTION_7 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 7)//? + +#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1190) + +// ---------------------------------------------------------------------------- +// if we have _a_lot_ time, we should group the resource ids by type, instead +// of grouping them by semantics. The reason is that resource ids have to be +// unique relative to a fixed type (you can't have two dialogs with the same +// resource id), but they do not need to be unique gloablly (means you can have +// a dialog and a string, both with the same id) +// I suggest sticking to per-type ids instead of per-semantic ids, this is +// better maintainable (IMO), and does not waste that much ids +// fs@openoffice.org + +// ---------------------------------------------------------------------------- +// "Window" resource ids + + +// ---------------------------------------------------------------------------- +// "ModalDialog" resource ids + +#define RID_SVX_MDLG_FONTWORK_GALLERY ( RID_SVX_START + 2 ) +#define RID_SVX_MDLG_EXTRUSION_DEPTH ( RID_SVX_START + 3 ) + +// ---------------------------------------------------------------------------- +// "Menu" resource ids +#define RID_SVX_MDLG_SCRIPTORG_NEWLIB ( RID_SVX_START + 7 ) +#define RID_SVX_MDLG_FONTWORK_CHARSPACING ( RID_SVX_START + 19 ) + +// ResId fuer den ImportClipboard-Dialog +// depricated +//#define RID_SVXDLG_CLIPBOARD ( RID_SVX_START + 9 ) + +// ResId fuer den Sonderzeichen-Dialog + +// allgemeine DBMgr-Dialoge +// depricated +//#define RID_SVX_DBSELDLG ( RID_SVX_START + 11 ) +//#define RID_SVX_DBEDDLG ( RID_SVX_START + 12 ) +//#define RID_SVX_DBLOGON ( RID_SVX_START + 13 ) +//#define RID_SVX_RECDLG ( RID_SVX_START + 14 ) +//#define RID_SVX_BRSEEKDLG ( RID_SVX_START + 15 ) +//#define RID_SVX_BRCFGDLG ( RID_SVX_START + 16 ) +//#define RID_SVX_BRSORTDLG ( RID_SVX_START + 17 ) + +// document recovery and error report +// recycling ids from DBMgr +#define RID_SVX_MDLG_DOCRECOVERY_PROGR ( RID_SVX_START + 11 ) +#define RID_SVX_MDLG_DOCRECOVERY_BROKEN ( RID_SVX_START + 12 ) +#define RID_SVX_MDLG_ERR_REP_OPTIONS ( RID_SVX_START + 13 ) +#define RID_SVX_MDLG_ERR_REP_PREVIEW ( RID_SVX_START + 14 ) + +#define RID_SVX_TABDLG_DOCRECOVERY ( RID_SVX_START + 0 ) + +#define RID_SVXPAGE_DOCRECOVERY_SAVE ( RID_SVX_START + 8 ) +#define RID_SVXPAGE_DOCRECOVERY_RECOVER ( RID_SVX_START + 9 ) +#define RID_SVXPAGE_ERR_REP_WELCOME ( RID_SVX_START + 10 ) +#define RID_SVXPAGE_ERR_REP_SEND ( RID_SVX_START + 11 ) + +// ---------------------------------------------------------------------------- + +// !!!! double defined ID's (see below) !!! +#define RID_OFA_AUTOCORR_DLG (RID_OFA_START + 101) + +#define RID_OFA_GENERAL_OPTIONS_DLG (RID_OFA_START + 105) +#define RID_OFADLG_INTERNET (RID_OFA_START + 106) +#define RID_OFA_TABNEW_DLG (RID_OFA_START + 107) +#define RID_OFADLG_BROWSER (RID_OFA_START + 108) +#define RID_OFA_FORMNEW_DLG (RID_OFA_START + 112) +#define RID_OFA_TABPROPERTIES (RID_OFA_START + 113) +#define RID_OFADLG_REGISTRATION (RID_OFA_START + 114) +#define RID_OFADLG_AWCP_VALUES (RID_OFA_START + 117) + +// TabPages -------------------------------------------------------------- + +// !!!! double defined ID's (see above) !!! + +#define OFA_TP_APPEARANCE (RID_OFA_START + 203) +#define OFA_TP_TABPROPERTIES_GENERAL (RID_OFA_START + 204) + +//die RID_??_TP_* stehen nochmal im offids.hrc + +#define RID_SW_TP_LAYOUT_OPT (RID_OFA_START + 207) +#define RID_SW_TP_OPTINSERT_PAGE (RID_OFA_START + 213) +#define RID_SW_TP_OPTTEST_PAGE (RID_OFA_START + 215) +#define RID_SW_TP_OPTSRCVIEW (RID_OFA_START + 216) +#define RID_SW_TP_OPTINSERT_HTML_PAGE (RID_OFA_START + 238) +#define RID_SW_TP_HTML_LAYOUT_OPT (RID_OFA_START + 241) +#define SID_SD_TP_LAYOUT (RID_OFA_START + 226) +#define SID_SD_TP_SCALE (RID_OFA_START + 228) +#define SID_SD_TP_GRID (RID_OFA_START + 229) +#define SID_SI_TP_LAYOUT (RID_OFA_START + 233) +#define SID_SI_TP_GRID (RID_OFA_START + 235) +#define SID_SC_TP_MISC (RID_OFA_START + 239) +#define OFA_TP_TABPROPERTIES_TEXT (RID_OFA_START + 245) +#define OFA_TP_HELPERPROG (RID_OFA_START + 249) + +#endif + diff --git a/svx/inc/svx/dlgctl3d.hxx b/svx/inc/svx/dlgctl3d.hxx new file mode 100644 index 000000000000..4ee362978429 --- /dev/null +++ b/svx/inc/svx/dlgctl3d.hxx @@ -0,0 +1,218 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dlgctl3d.hxx,v $ + * $Revision: 1.4.226.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_DLGCTL3D_HXX +#define _SVX_DLGCTL3D_HXX + +#include <vcl/ctrl.hxx> +#include <vcl/scrbar.hxx> +#include <vcl/button.hxx> +#include <svl/itemset.hxx> +#include "svx/svxdllapi.h" +#include <basegfx/vector/b3dvector.hxx> + +////////////////////////////////////////////////////////////////////////////// + +class FmFormModel; +class FmFormPage; +class E3dView; +class E3dPolyScene; +class E3dObject; + +////////////////////////////////////////////////////////////////////////////// + +#define PREVIEW_OBJECTTYPE_SPHERE 0x0000 +#define PREVIEW_OBJECTTYPE_CUBE 0x0001 + +////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC Svx3DPreviewControl : public Control +{ +protected: + FmFormModel* mpModel; + FmFormPage* mpFmPage; + E3dView* mp3DView; + E3dPolyScene* mpScene; + E3dObject* mp3DObj; + sal_uInt16 mnObjectType; + + void Construct(); + +public: + Svx3DPreviewControl(Window* pParent, const ResId& rResId); + Svx3DPreviewControl(Window* pParent, WinBits nStyle = 0); + ~Svx3DPreviewControl(); + + virtual void Paint( const Rectangle& rRect ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void Resize(); + + void Reset(); + virtual void SetObjectType(sal_uInt16 nType); + sal_uInt16 GetObjectType() const { return( mnObjectType ); } + SfxItemSet Get3DAttributes() const; + virtual void Set3DAttributes(const SfxItemSet& rAttr); +}; + +////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC Svx3DLightControl : public Svx3DPreviewControl +{ + // Callback for interactive changes + Link maUserInteractiveChangeCallback; + Link maUserSelectionChangeCallback; + Link maChangeCallback; + Link maSelectionChangeCallback; + + // lights + sal_uInt32 maSelectedLight; + + // extra objects for light control + E3dObject* mpExpansionObject; + E3dObject* mpLampBottomObject; + E3dObject* mpLampShaftObject; + std::vector< E3dObject* > maLightObjects; + + // 3d rotations of object + double mfRotateX; + double mfRotateY; + double mfRotateZ; + + // interaction parameters + Point maActionStartPoint; + sal_Int32 mnInteractionStartDistance; + double mfSaveActionStartHor; + double mfSaveActionStartVer; + double mfSaveActionStartRotZ; + + // bitfield + unsigned mbMouseMoved : 1; + unsigned mbGeometrySelected : 1; + + void Construct2(); + void ConstructLightObjects(); + void AdaptToSelectedLight(); + void TrySelection(Point aPosPixel); + +public: + Svx3DLightControl(Window* pParent, const ResId& rResId); + Svx3DLightControl(Window* pParent, WinBits nStyle = 0); + ~Svx3DLightControl(); + + virtual void Paint(const Rectangle& rRect); + virtual void MouseButtonDown(const MouseEvent& rMEvt); + virtual void Tracking( const TrackingEvent& rTEvt ); + virtual void Resize(); + + virtual void SetObjectType(sal_uInt16 nType); + + // User Callback eintragen + void SetUserInteractiveChangeCallback(Link aNew) { maUserInteractiveChangeCallback = aNew; } + void SetUserSelectionChangeCallback(Link aNew) { maUserSelectionChangeCallback = aNew; } + void SetChangeCallback(Link aNew) { maChangeCallback = aNew; } + void SetSelectionChangeCallback(Link aNew) { maSelectionChangeCallback = aNew; } + + // selection checks + bool IsSelectionValid(); + bool IsGeometrySelected() { return mbGeometrySelected; } + + // get/set position of selected lamp in polar coordinates, Hor:[0..360.0[ and Ver:[-90..90] degrees + void GetPosition(double& rHor, double& rVer); + void SetPosition(double fHor, double fVer); + + // get/set rotation of 3D object + void SetRotation(double fRotX, double fRotY, double fRotZ); + void GetRotation(double& rRotX, double& rRotY, double& rRotZ); + + void SelectLight(sal_uInt32 nLightNumber); + virtual void Set3DAttributes(const SfxItemSet& rAttr); + sal_uInt32 GetSelectedLight() { return maSelectedLight; } + + // light data access + bool GetLightOnOff(sal_uInt32 nNum) const; + Color GetLightColor(sal_uInt32 nNum) const; + basegfx::B3DVector GetLightDirection(sal_uInt32 nNum) const; +}; + +////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SvxLightCtl3D : public Control +{ +private: + // local controls + Svx3DLightControl maLightControl; + ScrollBar maHorScroller; + ScrollBar maVerScroller; + PushButton maSwitcher; + + // Callback bei interaktiven Aenderungen + Link maUserInteractiveChangeCallback; + Link maUserSelectionChangeCallback; + +public: + SvxLightCtl3D( Window* pParent, const ResId& rResId); + SvxLightCtl3D( Window* pParent, WinBits nStyle = 0); + ~SvxLightCtl3D(); + + // Reagiere auf Groessenaenderungen + virtual void Resize(); + void NewLayout(); + + // Selektion auf Gueltigkeit pruefen + void CheckSelection(); + + // Um weitere Einstellungen nach Aussen zu bringen... + Svx3DLightControl& GetSvx3DLightControl() { return maLightControl; } + + // User Callback eintragen + void SetUserInteractiveChangeCallback(Link aNew) { maUserInteractiveChangeCallback = aNew; } + void SetUserSelectionChangeCallback(Link aNew) { maUserSelectionChangeCallback = aNew; } + + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void GetFocus(); + virtual void LoseFocus(); + +protected: + + DECL_LINK( InternalInteractiveChange, void*); + DECL_LINK( InternalSelectionChange, void*); + DECL_LINK( ScrollBarMove, void*); + DECL_LINK( ButtonPress, void*); + + // Lokale Parameter Initialisieren + void Init(); + + void move( double fDeltaHor, double fDeltaVer ); +}; + +#endif // _SCH_DLGCTL3D_HXX + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/svx/inc/svx/dlgctrl.hxx b/svx/inc/svx/dlgctrl.hxx new file mode 100644 index 000000000000..af3551c83301 --- /dev/null +++ b/svx/inc/svx/dlgctrl.hxx @@ -0,0 +1,542 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dlgctrl.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DLG_CTRL_HXX +#define _SVX_DLG_CTRL_HXX + +// include --------------------------------------------------------------- + +#include <svtools/ctrlbox.hxx> +#include <sfx2/tabdlg.hxx> +#include "svx/svxdllapi.h" +#include <svx/rectenum.hxx> +#include <vcl/graph.hxx> +#ifndef _XTABLE_HXX +class XBitmapEntry; +class XBitmapList; +class XColorEntry; +class XColorTable; +class XDash; +class XDashEntry; +class XDashList; +class XGradient; +class XGradientEntry; +class XGradientList; +class XHatch; +class XHatchEntry; +class XHatchList; +class XLineEndEntry; +class XLineEndList; +class XFillAttrSetItem; +#endif + +class XOBitmap; +class XOutdevItemPool; + +namespace com { namespace sun { namespace star { namespace awt { + struct Point; +} } } } + +/************************************************************************* +|* +|* Von SfxTabPage abgeleitet, um vom Control ueber virtuelle Methode +|* benachrichtigt werden zu koennen. +|* +\************************************************************************/ +class SvxTabPage : public SfxTabPage +{ + +public: + SvxTabPage( Window* pParent, ResId Id, const SfxItemSet& rInAttrs ) : + SfxTabPage( pParent, Id, rInAttrs ) {} + + virtual void PointChanged( Window* pWindow, RECT_POINT eRP ) = 0; +}; + +/************************************************************************* +|* +|* Control zur Darstellung und Auswahl der Eckpunkte (und Mittelpunkt) +|* eines Objekts +|* +\************************************************************************/ +typedef UINT16 CTL_STATE; +#define CS_NOHORZ 1 // no horizontal input information is used +#define CS_NOVERT 2 // no vertikal input information is used + +class SvxRectCtlAccessibleContext; + +class SVX_DLLPUBLIC SvxRectCtl : public Control +{ +private: + SVX_DLLPRIVATE void InitSettings( BOOL bForeground, BOOL bBackground ); + SVX_DLLPRIVATE void InitRectBitmap( void ); + SVX_DLLPRIVATE Bitmap& GetRectBitmap( void ); + SVX_DLLPRIVATE void Resize_Impl(); + +protected: + SvxRectCtlAccessibleContext* pAccContext; + USHORT nBorderWidth; + USHORT nRadius; + Size aSize; + Point aPtLT, aPtMT, aPtRT; + Point aPtLM, aPtMM, aPtRM; + Point aPtLB, aPtMB, aPtRB; + Point aPtNew; + RECT_POINT eRP, eDefRP; + CTL_STYLE eCS; + Bitmap* pBitmap; + CTL_STATE m_nState; + + // #103516# Added a possibility to completely disable this control + sal_Bool mbCompleteDisable; + + RECT_POINT GetRPFromPoint( Point ) const; + Point GetPointFromRP( RECT_POINT ) const; + void SetFocusRect( const Rectangle* pRect = NULL ); // pRect == NULL -> calculate rectangle in method + Point SetActualRPWithoutInvalidate( RECT_POINT eNewRP ); // returns the last point + + virtual void GetFocus(); + virtual void LoseFocus(); + + Point GetApproxLogPtFromPixPt( const Point& rRoughPixelPoint ) const; +public: + SvxRectCtl( Window* pParent, const ResId& rResId, RECT_POINT eRpt = RP_MM, + USHORT nBorder = 200, USHORT nCircle = 80, CTL_STYLE eStyle = CS_RECT ); + virtual ~SvxRectCtl(); + + virtual void Paint( const Rectangle& rRect ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void KeyInput( const KeyEvent& rKeyEvt ); + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + virtual void Resize(); + + void Reset(); + RECT_POINT GetActualRP() const; + void SetActualRP( RECT_POINT eNewRP ); + + void SetState( CTL_STATE nState ); + + UINT8 GetNumOfChilds( void ) const; // returns number of usable radio buttons + + Rectangle CalculateFocusRectangle( void ) const; + Rectangle CalculateFocusRectangle( RECT_POINT eRectPoint ) const; + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); + + RECT_POINT GetApproxRPFromPixPt( const ::com::sun::star::awt::Point& rPixelPoint ) const; + + // #103516# Added a possibility to completely disable this control + sal_Bool IsCompletelyDisabled() const { return mbCompleteDisable; } + void DoCompletelyDisable(sal_Bool bNew); +}; + +/************************************************************************* +|* +|* Control zur Darstellung und Auswahl des Winkels der Eckpunkte +|* eines Objekts +|* +\************************************************************************/ +class SvxAngleCtl : public SvxRectCtl +{ +private: + void Initialize(); + +protected: + Font aFont; + Size aFontSize; + BOOL bPositive; + +public: + SvxAngleCtl( Window* pParent, const ResId& rResId ); + SvxAngleCtl( Window* pParent, const ResId& rResId, Size aSize ); + + void ChangeMetric() + { bPositive = !bPositive; } + virtual void Paint( const Rectangle& rRect ); +}; + +/************************************************************************* +|* +|* Preview-Control zur Darstellung von Bitmaps +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxBitmapCtl +{ +protected: + Size aSize; + USHORT nLines; + Color aPixelColor, aBackgroundColor; + const USHORT* pBmpArray; + +public: + SvxBitmapCtl( Window* pParent, const Size& rSize ); + ~SvxBitmapCtl(); + + XOBitmap GetXBitmap(); + + void SetBmpArray( const USHORT* pPixel ) { pBmpArray = pPixel; } + void SetLines( USHORT nLns ) { nLines = nLns; } + void SetPixelColor( Color aColor ) { aPixelColor = aColor; } + void SetBackgroundColor( Color aColor ) { aBackgroundColor = aColor; } +}; + +/************************************************************************* +|* +|* Control zum Editieren von Bitmaps +|* +\************************************************************************/ +class SVX_DLLPUBLIC SvxPixelCtl : public Control +{ +private: + using OutputDevice::SetLineColor; + +protected: + USHORT nLines, nSquares; + Color aPixelColor; + Color aBackgroundColor; + Color aLineColor; + Size aRectSize; + USHORT* pPixel; + BOOL bPaintable; + + void ChangePixel( USHORT nPixel ); + +public: + SvxPixelCtl( Window* pParent, const ResId& rResId, + USHORT nNumber = 8 ); + ~SvxPixelCtl(); + + virtual void Paint( const Rectangle& rRect ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + + void SetXBitmap( const XOBitmap& rXOBitmap ); + + void SetPixelColor( const Color& rCol ) { aPixelColor = rCol; } + void SetBackgroundColor( const Color& rCol ) { aBackgroundColor = rCol; } + void SetLineColor( const Color& rCol ) { aLineColor = rCol; } + + USHORT GetLineCount() const { return nLines; } + Color GetPixelColor() const { return aPixelColor; } + Color GetBackgroundColor() const { return aBackgroundColor; } + + USHORT GetBitmapPixel( const USHORT nPixelNumber ); + USHORT* GetBitmapPixelPtr() { return pPixel; } + + void SetPaintable( BOOL bTmp ) { bPaintable = bTmp; } + void Reset(); +}; + +/************************************************************************* +|* +|* ColorLB kann mit Farben und Namen gefuellt werden +|* +\************************************************************************/ +class SVX_DLLPUBLIC ColorLB : public ColorListBox +{ + +public: + ColorLB( Window* pParent, ResId Id ) : ColorListBox( pParent, Id ) {} + ColorLB( Window* pParent, WinBits aWB ) : ColorListBox( pParent, aWB ) {} + + virtual void Fill( const XColorTable* pTab ); + + void Append( XColorEntry* pEntry, Bitmap* pBmp = NULL ); + void Modify( XColorEntry* pEntry, USHORT nPos, Bitmap* pBmp = NULL ); +}; + +/************************************************************************* +|* +|* HatchingLB +|* +\************************************************************************/ +class SVX_DLLPUBLIC HatchingLB : public ListBox +{ + +public: + HatchingLB( Window* pParent, ResId Id, BOOL bUserDraw = TRUE ); + HatchingLB( Window* pParent, WinBits aWB, BOOL bUserDraw = TRUE ); + + virtual void Fill( const XHatchList* pList ); + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + + void Append( XHatchEntry* pEntry, Bitmap* pBmp = NULL ); + void Modify( XHatchEntry* pEntry, USHORT nPos, Bitmap* pBmp = NULL ); + void SelectEntryByList( const XHatchList* pList, const String& rStr, + const XHatch& rXHatch, USHORT nDist = 0 ); + +private: + XHatchList* mpList; + BOOL mbUserDraw; +}; + +/************************************************************************* +|* +|* GradientLB +|* +\************************************************************************/ +class SVX_DLLPUBLIC GradientLB : public ListBox +{ +public: + GradientLB( Window* pParent, ResId Id, BOOL bUserDraw = TRUE ); + GradientLB( Window* pParent, WinBits aWB, BOOL bUserDraw = TRUE ); + + virtual void Fill( const XGradientList* pList ); + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + + void Append( XGradientEntry* pEntry, Bitmap* pBmp = NULL ); + void Modify( XGradientEntry* pEntry, USHORT nPos, Bitmap* pBmp = NULL ); + void SelectEntryByList( const XGradientList* pList, const String& rStr, + const XGradient& rXGradient, USHORT nDist = 0 ); + +private: + XGradientList* mpList; + BOOL mbUserDraw; +}; + +/************************************************************************* +|* +|* BitmapLB +|* +\************************************************************************/ +class SVX_DLLPUBLIC BitmapLB : public ListBox +{ +public: + BitmapLB( Window* pParent, ResId Id, BOOL bUserDraw = TRUE ); + + virtual void Fill( const XBitmapList* pList ); + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + + void Append( XBitmapEntry* pEntry, Bitmap* pBmp = NULL ); + void Modify( XBitmapEntry* pEntry, USHORT nPos, Bitmap* pBmp = NULL ); + void SelectEntryByList( const XBitmapList* pList, const String& rStr, + const Bitmap& rBmp); + +private: + VirtualDevice aVD; + Bitmap aBitmap; + + XBitmapList* mpList; + BOOL mbUserDraw; + + SVX_DLLPRIVATE void SetVirtualDevice(); +}; + +/************************************************************************* +|* +|* FillAttrLB vereint alle Fuellattribute in einer ListBox +|* +\************************************************************************/ +class FillAttrLB : public ColorListBox +{ +private: + VirtualDevice aVD; + Bitmap aBitmap; + + void SetVirtualDevice(); + +public: + FillAttrLB( Window* pParent, ResId Id ); + FillAttrLB( Window* pParent, WinBits aWB ); + + virtual void Fill( const XColorTable* pTab ); + virtual void Fill( const XHatchList* pList ); + virtual void Fill( const XGradientList* pList ); + virtual void Fill( const XBitmapList* pList ); + + void SelectEntryByList( const XBitmapList* pList, const String& rStr, + const Bitmap& rBmp); +}; + +/************************************************************************* +|* +|* FillTypeLB +|* +\************************************************************************/ +class FillTypeLB : public ListBox +{ + +public: + FillTypeLB( Window* pParent, ResId Id ) : ListBox( pParent, Id ) {} + FillTypeLB( Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) {} + + virtual void Fill(); +}; + +/************************************************************************* +|* +|* LineLB +|* +\************************************************************************/ +class SVX_DLLPUBLIC LineLB : public ListBox +{ + +public: + LineLB( Window* pParent, ResId Id ) : ListBox( pParent, Id ) {} + LineLB( Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) {} + + virtual void Fill( const XDashList* pList ); + + void Append( XDashEntry* pEntry, Bitmap* pBmp = NULL ); + void Modify( XDashEntry* pEntry, USHORT nPos, Bitmap* pBmp = NULL ); + void SelectEntryByList( const XDashList* pList, const String& rStr, + const XDash& rDash, USHORT nDist = 0 ); + void FillStyles(); +}; + +/************************************************************************* +|* +|* LineEndsLB +|* +\************************************************************************/ +class SVX_DLLPUBLIC LineEndLB : public ListBox +{ + +public: + LineEndLB( Window* pParent, ResId Id ) : ListBox( pParent, Id ) {} + LineEndLB( Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) {} + + virtual void Fill( const XLineEndList* pList, BOOL bStart = TRUE ); + + void Append( XLineEndEntry* pEntry, Bitmap* pBmp = NULL, + BOOL bStart = TRUE ); + void Modify( XLineEndEntry* pEntry, USHORT nPos, Bitmap* pBmp = NULL, + BOOL bStart = TRUE ); +}; + +////////////////////////////////////////////////////////////////////////////// + +class SdrObject; +class SdrModel; + +class SvxPreviewBase : public Control +{ +private: + SdrModel* mpModel; + VirtualDevice* mpBufferDevice; + +protected: + void InitSettings(bool bForeground, bool bBackground); + + // prepare buffered paint + void LocalPrePaint(); + + // end and output buffered paint + void LocalPostPaint(); + +public: + SvxPreviewBase( Window* pParent, const ResId& rResId ); + virtual ~SvxPreviewBase(); + + // change support + virtual void StateChanged(StateChangedType nStateChange); + virtual void DataChanged(const DataChangedEvent& rDCEvt); + + // dada read access + SdrModel& getModel() const { return *mpModel; } + OutputDevice& getBufferDevice() const { return *mpBufferDevice; } +}; + +/************************************************************************* +|* +|* SvxLinePreview +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxXLinePreview : public SvxPreviewBase +{ +private: + SdrObject* mpLineObjA; + SdrObject* mpLineObjB; + SdrObject* mpLineObjC; + + //#58425# Symbole auf einer Linie (z.B. StarChart) + Graphic* mpGraphic; + sal_Bool mbWithSymbol; + Size maSymbolSize; + +public: + SvxXLinePreview( Window* pParent, const ResId& rResId ); + virtual ~SvxXLinePreview(); + + void SetLineAttributes(const SfxItemSet& rItemSet); + + void ShowSymbol( BOOL b ) { mbWithSymbol = b; }; + void SetSymbol( Graphic* p, const Size& s ); + void ResizeSymbol( const Size& s ); + + virtual void Paint( const Rectangle& rRect ); +}; + +/************************************************************************* +|* +|* SvxXRectPreview +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxXRectPreview : public SvxPreviewBase +{ +private: + SdrObject* mpRectangleObject; + +public: + SvxXRectPreview( Window* pParent, const ResId& rResId ); + virtual ~SvxXRectPreview(); + + void SetAttributes(const SfxItemSet& rItemSet); + + virtual void Paint( const Rectangle& rRect ); +}; + +/************************************************************************* +|* +|* SvxXShadowPreview +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxXShadowPreview : public SvxPreviewBase +{ +private: + SdrObject* mpRectangleObject; + SdrObject* mpRectangleShadow; + +public: + SvxXShadowPreview( Window* pParent, const ResId& rResId ); + virtual ~SvxXShadowPreview(); + + void SetRectangleAttributes(const SfxItemSet& rItemSet); + void SetShadowAttributes(const SfxItemSet& rItemSet); + void SetShadowPosition(const Point& rPos); + + virtual void Paint( const Rectangle& rRect ); +}; + +#endif // _SVX_DLG_CTRL_HXX + diff --git a/svx/inc/svx/dstribut_enum.hxx b/svx/inc/svx/dstribut_enum.hxx new file mode 100644 index 000000000000..9866a8e9107b --- /dev/null +++ b/svx/inc/svx/dstribut_enum.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dstribut_enum.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DSTRIBUT_ENUM_HXX +#define _SVX_DSTRIBUT_ENUM_HXX + +/************************************************************************* +|* +\************************************************************************/ + +enum SvxDistributeHorizontal +{ + SvxDistributeHorizontalNone = 0, + SvxDistributeHorizontalLeft, + SvxDistributeHorizontalCenter, + SvxDistributeHorizontalDistance, + SvxDistributeHorizontalRight +}; + +enum SvxDistributeVertical +{ + SvxDistributeVerticalNone = 0, + SvxDistributeVerticalTop, + SvxDistributeVerticalCenter, + SvxDistributeVerticalDistance, + SvxDistributeVerticalBottom +}; + +#endif // _SVX_DSTRIBUT_ENUM_HXX + diff --git a/svx/inc/svx/e3ditem.hxx b/svx/inc/svx/e3ditem.hxx new file mode 100644 index 000000000000..cc90da3aff9e --- /dev/null +++ b/svx/inc/svx/e3ditem.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: e3ditem.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVXE3DITEM_HXX +#define _SVXE3DITEM_HXX + +#include <svl/poolitem.hxx> +#include <basegfx/vector/b3dvector.hxx> +#include "svx/svxdllapi.h" + +#ifndef _SVXVECT3DITEM_HXX +#define _SVXVECT3DITEM_HXX + +class SvStream; + +class SVX_DLLPUBLIC SvxB3DVectorItem : public SfxPoolItem +{ + basegfx::B3DVector aVal; + +public: + TYPEINFO(); + SvxB3DVectorItem(); + SvxB3DVectorItem( USHORT nWhich, const basegfx::B3DVector& rVal ); + SvxB3DVectorItem( USHORT nWhich, SvStream & ); + SvxB3DVectorItem( const SvxB3DVectorItem& ); + ~SvxB3DVectorItem(); + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + const basegfx::B3DVector& GetValue() const { return aVal; } + void SetValue( const basegfx::B3DVector& rNewVal ) { + DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); + aVal = rNewVal; + } + + virtual USHORT GetVersion (USHORT nFileFormatVersion) const; +}; + +#endif + +#endif + + diff --git a/svx/inc/svx/e3dsceneupdater.hxx b/svx/inc/svx/e3dsceneupdater.hxx new file mode 100644 index 000000000000..a68a8e66e43e --- /dev/null +++ b/svx/inc/svx/e3dsceneupdater.hxx @@ -0,0 +1,77 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: e3dsceneupdater.hxx,v $ + * $Revision: 1.1.2.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_SCENEUPDATER_HXX +#define _E3D_SCENEUPDATER_HXX + +#include <svx/svxdllapi.h> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrObject; +class E3dScene; +namespace drawinglayer { namespace geometry { + class ViewInformation3D; +}} + +////////////////////////////////////////////////////////////////////////////// +// This class is a helper to encapsulate 3D object changes which shall change the +// scene's 2D geometry. E.g. when moving one 3D object in a scene, the visualisation +// would not change since the scene's 2D attributes are defined by it's 2D object +// transformation and the changed content would be projected to the same 2D bounds +// as before. To reflect the fact that the 2D positions may 'change' for the user's +// imagination, it is necessary to calculate a new 2D object transformation of the scene +// (the SnapRect) using the old 3D transformation stack and the eventually changed +// 3D content and tu use it. This is only wanted if changes to the scene's +// content are intended to change the scene's 2D geometry attributes + +class SVX_DLLPUBLIC E3DModifySceneSnapRectUpdater +{ + // the scene which may be changed. This gets set to the outmost scene + // of the to-be-changed 3D object when the scene has a 3d transformation + // stack at construction time. In all other cases it's set to zero and + // no action needs to be taken + E3dScene* mpScene; + + // the 3d transformation stack at the time of construction, valid when + // mpScene is not zero + drawinglayer::geometry::ViewInformation3D* mpViewInformation3D; + +public: + // the constructor evaluates and sets the members at construction time + E3DModifySceneSnapRectUpdater(const SdrObject* pObject); + + // the destructor will take action if mpScene is not zero and modify the + // 2D geomeztry of the target scene + ~E3DModifySceneSnapRectUpdater(); +}; + +#endif // _E3D_SCENEUPDATER_HXX diff --git a/svx/inc/svx/e3dundo.hxx b/svx/inc/svx/e3dundo.hxx new file mode 100644 index 000000000000..9edcafafdf46 --- /dev/null +++ b/svx/inc/svx/e3dundo.hxx @@ -0,0 +1,127 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: e3dundo.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_UNDO_HXX +#define _E3D_UNDO_HXX + +#include <svx/svdundo.hxx> +class E3DObject; +#include <svx/scene3d.hxx> +#include "svx/svxdllapi.h" + +class E3dView; + +/************************************************************************\ +|* +|* Basisklasse fuer alle 3D-Undo-Aktionen. +|* +\************************************************************************/ +class E3dUndoAction : public SdrUndoAction +{ + + protected : + E3dObject *pMy3DObj; + + public: + TYPEINFO(); + E3dUndoAction (SdrModel *pModel, + E3dObject *p3DObj) : + SdrUndoAction (*pModel), + pMy3DObj (p3DObj) + { + } + + virtual ~E3dUndoAction (); + + virtual BOOL CanRepeat(SfxRepeatTarget&) const; +}; + +/************************************************************************\ +|* +|* Undo fuer 3D-Rotation ueber die Rotationsmatrizen (ob das wohl klappt ?) +|* +\************************************************************************/ +class E3dRotateUndoAction : public E3dUndoAction +{ + basegfx::B3DHomMatrix aMyOldRotation; + basegfx::B3DHomMatrix aMyNewRotation; + + public: + TYPEINFO(); + E3dRotateUndoAction (SdrModel *pModel, + E3dObject *p3DObj, + const basegfx::B3DHomMatrix &aOldRotation, + const basegfx::B3DHomMatrix &aNewRotation) : + E3dUndoAction (pModel, p3DObj), + aMyOldRotation (aOldRotation), + aMyNewRotation (aNewRotation) + { + } + + virtual ~E3dRotateUndoAction (); + + virtual void Undo(); + virtual void Redo(); + +}; + +/************************************************************************\ +|* +|* Undo fuer 3D-Attribute (Implementiert ueber Set3DAttributes()) +|* +\************************************************************************/ +class SVX_DLLPUBLIC E3dAttributesUndoAction : public SdrUndoAction +{ + using SdrUndoAction::Repeat; + + SdrObject* pObject; + E3dView* pView; + BOOL bUseSubObjects; + + const SfxItemSet aNewSet; + const SfxItemSet aOldSet; + + public: + TYPEINFO(); + E3dAttributesUndoAction( SdrModel &rModel, E3dView* pView, + E3dObject* pInObject, + const SfxItemSet& rNewSet, + const SfxItemSet& rOldSet, + BOOL bUseSubObj); + + virtual ~E3dAttributesUndoAction(); + + virtual BOOL CanRepeat(SfxRepeatTarget& rView) const; + virtual void Undo(); + virtual void Redo(); + virtual void Repeat(); +}; + +#endif // _E3D_CUBE3D_HXX diff --git a/svx/inc/svx/editdata.hxx b/svx/inc/svx/editdata.hxx new file mode 100644 index 000000000000..8e3c9f853961 --- /dev/null +++ b/svx/inc/svx/editdata.hxx @@ -0,0 +1,391 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: editdata.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MyEDITDATA, wegen exportiertem EditData +#ifndef _MyEDITDATA_HXX +#define _MyEDITDATA_HXX + +#include <tools/string.hxx> +#include "svx/svxdllapi.h" + +#include <svl/svarray.hxx> + +class SfxItemSet; +class SfxPoolItem; +class SvParser; +class SvxFieldItem; + +enum EETextFormat { EE_FORMAT_TEXT = 0x20, EE_FORMAT_RTF, EE_FORMAT_BIN = 0x31, EE_FORMAT_HTML, EE_FORMAT_XML }; +enum EEHorizontalTextDirection { EE_HTEXTDIR_DEFAULT, EE_HTEXTDIR_L2R, EE_HTEXTDIR_R2L }; +enum EESelectionMode { EE_SELMODE_STD, EE_SELMODE_TXTONLY, EE_SELMODE_HIDDEN }; + // EE_SELMODE_HIDDEN can be used to completely hide the selection. This is usefull e.g. when you want show the selection + // only as long as your window (which the edit view works on) has the focus +enum EESpellState { EE_SPELL_OK, EE_SPELL_NOLANGUAGE, EE_SPELL_LANGUAGENOTINSTALLED, EE_SPELL_NOSPELLER, EE_SPELL_ERRORFOUND }; +enum EVAnchorMode { + ANCHOR_TOP_LEFT, ANCHOR_VCENTER_LEFT, ANCHOR_BOTTOM_LEFT, + ANCHOR_TOP_HCENTER, ANCHOR_VCENTER_HCENTER, ANCHOR_BOTTOM_HCENTER, + ANCHOR_TOP_RIGHT, ANCHOR_VCENTER_RIGHT, ANCHOR_BOTTOM_RIGHT }; + +#define EE_PARA_NOT_FOUND 0xFFFF +#define EE_PARA_APPEND 0xFFFF +#define EE_PARA_ALL 0xFFFF +#define EE_APPEND 0xFFFF +#define EE_INDEX_NOT_FOUND 0xFFFF + +// Fehlermeldungen fuer Read/Write-Methode +#define EE_READWRITE_OK (SVSTREAM_OK) +#define EE_READWRITE_WRONGFORMAT (SVSTREAM_ERRBASE_USER+1) +#define EE_READWRITE_GENERALERROR (SVSTREAM_ERRBASE_USER+2) + +#define EDITUNDO_START 100 +#define EDITUNDO_REMOVECHARS 100 +#define EDITUNDO_CONNECTPARAS 101 +#define EDITUNDO_REMOVEFEATURE 102 +#define EDITUNDO_MOVEPARAGRAPHS 103 +#define EDITUNDO_INSERTFEATURE 104 +#define EDITUNDO_SPLITPARA 105 +#define EDITUNDO_INSERTCHARS 106 +#define EDITUNDO_DELCONTENT 107 +#define EDITUNDO_DELETE 108 +#define EDITUNDO_CUT 109 +#define EDITUNDO_PASTE 110 +#define EDITUNDO_INSERT 111 +#define EDITUNDO_SRCHANDREPL 112 +#define EDITUNDO_MOVEPARAS 113 +#define EDITUNDO_PARAATTRIBS 114 +#define EDITUNDO_ATTRIBS 115 +#define EDITUNDO_DRAGANDDROP 116 +#define EDITUNDO_READ 117 +#define EDITUNDO_STYLESHEET 118 +#define EDITUNDO_REPLACEALL 119 +#define EDITUNDO_STRETCH 120 +#define EDITUNDO_RESETATTRIBS 121 +#define EDITUNDO_INDENTBLOCK 122 +#define EDITUNDO_UNINDENTBLOCK 123 +#define EDITUNDO_MARKSELECTION 124 +#define EDITUNDO_TRANSLITERATE 125 +#define EDITUNDO_END 125 + +#define EDITUNDO_USER 200 + + +#define EE_COMPATIBLEMODE_PARAGRAPHSPACING_SUMMATION 0x0001 +#define EE_COMPATIBLEMODE_PARAGRAPHSPACING_BEFOREFIRSTPARAGRAPH 0x0002 + +class EditView; +class EditEngine; +class ImpEditView; +class ImpEditEngine; +class EditTextObject; +class SfxStyleSheet; + +#define RGCHK_NONE 0 // Keine Korrektur der ViusArea beim Scrollen +#define RGCHK_NEG 1 // Keine neg. ViusArea beim Scrollen +#define RGCHK_PAPERSZ1 2 // VisArea muss in Papierbreite,Texthoehe liegen + +struct EPosition +{ + USHORT nPara; + xub_StrLen nIndex; + + EPosition() : + nPara( EE_PARA_NOT_FOUND ), + nIndex( EE_INDEX_NOT_FOUND ) + { + } + + EPosition( USHORT nPara_, xub_StrLen nPos_ ) : + nPara( nPara_ ), + nIndex( nPos_ ) + { + } +}; + +struct ESelection +{ + USHORT nStartPara; + xub_StrLen nStartPos; + USHORT nEndPara; + xub_StrLen nEndPos; + + ESelection() : nStartPara( 0 ), nStartPos( 0 ), nEndPara( 0 ), nEndPos( 0 ) {} + + ESelection( USHORT nStPara, xub_StrLen nStPos, USHORT nEPara, xub_StrLen nEPos ) : + nStartPara( nStPara ), + nStartPos( nStPos ), + nEndPara( nEPara ), + nEndPos( nEPos ) + { + } + + ESelection( USHORT nPara, xub_StrLen nPos ) : + nStartPara( nPara ), + nStartPos( nPos ), + nEndPara( nPara ), + nEndPos( nPos ) + { + } + + void Adjust(); + BOOL IsEqual( const ESelection& rS ) const; + BOOL IsLess( const ESelection& rS ) const; + BOOL IsGreater( const ESelection& rS ) const; + BOOL IsZero() const; + BOOL HasRange() const; +}; + +inline BOOL ESelection::HasRange() const +{ + return ( nStartPara != nEndPara ) || ( nStartPos != nEndPos ); +} + +inline sal_Bool ESelection::IsZero() const +{ + return ( ( nStartPara == 0 ) && ( nStartPos == 0 ) && + ( nEndPara == 0 ) && ( nEndPos == 0 ) ); +} + +inline sal_Bool ESelection::IsEqual( const ESelection& rS ) const +{ + return ( ( nStartPara == rS.nStartPara ) && ( nStartPos == rS.nStartPos ) && + ( nEndPara == rS.nEndPara ) && ( nEndPos == rS.nEndPos ) ); +} + +inline sal_Bool ESelection::IsLess( const ESelection& rS ) const +{ + // Selektion muss justiert sein. + // => Nur pueffen, ob Ende von 'this' < Start von rS + + if ( ( nEndPara < rS.nStartPara ) || + ( ( nEndPara == rS.nStartPara ) && ( nEndPos < rS.nStartPos ) && !IsEqual( rS ) ) ) + { + return sal_True; + } + return sal_False; +} + +inline sal_Bool ESelection::IsGreater( const ESelection& rS ) const +{ + // Selektion muss justiert sein. + // => Nur pueffen, ob Ende von 'this' > Start von rS + + if ( ( nStartPara > rS.nEndPara ) || + ( ( nStartPara == rS.nEndPara ) && ( nStartPos > rS.nEndPos ) && !IsEqual( rS ) ) ) + { + return sal_True; + } + return sal_False; +} + +inline void ESelection::Adjust() +{ + sal_Bool bSwap = sal_False; + if ( nStartPara > nEndPara ) + bSwap = sal_True; + else if ( ( nStartPara == nEndPara ) && ( nStartPos > nEndPos ) ) + bSwap = sal_True; + + if ( bSwap ) + { + sal_uInt16 nSPar = nStartPara; sal_uInt16 nSPos = nStartPos; + nStartPara = nEndPara; nStartPos = nEndPos; + nEndPara = nSPar; nEndPos = nSPos; + } +} + +struct SVX_DLLPUBLIC EFieldInfo +{ + SvxFieldItem* pFieldItem; + String aCurrentText; + EPosition aPosition; + + EFieldInfo(); + EFieldInfo( const SvxFieldItem& rFieldItem, USHORT nPara, USHORT nPos ); + ~EFieldInfo(); + + EFieldInfo( const EFieldInfo& ); + EFieldInfo& operator= ( const EFieldInfo& ); +}; + +// ----------------------------------------------------------------------- + +enum ImportState { + RTFIMP_START, RTFIMP_END, // nur pParser, nPara, nIndex + RTFIMP_NEXTTOKEN, RTFIMP_UNKNOWNATTR, // nToken+nTokenValue + RTFIMP_SETATTR, // pAttrs + RTFIMP_INSERTTEXT, // aText + RTFIMP_INSERTPARA, // - + HTMLIMP_START, HTMLIMP_END, // nur pParser, nPara, nIndex + HTMLIMP_NEXTTOKEN, HTMLIMP_UNKNOWNATTR, // nToken + HTMLIMP_SETATTR, // pAttrs + HTMLIMP_INSERTTEXT, // aText + HTMLIMP_INSERTPARA, HTMLIMP_INSERTFIELD // - + }; + +struct ImportInfo +{ + SvParser* pParser; + ESelection aSelection; + ImportState eState; + + int nToken; + short nTokenValue; + + String aText; + + void* pAttrs; // RTF: SvxRTFItemStackType*, HTML: SfxItemSet* + + ImportInfo( ImportState eState, SvParser* pPrsrs, const ESelection& rSel ); + ~ImportInfo(); +}; + +#define EE_SEARCH_WORDONLY 0x0001 +#define EE_SEARCH_EXACT 0x0002 +#define EE_SEARCH_BACKWARD 0x0004 +#define EE_SEARCH_INSELECTION 0x0008 +#define EE_SEARCH_REGEXPR 0x0010 +#define EE_SEARCH_PATTERN 0x0020 + +struct ParagraphInfos +{ + ParagraphInfos() + : nParaHeight( 0 ) + , nLines( 0 ) + , nFirstLineStartX( 0 ) + , nFirstLineOffset( 0 ) + , nFirstLineHeight( 0 ) + , nFirstLineTextHeight ( 0 ) + , nFirstLineMaxAscent( 0 ) + , bValid( 0 ) + {} + USHORT nParaHeight; + USHORT nLines; + + USHORT nFirstLineStartX; + + USHORT nFirstLineOffset; + USHORT nFirstLineHeight; + USHORT nFirstLineTextHeight; + USHORT nFirstLineMaxAscent; + + BOOL bValid; // Bei einer Abfrage waehrend der Formatierung ungueltig! +}; + +struct EECharAttrib +{ + const SfxPoolItem* pAttr; + + USHORT nPara; + xub_StrLen nStart; + xub_StrLen nEnd; +}; + +SV_DECL_VARARR_VISIBILITY( EECharAttribArray, EECharAttrib, 0, 4, SVX_DLLPUBLIC ) + +struct MoveParagraphsInfo +{ + USHORT nStartPara; + USHORT nEndPara; + USHORT nDestPara; + + MoveParagraphsInfo( USHORT nS, USHORT nE, USHORT nD ) + { nStartPara = nS; nEndPara = nE; nDestPara = nD; } +}; + +#define EE_ACTION_PASTE 1 +#define EE_ACTION_DROP 2 + +struct PasteOrDropInfos +{ + USHORT nAction; + USHORT nStartPara; + USHORT nEndPara; + + PasteOrDropInfos() : nAction(0), nStartPara(0xFFFF), nEndPara(0xFFFF) {} +}; + +enum EENotifyType +{ + /// EditEngine text was modified + EE_NOTIFY_TEXTMODIFIED, + + /// A paragraph was inserted into the EditEngine + EE_NOTIFY_PARAGRAPHINSERTED, + + /// A paragraph was removed from the EditEngine + EE_NOTIFY_PARAGRAPHREMOVED, + + /// Multiple paragraphs have been removed from the EditEngine + EE_NOTIFY_PARAGRAPHSMOVED, + + /// The height of at least one paragraph has changed + EE_NOTIFY_TEXTHEIGHTCHANGED, + + /// The view area of the EditEngine scrolled + EE_NOTIFY_TEXTVIEWSCROLLED, + + /// The selection and/or the cursor position has changed + EE_NOTIFY_TEXTVIEWSELECTIONCHANGED, + + /** Denotes the beginning of a collected amount of EditEngine + notification events. This event itself is not queued, but sent + immediately + */ + EE_NOTIFY_BLOCKNOTIFICATION_START, + + /** Denotes the end of a collected amount of EditEngine + notification events. After this event, the queue is empty, and + a high-level operation such as "insert paragraph" is finished + */ + EE_NOTIFY_BLOCKNOTIFICATION_END, + + /// Denotes the beginning of a high-level action triggered by a key press + EE_NOTIFY_INPUT_START, + + /// Denotes the end of a high-level action triggered by a key press + EE_NOTIFY_INPUT_END +}; + +struct EENotify +{ + EENotifyType eNotificationType; + EditEngine* pEditEngine; + EditView* pEditView; + + USHORT nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED + + USHORT nParam1; + USHORT nParam2; + + EENotify( EENotifyType eType ) + { eNotificationType = eType; pEditEngine = NULL; pEditView = NULL; nParagraph = EE_PARA_NOT_FOUND; nParam1 = 0; nParam2 = 0; } +}; + +#endif // _MyEDITDATA_HXX diff --git a/svx/inc/svx/editeng.hxx b/svx/inc/svx/editeng.hxx new file mode 100644 index 000000000000..65168297274e --- /dev/null +++ b/svx/inc/svx/editeng.hxx @@ -0,0 +1,488 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: editeng.hxx,v $ + * $Revision: 1.8.14.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +// MyEDITENG, wegen exportiertem EditEng +#ifndef _MyEDITENG_HXX +#define _MyEDITENG_HXX + +class ImpEditEngine; +class EditView; +class OutputDevice; +class EditUndo; +class SvxFont; +class SfxUndoManager; +class SfxItemPool; +class SfxStyleSheet; +class String; +class SfxStyleSheetPool; +class SvxSearchItem; +class SvxFieldItem; +class SvxCharSetColorItem; +class SfxUndoAction; +class MapMode; +class Color; +class Font; +class KeyEvent; +class PolyPolygon; +class Size; +class Point; +class Rectangle; +class SvStream; +class Link; +class OutputDevice; +class SvUShorts; +class SfxPoolItem; +class SvxNumBulletItem; +class SvxBulletItem; +class SvxLRSpaceItem; +class SvKeyValueIterator; +class SvxForbiddenCharactersTable; +class SvxNumberFormat; +class FontList; + +#include <vos/ref.hxx> +#include <vector> +#include <com/sun/star/uno/Reference.h> + +namespace com { namespace sun { namespace star { + namespace linguistic2 { + class XSpellChecker1; + class XHyphenator; + } + namespace datatransfer { + class XTransferable; + } + namespace lang { + struct Locale; + } +}}} +namespace svx{ +struct SpellPortion; +typedef std::vector<SpellPortion> SpellPortions; +} + +namespace basegfx { class B2DPolyPolygon; } +#include <rsc/rscsfx.hxx> +#ifndef _EDITDATA_HXX +#include <svx/editdata.hxx> +#endif +#include <i18npool/lang.h> +#include "svx/svxdllapi.h" + +#include <tools/rtti.hxx> // wegen typedef TypeId + +#include <svx/eedata.hxx> +class SvxFieldData; + +////////////////////////////////////////////////////////////////////////////// + +/** values for GetAttribs +*/ +const sal_uInt8 EditEngineAttribs_All = 0; /// returns all attributes even when theire not set +const sal_uInt8 EditEngineAttribs_HardAndPara = 1; /// returns all attributes set on paragraph and on portions +const sal_uInt8 EditEngineAttribs_OnlyHard = 2; /// returns only attributes hard set on portions + +#define GETATTRIBS_STYLESHEET (sal_uInt8)0x01 +#define GETATTRIBS_PARAATTRIBS (sal_uInt8)0x02 +#define GETATTRIBS_CHARATTRIBS (sal_uInt8)0x04 +#define GETATTRIBS_ALL (sal_uInt8)0xFF + +class SVX_DLLPUBLIC EditEngine +{ + friend class EditView; + friend class ImpEditView; + friend class EditDbg; + friend class Outliner; + +private: + ImpEditEngine* pImpEditEngine; + + SVX_DLLPRIVATE EditEngine( const EditEngine& ); + SVX_DLLPRIVATE EditEngine& operator=( const EditEngine& ); + +//#if 0 // _SOLAR__PRIVATE + SVX_DLLPRIVATE BOOL PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView ); +//#endif + +protected: + + +public: + EditEngine( SfxItemPool* pItemPool ); + virtual ~EditEngine(); + + const SfxItemSet& GetEmptyItemSet(); + + void SetDefTab( USHORT nDefTab ); + USHORT GetDefTab() const; + + void SetRefDevice( OutputDevice* pRefDef ); + OutputDevice* GetRefDevice() const; + + void SetRefMapMode( const MapMode& rMapMode ); + MapMode GetRefMapMode(); + + void SetUpdateMode( BOOL bUpdate ); + BOOL GetUpdateMode() const; + + void SetBackgroundColor( const Color& rColor ); + Color GetBackgroundColor() const; + Color GetAutoColor() const; + void EnableAutoColor( BOOL b ); + BOOL IsAutoColorEnabled() const; + void ForceAutoColor( BOOL b ); + BOOL IsForceAutoColor() const; + + void InsertView( EditView* pEditView, USHORT nIndex = EE_APPEND ); + EditView* RemoveView( EditView* pEditView ); + EditView* RemoveView( USHORT nIndex = EE_APPEND ); + EditView* GetView( USHORT nIndex = 0 ) const; + USHORT GetViewCount() const; + BOOL HasView( EditView* pView ) const; + EditView* GetActiveView() const; + void SetActiveView( EditView* pView ); + + void SetPaperSize( const Size& rSize ); + const Size& GetPaperSize() const; + + void SetVertical( BOOL bVertical ); + BOOL IsVertical() const; + + void SetFixedCellHeight( BOOL bUseFixedCellHeight ); + BOOL IsFixedCellHeight() const; + + void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); + EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; + + USHORT GetScriptType( const ESelection& rSelection ) const; + LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const; + + void TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode ); + + void SetAsianCompressionMode( USHORT nCompression ); + USHORT GetAsianCompressionMode() const; + + void SetKernAsianPunctuation( BOOL bEnabled ); + BOOL IsKernAsianPunctuation() const; + + void SetAddExtLeading( BOOL b ); + BOOL IsAddExtLeading() const; + + void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon ); + void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon); + void ClearPolygon(); + const PolyPolygon* GetPolygon(); + + const Size& GetMinAutoPaperSize() const; + void SetMinAutoPaperSize( const Size& rSz ); + + const Size& GetMaxAutoPaperSize() const; + void SetMaxAutoPaperSize( const Size& rSz ); + + String GetText( LineEnd eEnd = LINEEND_LF ) const; + String GetText( const ESelection& rSelection, const LineEnd eEnd = LINEEND_LF ) const; + sal_uInt32 GetTextLen() const; + sal_uInt32 GetTextHeight() const; + sal_uInt32 CalcTextWidth(); + + String GetText( USHORT nParagraph ) const; + xub_StrLen GetTextLen( USHORT nParagraph ) const; + sal_uInt32 GetTextHeight( USHORT nParagraph ) const; + + USHORT GetParagraphCount() const; + + USHORT GetLineCount( USHORT nParagraph ) const; + xub_StrLen GetLineLen( USHORT nParagraph, USHORT nLine ) const; + void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; + USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + sal_uInt32 GetLineHeight( USHORT nParagraph, USHORT nLine = 0 ); + USHORT GetFirstLineOffset( USHORT nParagraph ); + ParagraphInfos GetParagraphInfos( USHORT nPara ); + USHORT FindParagraph( long nDocPosY ); + EPosition FindDocPosition( const Point& rDocPos ) const; + Rectangle GetCharacterBounds( const EPosition& rPos ) const; + + String GetWord( USHORT nPara, xub_StrLen nIndex ); + + ESelection GetWord( const ESelection& rSelection, USHORT nWordType ) const; + ESelection WordLeft( const ESelection& rSelection, USHORT nWordType ) const; + ESelection WordRight( const ESelection& rSelection, USHORT nWordType ) const; + ESelection CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const; + ESelection CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const; + + void Clear(); + void SetText( const String& rStr ); + + EditTextObject* CreateTextObject(); + EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ); + EditTextObject* CreateTextObject( const ESelection& rESelection ); + void SetText( const EditTextObject& rTextObject ); + + void RemoveParagraph( USHORT nPara ); + void InsertParagraph( USHORT nPara, const EditTextObject& rTxtObj ); + void InsertParagraph( USHORT nPara, const String& rText); + + void SetText( USHORT nPara, const EditTextObject& rTxtObj ); + void SetText( USHORT nPara, const String& rText); + + virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual const SfxItemSet& GetParaAttribs( USHORT nPara ) const; + + void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const; + + SfxItemSet GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags = 0xFF ) const; + SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ); + + BOOL HasParaAttrib( USHORT nPara, USHORT nWhich ) const; + const SfxPoolItem& GetParaAttrib( USHORT nPara, USHORT nWhich ); + + Font GetStandardFont( USHORT nPara ); + SvxFont GetStandardSvxFont( USHORT nPara ); + + void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); + + void ShowParagraph( USHORT nParagraph, BOOL bShow = TRUE ); + BOOL IsParagraphVisible( USHORT nParagraph ); + + SfxUndoManager& GetUndoManager(); + void UndoActionStart( USHORT nId ); + void UndoActionEnd( USHORT nId ); + BOOL IsInUndo(); + + void EnableUndo( BOOL bEnable ); + BOOL IsUndoEnabled(); + + /** returns the value last used for bTryMerge while calling ImpEditEngine::InsertUndo + This is currently used in a bad but needed hack to get undo actions merged in the + OutlineView in impress. Do not use it unless you want to sell your soul too! */ + BOOL HasTriedMergeOnLastAddUndo() const; + + void ClearModifyFlag(); + void SetModified(); + BOOL IsModified() const; + + void SetModifyHdl( const Link& rLink ); + Link GetModifyHdl() const; + + BOOL IsInSelectionMode() const; + void StopSelectionMode(); + + void StripPortions(); + void GetPortions( USHORT nPara, SvUShorts& rList ); + + long GetFirstLineStartX( USHORT nParagraph ); + Point GetDocPosTopLeft( USHORT nParagraph ); + Point GetDocPos( const Point& rPaperPos ) const; + BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 ); + + // StartDocPos entspr. VisArea.TopLeft(). + void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect ); + void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos ); + void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, BOOL bClip ); + void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 ); + +// ULONG: Fehlercode des Streams. + ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + ULONG Write( SvStream& rOutput, EETextFormat ); + + void SetStatusEventHdl( const Link& rLink ); + Link GetStatusEventHdl() const; + + void SetNotifyHdl( const Link& rLink ); + Link GetNotifyHdl() const; + + void SetImportHdl( const Link& rLink ); + Link GetImportHdl() const; + + // Flat-Mode: Keine Zeichenformatierung auswerten => Fuer Outliner + BOOL IsFlatMode() const; + void SetFlatMode( BOOL bFlat ); + + void SetControlWord( sal_uInt32 nWord ); + sal_uInt32 GetControlWord() const; + + void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); + void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); + void QuickMarkInvalid( const ESelection& rSel ); + void QuickFormatDoc( BOOL bFull = FALSE ); + void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); + void QuickInsertLineBreak( const ESelection& rSel ); + void QuickInsertText( const String& rText, const ESelection& rSel ); + void QuickDelete( const ESelection& rSel ); + void QuickMarkToBeRepainted( USHORT nPara ); + + void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 ); + void GetGlobalCharStretching( USHORT& rX, USHORT& rY ); + void DoStretchChars( USHORT nX, USHORT nY ); + + void SetEditTextObjectPool( SfxItemPool* pPool ); + SfxItemPool* GetEditTextObjectPool() const; + + void SetStyleSheetPool( SfxStyleSheetPool* pSPool ); + SfxStyleSheetPool* GetStyleSheetPool(); + + void SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle ); + SfxStyleSheet* GetStyleSheet( USHORT nPara ) const; + + void SetWordDelimiters( const String& rDelimiters ); + String GetWordDelimiters() const; + + void SetGroupChars( const String& rChars ); + String GetGroupChars() const; + + void EnablePasteSpecial( BOOL bEnable ); + BOOL IsPasteSpecialEnabled() const; + + void EnableIdleFormatter( BOOL bEnable ); + BOOL IsIdleFormatterEnabled() const; + + void EraseVirtualDevice(); + + void SetSpeller( ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller ); + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > + GetSpeller(); + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > + GetHyphenator() const; + void SetHyphenator( ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator >& xHyph ); + + void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ); + vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const; + + void SetDefaultLanguage( LanguageType eLang ); + LanguageType GetDefaultLanguage() const; + + BOOL HasOnlineSpellErrors() const; + void CompleteOnlineSpelling(); + + void SetBigTextObjectStart( USHORT nStartAtPortionCount ); + USHORT GetBigTextObjectStart() const; + BOOL ShouldCreateBigTextObject() const; + + // Zum schnellen Vorab-Pruefen ohne View: + EESpellState HasSpellErrors(); + BOOL HasText( const SvxSearchItem& rSearchItem ); + + //initialize sentence spelling + void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc); + //spell and return a sentence + bool SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking ); + // put spell position to start of current sentence + void PutSpellingToSentenceStart( EditView& rEditView ); + //applies a changed sentence + void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking ); + //deinitialize sentence spelling + void EndSpelling(); + + // for text conversion (see also HasSpellErrors) + sal_Bool HasConvertibleTextPortion( LanguageType nLang ); + virtual BOOL ConvertNextDocument(); + + BOOL UpdateFields(); + void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL ); + + USHORT GetFieldCount( USHORT nPara ) const; + EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; + + BOOL IsRightToLeft( USHORT nPara ) const; + + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > + CreateTransferable( const ESelection& rSelection ) const; + + // MT: Can't create new virtual functions like for ParagraphInserted/Deleted, musst be compatible in SRC638, change later... + void SetBeginMovingParagraphsHdl( const Link& rLink ); + void SetEndMovingParagraphsHdl( const Link& rLink ); + void SetBeginPasteOrDropHdl( const Link& rLink ); + void SetEndPasteOrDropHdl( const Link& rLink ); + + virtual void PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); + virtual void ParagraphInserted( USHORT nNewParagraph ); + virtual void ParagraphDeleted( USHORT nDeletedParagraph ); + virtual void ParagraphConnected( USHORT nLeftParagraph, USHORT nRightParagraph ); + virtual void ParaAttribsChanged( USHORT nParagraph ); + virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); + virtual void ParagraphHeightChanged( USHORT nPara ); + + // #101498# + virtual void DrawingText( + const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, + const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + const EEngineData::WrongSpellVector* pWrongSpellVector, + const SvxFieldData* pFieldData, + bool bEndOfLine, + bool bEndOfParagraph, + bool bEndOfBullet, + const ::com::sun::star::lang::Locale* pLocale, + const Color& rOverlineColor, + const Color& rTextLineColor); + + virtual String GetUndoComment( USHORT nUndoId ) const; + virtual BOOL FormattingParagraph( USHORT nPara ); + virtual BOOL SpellNextDocument(); + virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); + + // to be overloaded if access to bullet information needs to be provided + virtual const SvxNumberFormat * GetNumberFormat( USHORT nPara ) const; + + virtual Rectangle GetBulletArea( USHORT nPara ); + + static SfxItemPool* CreatePool( BOOL bLoadRefCounts = TRUE ); + static sal_uInt32 RegisterClipboardFormatName(); + static BOOL DoesKeyChangeText( const KeyEvent& rKeyEvent ); + static BOOL DoesKeyMoveCursor( const KeyEvent& rKeyEvent ); + static BOOL IsSimpleCharInput( const KeyEvent& rKeyEvent ); + static USHORT GetAvailableSearchOptions(); + static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const Font& rFont ); + static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont ); + static Font CreateFontFromItemSet( const SfxItemSet& rItemSet ); + static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, USHORT nScriptType ); + static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet ); + static void ImportBulletItem( SvxNumBulletItem& rNumBullet, USHORT nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace ); + static BOOL IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); } + static BOOL HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ); + + /** sets a link that is called at the beginning of a drag operation at an edit view */ + void SetBeginDropHdl( const Link& rLink ); + Link GetBeginDropHdl() const; + + /** sets a link that is called at the end of a drag operation at an edit view */ + void SetEndDropHdl( const Link& rLink ); + Link GetEndDropHdl() const; + + /// specifies if auto-correction should capitalize the first word or not (default is on) + void SetFirstWordCapitalization( BOOL bCapitalize ); + BOOL IsFirstWordCapitalization() const; +}; + +#endif // _MyEDITENG_HXX diff --git a/svx/inc/svx/editobj.hxx b/svx/inc/svx/editobj.hxx new file mode 100644 index 000000000000..31a62225ced1 --- /dev/null +++ b/svx/inc/svx/editobj.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: editobj.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _EDITOBJ_HXX +#define _EDITOBJ_HXX + +#include <tools/stream.hxx> +#include <tools/debug.hxx> +#include <rsc/rscsfx.hxx> +#include <svl/itemset.hxx> +#include <svx/eeitem.hxx> +#include "svx/svxdllapi.h" + +DBG_NAMEEX( EE_EditTextObject ) + +class SfxItemPool; +class SfxStyleSheetPool; +class SvxFieldItem; +class EECharAttribArray; + +#define EDTOBJ_SETTINGS_ULITEMSUMMATION 0x00000001 +#define EDTOBJ_SETTINGS_ULITEMFIRSTPARA 0x00000002 + +class SVX_DLLPUBLIC EditTextObject +{ +private: + USHORT nWhich; + SVX_DLLPRIVATE EditTextObject& operator=( const EditTextObject& ); + +protected: + EditTextObject( USHORT nWhich ); + EditTextObject( const EditTextObject& r ); + + virtual void StoreData( SvStream& rOStream ) const; + virtual void CreateData( SvStream& rIStream ); + +public: + virtual ~EditTextObject(); + + USHORT Which() const { return nWhich; } + + virtual USHORT GetUserType() const; // Fuer OutlinerMode, der kann das aber nicht kompatibel speichern + virtual void SetUserType( USHORT n ); + + virtual ULONG GetObjectSettings() const; + virtual void SetObjectSettings( ULONG n ); + + virtual BOOL IsVertical() const; + virtual void SetVertical( BOOL bVertical ); + + virtual USHORT GetScriptType() const; + + virtual USHORT GetVersion() const; // Solange der Outliner keine Recordlaenge speichert + + virtual EditTextObject* Clone() const = 0; + + BOOL Store( SvStream& rOStream ) const; + static EditTextObject* Create( SvStream& rIStream, + SfxItemPool* pGlobalTextObjectPool = 0 ); + void Skip( SvStream& rIStream ); + + virtual USHORT GetParagraphCount() const; + + virtual XubString GetText( USHORT nParagraph ) const; + virtual void Insert( const EditTextObject& rObj, USHORT nPara ); + virtual void RemoveParagraph( USHORT nPara ); + virtual EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ) const; + + virtual BOOL HasPortionInfo() const; + virtual void ClearPortionInfo(); + + virtual BOOL HasOnlineSpellErrors() const; + + virtual BOOL HasCharAttribs( USHORT nWhich = 0 ) const; + virtual void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const; + + virtual BOOL RemoveCharAttribs( USHORT nWhich = 0 ); + virtual BOOL RemoveParaAttribs( USHORT nWhich = 0 ); + + virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart = EE_CHAR_START, USHORT nEnd = EE_CHAR_END ); + + virtual BOOL IsFieldObject() const; + virtual const SvxFieldItem* GetField() const; + virtual BOOL HasField( TypeId aType = NULL ) const; + + virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; + virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs ); + + virtual BOOL HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; + virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const; + virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily ); + virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, + const XubString& rNewName, SfxStyleFamily eNewFamily ); + virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName ); + + bool operator==( const EditTextObject& rCompare ) const; + + // #i102062# + bool isWrongListEqual(const EditTextObject& rCompare) const; +}; + +#endif // _EDITOBJ_HXX diff --git a/svx/inc/svx/editview.hxx b/svx/inc/svx/editview.hxx new file mode 100644 index 000000000000..79deaab4dc36 --- /dev/null +++ b/svx/inc/svx/editview.hxx @@ -0,0 +1,251 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: editview.hxx,v $ + * $Revision: 1.4.198.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +// MyEDITVIEW, wegen exportiertem EditView +#ifndef _MyEDITVIEW_HXX +#define _MyEDITVIEW_HXX + +#include <rsc/rscsfx.hxx> +#include <i18npool/lang.h> +#include <tools/color.hxx> +#include <tools/gen.hxx> + +class EditEngine; +class ImpEditEngine; +class ImpEditView; +class SvxSearchItem; +class SvxFieldItem; +class Window; +class Pointer; +class Cursor; +class KeyEvent; +class MouseEvent; +class DropEvent; +class CommandEvent; +class Rectangle; +class Link; +class Pair; +class Point; +class Range; +class SvStream; +class SvKeyValueIterator; +class SfxStyleSheet; +class Font; +class FontList; + +#ifndef _EDITDATA_HXX +#include <svx/editdata.hxx> +#endif +#include <com/sun/star/uno/Reference.h> +#include "svx/svxdllapi.h" + +namespace com { +namespace sun { +namespace star { +namespace datatransfer { + class XTransferable; +}}}} + +class SVX_DLLPUBLIC EditView +{ + friend class EditEngine; + friend class ImpEditEngine; + friend class EditSelFunctionSet; + +public: // brauche ich fuer Undo + ImpEditView* GetImpEditView() const { return pImpEditView; } + ImpEditEngine* GetImpEditEngine() const; + +private: + ImpEditView* pImpEditView; + + SVX_DLLPRIVATE EditView( const EditView& ); + SVX_DLLPRIVATE EditView& operator=( const EditView& ); + +public: + EditView( EditEngine* pEng, Window* pWindow ); + virtual ~EditView(); + + void SetEditEngine( EditEngine* pEditEngine ); + EditEngine* GetEditEngine() const; + + void SetWindow( Window* pWin ); + Window* GetWindow() const; + + void Paint( const Rectangle& rRect ); + void Invalidate(); + Pair Scroll( long nHorzScroll, long nVertScroll, BYTE nRangeCheck = RGCHK_NEG ); + + void ShowCursor( BOOL bGotoCursor = TRUE, BOOL bForceVisCursor = TRUE ); + void HideCursor(); + + EESelectionMode GetSelectionMode() const; + void SetSelectionMode( EESelectionMode eMode ); + + void SetReadOnly( BOOL bReadOnly ); + BOOL IsReadOnly() const; + + BOOL HasSelection() const; + ESelection GetSelection() const; + void SetSelection( const ESelection& rNewSel ); + BOOL SelectCurrentWord(); + + void IndentBlock(); + void UnindentBlock(); + + BOOL IsInsertMode() const; + void SetInsertMode( BOOL bInsert ); + + void ReplaceSelected( const String& rStr ); + String GetSelected(); + void DeleteSelected(); + + USHORT GetSelectedScriptType() const; + + // Position der VisArea im Ausgabefenster. + // Eine Groessenaenderung betrifft auch die VisArea + void SetOutputArea( const Rectangle& rRec ); + const Rectangle& GetOutputArea() const; + + // Dokumentposition. + // Eine Groessenaenderung betrifft auch die VisArea + void SetVisArea( const Rectangle& rRec ); + const Rectangle& GetVisArea() const; + + void SetPointer( const Pointer& rPointer ); + const Pointer& GetPointer() const; + + void SetCursor( const Cursor& rCursor ); + Cursor* GetCursor() const; + + void InsertText( const String& rNew, BOOL bSelect = FALSE ); + + BOOL PostKeyEvent( const KeyEvent& rKeyEvent ); + + BOOL MouseButtonUp( const MouseEvent& rMouseEvent ); + BOOL MouseButtonDown( const MouseEvent& rMouseEvent ); + BOOL MouseMove( const MouseEvent& rMouseEvent ); + void Command( const CommandEvent& rCEvt ); + + BOOL Drop( const DropEvent& rEvt ); + BOOL QueryDrop( DropEvent& rEvt ); + ESelection GetDropPos(); + + void Cut(); + void Copy(); + void Paste(); + void PasteSpecial(); + + void EnablePaste( BOOL bEnable ); + BOOL IsPasteEnabled() const; + + void Undo(); + void Redo(); + + // speziell fuer Olli + USHORT GetParagraph( const Point& rMousePosPixel ); + Point GetWindowPosTopLeft( USHORT nParagraph ); + void MoveParagraphs( Range aParagraphs, USHORT nNewPos ); + void MoveParagraphs( long nDiff ); + + const SfxItemSet& GetEmptyItemSet(); + SfxItemSet GetAttribs(); + void SetAttribs( const SfxItemSet& rSet ); + void SetParaAttribs( const SfxItemSet& rSet, USHORT nPara ); + void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0 ); + void RemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); + void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs = FALSE ); + + ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + ULONG Write( SvStream& rOutput, EETextFormat eFormat ); + + void SetBackgroundColor( const Color& rColor ); + Color GetBackgroundColor() const; + + void SetControlWord( sal_uInt32 nWord ); + sal_uInt32 GetControlWord() const; + + EditTextObject* CreateTextObject(); + void InsertText( const EditTextObject& rTextObject ); + void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, BOOL bUseSpecial ); + + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > GetTransferable(); + + // An EditView, damit bei TRUE flackerfreies Update: + void SetEditEngineUpdateMode( BOOL bUpdate ); + void ForceUpdate(); + + SfxStyleSheet* GetStyleSheet() const; + void SetStyleSheet( SfxStyleSheet* pStyle ); + + void SetAnchorMode( EVAnchorMode eMode ); + EVAnchorMode GetAnchorMode() const; + + BOOL MatchGroup(); + + void CompleteAutoCorrect(); + + EESpellState StartSpeller( BOOL bMultipleDoc = FALSE ); + EESpellState StartThesaurus(); + USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem ); + + // for text conversion + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ); + sal_Bool HasConvertibleTextPortion( LanguageType nLang ); + + void TransliterateText( sal_Int32 nTransliterationMode ); + + BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE ); + BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE ); + void SpellIgnoreWord(); + void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 ); + + void InsertField( const SvxFieldItem& rFld ); + const SvxFieldItem* GetFieldUnderMousePointer() const; + const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const; + const SvxFieldItem* GetField( const Point& rPos, USHORT* pnPara = NULL, xub_StrLen* pnPos = NULL ) const; + + const SvxFieldItem* GetFieldAtSelection() const; + + String GetWordUnderMousePointer() const; + String GetWordUnderMousePointer( Rectangle& rWordRect ) const; + + void SetInvalidateMore( USHORT nPixel ); + USHORT GetInvalidateMore() const; + + // grows or shrinks the font height for the current selection + void ChangeFontSize( bool bGrow, const FontList* pList ); + + static bool ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFontList ); + + String GetSurroundingText() const;
+ Selection GetSurroundingTextSelection() const; +}; + +#endif // _MyEDITVIEW_HXX diff --git a/svx/inc/svx/eedata.hxx b/svx/inc/svx/eedata.hxx new file mode 100644 index 000000000000..33e542746d56 --- /dev/null +++ b/svx/inc/svx/eedata.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: eedata.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _EEDATA_HXX +#define _EEDATA_HXX + +////////////////////////////////////////////////////////////////////////////// +// extended data definitions for EditEngine portion stripping (StripPortions() +// support). These may be mapped to some primitive definitions from Drawinglayer +// later. +#include <vector> + +namespace EEngineData +{ + // spell checking wrong vector containing the redlining data + class WrongSpellClass + { + public: + sal_uInt32 nStart; + sal_uInt32 nEnd; + + WrongSpellClass(sal_uInt32 nS, sal_uInt32 nE) : nStart(nS), nEnd(nE) {} + }; + + typedef std::vector< WrongSpellClass > WrongSpellVector; + + // text marking vector containing the EOC, EOW and EOS TEXT definitions + enum TextMarkingType + { + EndOfCaracter = 0, + EndOfWord = 1, + EndOfSentence = 2 + }; + + class TextMarkingClass + { + public: + TextMarkingType eType; + sal_uInt32 nIndex; + + TextMarkingClass(TextMarkingType eT, sal_uInt32 nI) : eType(eT), nIndex(nI) {} + }; + + typedef std::vector< TextMarkingClass > TextMarkingVector; + +} // end of namespace EditEngine + +#endif // _EEDATA_HXX + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/svx/inc/svx/eeitem.hxx b/svx/inc/svx/eeitem.hxx new file mode 100644 index 000000000000..53202b795170 --- /dev/null +++ b/svx/inc/svx/eeitem.hxx @@ -0,0 +1,102 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: eeitem.hxx,v $ + * $Revision: 1.3.212.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _EEITEM_HXX +#define _EEITEM_HXX + +#define EE_ITEMS_START 3989 + +// Absatzattribute: +#define EE_PARA_START (EE_ITEMS_START+0) +#define EE_PARA_WRITINGDIR (EE_ITEMS_START+0) +#define EE_PARA_XMLATTRIBS (EE_ITEMS_START+1) +#define EE_PARA_HANGINGPUNCTUATION (EE_ITEMS_START+2) +#define EE_PARA_FORBIDDENRULES (EE_ITEMS_START+3) +#define EE_PARA_ASIANCJKSPACING (EE_ITEMS_START+4) +#define EE_PARA_NUMBULLET (EE_ITEMS_START+5) +#define EE_PARA_HYPHENATE (EE_ITEMS_START+6) +#define EE_PARA_BULLETSTATE (EE_ITEMS_START+7) +#define EE_PARA_OUTLLRSPACE (EE_ITEMS_START+8) +#define EE_PARA_OUTLLEVEL (EE_ITEMS_START+9) +#define EE_PARA_BULLET (EE_ITEMS_START+10) +#define EE_PARA_LRSPACE (EE_ITEMS_START+11) +#define EE_PARA_ULSPACE (EE_ITEMS_START+12) +#define EE_PARA_SBL (EE_ITEMS_START+13) +#define EE_PARA_JUST (EE_ITEMS_START+14) +#define EE_PARA_TABS (EE_ITEMS_START+15) +#define EE_PARA_END (EE_ITEMS_START+15) + +// Zeichenattribute: +#define EE_CHAR_START (EE_ITEMS_START+16) +#define EE_CHAR_COLOR (EE_ITEMS_START+16) +#define EE_CHAR_FONTINFO (EE_ITEMS_START+17) +#define EE_CHAR_FONTHEIGHT (EE_ITEMS_START+18) +#define EE_CHAR_FONTWIDTH (EE_ITEMS_START+19) +#define EE_CHAR_WEIGHT (EE_ITEMS_START+20) +#define EE_CHAR_UNDERLINE (EE_ITEMS_START+21) +#define EE_CHAR_STRIKEOUT (EE_ITEMS_START+22) +#define EE_CHAR_ITALIC (EE_ITEMS_START+23) +#define EE_CHAR_OUTLINE (EE_ITEMS_START+24) +#define EE_CHAR_SHADOW (EE_ITEMS_START+25) +#define EE_CHAR_ESCAPEMENT (EE_ITEMS_START+26) +#define EE_CHAR_PAIRKERNING (EE_ITEMS_START+27) +#define EE_CHAR_KERNING (EE_ITEMS_START+28) +#define EE_CHAR_WLM (EE_ITEMS_START+29) +#define EE_CHAR_LANGUAGE (EE_ITEMS_START+30) +#define EE_CHAR_LANGUAGE_CJK (EE_ITEMS_START+31) +#define EE_CHAR_LANGUAGE_CTL (EE_ITEMS_START+32) +#define EE_CHAR_FONTINFO_CJK (EE_ITEMS_START+33) +#define EE_CHAR_FONTINFO_CTL (EE_ITEMS_START+34) +#define EE_CHAR_FONTHEIGHT_CJK (EE_ITEMS_START+35) +#define EE_CHAR_FONTHEIGHT_CTL (EE_ITEMS_START+36) +#define EE_CHAR_WEIGHT_CJK (EE_ITEMS_START+37) +#define EE_CHAR_WEIGHT_CTL (EE_ITEMS_START+38) +#define EE_CHAR_ITALIC_CJK (EE_ITEMS_START+39) +#define EE_CHAR_ITALIC_CTL (EE_ITEMS_START+40) +#define EE_CHAR_EMPHASISMARK (EE_ITEMS_START+41) +#define EE_CHAR_RELIEF (EE_ITEMS_START+42) +#define EE_CHAR_RUBI_DUMMY (EE_ITEMS_START+43) +#define EE_CHAR_XMLATTRIBS (EE_ITEMS_START+44) +#define EE_CHAR_OVERLINE (EE_ITEMS_START+45) +#define EE_CHAR_END (EE_ITEMS_START+45) + + +#define EE_FEATURE_START (EE_ITEMS_START+46) +#define EE_FEATURE_TAB (EE_ITEMS_START+46) +#define EE_FEATURE_LINEBR (EE_ITEMS_START+47) +#define EE_FEATURE_NOTCONV (EE_ITEMS_START+48) +#define EE_FEATURE_FIELD (EE_ITEMS_START+49) +#define EE_FEATURE_END (EE_ITEMS_START+49) + +#define EE_ITEMS_END (EE_ITEMS_START+49) + +#define EDITITEMCOUNT ( EE_ITEMS_END - EE_ITEMS_START + 1 ) + +#endif // _EEITEM_HXX diff --git a/svx/inc/svx/eeitemid.hxx b/svx/inc/svx/eeitemid.hxx new file mode 100644 index 000000000000..088762f7fe10 --- /dev/null +++ b/svx/inc/svx/eeitemid.hxx @@ -0,0 +1,139 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: eeitemid.hxx,v $ + * $Revision: 1.3.212.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _EEITEMID_HXX +#define _EEITEMID_HXX + +#include <svx/eeitem.hxx> + +#ifdef ITEMID_FONT +#undef ITEMID_FONT +#endif +#ifdef ITEMID_FONTHEIGHT +#undef ITEMID_FONTHEIGHT +#endif +#ifdef ITEMID_COLOR +#undef ITEMID_COLOR +#endif +#ifdef ITEMID_WEIGHT +#undef ITEMID_WEIGHT +#endif +#ifdef ITEMID_POSTURE +#undef ITEMID_POSTURE +#endif +#ifdef ITEMID_SHADOWED +#undef ITEMID_SHADOWED +#endif +#ifdef ITEMID_CONTOUR +#undef ITEMID_CONTOUR +#endif +#ifdef ITEMID_CROSSEDOUT +#undef ITEMID_CROSSEDOUT +#endif +#ifdef ITEMID_UNDERLINE +#undef ITEMID_UNDERLINE +#endif +#ifdef ITEMID_OVERLINE +#undef ITEMID_OVERLINE +#endif +#ifdef ITEMID_LANGUAGE +#undef ITEMID_LANGUAGE +#endif +#ifdef ITEMID_ADJUST +#undef ITEMID_ADJUST +#endif +#ifdef ITEMID_WORDLINEMODE +#undef ITEMID_WORDLINEMODE +#endif +#ifdef ITEMID_CHARSETCOLOR +#undef ITEMID_CHARSETCOLOR +#endif +#ifdef ITEMID_SEARCH +#undef ITEMID_SEARCH +#endif +#ifdef ITEMID_BRUSH +#undef ITEMID_BRUSH +#endif + +// Zeichenattribute.... +#define ITEMID_FONT EE_CHAR_FONTINFO +#define ITEMID_POSTURE EE_CHAR_ITALIC +#define ITEMID_WEIGHT EE_CHAR_WEIGHT +#define ITEMID_SHADOWED EE_CHAR_SHADOW +#define ITEMID_CONTOUR EE_CHAR_OUTLINE +#define ITEMID_CROSSEDOUT EE_CHAR_STRIKEOUT +#define ITEMID_UNDERLINE EE_CHAR_UNDERLINE +#define ITEMID_OVERLINE EE_CHAR_OVERLINE +#define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT +#define ITEMID_CHARSCALE_W EE_CHAR_FONTWIDTH +#define ITEMID_COLOR EE_CHAR_COLOR +#define ITEMID_WORDLINEMODE EE_CHAR_WLM +#define ITEMID_PROPSIZE 0 +#define ITEMID_CHARSETCOLOR 0 // EE_FEATURE_NOTCONV +#define ITEMID_CASEMAP 0 +#define ITEMID_LANGUAGE 0 +#define ITEMID_ESCAPEMENT EE_CHAR_ESCAPEMENT +#define ITEMID_NOLINEBREAK 0 +#define ITEMID_NOHYPHENHERE 0 +#define ITEMID_AUTOKERN EE_CHAR_PAIRKERNING +#define ITEMID_KERNING EE_CHAR_KERNING +#define ITEMID_EMPHASISMARK EE_CHAR_EMPHASISMARK +#define ITEMID_CHARRELIEF EE_CHAR_RELIEF + +// Absatzattribute +#define ITEMID_SCRIPTSPACE EE_PARA_ASIANCJKSPACING +#define ITEMID_ADJUST EE_PARA_JUST +#define ITEMID_LINESPACING EE_PARA_SBL +#define ITEMID_WIDOWS 0 +#define ITEMID_ORPHANS 0 +#define ITEMID_HYPHENZONE 0 + +#define ITEMID_TABSTOP EE_PARA_TABS + +#define ITEMID_PAPERBIN 0 +#define ITEMID_LRSPACE EE_PARA_LRSPACE +#define ITEMID_ULSPACE EE_PARA_ULSPACE +#define ITEMID_FRAMEDIR EE_PARA_WRITINGDIR +#define ITEMID_PRINT 0 +#define ITEMID_OPAQUE 0 +#define ITEMID_PROTECT 0 +#define ITEMID_BACKGROUND 0 +#define ITEMID_SHADOW 0 +#define ITEMID_MACRO 0 +#define ITEMID_BOX 0 +#define ITEMID_BOXINFO 0 +#define ITEMID_BRUSH 0 + +#define ITEMID_FIELD EE_FEATURE_FIELD + +#define ITEMID_SEARCH 0 + +#endif //_EEITEMID_HXX + diff --git a/svx/inc/svx/emphitem.hxx b/svx/inc/svx/emphitem.hxx new file mode 100644 index 000000000000..c6956a819dc3 --- /dev/null +++ b/svx/inc/svx/emphitem.hxx @@ -0,0 +1,94 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: emphitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_EMPHITEM_HXX +#define _SVX_EMPHITEM_HXX + +// include --------------------------------------------------------------- + +#include <vcl/vclenum.hxx> +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxEmphasisMarkItem ---------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt die Font-Betonung. +*/ + +class SVX_DLLPUBLIC SvxEmphasisMarkItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + + SvxEmphasisMarkItem( const FontEmphasisMark eVal /*= EMPHASISMARK_NONE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId = 0 ); + + inline SvxEmphasisMarkItem& operator=(const SvxEmphasisMarkItem& rItem ) + { + SetValue( rItem.GetValue() ); + return *this; + } + + // enum cast + FontEmphasisMark GetEmphasisMark() const + { return (FontEmphasisMark)GetValue(); } + void SetEmphasisMark( FontEmphasisMark eNew ) + { SetValue( (USHORT)eNew ); } +}; + +#endif // #ifndef _SVX_EMPHITEM_HXX + diff --git a/svx/inc/svx/escpitem.hxx b/svx/inc/svx/escpitem.hxx new file mode 100644 index 000000000000..f96c3479dd0f --- /dev/null +++ b/svx/inc/svx/escpitem.hxx @@ -0,0 +1,120 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: escpitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ESCPITEM_HXX +#define _SVX_ESCPITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include <svx/svxenum.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxEscapementItem ----------------------------------------------- + +#define DFLT_ESC_SUPER 33 // 1/3 +#define DFLT_ESC_SUB -33 // auch 1/3 fr"uher 8/100 +#define DFLT_ESC_PROP 58 +#define DFLT_ESC_AUTO_SUPER 101 +#define DFLT_ESC_AUTO_SUB -101 + +/* [Beschreibung] + + Dieses Item beschreibt die Schrift-Position. +*/ + +class SVX_DLLPUBLIC SvxEscapementItem : public SfxEnumItemInterface +{ + short nEsc; + BYTE nProp; +public: + TYPEINFO(); + + SvxEscapementItem( const USHORT nId ); + SvxEscapementItem( const SvxEscapement eEscape, + const USHORT nId ); + SvxEscapementItem( const short nEsc, const BYTE nProp, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + + inline void SetEscapement( const SvxEscapement eNew ) + { + if( SVX_ESCAPEMENT_OFF == eNew ) + nEsc = 0, nProp = 100; + else + if( SVX_ESCAPEMENT_SUPERSCRIPT == eNew ) + nEsc = DFLT_ESC_SUPER, nProp = DFLT_ESC_PROP; + else + nEsc = DFLT_ESC_SUB, nProp = DFLT_ESC_PROP; + } + inline SvxEscapement GetEscapement() const { return static_cast< SvxEscapement >( GetEnumValue() ); } + + inline short &GetEsc() { return nEsc; } + inline short GetEsc() const { return nEsc; } + + inline BYTE &GetProp() { return nProp; } + inline BYTE GetProp() const { return nProp; } + + inline SvxEscapementItem& operator=(const SvxEscapementItem& rEsc) + { + nEsc = rEsc.GetEsc(); + nProp = rEsc.GetProp(); + return *this; + } + + virtual USHORT GetValueCount() const; + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual USHORT GetEnumValue() const; + virtual void SetEnumValue( USHORT nNewVal ); +}; + +#endif + diff --git a/svx/inc/svx/exthelpid.hrc b/svx/inc/svx/exthelpid.hrc new file mode 100644 index 000000000000..bd7b2b1c31aa --- /dev/null +++ b/svx/inc/svx/exthelpid.hrc @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: helpid.hrc,v $ + * $Revision: 1.78 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_EXTHELPID_HRC +#define _SVX_EXTHELPID_HRC +// include --------------------------------------------------------------- + +#include <svl/solar.hrc> + +// these HIDs are used in SVX and also in other modules, mainly CUI +// the reason is that different controls have the same help texts assigned +// but are implemented in different libraries +// to avoid "exporting" the whole HID list only those few ones that are shared +// are moved to this exported (delivered) hrc file + +// Help-Ids -------------------------------------------------------------- +#define HID_GALLERY_ACTUALIZE (HID_SVX_EXT0_START + 0) +#define HID_GALLERY_TITLE (HID_SVX_EXT0_START + 1)
+ +// please adjust ACT_SVX_EXT_HID_END2 below if you add entries here! + +// ----------------------------------------------------------------------- +// Overrun check --------------------------------------------------------- +// ----------------------------------------------------------------------- + +#define ACT_SVX_EXT_HID_END (HID_SVX_EXT0_START + 1) +#if ACT_SVX_EXT_HID_END > HID_SVX_EXT0_END +#error Resource-Ueberlauf in #line, #file +#endif + +#endif + diff --git a/svx/inc/svx/extrud3d.hxx b/svx/inc/svx/extrud3d.hxx new file mode 100644 index 000000000000..ee0c38af9fdd --- /dev/null +++ b/svx/inc/svx/extrud3d.hxx @@ -0,0 +1,116 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: extrud3d.hxx,v $ + * $Revision: 1.4.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_EXTRUD3D_HXX +#define _E3D_EXTRUD3D_HXX + +#include <svx/obj3d.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* 3D-Extrusionsobjekt aus uebergebenem 2D-Polygon erzeugen +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dExtrudeObj : public E3dCompoundObject +{ +private: + // #110094# DrawContact section + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // to allow sdr::properties::E3dExtrudeProperties access to SetGeometryValid() + friend class sdr::properties::E3dExtrudeProperties; + + // Geometrie, die dieses Objekt bestimmt + basegfx::B2DPolyPolygon maExtrudePolygon; + +protected: + void SetDefaultAttributes(E3dDefaultAttributes& rDefault); + +public: + TYPEINFO(); + + E3dExtrudeObj(E3dDefaultAttributes& rDefault, const basegfx::B2DPolyPolygon& rPP, double fDepth); + E3dExtrudeObj(); + + // PercentDiagonal: 0..100, before 0.0..0.5 + sal_uInt16 GetPercentDiagonal() const + { return ((const Svx3DPercentDiagonalItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); } + + // BackScale: 0..100, before 0.0..1.0 + sal_uInt16 GetPercentBackScale() const + { return ((const Svx3DBackscaleItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); } + + // BackScale: 0..100, before 0.0..1.0 + sal_uInt32 GetExtrudeDepth() const + { return ((const Svx3DDepthItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); } + + // #107245# GetSmoothNormals() for bExtrudeSmoothed + sal_Bool GetSmoothNormals() const + { return ((const Svx3DSmoothNormalsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_NORMALS)).GetValue(); } + + // #107245# GetSmoothLids() for bExtrudeSmoothFrontBack + sal_Bool GetSmoothLids() const + { return ((const Svx3DSmoothLidsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_LIDS)).GetValue(); } + + // #107245# GetCharacterMode() for bExtrudeCharacterMode + sal_Bool GetCharacterMode() const + { return ((const Svx3DCharacterModeItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CHARACTER_MODE)).GetValue(); } + + // #107245# GetCloseFront() for bExtrudeCloseFront + sal_Bool GetCloseFront() const + { return ((const Svx3DCloseFrontItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_FRONT)).GetValue(); } + + // #107245# GetCloseBack() for bExtrudeCloseBack + sal_Bool GetCloseBack() const + { return ((const Svx3DCloseBackItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK)).GetValue(); } + + virtual UINT16 GetObjIdentifier() const; + + virtual void operator=(const SdrObject&); + + // TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert". + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + // Lokale Parameter setzen/lesen mit Geometrieneuerzeugung + void SetExtrudePolygon(const basegfx::B2DPolyPolygon &rNew); + const basegfx::B2DPolyPolygon &GetExtrudePolygon() { return maExtrudePolygon; } + + // Aufbrechen + virtual BOOL IsBreakObjPossible(); + virtual SdrAttrObj* GetBreakObj(); +}; + +#endif // _E3D_EXTRUD3D_HXX + diff --git a/svx/inc/svx/extrusionbar.hxx b/svx/inc/svx/extrusionbar.hxx new file mode 100644 index 000000000000..7bdf512cce2b --- /dev/null +++ b/svx/inc/svx/extrusionbar.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: extrusionbar.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_EXTRUSION_BAR_HXX +#define _SVX_EXTRUSION_BAR_HXX + +#include <sfx2/shell.hxx> +#include <sfx2/module.hxx> +#include <svx/ifaceids.hxx> +#include "svx/svxdllapi.h" + +class SfxViewShell; +class SdrView; + +/************************************************************************/ + +namespace svx +{ + +SVX_DLLPUBLIC bool checkForSelectedCustomShapes( SdrView* pSdrView, bool bOnlyExtruded ); + +class SVX_DLLPUBLIC ExtrusionBar : public SfxShell +{ +public: + TYPEINFO(); + SFX_DECL_INTERFACE(SVX_INTERFACE_EXTRUSION_BAR) + + ExtrusionBar(SfxViewShell* pViewShell ); + ~ExtrusionBar(); + + static void execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBindings ); + static void getState( SdrView* pSdrView, SfxItemSet& rSet ); +}; + +} + +#endif // _SVX_EXTRUSION_BAR_HXX diff --git a/svx/inc/svx/f3dchild.hxx b/svx/inc/svx/f3dchild.hxx new file mode 100644 index 000000000000..1f1237ae3c6a --- /dev/null +++ b/svx/inc/svx/f3dchild.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: f3dchild.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef _SVX_F3DCHILD_HXX +#define _SVX_F3DCHILD_HXX + + +#include <sfx2/childwin.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Ableitung vom SfxChildWindow als "Behaelter" fuer 3D Window +|* +\************************************************************************/ + +class SVX_DLLPUBLIC Svx3DChildWindow : public SfxChildWindow +{ + public: + Svx3DChildWindow( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); + + SFX_DECL_CHILDWINDOW(Svx3DChildWindow); +}; + +#endif // _SVX_F3DCHILD_HXX + diff --git a/svx/inc/svx/fhgtitem.hxx b/svx/inc/svx/fhgtitem.hxx new file mode 100644 index 000000000000..e77457a94e61 --- /dev/null +++ b/svx/inc/svx/fhgtitem.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fhgtitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FHGTITEM_HXX +#define _SVX_FHGTITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxFontHeightItem ----------------------------------------------- + +// Achtung: Twips-Werte + +/* [Beschreibung] + + Dieses Item beschreibt die Font-Hoehe. +*/ + +#define FONTHEIGHT_16_VERSION ((USHORT)0x0001) +#define FONTHEIGHT_UNIT_VERSION ((USHORT)0x0002) + +class SVX_DLLPUBLIC SvxFontHeightItem : public SfxPoolItem +{ + UINT32 nHeight; + USHORT nProp; // default 100% + SfxMapUnit ePropUnit; // Percent, Twip, ... +public: + TYPEINFO(); + + SvxFontHeightItem( const ULONG nSz /*= 240*/, const USHORT nPropHeight /*= 100*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual USHORT GetVersion( USHORT nItemVersion) const; + virtual int ScaleMetrics( long nMult, long nDiv ); + virtual int HasMetrics() const; + + inline SvxFontHeightItem& operator=(const SvxFontHeightItem& rSize) + { + SetHeightValue( rSize.GetHeight() ); + SetProp( rSize.GetProp(), ePropUnit ); + return *this; + } + + void SetHeight( UINT32 nNewHeight, const USHORT nNewProp = 100, + SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE ); + + void SetHeight( UINT32 nNewHeight, USHORT nNewProp, + SfxMapUnit eUnit, SfxMapUnit eCoreUnit ); + + UINT32 GetHeight() const { return nHeight; } + + void SetHeightValue( UINT32 nNewHeight ) + { + DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); + nHeight = nNewHeight; + } + + void SetProp( const USHORT nNewProp, + SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE ) + { + DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); + nProp = nNewProp; + ePropUnit = eUnit; + } + + USHORT GetProp() const { return nProp; } + + SfxMapUnit GetPropUnit() const { return ePropUnit; } // Percent, Twip, ... +}; + +#endif + diff --git a/svx/inc/svx/fillctrl.hxx b/svx/inc/svx/fillctrl.hxx new file mode 100644 index 000000000000..7fb21f9d7b63 --- /dev/null +++ b/svx/inc/svx/fillctrl.hxx @@ -0,0 +1,111 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fillctrl.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _FILLCTRL_HXX +#define _FILLCTRL_HXX + +#include <svl/lstner.hxx> +#include <sfx2/tbxctrl.hxx> +#include "svx/svxdllapi.h" + +class XFillStyleItem; +class XFillColorItem; +class XFillGradientItem; +class XFillHatchItem; +class XFillBitmapItem; +class FillControl; +class SvxFillTypeBox; +class SvxFillAttrBox; +class ListBox; + +/************************************************************************* +|* +|* Klassen fuer Flaechenattribute (Controls und Controller) +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxFillToolBoxControl: public SfxToolBoxControl +{ +private: + XFillStyleItem* pStyleItem; + XFillColorItem* pColorItem; + XFillGradientItem* pGradientItem; + XFillHatchItem* pHatchItem; + XFillBitmapItem* pBitmapItem; + + FillControl* pFillControl; + SvxFillTypeBox* pFillTypeLB; + SvxFillAttrBox* pFillAttrLB; + + BOOL bUpdate; + BOOL bIgnoreStatusUpdate; + USHORT eLastXFS; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + + SvxFillToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxFillToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + void Update( const SfxPoolItem* pState ); + virtual Window* CreateItemWindow( Window *pParent ); + void IgnoreStatusUpdate( sal_Bool bSet ); +}; + +//======================================================================== + +class FillControl : public Window +{ +private: + friend class SvxFillToolBoxControl; + + SvxFillTypeBox* pLbFillType; + SvxFillAttrBox* pLbFillAttr; + Size aLogicalFillSize; + Size aLogicalAttrSize; + Timer aDelayTimer; + +//#if 0 // _SOLAR__PRIVATE + DECL_LINK( DelayHdl, Timer * ); + DECL_LINK( SelectFillTypeHdl, ListBox * ); + DECL_LINK( SelectFillAttrHdl, ListBox * ); +//#endif + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +public: + FillControl( Window* pParent, WinBits nStyle = 0 ); + ~FillControl(); + + virtual void Resize(); +}; + +#endif // _FILLCTRL_HXX + diff --git a/svx/inc/svx/flditem.hxx b/svx/inc/svx/flditem.hxx new file mode 100644 index 000000000000..1d14870d33d3 --- /dev/null +++ b/svx/inc/svx/flditem.hxx @@ -0,0 +1,430 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: flditem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FLDITEM_HXX +#define _SVX_FLDITEM_HXX + +#include <i18npool/lang.h> +#include <tools/time.hxx> +#include <tools/date.hxx> +#include <svl/poolitem.hxx> +#include <tools/pstm.hxx> +#include "svx/svxdllapi.h" + +class SvNumberFormatter; +class MetaAction; + +// class SvxFieldItem --------------------------------------------------- + + + +class SVX_DLLPUBLIC SvxFieldData : public SvPersistBase +{ +public: + SV_DECL_PERSIST1( SvxFieldData, SvPersistBase, 1 ) + + SvxFieldData(); + virtual ~SvxFieldData(); + + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; + + virtual MetaAction* createBeginComment() const; + virtual MetaAction* createEndComment() const; +}; + +/* +[Beschreibung] +In diesem Item wird ein Feld (SvxFieldData) gespeichert. +Das Feld gehoert dem Item. +Das Feld selbst wird durch eine Ableitung von SvxFieldData bestimmt. (RTTI) +*/ + +class SVX_DLLPUBLIC SvxFieldItem : public SfxPoolItem +{ +private: + SvxFieldData* pField; + + SVX_DLLPRIVATE SvxFieldItem( SvxFieldData* pField, const USHORT nId ); + +public: + TYPEINFO(); + + SvxFieldItem( const SvxFieldData& rField, const USHORT nId ); + SvxFieldItem( const SvxFieldItem& rItem ); + ~SvxFieldItem(); + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream&, USHORT nVer ) const; + virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + + const SvxFieldData* GetField() const { return pField; } + static SvClassManager& GetClassManager(); +}; + +// ================================================================= +// Es folgen die Ableitungen von SvxFieldData... +// ================================================================= + +#define SVX_DATEFIELD 2 +#define SVX_URLFIELD 3 + +#define SVX_PAGEFIELD 100 // Ex-Calc-Felder +#define SVX_PAGESFIELD 101 +#define SVX_TIMEFIELD 102 +#define SVX_FILEFIELD 103 +#define SVX_TABLEFIELD 104 +#define SVX_EXT_TIMEFIELD 105 +#define SVX_EXT_FILEFIELD 106 +#define SVX_AUTHORFIELD 107 +#define SVX_HEADERFIELD 108 +#define SVX_FOOTERFIELD 109 +#define SVX_DATEFIMEFIELD 110 + +#define SVX_USERFIELD 200 // Ab hier eigene Felder, nicht im SVX + +enum SvxDateType { SVXDATETYPE_FIX, SVXDATETYPE_VAR }; +enum SvxDateFormat { SVXDATEFORMAT_APPDEFAULT, // Wie in App eingestellt + SVXDATEFORMAT_SYSTEM, // Wie im System eingestellt + SVXDATEFORMAT_STDSMALL, + SVXDATEFORMAT_STDBIG, + SVXDATEFORMAT_A, // 13.02.96 + SVXDATEFORMAT_B, // 13.02.1996 + SVXDATEFORMAT_C, // 13.Feb 1996 + SVXDATEFORMAT_D, // 13.Februar 1996 + SVXDATEFORMAT_E, // Die, 13.Februar 1996 + SVXDATEFORMAT_F // Dienstag, 13.Februar 1996 + }; + +class SVX_DLLPUBLIC SvxDateField : public SvxFieldData +{ + sal_uInt32 nFixDate; + SvxDateType eType; + SvxDateFormat eFormat; + +public: + SV_DECL_PERSIST1( SvxDateField, SvxFieldData, SVX_DATEFIELD ) + + SvxDateField(); + SvxDateField( const Date& rDate, + SvxDateType eType = SVXDATETYPE_VAR, + SvxDateFormat eFormat = SVXDATEFORMAT_STDSMALL ); + + sal_uInt32 GetFixDate() const { return nFixDate; } + void SetFixDate( const Date& rDate ) { nFixDate = rDate.GetDate(); } + + SvxDateType GetType() const { return eType; } + void SetType( SvxDateType eTp ) { eType = eTp; } + + SvxDateFormat GetFormat() const { return eFormat; } + void SetFormat( SvxDateFormat eFmt ) { eFormat = eFmt; } + + // deprecated, to be removed + String GetFormatted( LanguageType eLanguage, LanguageType eFormat ) const; + // use this instead + // If eLanguage==LANGUAGE_DONTKNOW the language/country + // used in number formatter initialization is taken. + String GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const; + static String GetFormatted( Date& rDate, SvxDateFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); + + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; + + virtual MetaAction* createBeginComment() const; +}; + + +enum SvxURLFormat { SVXURLFORMAT_APPDEFAULT, // Wie in App eingestellt + SVXURLFORMAT_URL, // URL darstellen + SVXURLFORMAT_REPR // Repraesentation darstellen + }; + +class SVX_DLLPUBLIC SvxURLField : public SvxFieldData +{ +private: + SvxURLFormat eFormat; + XubString aURL; // URL-Adresse + XubString aRepresentation; // Was wird dargestellt + XubString aTargetFrame; // In welchem Frame + +public: + SV_DECL_PERSIST1( SvxURLField, SvxFieldData, SVX_URLFIELD ) + + SvxURLField(); + SvxURLField( const XubString& rURL, const XubString& rRepres, SvxURLFormat eFmt = SVXURLFORMAT_URL ); + + const XubString& GetURL() const { return aURL; } + void SetURL( const XubString& rURL ) { aURL = rURL; } + + const XubString& GetRepresentation() const { return aRepresentation; } + void SetRepresentation( const XubString& rRep ) { aRepresentation= rRep; } + + const XubString& GetTargetFrame() const { return aTargetFrame; } + void SetTargetFrame( const XubString& rFrm ) { aTargetFrame = rFrm; } + + SvxURLFormat GetFormat() const { return eFormat; } + void SetFormat( SvxURLFormat eFmt ) { eFormat = eFmt; } + + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; + + virtual MetaAction* createBeginComment() const; +}; + +class SVX_DLLPUBLIC SvxPageField : public SvxFieldData +{ +public: + SV_DECL_PERSIST1( SvxPageField, SvxFieldData, SVX_PAGEFIELD ) + SvxPageField() {} + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; + + virtual MetaAction* createBeginComment() const; +}; + +class SVX_DLLPUBLIC SvxPagesField : public SvxFieldData +{ +public: + SV_DECL_PERSIST1( SvxPagesField, SvxFieldData, SVX_PAGESFIELD ) + SvxPagesField() {} + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; +}; + +class SVX_DLLPUBLIC SvxTimeField : public SvxFieldData +{ +public: + SV_DECL_PERSIST1( SvxTimeField, SvxFieldData, SVX_TIMEFIELD ) + SvxTimeField() {} + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; + + virtual MetaAction* createBeginComment() const; +}; + +class SVX_DLLPUBLIC SvxFileField : public SvxFieldData +{ +public: + SV_DECL_PERSIST1( SvxFileField, SvxFieldData, SVX_FILEFIELD ) + SvxFileField() {} + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; +}; + +class SVX_DLLPUBLIC SvxTableField : public SvxFieldData +{ +public: + SV_DECL_PERSIST1( SvxTableField, SvxFieldData, SVX_TABLEFIELD ) + SvxTableField() {} + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; +}; + + +enum SvxTimeType { SVXTIMETYPE_FIX, SVXTIMETYPE_VAR }; +enum SvxTimeFormat { SVXTIMEFORMAT_APPDEFAULT, // Wie in App eingestellt + SVXTIMEFORMAT_SYSTEM, // Wie im System eingestellt + SVXTIMEFORMAT_STANDARD, + SVXTIMEFORMAT_24_HM, // 13:49 + SVXTIMEFORMAT_24_HMS, // 13:49:38 + SVXTIMEFORMAT_24_HMSH, // 13:49:38.78 + SVXTIMEFORMAT_12_HM, // 01:49 + SVXTIMEFORMAT_12_HMS, // 01:49:38 + SVXTIMEFORMAT_12_HMSH, // 01:49:38.78 + SVXTIMEFORMAT_AM_HM, // 01:49 PM + SVXTIMEFORMAT_AM_HMS, // 01:49:38 PM + SVXTIMEFORMAT_AM_HMSH // 01:49:38.78 PM + }; + +class SVX_DLLPUBLIC SvxExtTimeField : public SvxFieldData +{ +private: + sal_uInt32 nFixTime; + SvxTimeType eType; + SvxTimeFormat eFormat; + +public: + SV_DECL_PERSIST1( SvxExtTimeField, SvxFieldData, SVX_EXT_TIMEFIELD ) + SvxExtTimeField(); + SvxExtTimeField( const Time& rTime, + SvxTimeType eType = SVXTIMETYPE_VAR, + SvxTimeFormat eFormat = SVXTIMEFORMAT_STANDARD ); + + sal_uInt32 GetFixTime() const { return nFixTime; } + void SetFixTime( const Time& rTime ) { nFixTime = rTime.GetTime(); } + + SvxTimeType GetType() const { return eType; } + void SetType( SvxTimeType eTp ) { eType = eTp; } + + SvxTimeFormat GetFormat() const { return eFormat; } + void SetFormat( SvxTimeFormat eFmt ) { eFormat = eFmt; } + + // deprecated, to be removed + XubString GetFormatted( LanguageType eLanguage, LanguageType eFormat ) const; + // use this instead + // If eLanguage==LANGUAGE_DONTKNOW the language/country + // used in number formatter initialization is taken. + String GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const; + static String GetFormatted( Time& rTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); + + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; + + virtual MetaAction* createBeginComment() const; +}; + + +enum SvxFileType { SVXFILETYPE_FIX, SVXFILETYPE_VAR }; +enum SvxFileFormat { SVXFILEFORMAT_NAME_EXT, // Dateiname mit Extension + SVXFILEFORMAT_FULLPATH, // vollstndiger Pfad + SVXFILEFORMAT_PATH, // nur Pfad + SVXFILEFORMAT_NAME // nur Dateiname + }; + + + +class SVX_DLLPUBLIC SvxExtFileField : public SvxFieldData +{ +private: + XubString aFile; + SvxFileType eType; + SvxFileFormat eFormat; + +public: + SV_DECL_PERSIST1( SvxExtFileField, SvxFieldData, SVX_EXT_FILEFIELD ) + SvxExtFileField(); + SvxExtFileField( const XubString& rString, + SvxFileType eType = SVXFILETYPE_VAR, + SvxFileFormat eFormat = SVXFILEFORMAT_FULLPATH ); + + String GetFile() const { return aFile; } + void SetFile( const XubString& rString ) { aFile = rString; } + + SvxFileType GetType() const { return eType; } + void SetType( SvxFileType eTp ) { eType = eTp; } + + SvxFileFormat GetFormat() const { return eFormat; } + void SetFormat( SvxFileFormat eFmt ) { eFormat = eFmt; } + + XubString GetFormatted() const; + + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; +}; + + +enum SvxAuthorType { SVXAUTHORTYPE_FIX, SVXAUTHORTYPE_VAR }; +enum SvxAuthorFormat { SVXAUTHORFORMAT_FULLNAME, // vollstndiger Name + SVXAUTHORFORMAT_NAME, // nur Nachname + SVXAUTHORFORMAT_FIRSTNAME, // nur Vorname + SVXAUTHORFORMAT_SHORTNAME // Initialen + }; + +class SVX_DLLPUBLIC SvxAuthorField : public SvxFieldData +{ +private: + XubString aName; + XubString aFirstName; + XubString aShortName; + SvxAuthorType eType; + SvxAuthorFormat eFormat; + +public: + SV_DECL_PERSIST1( SvxAuthorField, SvxFieldData, SVX_AUTHORFIELD ) + SvxAuthorField(); + SvxAuthorField( + const XubString& rFirstName, + const XubString& rLastName, + const XubString& rShortName, + SvxAuthorType eType = SVXAUTHORTYPE_VAR, + SvxAuthorFormat eFormat = SVXAUTHORFORMAT_FULLNAME ); + + XubString GetName() const { return aName; } + void SetName( const XubString& rString ) { aName = rString; } + + XubString GetFirstName() const { return aFirstName; } + void SetFirstName( const XubString& rString ) { aFirstName = rString; } + + XubString GetShortName() const { return aShortName; } + void SetShortName( const XubString& rString ) { aShortName = rString; } + + SvxAuthorType GetType() const { return eType; } + void SetType( SvxAuthorType eTp ) { eType = eTp; } + + SvxAuthorFormat GetFormat() const { return eFormat; } + void SetFormat( SvxAuthorFormat eFmt ) { eFormat = eFmt; } + + XubString GetFormatted() const; + + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; +}; + +/** this field is used as a placeholder for a header&footer in impress. The actual + value is stored at the page */ +class SVX_DLLPUBLIC SvxHeaderField : public SvxFieldData +{ +public: + SV_DECL_PERSIST1( SvxHeaderField, SvxFieldData, SVX_HEADERFIELD ) + SvxHeaderField() {} + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; +}; + +/** this field is used as a placeholder for a header&footer in impress. The actual + value is stored at the page */ +class SVX_DLLPUBLIC SvxFooterField : public SvxFieldData +{ +public: + SV_DECL_PERSIST1( SvxFooterField, SvxFieldData, SVX_FOOTERFIELD ) + SvxFooterField() {} + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; +}; + +/** this field is used as a placeholder for a header&footer in impress. The actual + value is stored at the page */ +class SVX_DLLPUBLIC SvxDateTimeField : public SvxFieldData +{ +public: + SV_DECL_PERSIST1( SvxDateTimeField, SvxFieldData, SVX_DATEFIMEFIELD ) + SvxDateTimeField() {} + + static String GetFormatted( Date& rDate, Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); + + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; +}; + + + + +#endif + diff --git a/svx/inc/svx/float3d.hxx b/svx/inc/svx/float3d.hxx new file mode 100644 index 000000000000..889701764413 --- /dev/null +++ b/svx/inc/svx/float3d.hxx @@ -0,0 +1,316 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: float3d.hxx,v $ + * $Revision: 1.3.226.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FLOAT3D_HXX +#define _SVX_FLOAT3D_HXX + +#include <sfx2/ctrlitem.hxx> +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#ifndef _FIELD_HXX //autogen +#include <vcl/field.hxx> +#endif +#include <sfx2/dockwin.hxx> +#ifndef _IMAGEBTN_HXX //autogen +#include <vcl/imagebtn.hxx> +#endif +#include <svtools/valueset.hxx> +#include <svtools/stdctrl.hxx> +#include "svx/svxdllapi.h" + +#include <svx/f3dchild.hxx> +#include <svx/dlgctl3d.hxx> +#include <svx/dlgctrl.hxx> +#include <svx/svdmodel.hxx> + +enum ViewType3D +{ + VIEWTYPE_GEO = 1, + VIEWTYPE_REPRESENTATION, + VIEWTYPE_LIGHT, + VIEWTYPE_TEXTURE, + VIEWTYPE_MATERIAL +}; + +class SdrModel; +class FmFormModel; +class FmFormPage; +class VirtualDevice; +class E3dView; +class SdrPageView; +class Svx3DCtrlItem; +class SvxConvertTo3DItem; + +//------------------------------------------------------------------------ +struct Svx3DWinImpl; + +class SVX_DLLPUBLIC Svx3DWin : public SfxDockingWindow +{ + friend class Svx3DChildWindow; + friend class Svx3DCtrlItem; + using Window::Update; + +private: + ImageButton aBtnGeo; + ImageButton aBtnRepresentation; + ImageButton aBtnLight; + ImageButton aBtnTexture; + ImageButton aBtnMaterial; + ImageButton aBtnUpdate; + ImageButton aBtnAssign; + +// Geometrie + FixedText aFtPercentDiagonal; + MetricField aMtrPercentDiagonal; + FixedText aFtBackscale; + MetricField aMtrBackscale; + FixedText aFtEndAngle; + MetricField aMtrEndAngle; + FixedText aFtDepth; + MetricField aMtrDepth; + FixedLine aFLGeometrie; + + FixedText aFtHorizontal; + NumericField aNumHorizontal; + FixedText aFtVertical; + NumericField aNumVertical; + FixedLine aFLSegments; + + ImageButton aBtnNormalsObj; + ImageButton aBtnNormalsFlat; + ImageButton aBtnNormalsSphere; + ImageButton aBtnNormalsInvert; + ImageButton aBtnTwoSidedLighting; + FixedLine aFLNormals; + + ImageButton aBtnDoubleSided; + +// Darstellung + FixedText aFtShademode; + ListBox aLbShademode; + ImageButton aBtnShadow3d; + FixedText aFtSlant; + MetricField aMtrSlant; + FixedLine aFLShadow; + FixedText aFtDistance; + MetricField aMtrDistance; + FixedText aFtFocalLeng; + MetricField aMtrFocalLength; + FixedLine aFLCamera; + FixedLine aFLRepresentation; + +// Beleuchtung + ImageButton aBtnLight1; + ImageButton aBtnLight2; + ImageButton aBtnLight3; + ImageButton aBtnLight4; + ImageButton aBtnLight5; + ImageButton aBtnLight6; + ImageButton aBtnLight7; + ImageButton aBtnLight8; + ColorLB aLbLight1; + ColorLB aLbLight2; + ColorLB aLbLight3; + ColorLB aLbLight4; + ColorLB aLbLight5; + ColorLB aLbLight6; + ColorLB aLbLight7; + ColorLB aLbLight8; + + ImageButton aBtnLightColor; + FixedText aFTLightsource; + + // #99694# Keyboard shortcuts activate the next control, so the + // order needed to be changed here + FixedText aFTAmbientlight; // Text label + ColorLB aLbAmbientlight; // ListBox + ImageButton aBtnAmbientColor; // color button + + FixedLine aFLLight; + +// Texturen + FixedText aFtTexKind; + ImageButton aBtnTexLuminance; + ImageButton aBtnTexColor; + FixedText aFtTexMode; + ImageButton aBtnTexReplace; + ImageButton aBtnTexModulate; + ImageButton aBtnTexBlend; + FixedText aFtTexProjectionX; + ImageButton aBtnTexObjectX; + ImageButton aBtnTexParallelX; + ImageButton aBtnTexCircleX; + FixedText aFtTexProjectionY; + ImageButton aBtnTexObjectY; + ImageButton aBtnTexParallelY; + ImageButton aBtnTexCircleY; + FixedText aFtTexFilter; + ImageButton aBtnTexFilter; + FixedLine aFLTexture; + +// Material +// Materialeditor + FixedText aFtMatFavorites; + ListBox aLbMatFavorites; + FixedText aFtMatColor; + ColorLB aLbMatColor; + ImageButton aBtnMatColor; + FixedText aFtMatEmission; + ColorLB aLbMatEmission; + ImageButton aBtnEmissionColor; + FixedText aFtMatSpecular; + ColorLB aLbMatSpecular; + ImageButton aBtnSpecularColor; + FixedText aFtMatSpecularIntensity; + MetricField aMtrMatSpecularIntensity; + FixedLine aFLMatSpecular; + FixedLine aFLMaterial; + +// Unterer Teil + ImageButton aBtnConvertTo3D; + ImageButton aBtnLatheObject; + ImageButton aBtnPerspective; + Svx3DPreviewControl aCtlPreview; + SvxLightCtl3D aCtlLightPreview; + +// der Rest ... + Image aImgLightOn; + Image aImgLightOff; + BOOL bUpdate; + ViewType3D eViewType; + Size aSize; + + // Model, Page, View etc. fuer Favoriten + FmFormModel* pModel; + FmFormPage* pFmPage; + VirtualDevice* pVDev; + E3dView* p3DView; + List* pFavorSetList; + List* pMatFavSetList; + + SfxBindings* pBindings; + Svx3DCtrlItem* pControllerItem; + + SvxConvertTo3DItem* pConvertTo3DItem; + SvxConvertTo3DItem* pConvertTo3DLatheItem; + + Svx3DWinImpl* mpImpl; + SfxMapUnit ePoolUnit; + FieldUnit eFUnit; + + // ItemSet used to remember set 2d attributes + SfxItemSet* mpRemember2DAttributes; + + BOOL bOnly3DChanged; + + //------------------------------------ + + DECL_LINK( ClickViewTypeHdl, void * ); + DECL_LINK( ClickUpdateHdl, void * ); + DECL_LINK( ClickAssignHdl, void * ); + DECL_LINK( ClickHdl, PushButton * ); + DECL_LINK( ClickColorHdl, PushButton * ); + DECL_LINK( SelectHdl, void * ); + DECL_LINK( ModifyHdl, void * ); + DECL_LINK( ClickLightHdl, PushButton * ); + + DECL_LINK( DoubleClickHdl, void * ); + + DECL_LINK( ChangeLightCallbackHdl, void * ); + DECL_LINK( ChangeSelectionCallbackHdl, void * ); + + SVX_DLLPRIVATE void Construct(); + SVX_DLLPRIVATE void Reset(); + + SVX_DLLPRIVATE BOOL LBSelectColor( ColorLB* pLb, const Color& rColor ); + SVX_DLLPRIVATE USHORT GetLightSource( const PushButton* pBtn = NULL ); + SVX_DLLPRIVATE ColorLB* GetLbByButton( const PushButton* pBtn = NULL ); + + SVX_DLLPRIVATE bool GetUILightState( ImageButton& aBtn ) const; + SVX_DLLPRIVATE void SetUILightState( ImageButton& aBtn, bool bState ); + +protected: + virtual void Resize(); + +public: + Svx3DWin( SfxBindings* pBindings, SfxChildWindow *pCW, + Window* pParent ); + ~Svx3DWin(); + + void InitColorLB( const SdrModel* pDoc ); + BOOL IsUpdateMode() const { return bUpdate; } + + void Update( SfxItemSet& rSet ); + void GetAttr( SfxItemSet& rSet ); + + void UpdatePreview(); // nach oben (private) + void DocumentReload(); // #83951# +}; + +/************************************************************************* +|* +|* ControllerItem fuer 3D-Window (Floating/Docking) +|* +\************************************************************************/ + +class Svx3DCtrlItem : public SfxControllerItem +{ + Svx3DWin* p3DWin; + + protected: + virtual void StateChanged( USHORT nSId, SfxItemState eState, + const SfxPoolItem* pState ); + + public: + Svx3DCtrlItem( USHORT, Svx3DWin*, SfxBindings* ); +}; + +/************************************************************************* +|* +|* ControllerItem fuer Status eines Slots +|* (SID_CONVERT_TO_3D, SID_CONVERT_TO_3D_LATHE_FAST) +|* +\************************************************************************/ + +class SvxConvertTo3DItem : public SfxControllerItem +{ + BOOL bState; + +protected: + virtual void StateChanged(UINT16 nSId, SfxItemState eState, const SfxPoolItem* pState); + +public: + SvxConvertTo3DItem(UINT16 nId, SfxBindings* pBindings); + BOOL GetState() const { return bState; } +}; + +#endif // _SVX_FLOAT3D_HXX + diff --git a/svx/inc/svx/fmdmod.hxx b/svx/inc/svx/fmdmod.hxx new file mode 100644 index 000000000000..69b01019032a --- /dev/null +++ b/svx/inc/svx/fmdmod.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmdmod.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FMDMOD_HXX +#define _SVX_FMDMOD_HXX + +#include <svx/unomod.hxx> +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC SvxFmMSFactory : public SvxUnoDrawMSFactory +{ + +public: + SvxFmMSFactory() {}; + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance(const ::rtl::OUString& ServiceSpecifier) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments(const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); +}; + +#endif // _SVX_FMDMOD_HXX + diff --git a/svx/inc/svx/fmdpage.hxx b/svx/inc/svx/fmdpage.hxx new file mode 100644 index 000000000000..a9f2783d643a --- /dev/null +++ b/svx/inc/svx/fmdpage.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmdpage.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FMDPAGE_HXX +#define _SVX_FMDPAGE_HXX + +#include <com/sun/star/form/XFormsSupplier2.hpp> +#include <svx/unopage.hxx> +#include <comphelper/uno3.hxx> +#include "svx/svxdllapi.h" + +//================================================================== +// SvxFmDrawPage +//================================================================== +class SVX_DLLPUBLIC SvxFmDrawPage :public SvxDrawPage + ,public ::com::sun::star::form::XFormsSupplier2 +{ +protected: + + // Erzeugen eines SdrObjects anhand einer Description. Kann von + // abgeleiteten Klassen dazu benutzt werden, eigene ::com::sun::star::drawing::Shapes zu + // unterstuetzen (z.B. Controls) + virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape )throw (); + + // Die folgende Methode wird gerufen, wenn ein SvxShape-Objekt angelegt + // werden soll. abgeleitete Klassen koennen hier eine Ableitung oder + // ein ein SvxShape aggregierendes Objekt anlegen. + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw (); + +public: + SvxFmDrawPage( SdrPage* pPage ); + virtual ~SvxFmDrawPage() throw (); + + // UNO Anbindung + DECLARE_UNO3_AGG_DEFAULTS(SvxFmDrawPage, SvxDrawPage); + + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + + // XFormsSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getForms(void) throw( ::com::sun::star::uno::RuntimeException ); + + // XFormsSupplier2 + virtual sal_Bool SAL_CALL hasForms(void) throw( ::com::sun::star::uno::RuntimeException ); + + // ::com::sun::star::lang::XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); +}; + +#endif // _SVX_FMDPAGE_HXX + diff --git a/svx/inc/svx/fmglob.hxx b/svx/inc/svx/fmglob.hxx new file mode 100644 index 000000000000..e0ba5cc12e37 --- /dev/null +++ b/svx/inc/svx/fmglob.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmglob.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FMGLOB_HXX +#define _SVX_FMGLOB_HXX + +#include <tools/solar.h> +#include <svx/svdobj.hxx> +#include <com/sun/star/form/FormComponentType.hpp> + +const sal_uInt32 FmFormInventor = sal_uInt32('F')*0x00000001+ + sal_uInt32('M')*0x00000100+ + sal_uInt32('0')*0x00010000+ + sal_uInt32('1')*0x01000000; + +const sal_uInt16 OBJ_FM_CONTROL = ::com::sun::star::form::FormComponentType::CONTROL; + // fuer FormularKomponenten +const sal_uInt16 OBJ_FM_EDIT = ::com::sun::star::form::FormComponentType::TEXTFIELD; +const sal_uInt16 OBJ_FM_BUTTON = ::com::sun::star::form::FormComponentType::COMMANDBUTTON; +const sal_uInt16 OBJ_FM_FIXEDTEXT = ::com::sun::star::form::FormComponentType::FIXEDTEXT; +const sal_uInt16 OBJ_FM_LISTBOX = ::com::sun::star::form::FormComponentType::LISTBOX; +const sal_uInt16 OBJ_FM_CHECKBOX = ::com::sun::star::form::FormComponentType::CHECKBOX; +const sal_uInt16 OBJ_FM_COMBOBOX = ::com::sun::star::form::FormComponentType::COMBOBOX; +const sal_uInt16 OBJ_FM_RADIOBUTTON = ::com::sun::star::form::FormComponentType::RADIOBUTTON; +const sal_uInt16 OBJ_FM_GROUPBOX = ::com::sun::star::form::FormComponentType::GROUPBOX; +const sal_uInt16 OBJ_FM_GRID = ::com::sun::star::form::FormComponentType::GRIDCONTROL; +const sal_uInt16 OBJ_FM_IMAGEBUTTON = ::com::sun::star::form::FormComponentType::IMAGEBUTTON; +const sal_uInt16 OBJ_FM_FILECONTROL = ::com::sun::star::form::FormComponentType::FILECONTROL; +const sal_uInt16 OBJ_FM_DATEFIELD = ::com::sun::star::form::FormComponentType::DATEFIELD; +const sal_uInt16 OBJ_FM_TIMEFIELD = ::com::sun::star::form::FormComponentType::TIMEFIELD; +const sal_uInt16 OBJ_FM_NUMERICFIELD = ::com::sun::star::form::FormComponentType::NUMERICFIELD; +const sal_uInt16 OBJ_FM_CURRENCYFIELD = ::com::sun::star::form::FormComponentType::CURRENCYFIELD; +const sal_uInt16 OBJ_FM_PATTERNFIELD = ::com::sun::star::form::FormComponentType::PATTERNFIELD; +const sal_uInt16 OBJ_FM_HIDDEN = ::com::sun::star::form::FormComponentType::HIDDENCONTROL; +const sal_uInt16 OBJ_FM_IMAGECONTROL = ::com::sun::star::form::FormComponentType::IMAGECONTROL; +const sal_uInt16 OBJ_FM_FORMATTEDFIELD = ::com::sun::star::form::FormComponentType::PATTERNFIELD + 1; +const sal_uInt16 OBJ_FM_SCROLLBAR = ::com::sun::star::form::FormComponentType::PATTERNFIELD + 2; +const sal_uInt16 OBJ_FM_SPINBUTTON = ::com::sun::star::form::FormComponentType::PATTERNFIELD + 3; +const sal_uInt16 OBJ_FM_NAVIGATIONBAR = ::com::sun::star::form::FormComponentType::PATTERNFIELD + 4; + +#endif // _FM_FMGLOB_HXX + diff --git a/svx/inc/svx/fmgridcl.hxx b/svx/inc/svx/fmgridcl.hxx new file mode 100644 index 000000000000..f8e04c4c405c --- /dev/null +++ b/svx/inc/svx/fmgridcl.hxx @@ -0,0 +1,219 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmgridcl.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FMGRIDCL_HXX +#define _SVX_FMGRIDCL_HXX + +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/container/XNameContainer.hpp> + +#include <svx/gridctrl.hxx> +#include <svtools/transfer.hxx> +#include "svx/svxdllapi.h" + +//================================================================== +// FmGridHeader +//================================================================== +struct FmGridHeaderData; +class SVX_DLLPUBLIC FmGridHeader + :public ::svt::EditBrowserHeader + ,public DropTargetHelper +{ +protected: + FmGridHeaderData* m_pImpl; + + // trigger context menu execution + void triggerColumnContextMenu( const ::Point& _rPreferredPos ); + +public: + FmGridHeader( BrowseBox* pParent, WinBits nWinBits = WB_STDHEADERBAR | WB_DRAG ); + ~FmGridHeader(); + +public: + struct AccessControl { friend class FmGridControl; private: AccessControl() { } }; + + inline void triggerColumnContextMenu( const ::Point& _rPreferredPos, const AccessControl& ) + { + triggerColumnContextMenu( _rPreferredPos ); + } + +protected: + virtual void Command( const CommandEvent& rCEvt ); + virtual void RequestHelp( const HelpEvent& rHEvt ); + virtual void Select(); + + /** the value returned by GetItemPos is meaningless for the grid model if there are hidden columns, + so use GetModelColumnPos instead + */ + sal_uInt16 GetModelColumnPos(sal_uInt16 nId) const; + + /** This is called before executing a context menu for a column. rMenu contains the initial entries + handled by this base class' method (which always has to be called). + Derived classes may alter the menu in any way and handle any additional entries in + PostExecuteColumnContextMenu. + All disabled entries will be removed before executing the menu, so be careful with separators + near entries you probably wish to disable ... + */ + virtual void PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu); + /** After executing the context menu for a column this method is called. + */ + virtual void PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMenu& rMenu, sal_uInt16 nExecutionResult); + + // DropTargetHelper + virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); + virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); + + /** selects the column at the selection supplier. + @param nColumnId + The column id. + */ + void notifyColumnSelect(sal_uInt16 nColumnId); +private: + DECL_LINK( OnAsyncExecuteDrop, void* ); +}; + +//================================================================== +// FmGridControl +//================================================================== +class FmXGridPeer; +class SVX_DLLPUBLIC FmGridControl : public DbGridControl + +{ + friend class FmGridHeader; + friend class FmXGridPeer; + + FmXGridPeer* m_pPeer; + sal_Int32 m_nCurrentSelectedColumn; // this is the column model (not the view) posisition ... + sal_uInt16 m_nMarkedColumnId; + sal_Bool m_bSelecting; + sal_Bool m_bInColumnMove : 1; + +public: + FmGridControl( + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >, + Window* pParent, + FmXGridPeer* _pPeer, + WinBits nBits); + + // Window + virtual void KeyInput( const KeyEvent& rKEvt ); + + // ::com::sun::star::beans::XPropertyChangeListener + void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt); + + // ::com::sun::star::form::XPositioningListener + void positioned(const ::com::sun::star::lang::EventObject& rEvent); + + // XBound + sal_Bool commit(); + + // ::com::sun::star::form::XInsertListener + void inserted(const ::com::sun::star::lang::EventObject& rEvent); + + // ::com::sun::star::form::XRestoreListener + void restored(const ::com::sun::star::lang::EventObject& rEvent); + + void markColumn(sal_uInt16 nId); + sal_Bool isColumnMarked(sal_uInt16 nId) const; + + sal_Int32 GetSelectedColumn() const; + + /** return the name of the specified object. + @param eObjType + The type to ask for + @param _nPosition + The position of a tablecell (index position), header bar colum/row cell + @return + The name of the specified object. + */ + virtual ::rtl::OUString GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition = -1) const; + + /** return the description of the specified object. + @param eObjType + The type to ask for + @param _nPosition + The position of a tablecell (index position), header bar colum/row cell + @return + The description of the specified object. + */ + virtual ::rtl::OUString GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition = -1) const; + +protected: + virtual void Command(const CommandEvent& rEvt); + + virtual BrowserHeader* imp_CreateHeaderBar(BrowseBox* pParent); + virtual long QueryMinimumRowHeight(); + virtual void RowHeightChanged(); + virtual void ColumnResized(sal_uInt16 nId); + virtual void ColumnMoved(sal_uInt16 nId); + virtual void DeleteSelectedRows(); + virtual void SetDesignMode(sal_Bool bMode); + virtual void CellModified(); + virtual void HideColumn(sal_uInt16 nId); + virtual void ShowColumn(sal_uInt16 nId); + + sal_Bool IsInColumnMove() const {return m_bInColumnMove;} + + virtual void BeginCursorAction(); + virtual void EndCursorAction(); + virtual void Select(); + + // Initialisieren der Spalten + // a.) nur ueber Spaltenbeschreibung + virtual void InitColumnsByModels(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& xColumns); + // b.) im alivemode ueber Datenbankfelder + virtual void InitColumnsByFields(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xFields); + + // some kind of impl version (for one single column) of our version of InitColumnsByFields + void InitColumnByField( + DbGridColumn* _pColumn, + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumnModel, + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxFieldsByNames, + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxFieldsByIndex + ); + + FmXGridPeer* GetPeer() const {return m_pPeer;} + + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> + getSelectionBookmarks(); + sal_Bool selectBookmarks(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& _rBookmarks); + + /** returns if a column is selected + @param nColumnId + The column id. + @param _pColumn + The column to compare with. + @return + <TRUE/> if the column is selected, otherwise <FALSE/> + */ + sal_Bool isColumnSelected(sal_uInt16 nColumnId,DbGridColumn* _pColumn); +}; + +#endif // _SVX_FMGRIDCL_HXX + diff --git a/svx/inc/svx/fmmodel.hxx b/svx/inc/svx/fmmodel.hxx new file mode 100644 index 000000000000..f831729b5006 --- /dev/null +++ b/svx/inc/svx/fmmodel.hxx @@ -0,0 +1,105 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmmodel.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FMMODEL_HXX +#define _SVX_FMMODEL_HXX + +#include <svx/svdmodel.hxx> +#include "svx/svxdllapi.h" + +class SfxObjectShell; +class SfxItemPool; +class VCItemPool; +class FmXUndoEnvironment; +class SfxObjectShell; +class SbxObject; +class SbxArray; +class SbxValue; + +struct FmFormModelImplData; +class SVX_DLLPUBLIC FmFormModel : + public SdrModel +{ +private: + FmFormModelImplData* m_pImpl; + SfxObjectShell* m_pObjShell; + + sal_Bool m_bOpenInDesignMode : 1; + sal_Bool m_bAutoControlFocus : 1; + + SVX_DLLPRIVATE FmFormModel( const FmFormModel& ); // never implemented + SVX_DLLPRIVATE void operator=(const FmFormModel& rSrcModel); // never implemented + +public: + TYPEINFO(); + + FmFormModel(SfxItemPool* pPool=NULL, SfxObjectShell* pPers=NULL ); + FmFormModel(const XubString& rPath, SfxItemPool* pPool=NULL, + SfxObjectShell* pPers=NULL ); + FmFormModel(SfxItemPool* pPool, SfxObjectShell* pPers, FASTBOOL bUseExtColorTable); + FmFormModel(const XubString& rPath, SfxItemPool* pPool, SfxObjectShell* pPers, + FASTBOOL bUseExtColorTable); + + virtual ~FmFormModel(); + + virtual SdrPage* AllocPage(FASTBOOL bMasterPage); + virtual void InsertPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF); + virtual SdrPage* RemovePage(sal_uInt16 nPgNum); + virtual void MovePage(USHORT nPgNum, USHORT nNewPos); + virtual void InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF); + virtual SdrPage* RemoveMasterPage(sal_uInt16 nPgNum); + + virtual SdrLayerID GetControlExportLayerId( const SdrObject& rObj ) const; + SfxObjectShell* GetObjectShell() const { return m_pObjShell; } + void SetObjectShell( SfxObjectShell* pShell ); + + sal_Bool GetOpenInDesignMode() const { return m_bOpenInDesignMode; } + void SetOpenInDesignMode( sal_Bool _bOpenDesignMode ); + + sal_Bool GetAutoControlFocus() const { return m_bAutoControlFocus; } + void SetAutoControlFocus( sal_Bool _bAutoControlFocus ); + + /** check whether the OpenInDesignMode has been set explicitly or been loaded (<FALSE/>) + or if it still has the default value from construction (<TRUE/>) + */ + sal_Bool OpenInDesignModeIsDefaulted(); + + /** determines whether form controls should use the SdrModel's reference device for text rendering + */ + sal_Bool ControlsUseRefDevice() const; + + FmXUndoEnvironment& GetUndoEnv(); + +private: + void implSetOpenInDesignMode( sal_Bool _bOpenDesignMode, sal_Bool _bForce ); +}; + +#endif // _FM_FMMODEL_HXX + diff --git a/svx/inc/svx/fmpage.hxx b/svx/inc/svx/fmpage.hxx new file mode 100644 index 000000000000..1b5de5eabf08 --- /dev/null +++ b/svx/inc/svx/fmpage.hxx @@ -0,0 +1,90 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmpage.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FMPAGE_HXX +#define _SVX_FMPAGE_HXX + +#include <svx/svdpage.hxx> +#include <comphelper/uno3.hxx> +#include "svx/svxdllapi.h" + +class StarBASIC; +class FmFormModel; +class FmFormPageImpl; // haelt die Liste aller Forms + +FORWARD_DECLARE_INTERFACE(container,XNameContainer) + +class SdrView; +class SfxJSArray; +class HelpEvent; + +class SVX_DLLPUBLIC FmFormPage : public SdrPage +{ + friend class FmFormObj; + FmFormPageImpl* m_pImpl; + String m_sPageName; + StarBASIC* m_pBasic; + +public: + TYPEINFO(); + + FmFormPage(FmFormModel& rModel,StarBASIC*, FASTBOOL bMasterPage=sal_False); + FmFormPage(const FmFormPage& rPage); + ~FmFormPage(); + + virtual void SetModel(SdrModel* pNewModel); + + virtual SdrPage* Clone() const; + using SdrPage::Clone; + + virtual void InsertObject(SdrObject* pObj, ULONG nPos = CONTAINER_APPEND, + const SdrInsertReason* pReason=NULL); + + virtual SdrObject* RemoveObject(ULONG nObjNum); + + // Zugriff auf alle Formulare + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& GetForms( bool _bForceCreate = true ) const; + +#ifndef SVX_LIGHT + FmFormPageImpl& GetImpl() const { return *m_pImpl; } +#endif // SVX_LIGHT + +public: + const String& GetName() const { return m_sPageName; } + void SetName( const String& rName ) { m_sPageName = rName; } + StarBASIC* GetBasic() const { return m_pBasic; } + sal_Bool RequestHelp( + Window* pWin, + SdrView* pView, + const HelpEvent& rEvt ); +}; + +#endif // _SVX_FMPAGE_HXX + diff --git a/svx/inc/svx/fmsearch.hxx b/svx/inc/svx/fmsearch.hxx new file mode 100644 index 000000000000..85e5e94f33ee --- /dev/null +++ b/svx/inc/svx/fmsearch.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmsearch.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _FMSEARCH_HXX +#define _FMSEARCH_HXX + +#include <com/sun/star/sdbc/XResultSet.hpp> + +#define _SVSTDARR_STRINGSDTOR +#include <svl/svstdarr.hxx> + +#ifndef _DIALOG_HXX //autogen +#include <vcl/dialog.hxx> +#endif + +#ifndef _BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif + +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif + +#ifndef _EDIT_HXX //autogen +#include <vcl/edit.hxx> +#endif +#include <vcl/combobox.hxx> +#include <vcl/lstbox.hxx> +#include <tools/link.hxx> +#include <comphelper/uno3.hxx> +#include <comphelper/stl_types.hxx> +#include <tools/string.hxx> +#include "svx/svxdllapi.h" + +FORWARD_DECLARE_INTERFACE(util,XNumberFormatsSupplier) + +// =================================================================================================== +// Hilfsmethoden + +SVX_DLLPUBLIC sal_Bool IsSearchableControl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xControl, + ::rtl::OUString* pCurrentText = NULL); + // check if the control has one of the interfaces we can use for searching + // *pCurrentText will be filled with the current text of the control (as used when searching this control) + +// =================================================================================================== +// Hilfsstrukturen + +struct FmFoundRecordInformation +{ + ::com::sun::star::uno::Any aPosition; // Bookmark des Datensatzes, in dem der Text gefunden wurde + sal_Int16 nFieldPos; // dito : die relative Position der Spalte (im Stringnamen in Feldliste im Constructor) + sal_Int16 nContext; // Kontext, in dem gesucht und gefunden wurde (falls die aktuelle Suche verschiedene solche kennt) +}; + +// =================================================================================================== +// = struct FmSearchContext - Informationen fuer Suche in verschiedenen Kontexten +// =================================================================================================== + +struct FmSearchContext +{ + // [in] + sal_Int16 nContext; // die Nummer des Kontextes + // [out] + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xCursor; // der Iterator fuer diesen Kontext + String strUsedFields; // eine Liste von durch ';' getrennten Feldnamen + ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > + arrFields; // die korrespondierenden Text-Interfaces fuer die Felder in strUsedFields + String sFieldDisplayNames; // if not empty : names to be displayed for the searchable fields (must have the same token count as strUsedFields !) +}; + +#endif // _FMSEARCH_HXX diff --git a/svx/inc/svx/fmshell.hxx b/svx/inc/svx/fmshell.hxx new file mode 100644 index 000000000000..9f180156367f --- /dev/null +++ b/svx/inc/svx/fmshell.hxx @@ -0,0 +1,172 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmshell.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FMSHELL_HXX +#define _SVX_FMSHELL_HXX + +// *************************************************************************************************** +// *************************************************************************************************** +// *************************************************************************************************** + +#include <sfx2/shell.hxx> +#include <sfx2/module.hxx> +#include <vcl/event.hxx> + +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include <svx/fmview.hxx> +#include "svx/svxdllapi.h" + +#include <svx/ifaceids.hxx> + +//======================================================================== +class FmFormModel; +class FmFormPage; +class SvxFmTabWin; +class FmXFormShell; +class FmFormView; +class SdrView; +class SdrPage; +class SdrUnoObj; + +namespace com { namespace sun { namespace star { namespace form { + class XForm; + namespace runtime { + class XFormController; + } +} } } } + +//======================================================================== +class SVX_DLLPUBLIC FmDesignModeChangedHint : public SfxHint +{ + sal_Bool m_bDesignMode; + +public: + TYPEINFO(); + FmDesignModeChangedHint( sal_Bool bDesMode ); + virtual ~FmDesignModeChangedHint(); + + sal_Bool GetDesignMode() const { return m_bDesignMode; } +}; + +//======================================================================== +class SVX_DLLPUBLIC FmFormShell : public SfxShell +{ + friend class FmFormView; + friend class FmXFormShell; + + FmXFormShell* m_pImpl; + FmFormView* m_pFormView; + FmFormModel* m_pFormModel; + SfxViewShell* m_pParentShell; + + sal_uInt16 m_nLastSlot; + sal_Bool m_bDesignMode : 1; + sal_Bool m_bHasForms : 1; // Flag welches festhaelt, ob Formulare auf einer Seite + // vorhanden sind, nur fr den DesignMode, siehe UIFeatureChanged! + + // die Markierungen einer FormView haben sich geaendert ... + void NotifyMarkListChanged(FmFormView*); + // (die FormView selber ist kein Broadcaster, deshalb kann sie den Formular-Explorer, den dieses + // Ereignis interesiert, nicht sauber verstaendigen (sie koennte sich lediglich von der Application + // das Navigator-Fenster geben lassen, aber das wollen wir ja nicht, ge ? ...)) + + class FormShellWaitObject + { + Window* m_pWindow; + public: + FormShellWaitObject(const FmFormShell* _pShell); + ~FormShellWaitObject(); + }; + friend class FormShellWaitObject; + + const OutputDevice* GetCurrentViewDevice() const { return m_pFormView ? m_pFormView->GetActualOutDev() : NULL; } + +public: + SFX_DECL_INTERFACE(SVX_INTERFACE_FORM_SH) + TYPEINFO(); + + FmFormShell(SfxViewShell* pParent, FmFormView* pView = NULL); + virtual ~FmFormShell(); + + virtual void Execute( SfxRequest& ); + virtual void GetState( SfxItemSet& ); + virtual sal_Bool HasUIFeature( sal_uInt32 nFeature ); + + void ExecuteTextAttribute( SfxRequest& ); + void GetTextAttributeState( SfxItemSet& ); + + sal_Bool GetY2KState(sal_uInt16& nReturn); + void SetY2KState(sal_uInt16 n); + + void SetView(FmFormView* pView); + + FmFormView* GetFormView() const { return m_pFormView; } + FmFormModel* GetFormModel() const { return m_pFormModel; } + FmFormPage* GetCurPage() const; + FmXFormShell* GetImpl() const {return m_pImpl;}; + + sal_uInt16 PrepareClose(sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False); + + bool IsActiveControl() const; + void ForgetActiveControl(); + void SetControlActivationHandler( const Link& _rHdl ); + + virtual void Activate(sal_Bool bMDI); + virtual void Deactivate(sal_Bool bMDI); + + // helper methods for implementing XFormLayerAccess + SdrUnoObj* GetFormControl( + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxModel, + const SdrView& _rView, + const OutputDevice& _rDevice, + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _out_rxControl + ) const; + ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > GetFormController( + const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm, + const SdrView& _rView, + const OutputDevice& _rDevice + ) const; + sal_Bool IsDesignMode() const { return m_bDesignMode; } + void SetDesignMode( sal_Bool _bDesignMode ); + +protected: + void GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich); + + // gibt es ein Formular auf der aktuellen Seite? + void DetermineForms(sal_Bool bInvalidate); + void impl_setDesignMode( sal_Bool bDesign); +}; + +// *************************************************************************************************** +// *************************************************************************************************** +// *************************************************************************************************** + +#endif // _SVX_FMSHELL_HXX diff --git a/svx/inc/svx/fmtools.hxx b/svx/inc/svx/fmtools.hxx new file mode 100644 index 000000000000..b74f00aa236c --- /dev/null +++ b/svx/inc/svx/fmtools.hxx @@ -0,0 +1,233 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FMTOOLS_HXX +#define _SVX_FMTOOLS_HXX + +#include "svx/svxdllapi.h" + +#include <com/sun/star/sdb/SQLContext.hpp> +#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp> +#include <com/sun/star/sdbcx/Privilege.hpp> +#include <com/sun/star/sdbcx/XColumnsSupplier.hpp> +#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp> +#include <com/sun/star/sdbc/XRowSet.hpp> +#include <com/sun/star/sdbc/XDatabaseMetaData.hpp> +#include <com/sun/star/sdb/XColumn.hpp> +#include <com/sun/star/sdb/XColumnUpdate.hpp> +#include <com/sun/star/sdb/SQLErrorEvent.hpp> +#include <com/sun/star/sdbc/XConnection.hpp> +#include <com/sun/star/sdbc/XResultSet.hpp> +#include <com/sun/star/sdbc/XResultSetUpdate.hpp> +#include <com/sun/star/sdbcx/XRowLocate.hpp> +#include <com/sun/star/sdbc/XDataSource.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/frame/XDispatchProviderInterception.hpp> +#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> +#include <com/sun/star/frame/FeatureStateEvent.hpp> +#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/script/ScriptEventDescriptor.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/container/XEnumeration.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/awt/XControlModel.hpp> +#include <com/sun/star/awt/XControl.hpp> +#include <com/sun/star/awt/FontSlant.hpp> +#include <com/sun/star/awt/FontDescriptor.hpp> +#include <com/sun/star/awt/FontUnderline.hpp> +#include <com/sun/star/awt/FontStrikeout.hpp> +#include <com/sun/star/util/XNumberFormatsSupplier.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/sdbc/XConnection.hpp> +#include <com/sun/star/io/XObjectInputStream.hpp> +#include <com/sun/star/io/XObjectOutputStream.hpp> +#include <com/sun/star/io/XPersistObject.hpp> +#include <com/sun/star/util/XNumberFormatter.hpp> +#include <com/sun/star/util/XNumberFormats.hpp> + +#include <vcl/wintypes.hxx> +#include <cppuhelper/weakref.hxx> +#include <comphelper/uno3.hxx> +#include <comphelper/stl_types.hxx> +#include <cppuhelper/implbase1.hxx> + +#include <set> + +class Window; + +//================================================================== +// allgemeine Typen +//================================================================== +// displaying a database exception for the user +// display info about a simple ::com::sun::star::sdbc::SQLException +void displayException(const ::com::sun::star::sdbc::SQLException&, Window* _pParent = NULL); +void displayException(const ::com::sun::star::sdbc::SQLWarning&, Window* _pParent = NULL); +SVX_DLLPUBLIC void displayException(const ::com::sun::star::sdb::SQLContext&, Window* _pParent = NULL); +void displayException(const ::com::sun::star::sdb::SQLErrorEvent&, Window* _pParent = NULL); +void displayException(const ::com::sun::star::uno::Any&, Window* _pParent = NULL); + +sal_Int32 getElementPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& xCont, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement); + +SVX_DLLPUBLIC ::rtl::OUString getLabelName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xControlModel); + +// =================================================================================================== +// = class CursorWrapper - eine Hilfsklasse, die parallel mit je einem ::com::sun::star::uno::Reference<XDatabaseUpdateCursor>, +// XDatabaseBookmarkCursor und XDatabaseDirectCursor arbeitet +// =================================================================================================== + +class CursorWrapper +{ +private: + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xGeneric; + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> m_xMoveOperations; + ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate> m_xBookmarkOperations; + ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> m_xColumnsSupplier; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xPropertyAccess; + +public: + // Construction/Destruction + CursorWrapper() { } + CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxCursor, sal_Bool bUseCloned = sal_False); + SVX_DLLPUBLIC CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _rxCursor, sal_Bool bUseCloned = sal_False); + // bei bUseCloned == sal_True wird der Cursor ueber das XCloneable-Interface (dass er besitzen muss) gedoubled und + // erst dann benutzt + + friend bool operator==(const CursorWrapper& lhs, const CursorWrapper& rhs) + { + return lhs.m_xGeneric.get() == rhs.m_xGeneric.get(); + } + + sal_Bool is() const { return m_xMoveOperations.is(); } + sal_Bool Is() const { return m_xMoveOperations.is(); } + + CursorWrapper* operator ->() { return this; } + operator const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& () const{ return m_xGeneric; } + + // 'Konvertierungen' + const CursorWrapper& operator=(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& xCursor); + operator const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& () const { return m_xMoveOperations; } + operator const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate>& () const { return m_xBookmarkOperations; } + operator const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>& () const { return m_xColumnsSupplier; } + + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& getPropertySet() const { return m_xPropertyAccess; } + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& getResultSet() const { return m_xMoveOperations; } + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate >& getRowLocate() const { return m_xBookmarkOperations; } + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier >& getColumnsSupplier() const { return m_xColumnsSupplier; } + + // das normale queryInterface + ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException ) + { return m_xMoveOperations->queryInterface(type); } + + // ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate> + ::com::sun::star::uno::Any getBookmark(void) + throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) + { return m_xBookmarkOperations->getBookmark(); } + sal_Bool moveToBookmark(const ::com::sun::star::uno::Any& bookmark) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { return m_xBookmarkOperations->moveToBookmark(bookmark); } + sal_Bool moveRelativeToBookmark(const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { return m_xBookmarkOperations->moveRelativeToBookmark(bookmark, rows); } + sal_Int32 compareBookmarks(const ::com::sun::star::uno::Any& lhs, const ::com::sun::star::uno::Any& rhs) const throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { return m_xBookmarkOperations->compareBookmarks(lhs, rhs); } + sal_Int32 hasOrderedBookmarks(void) const throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { return m_xBookmarkOperations->hasOrderedBookmarks(); } + sal_Int32 hashBookmark(const ::com::sun::star::uno::Any& bookmark) const throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { return m_xBookmarkOperations->hashBookmark(bookmark); } + + // ::com::sun::star::sdbc::XResultSet + sal_Bool isBeforeFirst() const { return m_xMoveOperations->isBeforeFirst(); } + sal_Bool isAfterLast() const { return m_xMoveOperations->isAfterLast(); } + sal_Bool isFirst() const { return m_xMoveOperations->isFirst(); } + sal_Bool isLast() const { return m_xMoveOperations->isLast(); } + void beforeFirst() { m_xMoveOperations->beforeFirst(); } + sal_Bool first() { return m_xMoveOperations->first(); } + sal_Bool last() { return m_xMoveOperations->last(); } + sal_Int32 getRow() const { return m_xMoveOperations->getRow(); } + sal_Bool absolute(sal_Int32 nPosition) { return m_xMoveOperations->absolute(nPosition); } + sal_Bool relative(sal_Int32 nCount) { return m_xMoveOperations->relative(nCount); } + sal_Bool previous() { return m_xMoveOperations->previous(); } + sal_Bool next() { return m_xMoveOperations->next(); } + void refreshRow() { m_xMoveOperations->refreshRow(); } + sal_Bool rowUpdated() { return m_xMoveOperations->rowUpdated(); } + sal_Bool rowInserted() { return m_xMoveOperations->rowInserted(); } + sal_Bool rowDeleted() { return m_xMoveOperations->rowDeleted(); } + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> getStatement() { return m_xMoveOperations->getStatement(); } + // ::com::sun::star::sdbcx::XColumnsSupplier + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getColumns() const throw( ::com::sun::star::uno::RuntimeException ) { return m_xColumnsSupplier->getColumns(); } +private: + void ImplConstruct(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _rxCursor, sal_Bool bUseCloned); +}; + + +class FmXDisposeMultiplexer; +class FmXDisposeListener +{ + friend class FmXDisposeMultiplexer; + + FmXDisposeMultiplexer* m_pAdapter; + ::osl::Mutex& m_rMutex; + +public: + FmXDisposeListener(::osl::Mutex& _rMutex) : m_pAdapter(NULL), m_rMutex(_rMutex) { } + virtual ~FmXDisposeListener(); + + virtual void disposing(const ::com::sun::star::lang::EventObject& _rEvent, sal_Int16 _nId) throw( ::com::sun::star::uno::RuntimeException ) = 0; + +protected: + void setAdapter(FmXDisposeMultiplexer* pAdapter); +}; + +//============================================================================== + +class FmXDisposeMultiplexer :public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener> +{ + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> m_xObject; + FmXDisposeListener* m_pListener; + sal_Int16 m_nId; + + virtual ~FmXDisposeMultiplexer(); +public: + FmXDisposeMultiplexer(FmXDisposeListener* _pListener, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& _rxObject, sal_Int16 _nId = -1); + +// ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); + + void dispose(); +}; + +// ================================================================== + +sal_Int16 getControlTypeByObject(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo>& _rxObject); + // get the object type (OBJ_FM_...) from the services the object supports + +//================================================================== +sal_Bool isRowSetAlive(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rxRowSet); + // checks if the ::com::sun::star::sdbcx::XColumnsSupplier provided by _rxRowSet supllies any columns + +//================================================================== +typedef ::std::set < ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > + , ::comphelper::OInterfaceCompare< ::com::sun::star::uno::XInterface > + > InterfaceBag; + +#endif // _SVX_FMTOOLS_HXX + diff --git a/svx/inc/svx/fmview.hxx b/svx/inc/svx/fmview.hxx new file mode 100644 index 000000000000..3b965967ed42 --- /dev/null +++ b/svx/inc/svx/fmview.hxx @@ -0,0 +1,169 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fmview.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FMVIEW_HXX +#define _SVX_FMVIEW_HXX + +#include <svx/view3d.hxx> +#include <comphelper/uno3.hxx> +#include "svx/svxdllapi.h" + +FORWARD_DECLARE_INTERFACE(util,XNumberFormats) +FORWARD_DECLARE_INTERFACE(beans,XPropertySet) + +class OutputDevice; +class FmFormModel; +class FmPageViewWinRec; +class FmFormObj; +class FmFormPage; +class FmFormShell; +class FmXFormView; + +namespace svx { + class ODataAccessDescriptor; + struct OXFormsDescriptor; +} + +class SdrUnoObj; +namespace com { namespace sun { namespace star { namespace form { + class XForm; + namespace runtime { + class XFormController; + } +} } } } + +class SVX_DLLPUBLIC FmFormView : public E3dView +{ + FmXFormView* pImpl; + FmFormShell* pFormShell; + + void Init(); + +public: + TYPEINFO(); + + FmFormView(FmFormModel* pModel, OutputDevice* pOut = 0L); + virtual ~FmFormView(); + + /** create a control pair (label/bound control) for the database field description given. + @param rFieldDesc + description of the field. see clipboard format SBA-FIELDFORMAT + @deprecated + This method is deprecated. Use the version with a ODataAccessDescriptor instead. + */ + SdrObject* CreateFieldControl(const UniString& rFieldDesc) const; + + /** create a control pair (label/bound control) for the database field description given. + */ + SdrObject* CreateFieldControl( const ::svx::ODataAccessDescriptor& _rColumnDescriptor ); + + /** create a control pair (label/bound control) for the xforms description given. + */ + SdrObject* CreateXFormsControl( const ::svx::OXFormsDescriptor &_rDesc ); + + virtual void MarkListHasChanged(); + virtual void AddWindowToPaintView(OutputDevice* pNewWin); + virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin); + + static void createControlLabelPair( + OutputDevice* _pOutDev, + sal_Int32 _nXOffsetMM, + sal_Int32 _nYOffsetMM, + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxField, + const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& _rxNumberFormats, + sal_uInt16 _nControlObjectID, + const ::rtl::OUString& _rFieldPostfix, + UINT32 _nInventor, + UINT16 _nLabelObjectID, + SdrPage* _pLabelPage, + SdrPage* _pControlPage, + SdrModel* _pModel, + SdrUnoObj*& _rpLabel, + SdrUnoObj*& _rpControl + ); + + virtual SdrPageView* ShowSdrPage(SdrPage* pPage); + virtual void HideSdrPage(); + + // for copying complete form structures, not only control models + virtual SdrModel* GetMarkedObjModel() const; + using E3dView::Paste; + virtual sal_Bool Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst=NULL, sal_uInt32 nOptions=0); + + virtual BOOL MouseButtonDown( const MouseEvent& _rMEvt, Window* _pWin ); + + /** grab the focus to the first form control on the view + @param _bForceSync + <TRUE/> if the handling should be done synchronously. + */ + SVX_DLLPRIVATE void GrabFirstControlFocus( sal_Bool _bForceSync = sal_False ); + + /** returns the form controller for a given form and a given device + */ + SVX_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > + GetFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm, const OutputDevice& _rDevice ) const; + + // SdrView + BOOL KeyInput(const KeyEvent& rKEvt, Window* pWin); + + /// shortcut to "GetSdrPageView() ? PTR_CAST( FmFormPage, GetSdrPageView() ) : NULL" + FmFormPage* GetCurPage(); + + SVX_DLLPRIVATE void ActivateControls(SdrPageView*); + SVX_DLLPRIVATE void DeactivateControls(SdrPageView*); + + SVX_DLLPRIVATE void ChangeDesignMode(sal_Bool bDesign); + + SVX_DLLPRIVATE FmXFormView* GetImpl() const { return pImpl; } + SVX_DLLPRIVATE FmFormShell* GetFormShell() const { return pFormShell; } + + struct FormShellAccess { friend class FmFormShell; private: FormShellAccess() { } }; + void SetFormShell( FmFormShell* pShell, FormShellAccess ) { pFormShell = pShell; } + + struct ImplAccess { friend class FmXFormView; private: ImplAccess() { } }; + void SetMoveOutside( bool _bMoveOutside, ImplAccess ) { E3dView::SetMoveOutside( _bMoveOutside ); } + virtual void InsertControlContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& xCC); + virtual void RemoveControlContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& xCC); + + virtual SdrPaintWindow* BeginCompleteRedraw(OutputDevice* pOut); + virtual void EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer); + + SVX_DLLPRIVATE const OutputDevice* GetActualOutDev() const {return pActualOutDev;} + SVX_DLLPRIVATE sal_Bool checkUnMarkAll(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xSource); + +private: + SVX_DLLPRIVATE void AdjustMarks(const SdrMarkList& rMarkList); + SVX_DLLPRIVATE FmFormObj* getMarkedGrid() const; + protected: + using E3dView::SetMoveOutside; +}; + +#endif // _FML_FMVIEW_HXX + diff --git a/svx/inc/svx/fntctl.hxx b/svx/inc/svx/fntctl.hxx new file mode 100644 index 000000000000..924ae78c4182 --- /dev/null +++ b/svx/inc/svx/fntctl.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fntctl.hxx,v $ + * $Revision: 1.4.76.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FNTCTL_HXX +#define _SVX_FNTCTL_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/mnuitem.hxx> +#include <svl/lstner.hxx> +#include "svx/svxdllapi.h" + + + +class FontNameMenu; +class SfxBindings; + +// class SvxFontMenuControl ---------------------------------------------- + +class SVX_DLLPUBLIC SvxFontMenuControl : public SfxMenuControl, public SfxListener +{ +private: + FontNameMenu* pMenu; + Menu& rParent; + +//#if 0 // _SOLAR__PRIVATE + SVX_DLLPRIVATE void FillMenu(); + DECL_LINK( MenuSelect, FontNameMenu * ); + SVX_DLLPRIVATE virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + SVX_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); +//#endif + +public: + SvxFontMenuControl( USHORT nId, Menu&, SfxBindings& ); + ~SvxFontMenuControl(); + + virtual PopupMenu* GetPopup() const; + + SFX_DECL_MENU_CONTROL(); +}; + + + +#endif + diff --git a/svx/inc/svx/fntctrl.hxx b/svx/inc/svx/fntctrl.hxx new file mode 100644 index 000000000000..a0de3b2d3048 --- /dev/null +++ b/svx/inc/svx/fntctrl.hxx @@ -0,0 +1,93 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fntctrl.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FNTCTRL_HXX +#define _SVX_FNTCTRL_HXX + +// include --------------------------------------------------------------- + +#include <vcl/window.hxx> +#include <svx/svxfont.hxx> +#include "svx/svxdllapi.h" + +#ifndef _RTL_USTRING_HXX_ +#include <rtl/ustring.hxx> +#endif + +// forward --------------------------------------------------------------- + +class FontPrevWin_Impl; + +// class SvxFontPrevWindow ----------------------------------------------- + +class SVX_DLLPUBLIC SvxFontPrevWindow : public Window +{ + using OutputDevice::SetFont; +private: + FontPrevWin_Impl* pImpl; + + SVX_DLLPRIVATE void InitSettings( BOOL bForeground, BOOL bBackground ); + +public: + SvxFontPrevWindow( Window* pParent, const ResId& rId ); + virtual ~SvxFontPrevWindow(); + + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + // Aus Effizienz-gr"unden nicht const + SvxFont& GetFont(); + const SvxFont& GetFont() const; + void SetFont( const SvxFont& rFont ); + void SetFont( const SvxFont& rNormalFont, const SvxFont& rCJKFont, const SvxFont& rCTLFont ); + void SetCJKFont( const SvxFont& rFont ); + void SetCTLFont( const SvxFont& rFont ); + SvxFont& GetCJKFont(); + SvxFont& GetCTLFont(); + void SetColor( const Color& rColor ); + void ResetColor(); + void SetBackColor( const Color& rColor ); + void UseResourceText( BOOL bUse = TRUE ); + void Paint( const Rectangle& ); + + BOOL IsTwoLines() const; + void SetTwoLines(BOOL bSet); + + void SetBrackets(sal_Unicode cStart, sal_Unicode cEnd); + + void SetFontWidthScale( UINT16 nScaleInPercent ); + + void AutoCorrectFontColor( void ); + + void SetPreviewText( const ::rtl::OUString& rString ); + void SetFontNameAsPreviewText(); +}; + +#endif // #ifndef _SVX_FNTCTRL_HXX + diff --git a/svx/inc/svx/fntszctl.hxx b/svx/inc/svx/fntszctl.hxx new file mode 100644 index 000000000000..2fb576a98793 --- /dev/null +++ b/svx/inc/svx/fntszctl.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fntszctl.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FNTSZCTL_HXX +#define _SVX_FNTSZCTL_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/mnuitem.hxx> +#include "svx/svxdllapi.h" + + + +class SfxBindings; +class FontSizeMenu; + +// class SvxFontSizeMenuControl ------------------------------------------ + +class SVX_DLLPUBLIC SvxFontSizeMenuControl : public SfxMenuControl +{ +private: + FontSizeMenu* pMenu; + Menu& rParent; + SfxStatusForwarder aFontNameForwarder; + +//#if 0 // _SOLAR__PRIVATE + DECL_LINK( MenuSelect, FontSizeMenu * ); +//#endif + +protected: + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + +public: + SvxFontSizeMenuControl( USHORT nId, Menu&, SfxBindings& ); + ~SvxFontSizeMenuControl(); + + virtual PopupMenu* GetPopup() const; + + SFX_DECL_MENU_CONTROL(); +}; + + + +#endif + diff --git a/svx/inc/svx/fontwork.hxx b/svx/inc/svx/fontwork.hxx new file mode 100644 index 000000000000..f4d9146018a8 --- /dev/null +++ b/svx/inc/svx/fontwork.hxx @@ -0,0 +1,200 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fontwork.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FONTWORK_HXX +#define _SVX_FONTWORK_HXX + +// include --------------------------------------------------------------- + +#ifndef _TOOLBOX_HXX //autogen +#include <vcl/toolbox.hxx> +#endif +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#include <svtools/valueset.hxx> +#include <sfx2/dockwin.hxx> +#include <sfx2/ctrlitem.hxx> +#include <svx/xenum.hxx> +#include <svx/dlgctrl.hxx> +#include "svx/svxdllapi.h" + +// forward --------------------------------------------------------------- + +class SdrView; +class SdrPageView; +class SdrObject; + +class XFormTextAdjustItem; +class XFormTextDistanceItem; +class XFormTextStartItem; +class XFormTextMirrorItem; +class XFormTextStdFormItem; +class XFormTextHideFormItem; +class XFormTextOutlineItem; +class XFormTextShadowItem; +class XFormTextShadowColorItem; +class XFormTextShadowXValItem; +class XFormTextShadowYValItem; + +/************************************************************************* +|* +|* ControllerItem fuer Fontwork +|* +\************************************************************************/ + +class SvxFontWorkDialog; + +class SvxFontWorkControllerItem : public SfxControllerItem +{ + SvxFontWorkDialog &rFontWorkDlg; + +protected: + virtual void StateChanged(USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState); + +public: + SvxFontWorkControllerItem(USHORT nId, SvxFontWorkDialog&, SfxBindings&); +}; + +/************************************************************************* +|* +|* Ableitung vom SfxChildWindow als "Behaelter" fuer Fontwork-Dialog +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxFontWorkChildWindow : public SfxChildWindow +{ + public: + SvxFontWorkChildWindow(Window*, USHORT, SfxBindings*, SfxChildWinInfo*); + SFX_DECL_CHILDWINDOW(SvxFontWorkChildWindow); +}; + +/************************************************************************* +|* +|* Floating Window zur Attributierung von Texteffekten +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow +{ + #define CONTROLLER_COUNT 12 + + SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT]; + + ValueSet aFormSet; + + ToolBox aTbxStyle; + ToolBox aTbxAdjust; + + FixedImage aFbDistance; + MetricField aMtrFldDistance; + FixedImage aFbTextStart; + MetricField aMtrFldTextStart; + + ToolBox aTbxShadow; + + FixedImage aFbShadowX; + MetricField aMtrFldShadowX; + FixedImage aFbShadowY; + MetricField aMtrFldShadowY; + + ColorLB aShadowColorLB; + + SfxBindings& rBindings; + Timer aInputTimer; + BOOL bUserZoomedIn; + + USHORT nLastStyleTbxId; + USHORT nLastAdjustTbxId; + USHORT nLastShadowTbxId; + long nSaveShadowX; + long nSaveShadowY; + long nSaveShadowAngle; + long nSaveShadowSize; + + ImageList maImageList; + ImageList maImageListH; + + const XColorTable* pColorTable; + +#ifdef _SVX_FONTWORK_CXX + friend class SvxFontWorkChildWindow; + friend class SvxFontWorkControllerItem; + + DECL_LINK( SelectStyleHdl_Impl, void * ); + DECL_LINK( SelectAdjustHdl_Impl, void * ); + DECL_LINK( SelectShadowHdl_Impl, void * ); + + DECL_LINK( ModifyInputHdl_Impl, void * ); + DECL_LINK( InputTimoutHdl_Impl, void * ); + + DECL_LINK( FormSelectHdl_Impl, void * ); + DECL_LINK( ColorSelectHdl_Impl, void * ); + + void SetStyle_Impl(const XFormTextStyleItem*); + void SetAdjust_Impl(const XFormTextAdjustItem*); + void SetDistance_Impl(const XFormTextDistanceItem*); + void SetStart_Impl(const XFormTextStartItem*); + void SetMirror_Impl(const XFormTextMirrorItem*); + void SetStdForm_Impl(const XFormTextStdFormItem*); + void SetShowForm_Impl(const XFormTextHideFormItem*); + void SetOutline_Impl(const XFormTextOutlineItem*); + void SetShadow_Impl(const XFormTextShadowItem*, + BOOL bRestoreValues = FALSE); + void SetShadowColor_Impl(const XFormTextShadowColorItem*); + void SetShadowXVal_Impl(const XFormTextShadowXValItem*); + void SetShadowYVal_Impl(const XFormTextShadowYValItem*); +#endif + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + void ApplyImageList(); + + protected: + virtual void Zoom(); + virtual SfxChildAlignment CheckAlignment( SfxChildAlignment eActAlign, + SfxChildAlignment eAlign ); + + public: + SvxFontWorkDialog( SfxBindings *pBindinx, + SfxChildWindow *pCW, + Window* pParent, + const ResId& rResId ); + ~SvxFontWorkDialog(); + + void SetColorTable(const XColorTable* pTable); + void SetActive(BOOL bActivate = TRUE); + + void CreateStdFormObj(SdrView& rView, SdrPageView& rPV, + const SfxItemSet& rAttr, SdrObject& rOldObj, + XFormTextStdForm eForm); +}; + +#endif // _SVX_FONTWORK_HXX + diff --git a/svx/inc/svx/fontworkbar.hxx b/svx/inc/svx/fontworkbar.hxx new file mode 100644 index 000000000000..f1b2b48ae09a --- /dev/null +++ b/svx/inc/svx/fontworkbar.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fontworkbar.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FONTWORK_BAR_HXX +#define _SVX_FONTWORK_BAR_HXX + +#include <sfx2/shell.hxx> +#include <sfx2/module.hxx> +#include <svx/ifaceids.hxx> +#include "svx/svxdllapi.h" + +class SfxViewShell; +class SdrView; + +/************************************************************************/ + +namespace svx +{ + +bool SVX_DLLPUBLIC checkForSelectedFontWork( SdrView* pSdrView, sal_uInt32& nCheckStatus ); + +class SVX_DLLPUBLIC FontworkBar : public SfxShell +{ +public: + TYPEINFO(); + SFX_DECL_INTERFACE(SVX_INTERFACE_FONTWORK_BAR) + + FontworkBar(SfxViewShell* pViewShell ); + ~FontworkBar(); + + static void execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBindings ); + static void getState( SdrView* pSdrView, SfxItemSet& rSet ); +}; + +} + +#endif // _SVX_FONTWORK_BAR_HXX diff --git a/svx/inc/svx/forbiddenruleitem.hxx b/svx/inc/svx/forbiddenruleitem.hxx new file mode 100644 index 000000000000..24010eacc5ed --- /dev/null +++ b/svx/inc/svx/forbiddenruleitem.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: forbiddenruleitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FORBIDDENRULEITEM_HXX +#define _SVX_FORBIDDENRULEITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxForbiddenRuleItem ----------------------------------------- + +/* [Description] + + This item describe how to handle the last character of a line. +*/ + +class SVX_DLLPUBLIC SvxForbiddenRuleItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxForbiddenRuleItem( sal_Bool bOn /*= sal_False*/, + const sal_uInt16 nId ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * = 0 ) const; + + inline SvxForbiddenRuleItem& operator=( + const SvxForbiddenRuleItem& rItem ) + { + SetValue( rItem.GetValue() ); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/framebordertype.hxx b/svx/inc/svx/framebordertype.hxx new file mode 100644 index 000000000000..7f3ce1327ee1 --- /dev/null +++ b/svx/inc/svx/framebordertype.hxx @@ -0,0 +1,68 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: framebordertype.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_FRAMEBORDERTYPE_HXX +#define SVX_FRAMEBORDERTYPE_HXX + +#include "svx/svxdllapi.h" + +namespace svx { + +// ============================================================================ + +/** Enumerates all borders a frame selection control can contain. */ +enum FrameBorderType +{ + FRAMEBORDER_NONE, /// No border (special state). + FRAMEBORDER_LEFT, /// Left frame border. + FRAMEBORDER_RIGHT, /// Right frame border. + FRAMEBORDER_TOP, /// Top frame border. + FRAMEBORDER_BOTTOM, /// Bottom frame border. + FRAMEBORDER_HOR, /// Inner horizontal frame border. + FRAMEBORDER_VER, /// Inner vertical frame border. + FRAMEBORDER_TLBR, /// Top-left to bottom-right frame border. + FRAMEBORDER_BLTR /// Bottom-left to top-right frame border. +}; + +/** The number of valid frame border types (excluding FRAMEBORDER_NONE). */ +const int FRAMEBORDERTYPE_COUNT = 8; + +/** Returns the frame border type from a 0-based integer index. */ +SVX_DLLPUBLIC FrameBorderType GetFrameBorderTypeFromIndex( size_t nIndex ); + +/** Returns the zero-based index of a valid frame border type. */ +size_t GetIndexFromFrameBorderType( FrameBorderType eBorder ); + +// ============================================================================ + +} // namespace svx + +#endif + diff --git a/svx/inc/svx/framelink.hxx b/svx/inc/svx/framelink.hxx new file mode 100644 index 000000000000..012e0f103ac3 --- /dev/null +++ b/svx/inc/svx/framelink.hxx @@ -0,0 +1,730 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: framelink.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_FRAMELINK_HXX +#define SVX_FRAMELINK_HXX + +#include <algorithm> +#include <sal/types.h> +#include <tools/gen.hxx> +#include <tools/color.hxx> +#include "svx/svxdllapi.h" + +class OutputDevice; +class SvxBorderLine; + +namespace svx { +namespace frame { + +// ============================================================================ +// Enums +// ============================================================================ + +/** Specifies how the reference points for frame borders are used. + */ +enum RefMode +{ + /** Frame borders are drawn centered to the reference points. */ + REFMODE_CENTERED, + + /** The reference points specify the begin of the frame border width. + + The result is that horizontal lines are drawn below, and vertical lines + are drawn right of the reference points. + */ + REFMODE_BEGIN, + + /** The reference points specify the end of the frame border width. + + The result is that horizontal lines are drawn above, and vertical lines + are drawn left of the reference points. + */ + REFMODE_END +}; + +// ============================================================================ +// Classes +// ============================================================================ + +/** Contains the widths of primary and secondary line of a frame style. + + In the following, "frame style" is a complete style of one frame border, + i.e. the double line at the left side of the frame. A "line" is always a + trivial single line, i.e. the first line of a double frame style. + + The following states of the members of this struct are valid: + + mnPrim mnDist mnSecn frame style + ------------------------------------------------- + 0 0 0 invisible + >0 0 0 single + >0 >0 >0 double + + The behaviour of the member functions for other states is not defined. + + Per definition the primary line in double frame styles is: + - The top line for horizontal frame borders. + - The left line for vertical frame borders. + - The bottom-left line for top-left to bottom-right diagonal frame borders. + - The top-left line for bottom-left to top-right diagonal frame borders. + + The following picture shows the upper end of a vertical double frame + border. + + |<---------------- GetWidth() ----------------->| + | | + |<----- mnPrim ----->||<- mnDist ->||<- mnSecn >| + | || || | + ###################### ############# + ###################### ############# + ###################### ############# + ###################### ############# + ###################### | ############# + ###################### | ############# + | + |<- middle of the frame border + */ +class SVX_DLLPUBLIC Style +{ +public: + /** Constructs an invisible frame style. */ + inline explicit Style() : meRefMode( REFMODE_CENTERED ), mnPrim( 0 ), mnDist( 0 ), mnSecn( 0 ), mbDotted( false ) {} + /** Constructs a frame style with passed line widths. */ + inline explicit Style( sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS ) : + meRefMode( REFMODE_CENTERED ), mbDotted( false ) + { Set( nP, nD, nS ); } + /** Constructs a frame style with passed color and line widths. */ + inline explicit Style( const Color& rColor, sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS ) : + meRefMode( REFMODE_CENTERED ), mbDotted( false ) + { Set( rColor, nP, nD, nS ); } + /** Constructs a frame style from the passed SvxBorderLine struct. */ + inline explicit Style( const SvxBorderLine& rBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16, bool /*bUseDots*/ = false ) : + meRefMode( REFMODE_CENTERED ) { Set( rBorder, fScale, nMaxWidth ); } + /** Constructs a frame style from the passed SvxBorderLine struct. Clears the style, if pBorder is 0. */ + inline explicit Style( const SvxBorderLine* pBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16, bool /*bUseDots*/ = false ) : + meRefMode( REFMODE_CENTERED ) { Set( pBorder, fScale, nMaxWidth ); } + + inline RefMode GetRefMode() const { return meRefMode; } + inline const Color& GetColor() const { return maColor; } + inline sal_uInt16 Prim() const { return mnPrim; } + inline sal_uInt16 Dist() const { return mnDist; } + inline sal_uInt16 Secn() const { return mnSecn; } + inline bool Dotted() const { return mbDotted; } + + /** Returns the total width of this frame style. */ + inline sal_uInt16 GetWidth() const { return mnPrim + mnDist + mnSecn; } + + + /** Sets the frame style to invisible state. */ + void Clear(); + /** Sets the frame style to the passed line widths. */ + void Set( sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS ); + /** Sets the frame style to the passed line widths. */ + void Set( const Color& rColor, sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS ); + /** Sets the frame style to the passed SvxBorderLine struct. */ + void Set( const SvxBorderLine& rBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16, bool /*bUseDots*/ = false ); + /** Sets the frame style to the passed SvxBorderLine struct. Clears the style, if pBorder is 0. */ + void Set( const SvxBorderLine* pBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16, bool /*bUseDots*/ = false ); + + /** Sets a new reference point handling mode, does not modify other settings. */ + inline void SetRefMode( RefMode eRefMode ) { meRefMode = eRefMode; } + /** Sets a new color, does not modify other settings. */ + inline void SetColor( const Color& rColor ) { maColor = rColor; } + /** Sets whether to use dotted style for single hair lines. */ + inline void SetDotted( bool bDotted ) { mbDotted = bDotted; } + + /** Scales the style by the specified scaling factor. Ensures that visible lines keep visible. */ + Style& ScaleSelf( double fScale, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 ); + /** Returns this style scaled by the specified scaling factor. Ensures that visible lines keep visible. */ + Style Scale( double fScale, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 ) const; + + /** Mirrors this style (exchanges primary and secondary), if it is a double frame style. */ + Style& MirrorSelf(); + /** Returns this style mirrored, if it is a double frame style, otherwise a simple copy. */ + Style Mirror() const; + +private: + Color maColor; /// The color of the line(s) of this frame border. + RefMode meRefMode; /// Reference point handling for this frame border. + sal_uInt16 mnPrim; /// Width of primary (single, left, or top) line. + sal_uInt16 mnDist; /// Distance between primary and secondary line. + sal_uInt16 mnSecn; /// Width of secondary (right or bottom) line. + bool mbDotted; /// true = Draw dotted lines; false = Draw solid lines. +}; + +bool operator==( const Style& rL, const Style& rR ); +SVX_DLLPUBLIC bool operator<( const Style& rL, const Style& rR ); + +inline bool operator!=( const Style& rL, const Style& rR ) { return !(rL == rR); } +inline bool operator>( const Style& rL, const Style& rR ) { return rR < rL; } +inline bool operator<=( const Style& rL, const Style& rR ) { return !(rR < rL); } +inline bool operator>=( const Style& rL, const Style& rR ) { return !(rL < rR); } + +// ---------------------------------------------------------------------------- + +/** Extends the Style struct with an angle for diagonal frame borders. + + The angle is specified in radian (a full circle is equivalent to 2*PI). + It is dependent on the context, how the value is interpreted, i.e. it may + specify the angle to a horizontal or vertical frame border. + */ +class DiagStyle : public Style +{ +public: + /** Constructs an invisible diagonal frame style. */ + inline explicit DiagStyle() : mfAngle( 0.0 ) {} + /** Constructs a diagonal frame style passed style and angle. */ + inline explicit DiagStyle( const Style& rStyle, double fAngle ) : + Style( rStyle ), mfAngle( fAngle ) {} + + inline double GetAngle() const { return mfAngle; } + + /** Returns this style mirrored, if it is a double frame style, otherwise a simple copy. */ + inline DiagStyle Mirror() const { return DiagStyle( Style::Mirror(), mfAngle ); } + +private: + double mfAngle; /// Angle between this and hor. or vert. border. +}; + +// ============================================================================ +// Various helper functions +// ============================================================================ + +/** Returns the angle between horizontal border of a rectangle and its diagonal. + + The returned values represents the inner angle between the diagonals and + horizontal borders, and is therefore in the range [0,PI/2] (inclusive). The + passed sizes may be negative, calculation is done with absolute values. + */ +SVX_DLLPUBLIC double GetHorDiagAngle( long nWidth, long nHeight ); + +/** Returns the angle between horizontal border of a rectangle and its diagonal. + + The returned values represents the inner angle between the diagonals and + horizontal borders, and is therefore in the range [0,PI/2] (inclusive). The + passed rectangle positions may be unordered, they are adjusted internally. + */ +inline double GetHorDiagAngle( long nX1, long nX2, long nY1, long nY2 ) +{ return GetHorDiagAngle( nX2 - nX1, nY2 - nY1 ); } + +/** Returns the angle between horizontal border of a rectangle and its diagonal. + + The returned values represents the inner angle between the diagonals and + horizontal borders, and is therefore in the range [0,PI/2] (inclusive). The + passed rectangle edges may be unordered, they are adjusted internally. + */ +inline double GetHorDiagAngle( const Point& rP1, const Point& rP2 ) +{ return GetHorDiagAngle( rP2.X() - rP1.X(), rP2.Y() - rP1.Y() ); } + +/** Returns the angle between horizontal border of a rectangle and its diagonal. + + The returned values represents the inner angle between the diagonals and + horizontal borders, and is therefore in the range [0,PI/2] (inclusive). + */ +inline double GetHorDiagAngle( const Rectangle& rRect ) +{ return GetHorDiagAngle( rRect.GetWidth(), rRect.GetHeight() ); } + +// ---------------------------------------------------------------------------- + +/** Returns the angle between vertical border of a rectangle and its diagonal. + + The returned values represents the inner angle between the diagonals and + vertical borders, and is therefore in the range [0,PI/2] (inclusive). The + passed sizes may be negative, calculation is done with absolute values. + */ +inline double GetVerDiagAngle( long nWidth, long nHeight ) +{ return GetHorDiagAngle( nHeight, nWidth ); } + +/** Returns the angle between vertical border of a rectangle and its diagonal. + + The returned values represents the inner angle between the diagonals and + vertical borders, and is therefore in the range [0,PI/2] (inclusive). The + passed rectangle positions may be unordered, they are adjusted internally. + */ +inline double GetVerDiagAngle( long nX1, long nX2, long nY1, long nY2 ) +{ return GetVerDiagAngle( nX2 - nX1, nY2 - nY1 ); } + +/** Returns the angle between vertical border of a rectangle and its diagonal. + + The returned values represents the inner angle between the diagonals and + vertical borders, and is therefore in the range [0,PI/2] (inclusive). The + passed rectangle edges may be unordered, they are adjusted internally. + */ +inline double GetVerDiagAngle( const Point& rP1, const Point& rP2 ) +{ return GetVerDiagAngle( rP2.X() - rP1.X(), rP2.Y() - rP1.Y() ); } + +/** Returns the angle between vertical border of a rectangle and its diagonal. + + The returned values represents the inner angle between the diagonals and + vertical borders, and is therefore in the range [0,PI/2] (inclusive). + */ +inline double GetVerDiagAngle( const Rectangle& rRect ) +{ return GetVerDiagAngle( rRect.GetWidth(), rRect.GetHeight() ); } + +// ============================================================================ + +/** Returns an X coordinate for a diagonal frame border in the specified height. + + This function is for usage with the top-left end of a top-left to + bottom-right diagonal frame border, connected to the left end of a + horizontal frame border. + + The function returns the relative X position (i.e. for a polygon) of the + diagonal frame border according to the specified relative Y position. The + mentioned positions are relative to the reference point of both frame + borders. + + +---------------------------------------------------------- + | The horizontal frame border. + | | + - - - - - - | --+-- <---- Reference point for horizontal and diagonal frame borders. + ^ | \ | \ + nVerOffs | \ \ <--- The diagonal frame border. + v +---\ \------------------------------------------------ + - - - - - - - - -\- - -X <----- The function calculates the X position of i.e. + \ \ this point (relative from X of reference point). + \ \ + Primary -->\ \<-- Secondary + + @param nVerOffs + The vertical position of the point to be calculated, relative to the Y + coordinate of the reference point. + @param nDiagOffs + The width offset across the diagonal frame border (0 = middle), + regardless of the gradient of the diagonal frame border (always + vertical to the direction of the diagonal frame border). This value is + not related in any way to the reference point. For details about + relative width offsets, see description of class Style. + @param fAngle + Inner (right) angle between diagonal and horizontal frame border. + */ +SVX_DLLPUBLIC long GetTLDiagOffset( long nVerOffs, long nDiagOffs, double fAngle ); + +/** Returns an X coordinate for a diagonal frame border in the specified height. + + This function is for usage with the bottom-left end of a bottom-left to + top-right diagonal frame border, connected to the left end of a horizontal + frame border. + + The function returns the relative X position (i.e. for a polygon) of the + diagonal frame border according to the specified relative Y position. The + mentioned positions are relative to the reference point of both frame + borders. + + Primary -->/ /<--- Secondary + / / + / / The function calculates the X position of i.e. + - - - - - - - - -/- - -X <----- this point (relative from X of reference point). + ^ +---/ /------------------------------------------------ + nVerOffs | / / <--- The diagonal frame border. + v | / | / + - - - - - - | --+-- <---- Reference point for horizontal and diagonal frame borders. + | | + | The horizontal frame border. + +---------------------------------------------------------- + + @param nVerOffs + The vertical position of the point to be calculated, relative to the Y + coordinate of the reference point. + @param nDiagOffs + The width offset across the diagonal frame border (0 = middle), + regardless of the gradient of the diagonal frame border (always + vertical to the direction of the diagonal frame border). This value is + not related in any way to the reference point. For details about + relative width offsets, see description of class Style. + @param fAngle + Inner (right) angle between diagonal and horizontal frame border. + */ +long GetBLDiagOffset( long nVerOffs, long nDiagOffs, double fAngle ); + +/** Returns an X coordinate for a diagonal frame border in the specified height. + + This function is for usage with the bottom-right end of a top-left to + bottom-right diagonal frame border, connected to the right end of a + horizontal frame border. + + @param nVerOffs + The vertical position of the point to be calculated, relative to the Y + coordinate of the reference point. + @param nDiagOffs + The width offset across the diagonal frame border (0 = middle), + regardless of the gradient of the diagonal frame border (always + vertical to the direction of the diagonal frame border). This value is + not related in any way to the reference point. For details about + relative width offsets, see description of class Style. + @param fAngle + Inner (left) angle between diagonal and horizontal frame border. + */ +long GetBRDiagOffset( long nVerOffs, long nDiagOffs, double fAngle ); + +/** Returns an X coordinate for a diagonal frame border in the specified height. + + This function is for usage with the top-right end of a bottom-left to + top-right diagonal frame border, connected to the right end of a horizontal + frame border. + + @param nVerOffs + The vertical position of the point to be calculated, relative to the Y + coordinate of the reference point. + @param nDiagOffs + The width offset across the diagonal frame border (0 = middle), + regardless of the gradient of the diagonal frame border (always + vertical to the direction of the diagonal frame border). This value is + not related in any way to the reference point. For details about + relative width offsets, see description of class Style. + @param fAngle + Inner (left) angle between diagonal and horizontal frame border. + */ +long GetTRDiagOffset( long nVerOffs, long nDiagOffs, double fAngle ); + +// ============================================================================ + +/** Checks whether two horizontal frame borders are "connectable". + + Two borders are "connectable" in terms of this function, if both can be + drawn with only one call of a border drawing function. This means, the two + frame borders must have equal style and color, and none of the other + vertical and diagonal frame borders break the lines of the two borders in + any way (i.e. two vertical double frame borders would break the horizonal + frame borders). Of course this function can be used for vertical frame + borders as well. + + The follong picture shows the meaning of all passed parameters: + + \ rTFromT / + \ | / + rTFromTL | rTFromTR + \ | / + \ | / + ======== rLBorder ========= ========== rRBorder ======= + / | \ + / | \ + rBFromBL | rBFromBR + / | \ + / rBFromB \ + + @return + True, if rLBorder and rRBorder can be drawn in one step without + interruption at their connection point. + */ +SVX_DLLPUBLIC bool CheckFrameBorderConnectable( + const Style& rLBorder, /// Style of the left frame border to connect. + const Style& rRBorder, /// Style of the right frame border to connect. + + const Style& rTFromTL, /// Diagonal frame border from top-left to connection point. + const Style& rTFromT, /// Vertical frame border from top to connection point. + const Style& rTFromTR, /// Horizontal frame border from top-right to connection point. + + const Style& rBFromBL, /// Diagonal frame border from bottom-left to connection point. + const Style& rBFromB, /// Vertical frame border from bottom to connection point. + const Style& rBFromBR /// Horizontal frame border from bottom-right to connection point. +); + +// ============================================================================ +// Drawing functions +// ============================================================================ + +/** Draws a horizontal frame border, regards all connected frame styles. + + The frame style to draw is passed as parameter rBorder. The function + calculates the adjustment in X direction for left and right end of primary + and secondary line of the frame border (the style may present a double + line). The line ends may differ according to the connected frame styles + coming from top, bottom, left, right, and/or diagonal. + + Thick frame styles are always drawn centered (in width) to the passed + reference points. The Y coordinates of both reference points must be equal + (the line cannot be drawn slanted). + + The function preserves all settings of the passed output device. + + All parameters starting with "rL" refer to the left end of the processed + frame border, all parameters starting with "rR" refer to the right end. + The following part of the parameter name starting with "From" specifies + where the frame border comes from. Example: "rLFromTR" means the frame + border coming from top-right, connected to the left end of rBorder (and + therefore a diagonal frame border). + + The follong picture shows the meaning of all passed parameters: + + rLFromT / \ rRFromT + | / \ | + | rLFromTR rRFromTL | + | / \ | + | / \ | + --- rLFromL --- ============== rBorder ============== --- rRFromR --- + | \ / | + | \ / | + | rLFromBR rRFromBL | + | \ / | + rLFromB \ / rRFromB + */ +SVX_DLLPUBLIC void DrawHorFrameBorder( + OutputDevice& rDev, /// The output device used to draw the frame border. + + const Point& rLPos, /// Reference point for left end of the processed frame border. + const Point& rRPos, /// Reference point for right end of the processed frame border. + const Style& rBorder, /// Style of the processed frame border. + + const DiagStyle& rLFromTR, /// Diagonal frame border from top-right to left end of rBorder. + const Style& rLFromT, /// Vertical frame border from top to left end of rBorder. + const Style& rLFromL, /// Horizontal frame border from left to left end of rBorder. + const Style& rLFromB, /// Vertical frame border from bottom to left end of rBorder. + const DiagStyle& rLFromBR, /// Diagonal frame border from bottom-right to left end of rBorder. + + const DiagStyle& rRFromTL, /// Diagonal frame border from top-left to right end of rBorder. + const Style& rRFromT, /// Vertical frame border from top to right end of rBorder. + const Style& rRFromR, /// Horizontal frame border from right to right end of rBorder. + const Style& rRFromB, /// Vertical frame border from bottom to right end of rBorder. + const DiagStyle& rRFromBL, /// Diagonal frame border from bottom-left to right end of rBorder. + + const Color* pForceColor = 0 /// If specified, overrides frame border color. +); + +// ---------------------------------------------------------------------------- + +/** Draws a horizontal frame border, regards all connected frame styles. + + This is a simplified version of the DrawHorFrameBorder() function described + above. It does not support diagonal connected frame borders. See description + above for additional details about the parameters. + + The function preserves all settings of the passed output device. + */ +void SVX_DLLPUBLIC DrawHorFrameBorder( + OutputDevice& rDev, /// The output device used to draw the frame border. + + const Point& rLPos, /// Reference point for left end of the processed frame border. + const Point& rRPos, /// Reference point for right end of the processed frame border. + const Style& rBorder, /// Style of the processed frame border. + + const Style& rLFromT, /// Vertical frame border from top to left end of rBorder. + const Style& rLFromL, /// Horizontal frame border from left to left end of rBorder. + const Style& rLFromB, /// Vertical frame border from bottom to left end of rBorder. + + const Style& rRFromT, /// Vertical frame border from top to right end of rBorder. + const Style& rRFromR, /// Horizontal frame border from right to right end of rBorder. + const Style& rRFromB, /// Vertical frame border from bottom to right end of rBorder. + + const Color* pForceColor = 0 /// If specified, overrides frame border color. +); + +// ---------------------------------------------------------------------------- + +/** Draws a horizontal frame border without connected frame styles. + + This is the most simplified version of the DrawHorFrameBorder() function + described above. See description above for additional details about the + parameters. + + The function preserves all settings of the passed output device. + */ +void SVX_DLLPUBLIC DrawHorFrameBorder( + OutputDevice& rDev, /// The output device used to draw the frame border. + const Point& rLPos, /// Reference point for left end of the processed frame border. + const Point& rRPos, /// Reference point for right end of the processed frame border. + const Style& rBorder, /// Style of the frame border to draw. + const Color* pForceColor = 0 /// If specified, overrides frame border color. +); + +// ============================================================================ + +/** Draws a vertical frame border, regards all connected frame styles. + + The frame style to draw is passed as parameter rBorder. The function + calculates the adjustment in Y direction for top and bottom end of primary + and secondary line of the frame border (the style may present a double + line). The line ends may differ according to the connected frame styles + coming from left, right, top, bottom, and/or diagonal. + + Thick frame styles are always drawn centered (in width) to the passed + reference points. The X coordinates of both reference points must be equal + (the line cannot be drawn slanted). + + The function preserves all settings of the passed output device. + + All parameters starting with "rT" refer to the top end of the processed + frame border, all parameters starting with "rB" refer to the bottom end. + The following part of the parameter name starting with "From" specifies + where the frame border comes from. Example: "rTFromBL" means the frame + border coming from bottom-left, connected to the top end of rBorder (and + therefore a diagonal frame border). + + The follong picture shows the meaning of all passed parameters: + + | + rTFromT + | + | + --- rTFromL --- --- rTFromR --- + / # \ + / # \ + rTFromBL # rTFromBR + / # \ + / # \ + # + rBorder + # + \ # / + \ # / + rBFromTL # rBFromTR + \ # / + \ # / + --- rBFromL --- --- rBFromR --- + | + | + rBFromB + | + */ +SVX_DLLPUBLIC void DrawVerFrameBorder( + OutputDevice& rDev, /// The output device used to draw the frame border. + + const Point& rTPos, /// Reference point for top end of the processed frame border. + const Point& rBPos, /// Reference point for bottom end of the processed frame border. + const Style& rBorder, /// Style of the processed frame border. + + const DiagStyle& rTFromBL, /// Diagonal frame border from bottom-right to top end of rBorder. + const Style& rTFromL, /// Horizontal frame border from left to top end of rBorder. + const Style& rTFromT, /// Vertical frame border from top to top end of rBorder. + const Style& rTFromR, /// Horizontal frame border from right to top end of rBorder. + const DiagStyle& rTFromBR, /// Diagonal frame border from bottom-right to top end of rBorder. + + const DiagStyle& rBFromTL, /// Diagonal frame border from top-left to bottom end of rBorder. + const Style& rBFromL, /// Horizontal frame border from left to bottom end of rBorder. + const Style& rBFromB, /// Vertical frame border from bottom to bottom end of rBorder. + const Style& rBFromR, /// Horizontal frame border from right to bottom end of rBorder. + const DiagStyle& rBFromTR, /// Diagonal frame border from top-right to bottom end of rBorder. + + const Color* pForceColor = 0 /// If specified, overrides frame border color. +); + +// ---------------------------------------------------------------------------- + +/** Draws a vertical frame border, regards all connected frame styles. + + This is a simplified version of the DrawVerFrameBorder() function described + above. It does not support diagonal connected frame borders. See description + above for additional details about the parameters. + + The function preserves all settings of the passed output device. + */ +void SVX_DLLPUBLIC DrawVerFrameBorder( + OutputDevice& rDev, /// The output device used to draw the frame border. + + const Point& rTPos, /// Reference point for top end of the processed frame border. + const Point& rBPos, /// Reference point for bottom end of the processed frame border. + const Style& rBorder, /// Style of the processed frame border. + + const Style& rTFromL, /// Horizontal frame border from left to top end of rBorder. + const Style& rTFromT, /// Vertical frame border from top to top end of rBorder. + const Style& rTFromR, /// Horizontal frame border from right to top end of rBorder. + + const Style& rBFromL, /// Horizontal frame border from left to bottom end of rBorder. + const Style& rBFromB, /// Vertical frame border from bottom to bottom end of rBorder. + const Style& rBFromR, /// Horizontal frame border from right to bottom end of rBorder. + + const Color* pForceColor = 0 /// If specified, overrides frame border color. +); + +// ---------------------------------------------------------------------------- + +/** Draws a vertical frame border without connected frame styles. + + This is the most simplified version of the DrawVerFrameBorder() function + described above. See description above for additional details about the + parameters. + + The function preserves all settings of the passed output device. + */ +void SVX_DLLPUBLIC DrawVerFrameBorder( + OutputDevice& rDev, /// The output device used to draw the frame border. + const Point& rTPos, /// Reference point for top end of the processed frame border. + const Point& rBPos, /// Reference point for bottom end of the processed frame border. + const Style& rBorder, /// Style of the frame border to draw. + const Color* pForceColor = 0 /// If specified, overrides frame border color. +); + +// ---------------------------------------------------------------------------- + +/** Draws a vertical slanted frame border without connected frame styles. + + This is an extended version of the simple DrawVerFrameBorder() function + described above. It accepts start and end reference points with different + X coordinates. See description above for additional details about the + parameters (except the restriction on the reference points). + + The function preserves all settings of the passed output device. + */ +void SVX_DLLPUBLIC DrawVerFrameBorderSlanted( + OutputDevice& rDev, /// The output device used to draw the frame border. + const Point& rTPos, /// Reference point for top end of the processed frame border. + const Point& rBPos, /// Reference point for bottom end of the processed frame border. + const Style& rBorder, /// Style of the frame border to draw. + const Color* pForceColor = 0 /// If specified, overrides frame border color. +); + +// ============================================================================ + +/** Draws both diagonal frame borders, regards all connected frame styles. + + One or both passed diagonal frame styles may be invisible. + + The function preserves all settings of the passed output device. + */ +SVX_DLLPUBLIC void DrawDiagFrameBorders( + OutputDevice& rDev, /// The output device used to draw the frame border. + + const Rectangle& rRect, /// Rectangle for both diagonal frame borders. + const Style& rTLBR, /// Style of the processed top-left to bottom-right diagonal frame border. + const Style& rBLTR, /// Style of the processed bottom-left to top-right diagonal frame border. + + const Style& rTLFromB, /// Vertical frame border from bottom to top-left end of rTLBR. + const Style& rTLFromR, /// Horizontal frame border from right to top-left end of rTLBR. + const Style& rBRFromT, /// Vertical frame border from top to bottom-right end of rTLBR. + const Style& rBRFromL, /// Horizontal frame border from left to bottom-right end of rTLBR. + + const Style& rBLFromT, /// Vertical frame border from top to bottom-left end of rBLTR. + const Style& rBLFromR, /// Horizontal frame border from right to bottom-left end of rBLTR. + const Style& rTRFromB, /// Vertical frame border from bottom to top-right end of rBLTR. + const Style& rTRFromL, /// Horizontal frame border from left to top-right end of rBLTR. + + const Color* pForceColor = 0, /// If specified, overrides frame border color. + bool bDiagDblClip = false /// true = Use clipping for crossing double frame borders. +); + +// ============================================================================ + +} // namespace frame +} // namespace svx + +/* Yes, I love ASCII art. :-) -DR- */ + +#endif + diff --git a/svx/inc/svx/framelinkarray.hxx b/svx/inc/svx/framelinkarray.hxx new file mode 100644 index 000000000000..c1aec01eb017 --- /dev/null +++ b/svx/inc/svx/framelinkarray.hxx @@ -0,0 +1,540 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: framelinkarray.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_FRAMELINKARRAY_HXX +#define SVX_FRAMELINKARRAY_HXX + +#include <svx/framelink.hxx> + +#include <memory> + +#include <vector> +#include "svx/svxdllapi.h" + +namespace svx { +namespace frame { + +// ============================================================================ + + +struct Cell +{ + Style maLeft; + Style maRight; + Style maTop; + Style maBottom; + Style maTLBR; + Style maBLTR; + long mnAddLeft; + long mnAddRight; + long mnAddTop; + long mnAddBottom; + bool mbMergeOrig; + bool mbOverlapX; + bool mbOverlapY; + + explicit Cell(); + + inline bool IsMerged() const { return mbMergeOrig || mbOverlapX || mbOverlapY; } + inline bool IsOverlapped() const { return mbOverlapX || mbOverlapY; } + + void MirrorSelfX( bool bMirrorStyles, bool bSwapDiag ); + void MirrorSelfY( bool bMirrorStyles, bool bSwapDiag ); +}; + +typedef std::vector< long > LongVec; +typedef std::vector< Cell > CellVec; + +struct ArrayImpl +{ + CellVec maCells; + LongVec maWidths; + LongVec maHeights; + mutable LongVec maXCoords; + mutable LongVec maYCoords; + size_t mnWidth; + size_t mnHeight; + size_t mnFirstClipCol; + size_t mnFirstClipRow; + size_t mnLastClipCol; + size_t mnLastClipRow; + mutable bool mbXCoordsDirty; + mutable bool mbYCoordsDirty; + bool mbDiagDblClip; + + explicit ArrayImpl( size_t nWidth, size_t nHeight, bool bDiagDblClip ); + + inline bool IsValidPos( size_t nCol, size_t nRow ) const + { return (nCol < mnWidth) && (nRow < mnHeight); } + inline size_t GetIndex( size_t nCol, size_t nRow ) const + { return nRow * mnWidth + nCol; } + + const Cell& GetCell( size_t nCol, size_t nRow ) const; + Cell& GetCellAcc( size_t nCol, size_t nRow ); + + size_t GetMergedFirstCol( size_t nCol, size_t nRow ) const; + size_t GetMergedFirstRow( size_t nCol, size_t nRow ) const; + size_t GetMergedLastCol( size_t nCol, size_t nRow ) const; + size_t GetMergedLastRow( size_t nCol, size_t nRow ) const; + + const Cell& GetMergedOriginCell( size_t nCol, size_t nRow ) const; + Cell& GetMergedOriginCellAcc( size_t nCol, size_t nRow ); + + bool IsMergedOverlappedLeft( size_t nCol, size_t nRow ) const; + bool IsMergedOverlappedRight( size_t nCol, size_t nRow ) const; + bool IsMergedOverlappedTop( size_t nCol, size_t nRow ) const; + bool IsMergedOverlappedBottom( size_t nCol, size_t nRow ) const; + + bool IsInClipRange( size_t nCol, size_t nRow ) const; + bool IsColInClipRange( size_t nCol ) const; + bool IsRowInClipRange( size_t nRow ) const; + + inline size_t GetMirrorCol( size_t nCol ) const { return mnWidth - nCol - 1; } + inline size_t GetMirrorRow( size_t nRow ) const { return mnHeight - nRow - 1; } + + long GetColPosition( size_t nCol ) const; + long GetRowPosition( size_t nRow ) const; + + long GetColWidth( size_t nFirstCol, size_t nLastCol ) const; + long GetRowHeight( size_t nFirstRow, size_t nLastRow ) const; + + double GetHorDiagAngle( size_t nCol, size_t nRow, bool bSimple = false ) const; + double GetVerDiagAngle( size_t nCol, size_t nRow, bool bSimple = false ) const; +}; + +/** Stores frame styles of an array of cells, supports merged ranges. + + This class is able to store the frame styles of an array of cells and to + draw the entire array or parts of it to any output device. + + Every cell contains the style of the left, right, top, bottom, top-left to + bottom-right, and bottom-left to top-right frame border. + + On drawing, the thicker frame border of neighbored cells is selected + automatically. All borders are drawn "connected", that means, the correct + start and end coordinates of all lines of the borders are calculated, + especaially, if they are drawn together with diagonal frame borders. + + This array fully supports merged cell ranges. In a merged range, the frame + borders of the top-left cell is extended to the entire range, and all other + cells in that range are overlapped. Again, all connected frame borders, + also diagonals and frame borders from adjacent merged ranges, are handled + automatically. + + Additionally, a clipping range can be set. If such a range is used, all + frame borders outside this range are completely ignored, and are not used + in the connected border calculation anymore. + + The array can be mirrored in both directions. It is possible to specify, + whether to mirror the double frame styles, and whether to swap diagonal + frame borders. + */ +class SVX_DLLPUBLIC Array +{ +public: + /** Constructs an empty array. */ + explicit Array(); + + /** Constructs an array with the specified width and height. */ + explicit Array( size_t nWidth, size_t nHeight ); + + /** Destructs the array. */ + ~Array(); + + // array size and column/row indexes -------------------------------------- + + /** Reinitializes the array with the specified size. Clears all styles. */ + void Initialize( size_t nWidth, size_t nHeight ); + + /** Clears all line styles, column widths, row heights, merge data, and the clip range. */ + void Clear(); + + /** Returns the number of columns in the array. */ + size_t GetColCount() const; + + /** Returns the number of rows in the array. */ + size_t GetRowCount() const; + + /** Returns the number of cells in the array. */ + size_t GetCellCount() const; + + /** Returns the column index of the specified cell index. */ + size_t GetColFromIndex( size_t nCellIndex ) const; + + /** Returns the row index of the specified cell index. */ + size_t GetRowFromIndex( size_t nCellIndex ) const; + + /** Returns the cell index from the cell address (nCol,nRow). */ + size_t GetCellIndex( size_t nCol, size_t nRow, bool bRTL = false) const; + + // cell border styles ----------------------------------------------------- + + /** Sets the left frame style of the cell (nCol,nRow). Ignores merged ranges. */ + void SetCellStyleLeft( size_t nCol, size_t nRow, const Style& rStyle ); + + /** Sets the right frame style of the cell (nCol,nRow). Ignores merged ranges. */ + void SetCellStyleRight( size_t nCol, size_t nRow, const Style& rStyle ); + + /** Sets the top frame style of the cell (nCol,nRow). Ignores merged ranges. */ + void SetCellStyleTop( size_t nCol, size_t nRow, const Style& rStyle ); + + /** Sets the bottom frame style of the specified cell (nCol,nRow). Ignores merged ranges. */ + void SetCellStyleBottom( size_t nCol, size_t nRow, const Style& rStyle ); + + /** Sets the top-left to bottom-right frame style of the cell (nCol,nRow). Ignores merged ranges. */ + void SetCellStyleTLBR( size_t nCol, size_t nRow, const Style& rStyle ); + + /** Sets the bottom-left to top-right frame style of the cell (nCol,nRow). Ignores merged ranges. */ + void SetCellStyleBLTR( size_t nCol, size_t nRow, const Style& rStyle ); + + /** Sets both diagonal frame styles of the specified cell (nCol,nRow). Ignores merged ranges. */ + void SetCellStyleDiag( size_t nCol, size_t nRow, const Style& rTLBR, const Style& rBLTR ); + + /** Sets the left frame style of the specified column. Ignores merged ranges. */ + void SetColumnStyleLeft( size_t nCol, const Style& rStyle ); + + /** Sets the right frame style of the specified column. Ignores merged ranges. */ + void SetColumnStyleRight( size_t nCol, const Style& rStyle ); + + /** Sets the top frame style of the specified row. Ignores merged ranges. */ + void SetRowStyleTop( size_t nRow, const Style& rStyle ); + + /** Sets the bottom frame style of the specified row. Ignores merged ranges. */ + void SetRowStyleBottom( size_t nRow, const Style& rStyle ); + + /** Returns the left frame style of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges and neighbor cells; + false = Returns thicker of own left style or right style of the cell to the left. + Returns the style only if visible (i.e. at left border of a merged range). + @return + The left frame style or an invisible style for invalid cell addresses. */ + const Style& GetCellStyleLeft( size_t nCol, size_t nRow, bool bSimple = false ) const; + + /** Returns the right frame style of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges and neighbor cells; + false = Returns thicker of own right style or left style of the cell to the right. + Returns the style only if visible (i.e. at right border of a merged range). + @return + The left frame style or an invisible style for invalid cell addresses. */ + const Style& GetCellStyleRight( size_t nCol, size_t nRow, bool bSimple = false ) const; + + /** Returns the top frame style of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges and neighbor cells; + false = Returns thicker of own top style or bottom style of the cell above. + Returns the style only if visible (i.e. at top border of a merged range). + @return + The top frame style or an invisible style for invalid cell addresses. */ + const Style& GetCellStyleTop( size_t nCol, size_t nRow, bool bSimple = false ) const; + + /** Returns the top frame style of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges and neighbor cells; + false = Returns thicker of own top style or bottom style of the cell above. + Returns the style only if visible (i.e. at top border of a merged range). + @return + The top frame style or an invisible style for invalid cell addresses. */ + const Style& GetCellStyleBottom( size_t nCol, size_t nRow, bool bSimple = false ) const; + + /** Returns the top-left to bottom-right frame style of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges; + false = Returns the visible style (i.e. from top-left corner of a merged range). + @return + The top-left to bottom-right frame style or an invisible style for invalid cell addresses. */ + const Style& GetCellStyleTLBR( size_t nCol, size_t nRow, bool bSimple = false ) const; + + /** Returns the bottom-left to top-right frame style of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges; + false = Returns the visible style (i.e. from top-left corner of a merged range). + @return + The bottom-left to top-right frame style or an invisible style for invalid cell addresses. */ + const Style& GetCellStyleBLTR( size_t nCol, size_t nRow, bool bSimple = false ) const; + + /** Returns the top-left to bottom-right frame style of the cell (nCol,nRow). + @return + The top-left to bottom-right frame style, if the cell is not part of + a merged range, or if (nCol,nRow) is the top-left corner of a merged + range (useful to find connected frame styles). + An invisible style for invalid cell addresses. */ + const Style& GetCellStyleTL( size_t nCol, size_t nRow ) const; + + /** Returns the top-left to bottom-right frame style of the cell (nCol,nRow). + @return + The top-left to bottom-right frame style, if the cell is not part of + a merged range, or if (nCol,nRow) is the bottom-right corner of a + merged range (useful to find connected frame styles). + An invisible style for invalid cell addresses. */ + const Style& GetCellStyleBR( size_t nCol, size_t nRow ) const; + + /** Returns the bottom-left to top-right frame style of the cell (nCol,nRow). + @return + The bottom-left to top-right frame style, if the cell is not part of + a merged range, or if (nCol,nRow) is the bottom-left corner of a + merged range (useful to find connected frame styles). + An invisible style for invalid cell addresses. */ + const Style& GetCellStyleBL( size_t nCol, size_t nRow ) const; + + /** Returns the bottom-left to top-right frame style of the cell (nCol,nRow). + @return + The bottom-left to top-right frame style, if the cell is not part of + a merged range, or if (nCol,nRow) is the top-right corner of a + merged range (useful to find connected frame styles). + An invisible style for invalid cell addresses. */ + const Style& GetCellStyleTR( size_t nCol, size_t nRow ) const; + + // cell merging ----------------------------------------------------------- + + /** Inserts a new merged cell range. + @precond The range must not intersect other merged ranges. */ + void SetMergedRange( size_t nFirstCol, size_t nFirstRow, size_t nLastCol, size_t nLastRow ); + + /** Removes the merged cell range that contains (nCol,nRow). */ + void RemoveMergedRange( size_t nCol, size_t nRow ); + + /** Sets an additional left width for the merged range that contains (nCol,nRow). + @descr Useful to handle merged ranges that are not completely part of the array. + @precond The merged range must be at the left border of the array. */ + void SetAddMergedLeftSize( size_t nCol, size_t nRow, long nAddSize ); + + /** Sets an additional right width for the merged range that contains (nCol,nRow). + @descr Useful to handle merged ranges that are not completely part of the array. + @precond The merged range must be at the right border of the array. */ + void SetAddMergedRightSize( size_t nCol, size_t nRow, long nAddSize ); + + /** Sets an additional top height for the merged range that contains (nCol,nRow). + @descr Useful to handle merged ranges that are not completely part of the array. + @precond The merged range must be at the top border of the array. */ + void SetAddMergedTopSize( size_t nCol, size_t nRow, long nAddSize ); + + /** Sets an additional bottom height for the merged range that contains (nCol,nRow). + @descr Useful to handle merged ranges that are not completely part of the array. + @precond The merged range must be at the bottom border of the array. */ + void SetAddMergedBottomSize( size_t nCol, size_t nRow, long nAddSize ); + + /** Returns true, if the cell (nCol,nRow) is part of a merged range. */ + bool IsMerged( size_t nCol, size_t nRow ) const; + + /** Returns true, if the cell (nCol,nRow) is the top-left corner of a merged range. */ + bool IsMergedOrigin( size_t nCol, size_t nRow ) const; + + /** Returns true, if the cell (nCol,nRow) is overlapped by a merged range. */ + bool IsMergedOverlapped( size_t nCol, size_t nRow ) const; + + /** Returns true, if the left border of the cell (nCol,nRow) is overlapped by a merged range. */ + bool IsMergedOverlappedLeft( size_t nCol, size_t nRow ) const; + + /** Returns true, if the right border of the cell (nCol,nRow) is overlapped by a merged range. */ + bool IsMergedOverlappedRight( size_t nCol, size_t nRow ) const; + + /** Returns true, if the top border of the cell (nCol,nRow) is overlapped by a merged range. */ + bool IsMergedOverlappedTop( size_t nCol, size_t nRow ) const; + + /** Returns true, if the bottom border of the cell (nCol,nRow) is overlapped by a merged range. */ + bool IsMergedOverlappedBottom( size_t nCol, size_t nRow ) const; + + /** Returns the address of the top-left cell of the merged range that contains (nCol,nRow). */ + void GetMergedOrigin( size_t& rnFirstCol, size_t& rnFirstRow, size_t nCol, size_t nRow ) const; + + /** Returns the range size of the merged range thst contains (nCol,nRow). */ + void GetMergedSize( size_t& rnWidth, size_t& rnHeight, size_t nCol, size_t nRow ) const; + + /** Returns the top-left and bottom-right address of the merged range that contains (nCol,nRow). */ + void GetMergedRange( size_t& rnFirstCol, size_t& rnFirstRow, + size_t& rnLastCol, size_t& rnLastRow, size_t nCol, size_t nRow ) const; + + // clipping --------------------------------------------------------------- + + /** Sets a clipping range. + @descr + No cell borders outside of this clipping range will be drawn. In + difference to simply using the DrawRange() function with the same + range, a clipping range causes the drawing functions to completely + ignore the frame styles connected from outside. This is used i.e. + in Calc to print single pages and to draw the print preview. + Partly visible diagonal frame borders in merged ranges are correctly + clipped too. This array can handle only one clip range at a time. */ + void SetClipRange( size_t nFirstCol, size_t nFirstRow, size_t nLastCol, size_t nLastRow ); + + /** Removes the clipping range set with the SetClipRange() function. */ + void RemoveClipRange(); + + /** Returns true, if the cell (bCol,nRow) is inside the current clip range. */ + bool IsInClipRange( size_t nCol, size_t nRow ) const; + + /** Returns the rectangle (output coordinates) of the current clipping range. */ + Rectangle GetClipRangeRectangle() const; + + // cell coordinates ------------------------------------------------------- + + /** Sets the X output coordinate of the left column. */ + void SetXOffset( long nXOffset ); + + /** Sets the Y output coordinate of the top row. */ + void SetYOffset( long nYOffset ); + + /** Sets the output width of the specified column. */ + void SetColWidth( size_t nCol, long nWidth ); + + /** Sets the output height of the specified row. */ + void SetRowHeight( size_t nRow, long nHeight ); + + /** Sets the same output width for all columns. */ + void SetAllColWidths( long nWidth ); + + /** Sets the same output height for all rows. */ + void SetAllRowHeights( long nHeight ); + + /** Returns the X output coordinate of the left border of the specified column. + @descr The column index <array-width> returns the X output coordinate + of the right array border. */ + long GetColPosition( size_t nCol ) const; + + /** Returns the Y output coordinate of the top border of the specified row. + @descr The row index <array-height> returns the Y output coordinate + of the bottom array border. */ + long GetRowPosition( size_t nRow ) const; + + /** Returns the output width of the specified column. */ + long GetColWidth( size_t nCol ) const; + + /** Returns the output width of the specified range of columns. */ + long GetColWidth( size_t nFirstCol, size_t nLastCol ) const; + + /** Returns the output height of the specified row. */ + long GetRowHeight( size_t nRow ) const; + + /** Returns the output height of the specified range of rows. */ + long GetRowHeight( size_t nFirstRow, size_t nLastRow ) const; + + /** Returns the output width of the entire array. */ + long GetWidth() const; + + /** Returns the output height of the entire array. */ + long GetHeight() const; + + /** Returns the top-left output position of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges; + false = Returns output position of top-left corner of merged ranges. */ + Point GetCellPosition( size_t nCol, size_t nRow, bool bSimple = false ) const; + + /** Returns the output size of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges; + false = Returns total output size of merged ranges. */ + Size GetCellSize( size_t nCol, size_t nRow, bool bSimple = false ) const; + + /** Returns the output rectangle of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges; + false = Returns total output rectangle of merged ranges. */ + Rectangle GetCellRect( size_t nCol, size_t nRow, bool bSimple = false ) const; + + // diagonal frame borders ------------------------------------------------- + + /** Returns the angle between horizontal and diagonal border of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges; + false = Returns the horizontal angle of merged ranges. */ + double GetHorDiagAngle( size_t nCol, size_t nRow, bool bSimple = false ) const; + + /** Returns the angle between vertical and diagonal border of the cell (nCol,nRow). + @param bSimple + true = Ignores merged ranges; + false = Returns the vertical angle of merged ranges. */ + double GetVerDiagAngle( size_t nCol, size_t nRow, bool bSimple = false ) const; + + /** Specifies whether to use polygon clipping to draw diagonal frame borders. + @descr + If enabled, diagonal frame borders are drawn interrupted, if they are + crossed by a double frame border. Polygon clipping is very expensive + and should only be used for very small output devices (i.e. in the + Border tab page). Default after construction is OFF. */ + void SetUseDiagDoubleClipping( bool bSet ); + + /** Returns true, if polygon clipping is used to draw diagonal frame borders. */ + bool GetUseDiagDoubleClipping() const; + + // mirroring -------------------------------------------------------------- + + /** Mirrors the entire array horizontally. + @param bMirrorStyles + true = Swap primary and secondary line of all vertical double frame borders. + @param bSwapDiag + true = Swap top-left to bottom-right and bottom-left to top-right frame borders. */ + void MirrorSelfX( bool bMirrorStyles, bool bSwapDiag ); + + /** Mirrors the entire array vertically. + @param bMirrorStyles + true = Swap primary and secondary line of all horizontal double frame borders. + @param bSwapDiag + true = Swap top-left to bottom-right and bottom-left to top-right frame borders. */ + void MirrorSelfY( bool bMirrorStyles, bool bSwapDiag ); + + // drawing ---------------------------------------------------------------- + + /** Draws the cell (nCol,nRow), if it is inside the clipping range. + @param pForceColor + If not NULL, only this color will be used to draw all frame borders. */ + void DrawCell( OutputDevice& rDev, size_t nCol, size_t nRow, + const Color* pForceColor = 0 ) const; + + /** Draws the part of the specified range, that is inside the clipping range. + @param pForceColor + If not NULL, only this color will be used to draw all frame borders. */ + void DrawRange( OutputDevice& rDev, + size_t nFirstCol, size_t nFirstRow, + size_t nLastCol, size_t nLastRow, + const Color* pForceColor = 0 ) const; + + /** Draws the part of the array, that is inside the clipping range. + @param pForceColor + If not NULL, only this color will be used to draw all frame borders. */ + void DrawArray( OutputDevice& rDev, const Color* pForceColor = 0 ) const; + + // ------------------------------------------------------------------------ + +private: + typedef std::auto_ptr< ArrayImpl > ArrayImplPtr; + + ArrayImplPtr mxImpl; +}; + +// ============================================================================ + +} // namespace frame +} // namespace svx + +#endif + diff --git a/svx/inc/svx/frmdir.hxx b/svx/inc/svx/frmdir.hxx new file mode 100644 index 000000000000..04cdcc78ee23 --- /dev/null +++ b/svx/inc/svx/frmdir.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: frmdir.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FRMDIR_HXX +#define _SVX_FRMDIR_HXX + +// ---------------------------------------------------------------------------- + +/** Defines possible text directions in frames. */ +enum SvxFrameDirection +{ + /** Horizontal, from left to right, from top to bottom + (typical for western languages). */ + FRMDIR_HORI_LEFT_TOP, + + /** Horizontal, from right to left, from top to bottom + (typical for ararbic/hebrew languages). */ + FRMDIR_HORI_RIGHT_TOP, + + /** Vertical, from top to bottom, from right to left + (typical for asian languages). */ + FRMDIR_VERT_TOP_RIGHT, + + /** Vertical, from top to bottom, from left to right + (typical for mongol language). */ + FRMDIR_VERT_TOP_LEFT, + + /** Use the value from the environment, can only be used in frames. */ + FRMDIR_ENVIRONMENT +}; + +// ---------------------------------------------------------------------------- + +#endif // #ifndef _SVX_FRMDIR_HXX + + diff --git a/svx/inc/svx/frmdiritem.hxx b/svx/inc/svx/frmdiritem.hxx new file mode 100644 index 000000000000..e82638c94d95 --- /dev/null +++ b/svx/inc/svx/frmdiritem.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: frmdiritem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_FRMDIRITEM_HXX +#define _SVX_FRMDIRITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/intitem.hxx> +#include <svx/frmdir.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxFrameDirectionItem ---------------------------------------------- + +/* [Description] + + This item defines a frame direction, which place the content inside + a frame. It exist different kind of directions which are used to the + layout text for Western, CJK and CTL languages. +*/ + +class SVX_DLLPUBLIC SvxFrameDirectionItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + + SvxFrameDirectionItem( USHORT nWhich ); + SvxFrameDirectionItem( SvxFrameDirection nValue /*= FRMDIR_HORI_LEFT_TOP*/, + USHORT nWhich ); + virtual ~SvxFrameDirectionItem(); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual int operator==( const SfxPoolItem& ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * = 0 ) const; + + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId ) const; + + inline SvxFrameDirectionItem& operator=( const SvxFrameDirectionItem& rItem ) + { + SetValue( rItem.GetValue() ); + return *this; + } +}; + +#endif // #ifndef _SVX_FRMDIRITEM_HXX + diff --git a/svx/inc/svx/frmdirlbox.hxx b/svx/inc/svx/frmdirlbox.hxx new file mode 100644 index 000000000000..872d6ddd5423 --- /dev/null +++ b/svx/inc/svx/frmdirlbox.hxx @@ -0,0 +1,109 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: frmdirlbox.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FRMDIRLBOX_HXX +#define _SVX_FRMDIRLBOX_HXX + +#ifndef _LSTBOX_HXX +#include <vcl/lstbox.hxx> +#endif +#include <sfx2/itemconnect.hxx> +#include <svx/frmdir.hxx> +#include "svx/svxdllapi.h" + +class SvxFrameDirectionItem; + +namespace svx { + +// ============================================================================ + +/** This listbox contains entries to select horizontal text direction. + + The control works on the SvxFrameDirection enumeration (i.e. left-to-right, + right-to-left), used i.e. in conjunction with the SvxFrameDirectionItem. + */ +class SVX_DLLPUBLIC FrameDirectionListBox : public ListBox +{ +public: + explicit FrameDirectionListBox( Window* pParent, WinBits nStyle = WB_BORDER ); + explicit FrameDirectionListBox( Window* pParent, const ResId& rResId ); + virtual ~FrameDirectionListBox(); + + /** Inserts a string with corresponding direction enum into the listbox. */ + void InsertEntryValue( + const String& rString, + SvxFrameDirection eDirection, + sal_uInt16 nPos = LISTBOX_APPEND ); + /** Removes the entry, that represents the specified frame direction. */ + void RemoveEntryValue( SvxFrameDirection eDirection ); + + /** Selects the specified frame direction. */ + void SelectEntryValue( SvxFrameDirection eDirection ); + /** Returns the currently selected frame direction. */ + SvxFrameDirection GetSelectEntryValue() const; + + /** Saves the currently selected frame direction. */ + inline void SaveValue() { meSaveValue = GetSelectEntryValue(); } + /** Returns the frame direction saved with SaveValue(). */ + inline SvxFrameDirection GetSavedValue() const { return meSaveValue; } + +private: + SvxFrameDirection meSaveValue; /// Saved value for later comparison. +}; + +typedef FrameDirectionListBox FrameDirListBox; + +// ============================================================================ + +/** Wrapper for usage of a FrameDirectionListBox in item connections. */ +class SVX_DLLPUBLIC FrameDirListBoxWrapper : public sfx::SingleControlWrapper< FrameDirListBox, SvxFrameDirection > +{ +public: + explicit FrameDirListBoxWrapper( FrameDirListBox& rListBox ); + + virtual bool IsControlDontKnow() const; + virtual void SetControlDontKnow( bool bSet ); + + virtual SvxFrameDirection GetControlValue() const; + virtual void SetControlValue( SvxFrameDirection eValue ); +}; + +/** Wrapper for usage of a SvxFrameDirectionItem in item connections. */ +typedef sfx::ValueItemWrapper< SvxFrameDirectionItem, SvxFrameDirection, sal_uInt16 > FrameDirItemWrapper; + +/** An item<->control connection for a FrameDirectionListBox. */ +typedef sfx::ItemControlConnection< FrameDirItemWrapper, FrameDirListBoxWrapper > FrameDirListBoxConnection; + +// ============================================================================ + +} // namespace svx + +#endif + diff --git a/svx/inc/svx/frmsel.hxx b/svx/inc/svx/frmsel.hxx new file mode 100644 index 000000000000..fa7208de1a31 --- /dev/null +++ b/svx/inc/svx/frmsel.hxx @@ -0,0 +1,207 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: frmsel.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_FRMSEL_HXX +#define SVX_FRMSEL_HXX + +#include <memory> +#include <tools/color.hxx> +#include <vcl/ctrl.hxx> +#include <vcl/bitmap.hxx> +#include <svx/framebordertype.hxx> +#include "svx/svxdllapi.h" + +class SvxBorderLine; + +namespace svx { + +struct FrameSelectorImpl; + +// ============================================================================ + +typedef int FrameSelFlags; + +const FrameSelFlags FRAMESEL_NONE = 0x0000; +/** If set, the left frame border is enabled. */ +const FrameSelFlags FRAMESEL_LEFT = 0x0001; +/** If set, the right frame border is enabled. */ +const FrameSelFlags FRAMESEL_RIGHT = 0x0002; +/** If set, the top frame border is enabled. */ +const FrameSelFlags FRAMESEL_TOP = 0x0004; +/** If set, the bottom frame border is enabled. */ +const FrameSelFlags FRAMESEL_BOTTOM = 0x0008; +/** If set, the inner horizontal frame border is enabled. */ +const FrameSelFlags FRAMESEL_INNER_HOR = 0x0010; +/** If set, the inner vertical frame border is enabled. */ +const FrameSelFlags FRAMESEL_INNER_VER = 0x0020; +/** If set, the top-left to bottom-right diagonal frame border is enabled. */ +const FrameSelFlags FRAMESEL_DIAG_TLBR = 0x0040; +/** If set, the bottom-left to top-right diagonal frame border is enabled. */ +const FrameSelFlags FRAMESEL_DIAG_BLTR = 0x0080; + +/** If set, all four outer frame borders are enabled. */ +const FrameSelFlags FRAMESEL_OUTER = FRAMESEL_LEFT|FRAMESEL_RIGHT|FRAMESEL_TOP|FRAMESEL_BOTTOM; +/** If set, both inner frame borders are enabled. */ +const FrameSelFlags FRAMESEL_INNER = FRAMESEL_INNER_HOR|FRAMESEL_INNER_VER; +/** If set, both diagonal frame borders are enabled. */ +const FrameSelFlags FRAMESEL_DIAGONAL = FRAMESEL_DIAG_TLBR|FRAMESEL_DIAG_BLTR; + +/** If set, all frame borders will support the don't care state. */ +const FrameSelFlags FRAMESEL_DONTCARE = 0x0100; + +// ---------------------------------------------------------------------------- + +/** All possible states of a frame border. */ +enum FrameBorderState +{ + FRAMESTATE_SHOW, /// Frame border has a visible style. + FRAMESTATE_HIDE, /// Frame border is hidden (off). + FRAMESTATE_DONTCARE /// Frame border is in don't care state (if enabled). +}; + +// ============================================================================ + +class SVX_DLLPUBLIC FrameSelector : public Control +{ +public: + explicit FrameSelector( Window* pParent, const ResId& rResId ); + virtual ~FrameSelector(); + + /** Initializes the control, enables/disables frame borders according to flags. */ + void Initialize( FrameSelFlags nFlags ); + + // enabled frame borders -------------------------------------------------- + + /** Returns true, if the specified frame border is enabled. */ + bool IsBorderEnabled( FrameBorderType eBorder ) const; + /** Returns the number of enabled frame borders. */ + sal_Int32 GetEnabledBorderCount() const; + /** Returns the border type from the passed index (counts only enabled frame borders). */ + FrameBorderType GetEnabledBorderType( sal_Int32 nIndex ) const; + /** Returns the index of a frame border (counts only enabled borders) from passed type. */ + sal_Int32 GetEnabledBorderIndex( FrameBorderType eBorder ) const; + + // frame border state and style ------------------------------------------- + + /** Returns true, if the control supports the "don't care" frame border state. */ + bool SupportsDontCareState() const; + + /** Returns the state (visible/hidden/don't care) of the specified frame border. */ + FrameBorderState GetFrameBorderState( FrameBorderType eBorder ) const; + /** Returns the style of the specified frame border, if it is visible. */ + const SvxBorderLine* GetFrameBorderStyle( FrameBorderType eBorder ) const; + + /** Shows the specified frame border using the passed style, or hides it, if pStyle is 0. */ + void ShowBorder( FrameBorderType eBorder, const SvxBorderLine* pStyle ); + /** Sets the specified frame border to "don't care" state. */ + void SetBorderDontCare( FrameBorderType eBorder ); + + /** Returns true, if any enabled frame border has a visible style (not "don't care"). */ + bool IsAnyBorderVisible() const; + /** Hides all enabled frame borders. */ + void HideAllBorders(); + + /** Returns true, if all visible frame borders have equal widths. + @descr Ignores hidden and "don't care" frame borders. On success, + returns the widths in the passed parameters. */ + bool GetVisibleWidth( USHORT& rnPrim, USHORT& rnDist, USHORT& rnSec ) const; + /** Returns true, if all visible frame borders have equal color. + @descr Ignores hidden and "don't care" frame borders. On success, + returns the color in the passed parameter. */ + bool GetVisibleColor( Color& rColor ) const; + + // frame border selection ------------------------------------------------- + + /** Returns the current selection handler. */ + const Link& GetSelectHdl() const; + /** Sets the passed handler that is called if the selection of the control changes. */ + void SetSelectHdl( const Link& rHdl ); + + /** Returns true, if the specified frame border is selected. */ + bool IsBorderSelected( FrameBorderType eBorder ) const; + /** Selects or deselects the specified frame border. */ + void SelectBorder( FrameBorderType eBorder, bool bSelect = true ); + /** Deselects the specified frame border. */ + inline void DeselectBorder( FrameBorderType eBorder ) { SelectBorder( eBorder, false ); } + + /** Returns true, if any of the enabled frame borders is selected. */ + bool IsAnyBorderSelected() const; + /** Selects or deselects all frame borders. */ + void SelectAllBorders( bool bSelect = true ); + /** Deselects all frame borders. */ + inline void DeselectAllBorders() { SelectAllBorders( false ); } + + /** Selects or deselects all visible frame borders (ignores hidden and "don't care" borders). */ + void SelectAllVisibleBorders( bool bSelect = true ); + + /** Sets the passed line widths to all selected frame borders (in twips). */ + void SetStyleToSelection( USHORT nPrim, USHORT nDist, USHORT nSec ); + /** Sets the passed color to all selected frame borders. */ + void SetColorToSelection( const Color& rColor ); + + // accessibility ---------------------------------------------------------- + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + CreateAccessible(); + + /** Returns the accessibility child object of the specified frame border (if enabled). */ + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + GetChildAccessible( FrameBorderType eBorder ); + /** Returns the accessibility child object with specified index (counts enabled frame borders only). */ + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + GetChildAccessible( sal_Int32 nIndex ); + /** Returns the accessibility child object at the specified position (relative to control). */ + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + GetChildAccessible( const Point& rPos ); + + /** Returns true, if the passed point is inside the click area of any enabled frame border. */ + bool ContainsClickPoint( const Point& rPos ) const; + /** Returns the bounding rectangle of the specified frame border (if enabled). */ + Rectangle GetClickBoundRect( FrameBorderType eBorder ) const; + + // ------------------------------------------------------------------------ +protected: + virtual void Paint( const Rectangle& rRect ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void GetFocus(); + virtual void LoseFocus(); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +private: + std::auto_ptr< FrameSelectorImpl > mxImpl; +}; + +// ============================================================================ + +} // namespace svx + +#endif + diff --git a/svx/inc/svx/gallery1.hxx b/svx/inc/svx/gallery1.hxx new file mode 100644 index 000000000000..04ae4814c91d --- /dev/null +++ b/svx/inc/svx/gallery1.hxx @@ -0,0 +1,186 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: gallery1.hxx,v $ + * $Revision: 1.8.216.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_GALLERY1_HXX_ +#define _SVX_GALLERY1_HXX_ + +#include <tools/string.hxx> +#include <tools/list.hxx> +#include <tools/urlobj.hxx> +#include <svl/brdcst.hxx> +#include "svx/svxdllapi.h" +//#include "gallery.hrc" + +#include <cstdio> +#include <list> + +// --------------------- +// - GalleryThemeEntry - +// --------------------- + +class SvStream; + +class GalleryThemeEntry +{ +private: + + String aName; + INetURLObject aThmURL; + INetURLObject aSdgURL; + INetURLObject aSdvURL; + UINT32 nFileNumber; + UINT32 nId; + BOOL bReadOnly; + BOOL bImported; + BOOL bModified; + BOOL bThemeNameFromResource; + + GalleryThemeEntry(); + INetURLObject ImplGetURLIgnoreCase( const INetURLObject& rURL ) const; + +public: + + GalleryThemeEntry( const INetURLObject& rBaseURL, const String& rName, + UINT32 nFileNumber, BOOL bReadOnly, BOOL bImported, + BOOL bNewFile, UINT32 nId, BOOL bThemeNameFromResource ); + ~GalleryThemeEntry() {}; + + const String& GetThemeName() const { return aName; } + UINT32 GetFileNumber() const { return nFileNumber; } + + const INetURLObject& GetThmURL() const { return aThmURL; } + const INetURLObject& GetSdgURL() const { return aSdgURL; } + const INetURLObject& GetSdvURL() const { return aSdvURL; } + + BOOL IsImported() const { return bImported; } + BOOL IsReadOnly() const { return bReadOnly; } + BOOL IsDefault() const; + + BOOL IsHidden() const { return aName.SearchAscii( "private://gallery/hidden/" ) == 0; } + + BOOL IsModified() const { return bModified; } + void SetModified( BOOL bSet ) { bModified = ( bSet && !IsImported() && !IsReadOnly() ); } + + void SetName( const String& rNewName ); + BOOL IsNameFromResource() const { return bThemeNameFromResource; } + + UINT32 GetId() const { return nId; } + void SetId( UINT32 nNewId, BOOL bResetThemeName ); +}; + +DECLARE_LIST( GalleryThemeList, GalleryThemeEntry* ) + +// --------------------------- +// - GalleryImportThemeEntry - +// --------------------------- + +struct GalleryImportThemeEntry +{ + String aThemeName; + String aUIName; + INetURLObject aURL; + String aImportName; +}; +DECLARE_LIST( GalleryImportThemeList, GalleryImportThemeEntry* ) + +// ----------------------------------------------------------------------------- + +SvStream& operator<<( SvStream& rOut, const GalleryImportThemeEntry& rEntry ); +SvStream& operator>>( SvStream& rIn, GalleryImportThemeEntry& rEntry ); + +// ----------- +// - Gallery - +// ----------- + +class SfxListener; +class GalleryTheme; + +class Gallery : public SfxBroadcaster +{ + // only for gengal utility! + friend Gallery* createGallery( const rtl::OUString& ); + friend void disposeGallery( Gallery* ); + +private: + + GalleryThemeList aThemeList; + GalleryImportThemeList aImportList; + List aThemeCache; + INetURLObject aRelURL; + INetURLObject aUserURL; + rtl_TextEncoding nReadTextEncoding; + ULONG nLastFileNumber; + BOOL bMultiPath; + + void ImplLoad( const String& rMultiPath ); + void ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbIsReadOnly ); + void ImplLoadImports(); + void ImplWriteImportList(); + + SVX_DLLPUBLIC GalleryThemeEntry* ImplGetThemeEntry( const String& rThemeName ); + GalleryThemeEntry* ImplGetThemeEntry( ULONG nThemeId ); + GalleryImportThemeEntry* ImplGetImportThemeEntry( const String& rImportName ); + + GalleryTheme* ImplGetCachedTheme( const GalleryThemeEntry* pThemeEntry ); + void ImplDeleteCachedTheme( GalleryTheme* pTheme ); + + SVX_DLLPUBLIC Gallery( const String& rMultiPath ); + SVX_DLLPUBLIC ~Gallery(); + +public: + + SVX_DLLPUBLIC static Gallery* GetGalleryInstance(); + + ULONG GetThemeCount() const { return aThemeList.Count(); } + const GalleryThemeEntry* GetThemeInfo( ULONG nPos ) { return aThemeList.GetObject( nPos ); } + const GalleryThemeEntry* GetThemeInfo( const String& rThemeName ) { return ImplGetThemeEntry( rThemeName ); } + + SVX_DLLPUBLIC BOOL HasTheme( const String& rThemeName ); + String GetThemeName( ULONG nThemeId ) const; + + SVX_DLLPUBLIC BOOL CreateTheme( const String& rThemeName, UINT32 nNumFrom = 0 ); + BOOL CreateImportTheme( const INetURLObject& rURL, const String& rFileName ); + BOOL RenameTheme( const String& rOldName, const String& rNewName ); + SVX_DLLPUBLIC BOOL RemoveTheme( const String& rThemeName ); + + SVX_DLLPUBLIC GalleryTheme* AcquireTheme( const String& rThemeName, SfxListener& rListener ); + SVX_DLLPUBLIC void ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener ); + +public: + + INetURLObject GetImportURL( const String& rThemeName ); + + const INetURLObject& GetUserURL() const { return aUserURL; } + const INetURLObject& GetRelativeURL() const { return aRelURL; } + + BOOL IsMultiPath() const { return bMultiPath; } +}; + +#endif // _SVX_GALLERY1_HXX_ diff --git a/svx/inc/svx/galmisc.hxx b/svx/inc/svx/galmisc.hxx new file mode 100644 index 000000000000..752c7cc005d7 --- /dev/null +++ b/svx/inc/svx/galmisc.hxx @@ -0,0 +1,265 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: galmisc.hxx,v $ + * $Revision: 1.19 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_GALMISC_HXX_ +#define _SVX_GALMISC_HXX_ + +#include <sot/storage.hxx> +#include <tools/urlobj.hxx> +#include <svtools/imap.hxx> +#include <svl/hint.hxx> +#include <svtools/transfer.hxx> +#include <svx/svdobj.hxx> +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/awt/XProgressMonitor.hpp> +#include "svx/svxdllapi.h" +#include <tools/date.hxx> +#include <tools/time.hxx> + +// ------------ +// - Forwards - +// ------------ + +class GalleryTheme; + +// ---------------- +// - ExchangeData - +// ---------------- + +struct ExchangeData +{ + GalleryTheme* pTheme; + String aEditedTitle; + Date aThemeChangeDate; + Time aThemeChangeTime; +}; + +enum SgaObjKind +{ + SGA_OBJ_NONE = 0, // Abstraktes Objekt + SGA_OBJ_BMP = 1, // Bitmap-Objekt + SGA_OBJ_SOUND = 2, // Sound-Objekt + SGA_OBJ_VIDEO = 3, // Video-Objekt + SGA_OBJ_ANIM = 4, // Animations-Objekt + SGA_OBJ_SVDRAW = 5, // Svdraw-Objekt + SGA_OBJ_INET = 6 // Grafik aus dem Internet +}; + +// ----------- +// - Defines - +// ----------- + +#define IV_IMAPINFO (UINT32('S')*0x00000001+UINT32('D')*0x00000100+UINT32('U')*0x00010000+UINT32('D')*0x01000000) +#define ID_IMAPINFO 2 + +#define USERDATA_HDL() (LINK(this,SgaUserDataFactory,MakeUserData)) + +#define GAL_RESID( nId ) ResId( nId, *GetGalleryResMgr() ) +#define STREAMBUF_SIZE 16384L + +#define SGA_IMPORT_NONE 0x0000 +#define SGA_IMPORT_FILE 0x0001 +#define SGA_IMPORT_INET 0x0002 + +#define GALLERY_PROGRESS_RANGE 10000 + +#define GALLERY_FG_COLOR Application::GetSettings().GetStyleSettings().GetWindowTextColor() +#define GALLERY_BG_COLOR Application::GetSettings().GetStyleSettings().GetWindowColor() +#define GALLERY_DLG_COLOR Application::GetSettings().GetStyleSettings().GetDialogColor() + +// ------------- +// - Functions - +// ------------- + +class ResMgr; +class String; +class SvStream; +class Graphic; +class FmFormModel; +class ImageMap; +class Gallery; + +SVX_DLLPUBLIC ResMgr* GetGalleryResMgr(); +USHORT GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, String& rFilterName, BOOL bShowProgress = FALSE ); +BOOL GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ); +BOOL CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap ); +SVX_DLLPUBLIC String GetReducedString( const INetURLObject& rURL, ULONG nMaxLen ); +String GetSvDrawStreamNameFromURL( const INetURLObject& rSvDrawObjURL ); + +BOOL FileExists( const INetURLObject& rURL ); +BOOL CreateDir( const INetURLObject& rURL ); +BOOL CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ); +BOOL KillFile( const INetURLObject& rURL ); +BitmapEx GalleryResGetBitmapEx( sal_uInt32 nId ); + + +// --------------- +// - SgaIMapInfo - +// --------------- + +class SgaIMapInfo : public SdrObjUserData, public SfxListener +{ + ImageMap aImageMap; + +public: + SgaIMapInfo() : SdrObjUserData( IV_IMAPINFO, ID_IMAPINFO, 0 ) {}; + + SgaIMapInfo( const ImageMap& rImageMap) : + SdrObjUserData( IV_IMAPINFO, ID_IMAPINFO, 0 ), + aImageMap( rImageMap ) {}; + + virtual ~SgaIMapInfo() {}; + + virtual SdrObjUserData* Clone( SdrObject* ) const + { + SgaIMapInfo* pInfo = new SgaIMapInfo; + pInfo->aImageMap = aImageMap; + return pInfo; + } + + const ImageMap& GetImageMap() const { return aImageMap; } +}; + +// ---------------------- +// - SgaUserDataFactory - +// ---------------------- + +class SgaUserDataFactory +{ +public: + SgaUserDataFactory() { SdrObjFactory::InsertMakeUserDataHdl( USERDATA_HDL() ); } + ~SgaUserDataFactory() { SdrObjFactory::RemoveMakeUserDataHdl( USERDATA_HDL() ); } + + DECL_LINK( MakeUserData, SdrObjFactory* ); +}; + +// ------------------- +// - GalleryProgress - +// ------------------- + +class GraphicFilter; + +class SVX_DLLPUBLIC GalleryProgress +{ + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XProgressBar > mxProgressBar; + GraphicFilter* mpFilter; + + public: + + GalleryProgress( GraphicFilter* pFilter = NULL ); + ~GalleryProgress(); + + void Update( ULONG nVal, ULONG nMaxVal ); +}; + +// ----------------------- +// - GalleryTransferable - +// ----------------------- + +class Gallery; +class GalleryTheme; +class GraphicObject; + +class GalleryTransferable : public TransferableHelper +{ +friend class GalleryTheme; +using TransferableHelper::CopyToClipboard; + +private: + + GalleryTheme* mpTheme; + SgaObjKind meObjectKind; + sal_uInt32 mnObjectPos; + SotStorageStreamRef mxModelStream; + GraphicObject* mpGraphicObject; + ImageMap* mpImageMap; + INetURLObject* mpURL; + +protected: + + GalleryTransferable( GalleryTheme* pTheme, ULONG nObjectPos, bool bLazy ); + ~GalleryTransferable(); + + void InitData( bool bLazy ); + + // TransferableHelper + virtual void AddSupportedFormats(); + virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + virtual void DragFinished( sal_Int8 nDropAction ); + virtual void ObjectReleased(); + + void CopyToClipboard( Window* pWindow ); + void StartDrag( Window* pWindow, sal_Int8 nDragSourceActions, + sal_Int32 nDragPointer = DND_POINTER_NONE, + sal_Int32 nDragImage = DND_IMAGE_NONE ); +}; + +// --------------- +// - GalleryHint - +// --------------- + +#define GALLERY_HINT_NONE 0x00000000 +#define GALLERY_HINT_CLOSE_THEME 0x00000001 +#define GALLERY_HINT_THEME_REMOVED 0x00000002 +#define GALLERY_HINT_THEME_RENAMED 0x00000004 +#define GALLERY_HINT_THEME_CREATED 0x00000008 +#define GALLERY_HINT_THEME_UPDATEVIEW 0x00000010 +#define GALLERY_HINT_CLOSE_OBJECT 0x00000020 +#define GALLERY_HINT_OBJECT_REMOVED 0x00000040 + +// ----------------------------------------------------------------------------- + +class GalleryHint : public SfxHint +{ +private: + + ULONG mnType; + String maThemeName; + String maStringData; + ULONG mnData1; + ULONG mnData2; + +public: + + GalleryHint( ULONG nType, const String& rThemeName, ULONG nData1 = 0UL, ULONG nData2 = 0UL ) : + mnType( nType ), maThemeName( rThemeName ), mnData1( nData1 ), mnData2( nData2 ) {} + + GalleryHint( ULONG nType, const String& rThemeName, const String& rStringData, ULONG nData1 = 0UL, ULONG nData2 = 0UL ) : + mnType( nType ), maThemeName( rThemeName ), maStringData( rStringData ), mnData1( nData1 ), mnData2( nData2 ) {} + + ULONG GetType() const { return mnType; } + const String& GetThemeName() const { return maThemeName; } + const String& GetStringData() const { return maStringData; } + ULONG GetData1() const { return mnData1; } + ULONG GetData2() const { return mnData2; } +}; + + #endif diff --git a/svx/inc/svx/graphctl.hxx b/svx/inc/svx/graphctl.hxx new file mode 100644 index 000000000000..7dc65effaf1e --- /dev/null +++ b/svx/inc/svx/graphctl.hxx @@ -0,0 +1,196 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: graphctl.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _GRAPHCTL_HXX +#define _GRAPHCTL_HXX + +// include --------------------------------------------------------------- + +#include <vcl/ctrl.hxx> +#include <vcl/graph.hxx> +#include "svx/svxdllapi.h" + +#include <svx/svdview.hxx> +#include <svx/svdobj.hxx> + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class GraphCtrlUserCall; +class SvxGraphCtrlAccessibleContext; + +#define WB_SDRMODE ((WinBits)0x0080) +#define WB_ANIMATION ((WinBits)0x0100) + +class SVX_DLLPUBLIC GraphCtrl : public Control +{ + friend class GraphCtrlView; + friend class GraphCtrlUserCall; + + Graphic aGraphic; + Timer aUpdateTimer; + Link aMousePosLink; + Link aGraphSizeLink; + Link aMarkObjLink; + Link aUpdateLink; + MapMode aMap100; + Size aGraphSize; + Point aMousePos; + GraphCtrlUserCall* pUserCall; + WinBits nWinStyle; + SdrObjKind eObjKind; + USHORT nPolyEdit; + BOOL bEditMode; + BOOL bSdrMode; + BOOL bAnim; + + DECL_LINK( UpdateHdl, Timer* ); + + SvxGraphCtrlAccessibleContext* mpAccContext; + +protected: + + SdrModel* pModel; + SdrView* pView; + + virtual void Paint( const Rectangle& rRect ); + virtual void Resize(); + virtual void KeyInput(const KeyEvent& rKEvt); + virtual void MouseButtonDown(const MouseEvent& rMEvt); + virtual void MouseButtonUp(const MouseEvent& rMEvt); + virtual void MouseMove(const MouseEvent& rMEvt); + + virtual void InitSdrModel(); + + virtual void SdrObjCreated( const SdrObject& rObj ); + virtual void SdrObjChanged( const SdrObject& rObj ); + virtual void MarkListHasChanged(); + + SdrObjUserCall* GetSdrUserCall() { return (SdrObjUserCall*) pUserCall; } + +public: + + GraphCtrl( Window* pParent, const WinBits nWinBits = 0 ); + GraphCtrl( Window* pParent, const ResId& rResId ); + ~GraphCtrl(); + + void SetWinStyle( WinBits nWinBits ); + WinBits GetWinStyle() const { return nWinStyle; } + + void SetGraphic( const Graphic& rGraphic, BOOL bNewModel = TRUE ); + const Graphic& GetGraphic() const { return aGraphic; } + const Size& GetGraphicSize() const { return aGraphSize; } + + const Point& GetMousePos() const { return aMousePos; } + + void SetEditMode( const BOOL bEditMode ); + BOOL IsEditMode() const { return bEditMode; } + + void SetPolyEditMode( const USHORT nPolyEdit ); + USHORT GetPolyEditMode() const { return nPolyEdit; } + + void SetObjKind( const SdrObjKind eObjKind ); + SdrObjKind GetObjKind() const { return eObjKind; } + + SdrModel* GetSdrModel() const { return pModel; } + SdrView* GetSdrView() const { return pView; } + SdrObject* GetSelectedSdrObject() const; + BOOL IsChanged() const { return bSdrMode ? pModel->IsChanged() : FALSE; } + + void SetMousePosLink( const Link& rLink ) { aMousePosLink = rLink; } + const Link& GetMousePosLink() const { return aMousePosLink; } + + void SetGraphSizeLink( const Link& rLink ) { aGraphSizeLink = rLink; } + const Link& GetGraphSizeLink() const { return aGraphSizeLink; } + + void SetMarkObjLink( const Link& rLink ) { aMarkObjLink = rLink; } + const Link& GetMarkObjLink() const { return aMarkObjLink; } + + void SetUpdateLink( const Link& rLink ) { aUpdateLink = rLink; } + const Link& GetUpdateLink() const { return aUpdateLink; } + + static String GetStringFromDouble( const double& rDouble ); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); +}; + +//#if 0 // _SOLAR__PRIVATE + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class GraphCtrlUserCall : public SdrObjUserCall +{ + GraphCtrl& rWin; + +public: + + GraphCtrlUserCall( GraphCtrl& rGraphWin ) : rWin( rGraphWin ) {}; + virtual ~GraphCtrlUserCall() {}; + + virtual void Changed( const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect ); +}; + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class GraphCtrlView : public SdrView +{ + GraphCtrl& rGraphCtrl; + +protected: + + virtual void MarkListHasChanged() + { + SdrView::MarkListHasChanged(); + rGraphCtrl.MarkListHasChanged(); + } + +public: + + GraphCtrlView( SdrModel* pModel, GraphCtrl* pWindow) : + SdrView ( pModel, pWindow ), + rGraphCtrl ( *pWindow ) {}; + + virtual ~GraphCtrlView() {}; +}; + +//#endif // __PRIVATE + +#endif // _GRAPHCTL_HXX + diff --git a/svx/inc/svx/grfcrop.hxx b/svx/inc/svx/grfcrop.hxx new file mode 100644 index 000000000000..7281bc559b4d --- /dev/null +++ b/svx/inc/svx/grfcrop.hxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: grfcrop.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_GRFCROP_HXX +#define _SVX_GRFCROP_HXX + +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + + +#define GRFCROP_VERSION_SWDEFAULT 0 +#define GRFCROP_VERSION_MOVETOSVX 1 + +class SVX_DLLPUBLIC SvxGrfCrop : public SfxPoolItem +{ + sal_Int32 nLeft, nRight, nTop, nBottom; +public: + SvxGrfCrop( USHORT ); + SvxGrfCrop( sal_Int32 nLeft, sal_Int32 nRight, + sal_Int32 nTop, sal_Int32 nBottom, + USHORT ); + virtual ~SvxGrfCrop(); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const; + virtual SvStream& Store(SvStream &, USHORT nIVer) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper* pIntl = 0 ) const; + virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId = 0 ) const; + virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId = 0 ); + + void SetLeft( sal_Int32 nVal ) { nLeft = nVal; } + void SetRight( sal_Int32 nVal ) { nRight = nVal; } + void SetTop( sal_Int32 nVal ) { nTop = nVal; } + void SetBottom( sal_Int32 nVal ) { nBottom = nVal; } + + sal_Int32 GetLeft() const { return nLeft; } + sal_Int32 GetRight() const { return nRight; } + sal_Int32 GetTop() const { return nTop; } + sal_Int32 GetBottom() const { return nBottom; } + + inline SvxGrfCrop& operator=( const SvxGrfCrop& rCrop ) + { + nLeft = rCrop.GetLeft(); nTop = rCrop.GetTop(); + nRight = rCrop.GetRight(); nBottom = rCrop.GetBottom(); + return *this; + } +}; + + +#endif // _GRFATR_HXX diff --git a/svx/inc/svx/grfflt.hxx b/svx/inc/svx/grfflt.hxx new file mode 100644 index 000000000000..608a6561e97c --- /dev/null +++ b/svx/inc/svx/grfflt.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: grfflt.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_GRFFLT_HXX +#define _SVX_GRFFLT_HXX + +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#include <vcl/timer.hxx> +#include <vcl/dialog.hxx> +#include <vcl/group.hxx> +#include <vcl/salbtype.hxx> +#include <goodies/grfmgr.hxx> +#include <svx/graphctl.hxx> +#include <svx/dlgctrl.hxx> +#include <svx/rectenum.hxx> +#include "svx/svxdllapi.h" + +// --------------- +// - Error codes - +// --------------- + +#define SVX_GRAPHICFILTER_ERRCODE_NONE 0x00000000 +#define SVX_GRAPHICFILTER_UNSUPPORTED_GRAPHICTYPE 0x00000001 +#define SVX_GRAPHICFILTER_UNSUPPORTED_SLOT 0x00000002 + +// -------------------- +// - SvxGraphicFilter - +// -------------------- + +class SfxRequest; +class SfxItemSet; + +class SVX_DLLPUBLIC SvxGraphicFilter +{ +public: + + static ULONG ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& rFilterObject ); + static void DisableGraphicFilterSlots( SfxItemSet& rSet ); +}; + +#endif diff --git a/svx/inc/svx/gridctrl.hxx b/svx/inc/svx/gridctrl.hxx new file mode 100644 index 000000000000..834ea17eaa1f --- /dev/null +++ b/svx/inc/svx/gridctrl.hxx @@ -0,0 +1,616 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: gridctrl.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_GRIDCTRL_HXX +#define _SVX_GRIDCTRL_HXX + +#include <tools/list.hxx> +#include <com/sun/star/sdbc/XRowSet.hpp> +#include <com/sun/star/beans/PropertyChangeEvent.hpp> +#include <com/sun/star/util/XNumberFormatter.hpp> +#include <com/sun/star/util/Date.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> + +#ifndef _SV_BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#include <tools/date.hxx> +#include <tools/ref.hxx> +#include <svtools/editbrowsebox.hxx> +#include <vos/mutex.hxx> +#include <comphelper/propmultiplex.hxx> +#include <svtools/transfer.hxx> +#include "svx/svxdllapi.h" + +class DbGridControl; +class CursorWrapper; + +sal_Bool CompareBookmark(const ::com::sun::star::uno::Any& aLeft, const ::com::sun::star::uno::Any& aRight); + +namespace svxform +{ + class DataColumn; +} +DECLARE_LIST(DbDataColumns, ::svxform::DataColumn*) + +enum GridRowStatus +{ + GRS_CLEAN, + GRS_MODIFIED, + GRS_DELETED, + GRS_INVALID +}; + +//================================================================== +// DbGridRow, Zeilenbeschreibung +//================================================================== + +class DbGridRow : public SvRefBase +{ + ::com::sun::star::uno::Any m_aBookmark; // ::com::sun::star::text::Bookmark der Zeile, kann gesetzt sein + DbDataColumns m_aVariants; + GridRowStatus m_eStatus; + sal_Bool m_bIsNew; + // Zeile ist nicht mehr gueltig, + // wird bei der naechsten positionierung entfernt +public: + DbGridRow():m_eStatus(GRS_CLEAN), m_bIsNew(sal_True) { } + DbGridRow(CursorWrapper* pCur, sal_Bool bPaintCursor); + void SetState(CursorWrapper* pCur, sal_Bool bPaintCursor); + + ~DbGridRow(); + + // da GetField auf Geschwindigkeit getuned ist vorher immer noch hasField verwenden + sal_Bool HasField(sal_uInt32 nPos) const {return nPos < m_aVariants.Count();} + const ::svxform::DataColumn& GetField(sal_uInt32 nPos) const { return *m_aVariants.GetObject(nPos); } + + void SetStatus(GridRowStatus _eStat) { m_eStatus = _eStat; } + GridRowStatus GetStatus() const { return m_eStatus; } + void SetNew(sal_Bool _bNew) { m_bIsNew = _bNew; } + sal_Bool IsNew() const { return m_bIsNew; } + + const ::com::sun::star::uno::Any& GetBookmark() const { return m_aBookmark; } + + sal_Bool IsValid() const { return m_eStatus == GRS_CLEAN || m_eStatus == GRS_MODIFIED; } + sal_Bool IsModified() const { return m_eStatus == GRS_MODIFIED; } +}; + +SV_DECL_REF(DbGridRow) + +//================================================================== +// DbGridControl +//================================================================== +class DbGridColumn; +DECLARE_LIST(DbGridColumns, DbGridColumn*) + +//================================================================== +class FmGridListener +{ +public: + virtual void selectionChanged() = 0; + virtual void columnChanged() = 0; +}; + +#define GRID_COLUMN_NOT_FOUND ((sal_uInt16)-1) + +//================================================================== +// InitWindowFacet, describing which aspect of a column's Window to (re-)initialize +//================================================================== +enum InitWindowFacet +{ + InitFont = 0x01, + InitForeground = 0x02, + InitBackground = 0x04, + InitWritingMode = 0x08, + InitAll = 0xFF +}; + +//================================================================== +class FmXGridSourcePropListener; +class DisposeListenerGridBridge; +typedef ::svt::EditBrowseBox DbGridControl_Base; +class SVX_DLLPUBLIC DbGridControl : public DbGridControl_Base +{ + friend class FmXGridSourcePropListener; + friend class GridFieldValueListener; + friend class DisposeListenerGridBridge; + +public: + //================================================================== + // NavigationBar + //================================================================== + class NavigationBar: public Control + { + class AbsolutePos : public NumericField + { + public: + AbsolutePos(Window* pParent, WinBits nStyle = 0); + + virtual void KeyInput(const KeyEvent& rEvt); + virtual void LoseFocus(); + }; + + friend class NavigationBar::AbsolutePos; + + // zusaetzliche Controls + FixedText m_aRecordText; + AbsolutePos m_aAbsolute; // AbsolutePositionierung + FixedText m_aRecordOf; + FixedText m_aRecordCount; + + ImageButton m_aFirstBtn; // ImageButton fuer 'gehe zum ersten Datensatz' + ImageButton m_aPrevBtn; // ImageButton fuer 'gehe zum vorhergehenden Datensatz' + ImageButton m_aNextBtn; // ImageButton fuer 'gehe zum naechsten Datensatz' + ImageButton m_aLastBtn; // ImageButton fuer 'gehe zum letzten Datensatz' + ImageButton m_aNewBtn; // ImageButton fuer 'gehe zum neuen Datensatz' + sal_uInt16 m_nDefaultWidth; + sal_Int32 m_nCurrentPos; + + sal_Bool m_bPositioning; // protect PositionDataSource against recursion + + public: + // StatusIds fuer Controls der Bar + // wichtig fuers Invalidieren + enum State + { + RECORD_TEXT = 1, + RECORD_ABSOLUTE, + RECORD_OF, + RECORD_COUNT, + RECORD_FIRST, + RECORD_NEXT, + RECORD_PREV, + RECORD_LAST, + RECORD_NEW + }; + + NavigationBar(Window* pParent, WinBits nStyle = 0); + + // Status Methoden fuer Controls + void InvalidateAll(sal_Int32 nCurrentPos = -1, sal_Bool bAll = sal_False); + void InvalidateState(sal_uInt16 nWhich) {SetState(nWhich);} + void SetState(sal_uInt16 nWhich); + sal_Bool GetState(sal_uInt16 nWhich) const; + sal_uInt16 GetDefaultWidth() const {return m_nDefaultWidth;} + + protected: + virtual void Resize(); + virtual void Paint(const Rectangle& rRect); + virtual void StateChanged( StateChangedType nType ); + + private: + DECL_LINK(OnClick, Button*); + sal_uInt16 ArrangeControls(); + + void PositionDataSource(sal_Int32 nRecord); + }; + + friend class DbGridControl::NavigationBar; + +public: + // diese Optionen werden verodert und geben an, welche der einzelnen feature + // freigegeben werden koennen, default ist readonly also 0 + enum Option + { + OPT_READONLY = 0x00, + OPT_INSERT = 0x01, + OPT_UPDATE = 0x02, + OPT_DELETE = 0x04 + }; + +private: + Font m_aDefaultFont; + Link m_aMasterStateProvider; + Link m_aMasterSlotExecutor; + + ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory; + + DbGridColumns m_aColumns; // Spaltenbeschreibung + NavigationBar m_aBar; + DbGridRowRef m_xDataRow; // Zeile die modifiziert werden kann + // kommt vom DatenCursor + DbGridRowRef m_xSeekRow, // Zeile die von Iterator gesetzt wird + // kommt vom DatenCursor + + m_xEmptyRow; // Datensatz zum einfuegen + + sal_uInt32 m_nAsynAdjustEvent; + + // if we modify the row for the new record, we automatically insert a "new new row". + // But if somebody else inserts a new record into the data source, we have to do the same. + // For that reason we have to listen to some properties of our data source. + ::comphelper::OPropertyChangeMultiplexer* m_pDataSourcePropMultiplexer; + FmXGridSourcePropListener* m_pDataSourcePropListener; + + void* m_pFieldListeners; + // property listeners for field values + + DisposeListenerGridBridge* m_pCursorDisposeListener; + // need to know about the diposing of the seek cursor + // construct analogous to the data source proplistener/multiplexer above : + // DisposeListenerGridBridge is a bridge from FmXDisposeListener which I don't want to be derived from + + FmGridListener* m_pGridListener; + +protected: + CursorWrapper* m_pDataCursor; // Cursor fuer Updates + CursorWrapper* m_pSeekCursor; // Cursor zum Seeken + +private: + // dieses sind Laufvariablen + DbGridRowRef m_xCurrentRow; // Row an der aktuellen Zeile + DbGridRowRef m_xPaintRow; // Row die gerade drgestellt werden soll + sal_Int32 m_nSeekPos; // Position des SeekCursors + sal_Int32 m_nTotalCount; // wird gesetzt, wenn der DatenCursor mit dem Zhlen der + // Datenstze fertig ist + // initial Wert ist -1 + osl::Mutex m_aDestructionSafety; + osl::Mutex m_aAdjustSafety; + + com::sun::star::util::Date + m_aNullDate; // NullDate of the Numberformatter; + + BrowserMode m_nMode; + sal_Int32 m_nCurrentPos; // Aktuelle Position; + sal_uInt32 m_nDeleteEvent; // EventId fuer asychrone Loeschen von Zeilen + sal_uInt16 m_nOptions; // Was kann das Control (Insert, Update, Delete) + // default readonly + sal_uInt16 m_nOptionMask; // the mask of options to be enabled in setDataSource + // (with respect to the data source capabilities) + // defaults to (insert | update | delete) + USHORT m_nLastColId; + long m_nLastRowId; + + sal_Bool m_bDesignMode : 1; // default = sal_False + sal_Bool m_bRecordCountFinal : 1; + sal_Bool m_bMultiSelection : 1; + sal_Bool m_bNavigationBar : 1; + + sal_Bool m_bSynchDisplay : 1; + sal_Bool m_bForceROController : 1; + sal_Bool m_bHandle : 1; + sal_Bool m_bFilterMode : 1; + sal_Bool m_bWantDestruction : 1; + sal_Bool m_bInAdjustDataSource : 1; + sal_Bool m_bPendingAdjustRows : 1; // if an async adjust is pending, is it for AdjustRows or AdjustDataSource ? + sal_Bool m_bHideScrollbars : 1; + +protected: + sal_Bool m_bUpdating : 1; // werden gerade updates durchgefuehrt + +protected: + virtual sal_Bool SeekRow(long nRow); + virtual void VisibleRowsChanged( long nNewTopRow, sal_uInt16 nNumRows); + virtual void PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const; + virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId) const; + virtual RowStatus GetRowStatus(long nRow) const; + virtual sal_Bool CursorMoving(long nNewRow, sal_uInt16 nNewCol); + virtual void CursorMoved(); + virtual void ArrangeControls(sal_uInt16& nX, sal_uInt16 nY); + virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId); + virtual void Command(const CommandEvent& rEvt); + virtual long PreNotify(NotifyEvent& rEvt); + virtual void KeyInput(const KeyEvent& rEvt); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + virtual void Select(); + + virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol); + + virtual void CellModified(); + virtual sal_Bool SaveModified(); + virtual sal_Bool IsModified() const; + + virtual sal_uInt16 AppendColumn(const String& rName, sal_uInt16 nWidth = 0, sal_uInt16 nPos = HEADERBAR_APPEND, sal_uInt16 nId = (sal_uInt16)-1); + virtual void RemoveColumn(sal_uInt16 nId); + virtual DbGridColumn* CreateColumn(sal_uInt16 nId) const; + virtual void ColumnMoved(sal_uInt16 nId); + virtual sal_Bool SaveRow(); + virtual sal_Bool IsTabAllowed(sal_Bool bForward) const; + + /// hide a column + virtual void HideColumn(sal_uInt16 nId); + /// show a column + virtual void ShowColumn(sal_uInt16 nId); + + /** This is called before executing a context menu for a row. rMenu contains the initial entries + handled by this base class' method (which always has to be called). + Derived classes may alter the menu in any way and handle any additional entries in + PostExecuteColumnContextMenu. + All disabled entries will be removed before executing the menu, so be careful with separators + near entries you probably wish to disable ... + */ + virtual void PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu); + /** After executing the context menu for a row this method is called. + */ + virtual void PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& rMenu, sal_uInt16 nExecutionResult); + + virtual void DataSourcePropertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException); + + virtual void FieldValueChanged(sal_uInt16 _nId, const ::com::sun::star::beans::PropertyChangeEvent& _evt); + virtual void FieldListenerDisposing(sal_uInt16 _nId); + + virtual void disposing(sal_uInt16 _nId, const ::com::sun::star::lang::EventObject& _rEvt); + + // own overridables + /// called when the current row changed + virtual void onRowChange(); + /// called when the current column changed + virtual void onColumnChange(); + + // DragSourceHelper overridables + virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ); + + void executeRowContextMenu( long _nRow, const Point& _rPreferredPos ); + +public: + DbGridControl( + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >, + Window* pParent, + WinBits nBits = WB_BORDER); + + virtual ~DbGridControl(); + + virtual void Init(); + virtual void InitColumnsByFields(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xFields) = 0; + virtual void RemoveRows(); + + /** GetCellText returns the text at the given position + @param _nRow + the number of the row + @param _nColId + the ID of the column + @return + the text out of the cell + */ + virtual String GetCellText(long _nRow, USHORT _nColId) const; + + void RemoveRows(sal_Bool bNewCursor); + + void InvalidateStatus(); + + const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& getNumberFormatter() const {return m_xFormatter;} + + // die Datenquelle + // die Optionen koennen die Updatefaehigkeiten noch einschraenken, nicht erweitern + virtual void setDataSource(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& rCursor, + sal_uInt16 nOpts = OPT_INSERT | OPT_UPDATE | OPT_DELETE); + virtual void Dispatch(sal_uInt16 nId); + + CursorWrapper* getDataSource() const {return m_pDataCursor;} + const DbGridColumns& GetColumns() const {return m_aColumns;} + + void EnableHandle(sal_Bool bEnable); + sal_Bool HasHandle() const {return m_bHandle;} + void InsertHandleColumn(); + + /// welche Position hat die Spalte mit der Id in der ::com::sun::star::sdbcx::View, die Handle-Column zahelt nicht mit + sal_uInt16 GetViewColumnPos( sal_uInt16 nId ) const { sal_uInt16 nPos = GetColumnPos(nId); return (nPos==(sal_uInt16)-1) ? GRID_COLUMN_NOT_FOUND : nPos-1; } + + /** welche Position hat die Spalte mit der Id in m_aColumns, also dem von GetColumns gelieferten ::com::sun::star::sdbcx::Container ? + (unterscheidet sich u.U. von der von GetViewColumnPos gelieferten, wenn es versteckt Spalten gibt) + */ + sal_uInt16 GetModelColumnPos( sal_uInt16 nId ) const; + + /// Anzahl der Spalten im Model + sal_uInt16 GetViewColCount() const { return ColCount() - 1; } + sal_uInt16 GetModelColCount() const { return (sal_uInt16)m_aColumns.Count(); } + /// umgekehrt zu GetViewColumnPos : Id zu Position, die erste Nicht-Handle-Column hat die Position 0 + sal_uInt16 GetColumnIdFromViewPos( sal_uInt16 nPos ) const { return GetColumnId(nPos + 1); } + sal_uInt16 GetColumnIdFromModelPos( sal_uInt16 nPos ) const; + + virtual void SetDesignMode(sal_Bool bMode); + sal_Bool IsDesignMode() const {return m_bDesignMode;} + sal_Bool IsOpen() const {return m_pSeekCursor != NULL;} + + virtual void SetFilterMode(sal_Bool bMode); + sal_Bool IsFilterMode() const {return m_bFilterMode;} + sal_Bool IsFilterRow(long nRow) const {return m_bFilterMode && nRow == 0;} + + void EnableNavigationBar(sal_Bool bEnable); + sal_Bool HasNavigationBar() const {return m_bNavigationBar;} + + sal_uInt16 GetOptions() const {return m_nOptions;} + NavigationBar& GetNavigationBar() {return m_aBar;} + sal_uInt16 SetOptions(sal_uInt16 nOpt); + // The new options are interpreted with respect to the current data source. If it is unable + // to update, to insert or to restore, the according options are ignored. If the grid isn't + // connected to a data source, all options except OPT_READONLY are ignored. + + void SetMultiSelection(sal_Bool bMulti); + sal_Bool GetMultiSelection() const {return m_bMultiSelection;} + + const com::sun::star::util::Date& getNullDate() const {return m_aNullDate;} + + // Positionierung + void MoveToPosition(sal_uInt32 nPos); + void MoveToFirst(); + void MoveToNext(); + void MoveToPrev(); + void MoveToLast(); + void AppendNew(); + + // Abgleich der Cursor falls von auen der DatenCursor verschoben wurde + // Flag bedeutet ob ein Abgleich es Rowcounts vorgenommen werden soll + void AdjustDataSource(sal_Bool bFull = sal_False); + void Undo(); + + virtual void BeginCursorAction(); + virtual void EndCursorAction(); + + // wird die aktuelle Zeile neu gesetzt + sal_Bool IsUpdating() const {return m_bUpdating;} + + virtual void RowRemoved( long nRow, long nNumRows = 1, sal_Bool bDoPaint = sal_True ); + virtual void RowInserted( long nRow, long nNumRows = 1, sal_Bool bDoPaint = sal_True, sal_Bool bKeepSelection = sal_False ); + virtual void RowModified( long nRow, sal_uInt16 nColId = USHRT_MAX ); + + void resetCurrentRow(); + + sal_Bool getDisplaySynchron() const { return m_bSynchDisplay; } + void setDisplaySynchron(sal_Bool bSync); + void forceSyncDisplay(); + // wenn das auf sal_False gesetzt wird, laeuft die Anzeige nicht mehr mit der aktuellen Cursor-Position synchron + // (soll heissen, in AdjustDataSource wird nicht in die zur CursorPosition gehoerenden Zeile gesprungen) + // wer das benutzt, sollte bitte wissen, was er tut, da zum Beispiel die Eingabe von Daten in einer Zeile auf der Anzeige, + // die gar nicht mit der Position des Cursors synchron ist, ziemlich kritisch sein koennte + + sal_Bool isForcedROController() const { return m_bForceROController; } + void forceROController(sal_Bool bForce); + // Setzt man das auf sal_True, hat das GridControl immer einen ::com::sun::star::frame::Controller, der allerdings read-only ist. Ausserdem + // wird die Edit-Zeile des Controllers so eingestellt, dass sie ihre Selektion bei Fokus-Verlust weiterhin anzeigt. + + const DbGridRowRef& GetCurrentRow() const {return m_xCurrentRow;} + + void SetStateProvider(const Link& rProvider) { m_aMasterStateProvider = rProvider; } + // if this link is set the given provider will be asked for the state of my items. + // the return values are interpreted as follows : + // <0 -> not specified (use default mechanism to determine the state) + // ==0 -> the item is disabled + // >0 -> the item is enabled + void SetSlotExecutor(const Link& rExecutor) { m_aMasterSlotExecutor = rExecutor; } + // analogous : if this link is set, all nav-bar slots will be routed through it when executed + // if the handler returns nonzero, no further handling of the slot occurs + + void EnablePermanentCursor(sal_Bool bEnable); + sal_Bool IsPermanentCursorEnabled() const; + + /** forces both scrollbars to be hidden + + For the horizontal srollbar, this is overruled by enabling the navigation bar: A navigation + bar <b>always</b> implies a horizontal scroll bar + @seealso EnableNavigationBar + */ + void ForceHideScrollbars( sal_Bool _bForce ); + sal_Bool IsForceHideScrollbars() const; + + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > + getServiceManager() const { return m_xServiceFactory; } + + /// returns <TRUE/> if the text of the given cell can be copied into the clipboard + sal_Bool canCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId); + /// copies the text of the given cell into the clipboard + void copyCellText(sal_Int32 _nRow, sal_Int16 _nColId); + + // selectin listener handling + FmGridListener* getGridListener() const { return m_pGridListener; } + void setGridListener( FmGridListener* _pListener ) { m_pGridListener = _pListener; } + + // helper class to grant access to selected methods from within the DbCellControl class + struct GrantCellControlAccess + { + friend class DbCellControl; + protected: + GrantCellControlAccess() { } + }; + + /// called when a controller needs to be re-initialized + void refreshController(sal_uInt16 _nColId, GrantCellControlAccess _aAccess); + + /** + @return + The count of additional controls of the control area. + */ + virtual sal_Int32 GetAccessibleControlCount() const; + + /** Creates the accessible object of an additional control. + @param _nIndex + The 0-based index of the control. + @return + The XAccessible interface of the specified control. + */ + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible > + CreateAccessibleControl( sal_Int32 _nIndex ); + + // IAccessibleTableProvider + /** Creates the accessible object of a data table cell. + @param nRow The row index of the cell. + @param nColumnId The column ID of the cell. + @return The XAccessible interface of the specified cell. */ + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible > + CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ); + +protected: + void RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_Bool bUpdateCursor); + sal_Bool SeekCursor(long nRow, sal_Bool bAbsolute = sal_False); + void RemoveColumns(); // aufraeumen eigener strukturen + void AdjustRows(); + sal_Int32 AlignSeekCursor(); + sal_Bool SetCurrent(long nNewRow); + + String GetCurrentRowCellText(DbGridColumn* pCol,const DbGridRowRef& _rRow) const; + virtual void DeleteSelectedRows(); + sal_Bool IsValid(const DbGridRowRef& _xRow) const {return _xRow && _xRow->IsValid();} + + // Zeile an der gerade eingefuegt wird + sal_Bool IsCurrentAppending() const; + + // Leerzeile zum Einfuegen + sal_Bool IsInsertionRow(long nRow) const; + + void SetSeekPos(sal_Int32 nPos) {m_nSeekPos = nPos;} + sal_Int32 GetCurrentPos() const {return m_nCurrentPos;} + sal_Int32 GetSeekPos() const {return m_nSeekPos;} + sal_Int32 GetTotalCount() const {return m_nTotalCount;} + + const DbGridRowRef& GetEmptyRow() const { return m_xEmptyRow; } + const DbGridRowRef& GetSeekRow() const { return m_xSeekRow; } + const DbGridRowRef& GetPaintRow() const { return m_xPaintRow; } + CursorWrapper* GetSeekCursor() const { return m_pSeekCursor; } + + void ConnectToFields(); + void DisconnectFromFields(); + + void implAdjustInSolarThread(sal_Bool _bRows); + // calls AdjustRows or AdjustDataSource, synchron if the caller is running in the solar thread, else asynchron + +protected: + virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol); + void Construct(); + void ImplInitWindow( const InitWindowFacet _eInitWhat ); + DECL_LINK(OnDelete, void*); + + DECL_LINK(OnAsyncAdjust, void*); + // if the param is != NULL, AdjustRows will be called, else AdjustDataSource + +private: + using BrowseBox::InsertHandleColumn; +}; + + +SV_IMPL_REF(DbGridRow); + + +#endif // _SVX_GRIDCTRL_HXX + diff --git a/svx/inc/svx/hangulhanja.hxx b/svx/inc/svx/hangulhanja.hxx new file mode 100644 index 000000000000..e4eefce17ea3 --- /dev/null +++ b/svx/inc/svx/hangulhanja.hxx @@ -0,0 +1,307 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hangulhanja.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef SVX_HANGUL_HANJA_CONVERSION_HXX +#define SVX_HANGUL_HANJA_CONVERSION_HXX + +#include <vcl/window.hxx> +#include <svx/svxenum.hxx> + +#include <memory> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/uno/Sequence.hxx> +#include "svx/svxdllapi.h" + +//............................................................................. +namespace svx +{ +//............................................................................. + + class HangulHanjaConversion_Impl; + + //========================================================================= + //= HangulHanjaConversion + //========================================================================= + /** encapsulates Hangul-Hanja conversion functionality + + <p>terminology: + <ul><li>A <b>text <em>portion</em></b> is some (potentially large) piece of text + which is to be analyzed for convertible sub-strings.</li> + <li>A <b>text <em>unit</em></b> is a sub string in a text portion, which is + to be converted as a whole.</li> + </ul> + For instance, you could have two independent selections within your document, which are then + two text portions. A text unit would be single Hangul/Hanja words within a portion, or even + single Hangul syllabills when "replace by character" is enabled. + </p> + */ + class SVX_DLLPUBLIC HangulHanjaConversion + { + friend class HangulHanjaConversion_Impl; + + public: + enum ReplacementAction + { + eExchange, // simply exchange one text with another + eReplacementBracketed, // keep the original, and put the replacement in brackets after it + eOriginalBracketed, // replace the original text, but put it in brackeds after the replacement + eReplacementAbove, // keep the original, and put the replacement text as ruby text above it + eOriginalAbove, // replace the original text, but put it as ruby text above it + eReplacementBelow, // keep the original, and put the replacement text as ruby text below it + eOriginalBelow // replace the original text, but put it as ruby text below it + }; + + enum ConversionType // does not specify direction... + { + eConvHangulHanja, // Korean Hangul/Hanja conversion + eConvSimplifiedTraditional // Chinese simplified / Chinese traditional conversion + }; + + // Note: conversion direction for eConvSimplifiedTraditional is + // specified by source language. + // This one is for Hangul/Hanja where source and target language + // are the same. + enum ConversionDirection + { + eHangulToHanja, + eHanjaToHangul + }; + + enum ConversionFormat + { + eSimpleConversion, // used for simplified / traditional Chinese as well + eHangulBracketed, + eHanjaBracketed, + eRubyHanjaAbove, + eRubyHanjaBelow, + eRubyHangulAbove, + eRubyHangulBelow + }; + + private: + ::std::auto_ptr< HangulHanjaConversion_Impl > m_pImpl; + + // used to set initial values of m_pImpl object from saved ones + static sal_Bool m_bUseSavedValues; // defines if the followng two values should be used for initialization + static sal_Bool m_bTryBothDirectionsSave; + static ConversionDirection m_ePrimaryConversionDirectionSave; + + // Forbidden and not implemented. + HangulHanjaConversion (const HangulHanjaConversion &); + HangulHanjaConversion & operator= (const HangulHanjaConversion &); + + public: + HangulHanjaConversion( + Window* _pUIParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, + const ::com::sun::star::lang::Locale& _rSourceLocale, + const ::com::sun::star::lang::Locale& _rTargetLocale, + const Font* _pTargetFont, + sal_Int32 nOptions, + sal_Bool _bIsInteractive + ); + + virtual ~HangulHanjaConversion( ); + + // converts the whole document + void ConvertDocument(); + + LanguageType GetSourceLanguage() const; + LanguageType GetTargetLanguage() const; + const Font * GetTargetFont() const; + sal_Int32 GetConversionOptions() const; + sal_Bool IsInteractive() const; + + // chinese text conversion + static inline sal_Bool IsSimplified( LanguageType nLang ); + static inline sal_Bool IsTraditional( LanguageType nLang ); + static inline sal_Bool IsChinese( LanguageType nLang ); + static inline sal_Bool IsSimilarChinese( LanguageType nLang1, LanguageType nLang2 ); + + // used to specify that the conversion direction states from the + // last incarnation should be used as + // initial conversion direction for the next incarnation. + // (A hack used to transport a state information from + // one incarnation to the next. Used in Writers text conversion...) + static void SetUseSavedConversionDirectionState( sal_Bool bVal ); + static sal_Bool IsUseSavedConversionDirectionState(); + + protected: + /** retrieves the next text portion which is to be analyzed + + <p>pseudo-abstract, needs to be overridden</p> + + @param _rNextPortion + upon return, this must contain the next text portion + @param _rLangOfPortion + upon return, this must contain the language for the found text portion. + (necessary for Chinese translation since there are 5 language variants + too look for even if the 'source' language usually is only 'simplified' + or 'traditional'.) + */ + virtual void GetNextPortion( + ::rtl::OUString& /* [out] */ _rNextPortion, + LanguageType& /* [out] */ _rLangOfPortion, + sal_Bool /* [in] */ _bAllowImplicitChangesForNotConvertibleText ); + + /** announces a new "current unit" + + <p>This will be called whenever it is necessary to interactively ask the user for + a conversion. In such a case, a range within the current portion (see <member>GetNextPortion</member>) + is presented to the user for chosing a substitution. Additionally, this method is called, + so that derived classes can e.g. highlight this text range in a document view.</p> + + <p>Note that the indexes are relative to the most recent replace action. See + <member>ReplaceUnit</member> for details.</p> + + @param _nUnitStart + the start index of the unit + + @param _nUnitEnd + the start index (exclusively!) of the unit. + + @param _bAllowImplicitChangesForNotConvertibleText + allows implicit changes other than the text itself for the + text parts not being convertible. + Used for chinese translation to attribute all not convertible + text (e.g. western text, empty paragraphs, spaces, ...) to + the target language and target font of the conversion. + This is to ensure that after the conversion any new text entered + anywhere in the document will have the target language (of course + CJK Language only) and target font (CJK font only) set. + + @see GetNextPortion + */ + virtual void HandleNewUnit( const sal_Int32 _nUnitStart, const sal_Int32 _nUnitEnd ); + + /** replaces a text unit within a text portion with a new text + + <p>pseudo-abstract, needs to be overridden</p> + + <p>Note an important thing about the indicies: They are always relative to the <em>previous + call</em> of ReplaceUnit. This means whe you get a call to ReplaceUnit, and replace some text + in your document, than you have to remember the document position immediately <em>behind</em> + the changed text. In a next call to ReplaceUnit, an index of <em>0</em> will denote exactly + this position behind the previous replacement<br/> + The reaons for this is that this class here does not know anything about your document structure, + so after a replacement took place, it's impossible to address anything in the range from the + beginning of the portion up to the replaced text.<br/> + In the very first call to ReplaceUnit, an index of <em>0</em> denotes the very first position of + the current portion.</p> + + <p>If the language of the text to be replaced is different from + the target language (as given by 'GetTargetLanguage') for example + when converting simplified Chinese from/to traditional Chinese + the language attribute of the new text has to be changed as well, + **and** the font is to be set to the default (document) font for + that language.</p> + + @param _nUnitStart + the start index of the range to replace + + @param _nUnitEnd + the end index (exclusively!) of the range to replace. E.g., an index + pair (4,5) indicates a range of length 1. + + @param _rOrigText + the original text to be replaced (as returned by GetNextPortion). + Since in Chinese conversion the original text is needed as well + in order to only do the minimal necassry text changes and to keep + as much attributes as possible this is supplied here as well. + + @param _rReplaceWith + The replacement text + + @param _rOffsets + An sequence matching the indices (characters) of _rReplaceWith + to the indices of the characters in the original text they are + replacing. + This is necessary since some portions of the text may get + converted in portions of different length than the original. + The sequence will be empty if all conversions in the text are + of equal length. That is if always the character at index i in + _rOffsets is replacing the character at index i in the original + text for all valid index values of i. + + @param _eAction + replacement action to take + + @param pNewUnitLanguage + if the replacement unit is required to have a new language that + is specified here. If the language is to be left unchanged this + is the 0 pointer. + */ + virtual void ReplaceUnit( + const sal_Int32 _nUnitStart, const sal_Int32 _nUnitEnd, + const ::rtl::OUString& _rOrigText, + const ::rtl::OUString& _rReplaceWith, + const ::com::sun::star::uno::Sequence< sal_Int32 > &_rOffsets, + ReplacementAction _eAction, + LanguageType *pNewUnitLanguage + ); + + /** specifies if rubies are supported by the document implementing + this class. + + @return + <TRUE/> if rubies are supported. + */ + virtual sal_Bool HasRubySupport() const; + }; + + sal_Bool HangulHanjaConversion::IsSimplified( LanguageType nLang ) + { + return nLang == LANGUAGE_CHINESE_SIMPLIFIED || + nLang == LANGUAGE_CHINESE_SINGAPORE; + } + + sal_Bool HangulHanjaConversion::IsTraditional( LanguageType nLang ) + { + return nLang == LANGUAGE_CHINESE_TRADITIONAL || + nLang == LANGUAGE_CHINESE_HONGKONG || + nLang == LANGUAGE_CHINESE_MACAU; + } + + sal_Bool HangulHanjaConversion::IsChinese( LanguageType nLang ) + { + return IsTraditional( nLang ) || IsSimplified( nLang ); + } + + sal_Bool HangulHanjaConversion::IsSimilarChinese( LanguageType nLang1, LanguageType nLang2 ) + { + return (IsTraditional(nLang1) && IsTraditional(nLang2)) || + (IsSimplified(nLang1) && IsSimplified(nLang2)); + } + +//............................................................................. +} // namespace svx +//............................................................................. + +#endif // SVX_HANGUL_HANJA_CONVERSION_HXX diff --git a/svx/inc/svx/hdft.hxx b/svx/inc/svx/hdft.hxx new file mode 100644 index 000000000000..27a95ff92b6c --- /dev/null +++ b/svx/inc/svx/hdft.hxx @@ -0,0 +1,139 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hdft.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HDFT_HXX +#define _SVX_HDFT_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/tabdlg.hxx> + +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif + +#ifndef _FIELD_HXX //autogen +#include <vcl/field.hxx> +#endif + +#ifndef _GROUP_HXX //autogen +#include <vcl/group.hxx> +#endif +#include <svx/pagectrl.hxx> +#include "svx/svxdllapi.h" + +// class SvxHFPage ------------------------------------------------------ + +class SVX_DLLPUBLIC SvxHFPage: public SfxTabPage +{ + using TabPage::ActivatePage; + using TabPage::DeactivatePage; + +public: + + virtual BOOL FillItemSet( SfxItemSet& rOutSet ); + virtual void Reset( const SfxItemSet& rSet ); + + virtual ~SvxHFPage(); + + void DisableDeleteQueryBox() { bDisableQueryBox = TRUE; } + void EnableBackgroundSelector( BOOL bNew ) { bEnableBackgroundSelector = bNew; } + void EnableDynamicSpacing(); + +protected: + virtual void ActivatePage( const SfxItemSet& rSet ); + virtual int DeactivatePage( SfxItemSet* pSet = 0 ); + + SvxHFPage( Window* pParent, USHORT nResId, const SfxItemSet& rSet, + USHORT nSetId ); + + CheckBox aTurnOnBox; + CheckBox aCntSharedBox; + FixedText aLMLbl; + MetricField aLMEdit; + FixedText aRMLbl; + MetricField aRMEdit; + FixedText aDistFT; + MetricField aDistEdit; + CheckBox aDynSpacingCB; + FixedText aHeightFT; + MetricField aHeightEdit; + CheckBox aHeightDynBtn; + FixedLine aFrm; + SvxPageWindow aBspWin; + PushButton aBackgroundBtn; + + USHORT nId; + SfxItemSet* pBBSet; + BOOL bDisableQueryBox; + BOOL bEnableBackgroundSelector; + FASTBOOL bInReset; + + void InitHandler(); + DECL_LINK( TurnOnHdl, CheckBox*); + DECL_LINK( DistModify, MetricField*); + DECL_LINK( HeightModify, MetricField*); + DECL_LINK( BorderModify, MetricField*); + DECL_LINK( BackgroundHdl, Button*); + + void UpdateExample(); + DECL_LINK( RangeHdl, Edit*); + +private: +#ifdef _SVX_HDFT_CXX + SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet ); +#endif +}; + +// class SvxHeaderPage --------------------------------------------------- + +class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage +{ +public: + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + +private: + SvxHeaderPage( Window* pParent, const SfxItemSet& rSet ); +}; + +// class SvxFooterPage --------------------------------------------------- + +class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage +{ +public: + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static USHORT* GetRanges(); + +private: + SVX_DLLPRIVATE SvxFooterPage( Window* pParent, const SfxItemSet& rSet ); +}; + +#endif + diff --git a/svx/inc/svx/helperhittest3d.hxx b/svx/inc/svx/helperhittest3d.hxx new file mode 100644 index 000000000000..0364fd6622fc --- /dev/null +++ b/svx/inc/svx/helperhittest3d.hxx @@ -0,0 +1,113 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: helperhittest3d.hxx,v $ + * $Revision: 1.1.2.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SVX_HELPERHITTEST_HXX +#define INCLUDED_SVX_HELPERHITTEST_HXX + +#include "svx/svxdllapi.h" +#include <sal/types.h> +#include <vector> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +namespace basegfx { + class B2DPoint; +} + +namespace drawinglayer { namespace geometry { + class ViewInformation3D; +}} + +class E3dCompoundObject; +class E3dScene; + +////////////////////////////////////////////////////////////////////////////// + +/** support for getting a ViewInformation3D for a given CompoudObject3D + with correct ObjectTransformation filled out + + @param o_rViewInformation3D + The ViewInformation3D created which will be overwritten + + @param rCandidate + The E3dCompoundObject for which the ViewInformation3D shall be + prepared + + @return + A pointer to the found and used root scene. This is also a hint + if the operation succeeded or not, since when object has no root + scene (is not inserted to a model), an empty ViewInformation3D + will be used +*/ +E3dScene* fillViewInformation3DForCompoundObject( + drawinglayer::geometry::ViewInformation3D& o_rViewInformation3D, + const E3dCompoundObject& rCandidate); + +/** support for getting all from a 2d position hit objects in a 3d scene + in a depth sorted array + + @param rPoint + 2D Point in view coordinates + + @param rScene + The 3D Scene for HitTest + + @param o_rResult + Output parameter which contains all hit 3D objects inside rScene. This + vector will be changed in any case. If it's empty, no hit exists. If it's + not empty, the first object is the object closest to the viewer + +*/ +SVX_DLLPUBLIC void getAllHit3DObjectsSortedFrontToBack( + const basegfx::B2DPoint& rPoint, + const E3dScene& rScene, + ::std::vector< const E3dCompoundObject* >& o_rResult); + +/** support for checking if the single given 3d object is hit at position + + @param rPoint + 2D Point in view coordinates + + @param rCandidate + The 3D Object which needs checking + + @return + true if hit, false if not +*/ +bool checkHitSingle3DObject( + const basegfx::B2DPoint& rPoint, + const E3dCompoundObject& rCandidate); + +////////////////////////////////////////////////////////////////////////////// + +#endif // INCLUDED_SVX_HELPERHITTEST_HXX + +// eof diff --git a/svx/inc/svx/hngpnctitem.hxx b/svx/inc/svx/hngpnctitem.hxx new file mode 100644 index 000000000000..dad568857bab --- /dev/null +++ b/svx/inc/svx/hngpnctitem.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hngpnctitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HNGPNCTITEM_HXX +#define _SVX_HNGPNCTITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxHangingPunctuationItem ----------------------------------------- + +/* [Description] + + This item describe how to handle the last character of a line. +*/ + +class SVX_DLLPUBLIC SvxHangingPunctuationItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxHangingPunctuationItem( sal_Bool bOn /*= sal_False*/, + const sal_uInt16 nId ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * = 0 ) const; + + inline SvxHangingPunctuationItem& operator=( + const SvxHangingPunctuationItem& rItem ) + { + SetValue( rItem.GetValue() ); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/hyznitem.hxx b/svx/inc/svx/hyznitem.hxx new file mode 100644 index 000000000000..0c6f46e09e8c --- /dev/null +++ b/svx/inc/svx/hyznitem.hxx @@ -0,0 +1,112 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hyznitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HYZNITEM_HXX +#define _SVX_HYZNITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxHyphenZoneItem ----------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt ein Silbentrennungsattribut (Automatisch?, Anzahl der +Zeichen am Zeilenende und -anfang). +*/ + +class SVX_DLLPUBLIC SvxHyphenZoneItem : public SfxPoolItem +{ + BOOL bHyphen: 1; + BOOL bPageEnd: 1; + BYTE nMinLead; + BYTE nMinTrail; + BYTE nMaxHyphens; + + friend SvStream & operator<<( SvStream & aS, SvxHyphenZoneItem & ); + +public: + TYPEINFO(); + + SvxHyphenZoneItem( const BOOL bHyph /*= FALSE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + + inline void SetHyphen( const BOOL bNew ) { bHyphen = bNew; } + inline BOOL IsHyphen() const { return bHyphen; } + + inline void SetPageEnd( const BOOL bNew ) { bPageEnd = bNew; } + inline BOOL IsPageEnd() const { return bPageEnd; } + + inline BYTE &GetMinLead() { return nMinLead; } + inline BYTE GetMinLead() const { return nMinLead; } + + inline BYTE &GetMinTrail() { return nMinTrail; } + inline BYTE GetMinTrail() const { return nMinTrail; } + + inline BYTE &GetMaxHyphens() { return nMaxHyphens; } + inline BYTE GetMaxHyphens() const { return nMaxHyphens; } + + inline SvxHyphenZoneItem &operator=( const SvxHyphenZoneItem &rNew ) + { + bHyphen = rNew.IsHyphen(); + bPageEnd = rNew.IsPageEnd(); + nMinLead = rNew.GetMinLead(); + nMinTrail = rNew.GetMinTrail(); + nMaxHyphens = rNew.GetMaxHyphens(); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/ifaceids.hxx b/svx/inc/svx/ifaceids.hxx new file mode 100644 index 000000000000..e24386c9774d --- /dev/null +++ b/svx/inc/svx/ifaceids.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ifaceids.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_IFACEIDS_HXX +#define _SVX_IFACEIDS_HXX + +// ----------------------------------------------------------------------- + +#include <sfx2/shell.hxx> + +#define SVX_INTERFACE_BASIDE_DOCSH (SFX_INTERFACE_IDE_START+ 0) +#define SVX_INTERFACE_BASIDE_VIEWSH (SFX_INTERFACE_IDE_START+ 1) +#define SVX_INTERFACE_EXTRUSION_BAR (SFX_INTERFACE_IDE_START+ 2) +#define SVX_INTERFACE_FONTWORK_BAR (SFX_INTERFACE_IDE_START+ 3) + +#define HID_INTERFACE_BASIDE_VIEWSH SVX_INTERFACE_BASIDE_VIEWSH + +#define SVX_INTERFACE_FORM_SH (SFX_INTERFACE_IDE_END+ 1) + +#endif + + diff --git a/svx/inc/svx/impgrf.hxx b/svx/inc/svx/impgrf.hxx new file mode 100644 index 000000000000..d99bbd04d1ea --- /dev/null +++ b/svx/inc/svx/impgrf.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: impgrf.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_IMPGRF_HXX +#define _SVX_IMPGRF_HXX + +// include --------------------------------------------------------------- + +#include <svtools/filter.hxx> + +#ifndef _BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#include "svx/svxdllapi.h" + +// Funktionen ------------------------------------------------------------ + +// returnt einen static Graphic-Filter, wird einmalig angelegt, +// steht immer zur Verfuegung, DARF NIE geloescht werden!!!! +SVX_DLLPUBLIC GraphicFilter* GetGrfFilter(); +SVX_DLLPUBLIC int LoadGraphic( const String& rPath, const String& rFilter, + Graphic& rGraphic, + GraphicFilter* pFilter = NULL, + USHORT* pDeterminedFormat = NULL ); + +// class SvxImportGraphicDialog ------------------------------------------ +#ifndef SV_NODIALOG + +#define ENABLE_STANDARD ((USHORT)0x0001) // Standard-Button +#define ENABLE_LINK ((USHORT)0x0002) // Verkn"upfungs-Box +#define ENABLE_STD_AND_LINK (ENABLE_STANDARD | ENABLE_LINK) +#define ENABLE_PROPERTY ((USHORT)0x0004) // Eigenschaften-Button +#define ENABLE_ALL ((USHORT)0x0007) // alle +#define ENABLE_PROP_WITHOUTLINK ((USHORT)0x0008) // Eigenschaften ohne Link +#define ENABLE_EMPTY_FILENAMES ((USHORT)0x0010) // Leere Dateinamen zulassen + +#endif // SV_NODIALOG + +#endif diff --git a/svx/inc/svx/ipolypolygoneditorcontroller.hxx b/svx/inc/svx/ipolypolygoneditorcontroller.hxx new file mode 100644 index 000000000000..39b156b929ea --- /dev/null +++ b/svx/inc/svx/ipolypolygoneditorcontroller.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ipolypolygoneditorcontroller.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_IPOLYPOLYGONEDITORCONTROLLER_HXX +#define _SDR_IPOLYPOLYGONEDITORCONTROLLER_HXX + +#include "svx/svxdllapi.h" +#include <svx/svdedtv.hxx> + +//************************************************************ +// Defines +//************************************************************ + +enum SdrPathSmoothKind {SDRPATHSMOOTH_DONTCARE, // nur fuer Statusabfrage + SDRPATHSMOOTH_ANGULAR, // Eckig + SDRPATHSMOOTH_ASYMMETRIC, // unsymmetrisch, normales Smooth + SDRPATHSMOOTH_SYMMETRIC}; // symmetrisch + +enum SdrPathSegmentKind {SDRPATHSEGMENT_DONTCARE, // nur fuer Statusabfrage + SDRPATHSEGMENT_LINE, // gerader Streckenabschnitt + SDRPATHSEGMENT_CURVE, // Kurvenabschnitt (Bezier) + SDRPATHSEGMENT_TOGGLE}; // nur fuer Set: Toggle + +enum SdrObjClosedKind {SDROBJCLOSED_DONTCARE, // nur fuer Statusabfrage + SDROBJCLOSED_OPEN, // Objekte geoeffnet (Linie, Polyline, ...) + SDROBJCLOSED_CLOSED, // Objekte geschlossen (Polygon, ...) + SDROBJCLOSED_TOGGLE}; // nur fuer Set: Toggle (not implemented yet) + +class IPolyPolygonEditorController +{ +public: + virtual void DeleteMarkedPoints() = 0; + virtual BOOL IsDeleteMarkedPointsPossible() const = 0; + + virtual void RipUpAtMarkedPoints() = 0; + virtual bool IsRipUpAtMarkedPointsPossible() const = 0; + + virtual BOOL IsSetMarkedSegmentsKindPossible() const = 0; + virtual SdrPathSegmentKind GetMarkedSegmentsKind() const = 0; + virtual void SetMarkedSegmentsKind(SdrPathSegmentKind eKind) = 0; + + virtual BOOL IsSetMarkedPointsSmoothPossible() const = 0; + virtual SdrPathSmoothKind GetMarkedPointsSmooth() const = 0; + virtual void SetMarkedPointsSmooth(SdrPathSmoothKind eKind) = 0; + + virtual void CloseMarkedObjects(BOOL bToggle, BOOL bOpen ) = 0; + virtual bool IsOpenCloseMarkedObjectsPossible() const = 0; + virtual SdrObjClosedKind GetMarkedObjectsClosedState() const = 0; +}; + +#endif //_SDR_IPOLYPOLYGONEDITORCONTROLLER_HXX + diff --git a/svx/inc/svx/itemtype.hxx b/svx/inc/svx/itemtype.hxx new file mode 100644 index 000000000000..a01bea487147 --- /dev/null +++ b/svx/inc/svx/itemtype.hxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: itemtype.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ITEMTYPE_HXX +#define _SVX_ITEMTYPE_HXX + +// include --------------------------------------------------------------- + +#ifndef _SVXITEMS_HRC +#include <svx/svxitems.hrc> +#endif + +// forward --------------------------------------------------------------- +#include <tools/string.hxx> +#include <tools/resid.hxx> +#include <tools/bigint.hxx> +#include <svx/dialmgr.hxx> +#include <svl/poolitem.hxx> +#include <tools/shl.hxx> +#include "svx/svxdllapi.h" + +class Color; +class XColorTable; +class IntlWrapper; +// static and prototypes ------------------------------------------------- + +static const sal_Unicode cDelim = ','; +static const sal_Unicode cpDelim[] = { ',' , ' ', '\0' }; + +SVX_DLLPUBLIC String GetSvxString( USHORT nId ); +SVX_DLLPUBLIC String GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, const IntlWrapper * pIntl ); +#ifndef SVX_LIGHT +String GetColorString( const Color& rCol ); +#endif +SVX_DLLPUBLIC USHORT GetMetricId( SfxMapUnit eUnit ); + +// ----------------------------------------------------------------------- + +inline String GetBoolString( BOOL bVal ) +{ + return String( ResId( bVal ? RID_SVXITEMS_TRUE + : RID_SVXITEMS_FALSE, DIALOG_MGR() ) ); +} + +// ----------------------------------------------------------------------- + +inline long Scale( long nVal, long nMult, long nDiv ) +{ + BigInt aVal( nVal ); + aVal *= nMult; + aVal += nDiv/2; + aVal /= nDiv; + return aVal; +} + +#endif + diff --git a/svx/inc/svx/itemwin.hxx b/svx/inc/svx/itemwin.hxx new file mode 100644 index 000000000000..64dfcfe1933b --- /dev/null +++ b/svx/inc/svx/itemwin.hxx @@ -0,0 +1,200 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: itemwin.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ITEMWIN_HXX +#define _SVX_ITEMWIN_HXX + +#include <vcl/bitmap.hxx> + +#include <svx/dlgctrl.hxx> +#include "svx/svxdllapi.h" + +// forward --------------------------------------------------------------- + +class XLineColorItem; +class XLineWidthItem; +class SfxObjectShell; + +// class SvxLineBox ------------------------------------------------------ + +class SvxLineBox : public LineLB +{ + BmpColorMode meBmpMode; + USHORT nCurPos; + Timer aDelayTimer; + Size aLogicalSize; + BOOL bRelease; + SfxObjectShell* mpSh; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; + +#ifdef _SVX_ITEMWIN_CXX + DECL_LINK( DelayHdl_Impl, Timer * ); + + void ReleaseFocus_Impl(); +#endif +public: + SvxLineBox( Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); + ~SvxLineBox(); + + void FillControl(); + +protected: + virtual void Select(); + virtual long PreNotify( NotifyEvent& rNEvt ); + virtual long Notify( NotifyEvent& rNEvt ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +}; + +// class SvxColorBox ----------------------------------------------------- + +class SvxColorBox : public ColorLB +{ + using Window::Update; + + USHORT nCurPos; + USHORT nId; + Timer aDelayTimer; + Size aLogicalSize; + BOOL bRelease; + ::rtl::OUString maCommand; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; + +#ifdef _SVX_ITEMWIN_CXX + DECL_LINK( DelayHdl_Impl, Timer * ); + + void ReleaseFocus_Impl(); +#endif + +public: + SvxColorBox( Window* pParent, + const rtl::OUString& rCommand, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); + ~SvxColorBox(); + + void Update( const XLineColorItem* pItem ); + +protected: + virtual void Select(); + virtual long PreNotify( NotifyEvent& rNEvt ); + virtual long Notify( NotifyEvent& rNEvt ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +}; + +// class SvxMetricField -------------------------------------------------- + +class SVX_DLLPUBLIC SvxMetricField : public MetricField +{ + using Window::Update; + + String aCurTxt; + SfxMapUnit ePoolUnit; + FieldUnit eDlgUnit; + Size aLogicalSize; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; + +#ifdef _SVX_ITEMWIN_CXX + void ReleaseFocus_Impl(); +#endif + +protected: + virtual void Modify(); + virtual void Down(); + virtual void Up(); // Nur zur Sicherheit + + virtual long PreNotify( NotifyEvent& rNEvt ); + virtual long Notify( NotifyEvent& rNEvt ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +public: + SvxMetricField( Window* pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + WinBits nBits = WB_BORDER | WB_SPIN | WB_REPEAT ); + ~SvxMetricField(); + + void Update( const XLineWidthItem* pItem ); + void SetCoreUnit( SfxMapUnit eUnit ); + void RefreshDlgUnit(); +}; + +// class SvxFillTypeBox -------------------------------------------------- + +class SvxFillTypeBox : public FillTypeLB +{ +public: + SvxFillTypeBox( Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); + ~SvxFillTypeBox(); + + void Selected() { bSelect = TRUE; } + BOOL IsRelease() { return bRelease;} + +protected: + virtual long PreNotify( NotifyEvent& rNEvt ); + virtual long Notify( NotifyEvent& rNEvt ); + +private: + USHORT nCurPos; + BOOL bSelect; + BOOL bRelease; + +#ifdef _SVX_ITEMWIN_CXX + void ReleaseFocus_Impl(); +#endif +}; + +// class SvxFillAttrBox -------------------------------------------------- + +class SvxFillAttrBox : public FillAttrLB +{ +public: + SvxFillAttrBox( Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); + ~SvxFillAttrBox(); + + BOOL IsRelease() { return bRelease;} + +protected: + virtual long PreNotify( NotifyEvent& rNEvt ); + virtual long Notify( NotifyEvent& rNEvt ); + virtual void Select(); + +private: + USHORT nCurPos; + BOOL bRelease; + +#ifdef _SVX_ITEMWIN_CXX + void ReleaseFocus_Impl(); +#endif +}; + +#endif // #ifndef _SVX_ITEMWIN_HXX + diff --git a/svx/inc/svx/keepitem.hxx b/svx/inc/svx/keepitem.hxx new file mode 100644 index 000000000000..f12f6a79e413 --- /dev/null +++ b/svx/inc/svx/keepitem.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: keepitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_KEEPITEM_HXX +#define _SVX_KEEPITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +namespace rtl +{ + class OUString; +} + +// class SvxFmtKeepItem ------------------------------------------------ + +/* +[Beschreibung] +Dieses Item beschreibt eine logische Variable "Absaetze zusammenhalten?". +*/ + +class SVX_DLLPUBLIC SvxFmtKeepItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + inline SvxFmtKeepItem( const BOOL bKeep /*= FALSE*/, + const USHORT _nWhich ); + inline SvxFmtKeepItem& operator=( const SvxFmtKeepItem& rSplit ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream&, USHORT ) const; + virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +inline SvxFmtKeepItem::SvxFmtKeepItem( const BOOL bKeep, const USHORT _nWhich ) : + SfxBoolItem( _nWhich, bKeep ) +{} + +inline SvxFmtKeepItem& SvxFmtKeepItem::operator=( const SvxFmtKeepItem& rKeep ) +{ + SetValue( rKeep.GetValue() ); + return *this; +} + +#endif + diff --git a/svx/inc/svx/kernitem.hxx b/svx/inc/svx/kernitem.hxx new file mode 100644 index 000000000000..9e6f5b81da2b --- /dev/null +++ b/svx/inc/svx/kernitem.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: kernitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_KERNITEM_HXX +#define _SVX_KERNITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxKerningItem -------------------------------------------------- + +// Achtung: Twips-Werte +// Twips: 0 = kein Kerning + +/* [Beschreibung] + + Dieses Item beschreibt die Schrift-Laufweite. +*/ + +class SVX_DLLPUBLIC SvxKerningItem : public SfxInt16Item +{ +public: + TYPEINFO(); + + SvxKerningItem( const short nKern /*= 0*/, const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual int ScaleMetrics( long nMult, long nDiv ); + virtual int HasMetrics() const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxKerningItem& operator=(const SvxKerningItem& rKern) { + SetValue( rKern.GetValue() ); + return *this; + } + + virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +#endif + diff --git a/svx/inc/svx/langbox.hxx b/svx/inc/svx/langbox.hxx new file mode 100644 index 000000000000..476d78c53d03 --- /dev/null +++ b/svx/inc/svx/langbox.hxx @@ -0,0 +1,128 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: langbox.hxx,v $ + * $Revision: 1.4.242.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_LANGBOX_HXX +#define _SVX_LANGBOX_HXX + +// include --------------------------------------------------------------- + +#include <com/sun/star/uno/Sequence.hxx> +#include <vcl/lstbox.hxx> +#include "svx/svxdllapi.h" +#include <vcl/image.hxx> +#include <tools/solar.h> +#include <layout/layout.hxx> + +class SvtLanguageTable; + +#define LANG_LIST_EMPTY 0x0000 +#define LANG_LIST_ALL 0x0001 +#define LANG_LIST_WESTERN 0x0002 +#define LANG_LIST_CTL 0x0004 +#define LANG_LIST_CJK 0x0008 +#define LANG_LIST_FBD_CHARS 0x0010 +#define LANG_LIST_SPELL_AVAIL 0x0020 +#define LANG_LIST_HYPH_AVAIL 0x0040 +#define LANG_LIST_THES_AVAIL 0x0080 +#define LANG_LIST_ONLY_KNOWN 0x0100 // list only locales provided by I18N +#define LANG_LIST_SPELL_USED 0x0200 +#define LANG_LIST_HYPH_USED 0x0400 +#define LANG_LIST_THES_USED 0x0800 +#define LANG_LIST_ALSO_PRIMARY_ONLY 0x1000 // Do not exclude primary-only + // languages that do not form a + // locale, such as Arabic as + // opposed to Arabic-Egypt. + + +class SVX_DLLPUBLIC SvxLanguageBox : public ListBox +{ +public: + +private: + Image m_aNotCheckedImage; + Image m_aCheckedImage; + Image m_aCheckedImageHC; + String m_aAllString; + com::sun::star::uno::Sequence< INT16 > *m_pSpellUsedLang; + SvtLanguageTable* m_pLangTable; + INT16 m_nLangList; + BOOL m_bHasLangNone; + BOOL m_bLangNoneIsLangAll; + BOOL m_bWithCheckmark; + + SVX_DLLPRIVATE void Init(); + SVX_DLLPRIVATE USHORT ImplInsertImgEntry( const String& rEntry, USHORT nPos, bool bChecked ); + SVX_DLLPRIVATE USHORT ImplInsertLanguage(LanguageType, USHORT, sal_Int16 ); + +public: + SvxLanguageBox( Window* pParent, WinBits nWinStyle, BOOL bCheck = FALSE); + SvxLanguageBox( Window* pParent, const ResId& rResId, BOOL bCheck = FALSE); + ~SvxLanguageBox(); + + void SetLanguageList( INT16 nLangList, + BOOL bHasLangNone, BOOL bLangNoneIsLangAll = FALSE, + BOOL bCheckSpellAvail = FALSE ); + + USHORT InsertLanguage( const LanguageType eLangType, USHORT nPos = LISTBOX_APPEND ); + USHORT InsertDefaultLanguage( sal_Int16 nType, USHORT nPos = LISTBOX_APPEND ); + USHORT InsertLanguage( const LanguageType eLangType, + BOOL bCheckEntry, USHORT nPos = LISTBOX_APPEND ); + void RemoveLanguage( const LanguageType eLangType ); + void SelectLanguage( const LanguageType eLangType, BOOL bSelect = TRUE ); + LanguageType GetSelectLanguage() const; + BOOL IsLanguageSelected( const LanguageType eLangType ) const; +}; + +#if ENABLE_LAYOUT +namespace layout +{ +class SvxLanguageBoxImpl; +class SVX_DLLPUBLIC SvxLanguageBox : public ListBox +{ + /*DECL_GET_IMPL( SvxLanguageBox ); + DECL_CONSTRUCTORS( SvxLanguageBox, ListBox, WB_BORDER ); + DECL_GET_WINDOW (SvxLanguageBox);*/ + +public: + SvxLanguageBox( Context*, const char*, BOOL bCheck = FALSE ); + ~SvxLanguageBox (); + void SetLanguageList (sal_Int16 list, bool hasLangNone, bool langNoneIsLangAll=false, bool checkSpellAvailable=false); + + sal_uInt16 InsertLanguage (LanguageType const type, sal_uInt16 pos=LISTBOX_APPEND); + sal_uInt16 InsertLanguage (LanguageType const type, bool checkEntry, sal_uInt16 pos=LISTBOX_APPEND); + void RemoveLanguage (LanguageType const type); + void SelectLanguage (LanguageType const type, bool select=true); + LanguageType GetSelectLanguage () const; + bool IsLanguageSelected( LanguageType const type) const; +}; +}; +#endif + +#endif + diff --git a/svx/inc/svx/langitem.hxx b/svx/inc/svx/langitem.hxx new file mode 100644 index 000000000000..5345fede13f7 --- /dev/null +++ b/svx/inc/svx/langitem.hxx @@ -0,0 +1,90 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: langitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_LANGITEM_HXX +#define _SVX_LANGITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include <i18npool/lang.h> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxLanguageItem ------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt eine Sprache. +*/ + +class SVX_DLLPUBLIC SvxLanguageItem : public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxLanguageItem( const LanguageType eLang /*= LANGUAGE_GERMAN*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual USHORT GetValueCount() const; + + inline SvxLanguageItem& operator=(const SvxLanguageItem& rLang) + { + SetValue( rLang.GetValue() ); + return *this; + } + + // enum cast + LanguageType GetLanguage() const + { return (LanguageType)GetValue(); } + void SetLanguage( const LanguageType eLang ) + { SetValue( (USHORT)eLang ); } + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +#endif + diff --git a/svx/inc/svx/lathe3d.hxx b/svx/inc/svx/lathe3d.hxx new file mode 100644 index 000000000000..a0474fef522d --- /dev/null +++ b/svx/inc/svx/lathe3d.hxx @@ -0,0 +1,128 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: lathe3d.hxx,v $ + * $Revision: 1.4.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_LATHE3D_HXX +#define _E3D_LATHE3D_HXX + +#include <svx/obj3d.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* 3D-Rotationsobjekt aus uebergebenem 2D-Polygon erzeugen +|* +|* Das aPolyPoly3D wird in nHSegments-Schritten um die Achse rotiert. +|* nVSegments gibt die Anzahl der Linien von aPolyPoly3D an und stellt damit +|* quasi eine vertikale Segmentierung dar. +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dLatheObj : public E3dCompoundObject +{ +private: + // #110094# DrawContact section + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // Partcodes fuer Wireframe-Generierung: Standard oder Deckelflaeche + enum { LATHE_PART_STD = 1, LATHE_PART_COVER = 2 }; + basegfx::B2DPolyPolygon maPolyPoly2D; + + protected: + void SetDefaultAttributes(E3dDefaultAttributes& rDefault); + + public: + TYPEINFO(); + E3dLatheObj(E3dDefaultAttributes& rDefault, const basegfx::B2DPolyPolygon rPoly2D); + E3dLatheObj(); + + // HorizontalSegments: + sal_uInt32 GetHorizontalSegments() const + { return ((const Svx3DHorizontalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); } + + // VerticalSegments: + sal_uInt32 GetVerticalSegments() const + { return ((const Svx3DVerticalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); } + + // PercentDiagonal: 0..100, before 0.0..0.5 + sal_uInt16 GetPercentDiagonal() const + { return ((const Svx3DPercentDiagonalItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); } + + // BackScale: 0..100, before 0.0..1.0 + sal_uInt16 GetBackScale() const + { return ((const Svx3DBackscaleItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); } + + // EndAngle: 0..10000 + sal_uInt32 GetEndAngle() const + { return ((const Svx3DEndAngleItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue(); } + + // #107245# GetSmoothNormals() for bLatheSmoothed + sal_Bool GetSmoothNormals() const + { return ((const Svx3DSmoothNormalsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_NORMALS)).GetValue(); } + + // #107245# GetSmoothLids() for bLatheSmoothFrontBack + sal_Bool GetSmoothLids() const + { return ((const Svx3DSmoothLidsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_LIDS)).GetValue(); } + + // #107245# GetCharacterMode() for bLatheCharacterMode + sal_Bool GetCharacterMode() const + { return ((const Svx3DCharacterModeItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CHARACTER_MODE)).GetValue(); } + + // #107245# GetCloseFront() for bLatheCloseFront + sal_Bool GetCloseFront() const + { return ((const Svx3DCloseFrontItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_FRONT)).GetValue(); } + + // #107245# GetCloseBack() for bLatheCloseBack + sal_Bool GetCloseBack() const + { return ((const Svx3DCloseBackItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK)).GetValue(); } + + virtual UINT16 GetObjIdentifier() const; + void ReSegment(sal_uInt32 nHSegs, sal_uInt32 nVSegs); + + virtual void operator=(const SdrObject&); + + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + // TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert". + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + // Lokale Parameter setzen/lesen mit Geometrieneuerzeugung + void SetPolyPoly2D(const basegfx::B2DPolyPolygon& rNew); + const basegfx::B2DPolyPolygon& GetPolyPoly2D() { return maPolyPoly2D; } + + // Aufbrechen + virtual BOOL IsBreakObjPossible(); + virtual SdrAttrObj* GetBreakObj(); +}; + +#endif // _E3D_LATHE3D_HXX + diff --git a/svx/inc/svx/lcolitem.hxx b/svx/inc/svx/lcolitem.hxx new file mode 100644 index 000000000000..cd110dd19d3a --- /dev/null +++ b/svx/inc/svx/lcolitem.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: lcolitem.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_LCOLITEM_HXX +#define _SVX_LCOLITEM_HXX + +// include --------------------------------------------------------------- + +#include <svx/colritem.hxx> +#include <svx/svxids.hrc> +#include "svx/svxdllapi.h" + +/* + * dummy-Item fuer ToolBox-Controller: + * + */ + +class SVX_DLLPUBLIC SvxLineColorItem : public SvxColorItem +{ +public: + TYPEINFO(); + + SvxLineColorItem( const USHORT nId ); + SvxLineColorItem( const Color& aColor, const USHORT nId ); + SvxLineColorItem( SvStream& rStrm, const USHORT nId ); + SvxLineColorItem( const SvxLineColorItem& rCopy ); + ~SvxLineColorItem(); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * pIntlWrapper = 0 ) + const; + + inline SvxLineColorItem& operator=(const SvxLineColorItem& rColor) + { return (SvxLineColorItem&)SvxColorItem:: + operator=((const SvxColorItem&)rColor); } + +}; + +#endif + diff --git a/svx/inc/svx/lrspitem.hxx b/svx/inc/svx/lrspitem.hxx new file mode 100644 index 000000000000..1f54209cc82a --- /dev/null +++ b/svx/inc/svx/lrspitem.hxx @@ -0,0 +1,185 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: lrspitem.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_LRSPITEM_HXX +#define _SVX_LRSPITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +namespace rtl +{ + class OUString; +} + +// class SvxLRSpaceItem -------------------------------------------------- + +/* +[Beschreibung] +Linker/Rechter Rand sowie Erstzeileneinzug + +SvxLRSpaceItem bietet zwei Schnittstellen zur Befragung des linken +Randes und des Erstzeileneinzuges an. Die Get-Methoden liefern +die Member zurueck, wie sie das Layout bisher auch erwartete: +Der linke Rand verschiebt sich beim negativem Erstzeileneinzug +nach links. Die SetTxt/GetTxt-Methoden setzen voraus, dass der +linke Rand der 0-Punkt des Erstzeileneinzugs darstellt: + + UI UI LAYOUT UI/TEXT UI/TEXT (Wo?) +SetTxtLeft SetTxtFirst GetLeft GetTxtLeft GetTxtFirst (Was?) + 500 -500 0 500 -500 (Wieviel?) + 500 0 500 500 0 + 500 +500 500 500 +500 + 700 -500 200 700 -500 +*/ + +#define LRSPACE_16_VERSION ((USHORT)0x0001) +#define LRSPACE_TXTLEFT_VERSION ((USHORT)0x0002) +#define LRSPACE_AUTOFIRST_VERSION ((USHORT)0x0003) +#define LRSPACE_NEGATIVE_VERSION ((USHORT)0x0004) + +class SVX_DLLPUBLIC SvxLRSpaceItem : public SfxPoolItem +{ + short nFirstLineOfst; // Erstzeileneinzug _immer_ relativ zu nTxtLeft + long nTxtLeft; // wir spendieren einen USHORT + long nLeftMargin; // nLeft oder der neg. Erstzeileneinzug + long nRightMargin; // der unproblematische rechte Rand + + USHORT nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin; + BOOL bAutoFirst : 1; // Automatische Berechnung der Erstzeileneinzugs + + void AdjustLeft(); // nLeftMargin und nTxtLeft werden angepasst. + +public: + TYPEINFO(); + + SvxLRSpaceItem( const USHORT nId ); + SvxLRSpaceItem( const long nLeft, const long nRight, + const long nTLeft /*= 0*/, const short nOfset /*= 0*/, + const USHORT nId ); + inline SvxLRSpaceItem& operator=( const SvxLRSpaceItem &rCpy ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual int ScaleMetrics( long nMult, long nDiv ); + virtual int HasMetrics() const; + + // Die "Layout-Schnittstelle": + inline void SetLeft ( const long nL, const USHORT nProp = 100 ); + inline void SetRight( const long nR, const USHORT nProp = 100 ); + + // abfragen / direktes setzen der absoluten Werte + inline long GetLeft() const { return nLeftMargin; } + inline long GetRight() const { return nRightMargin;} + inline void SetLeftValue( const long nL ) { nTxtLeft = nLeftMargin = nL; } + inline void SetRightValue( const long nR ) { nRightMargin = nR; } + inline BOOL IsAutoFirst() const { return bAutoFirst; } + inline void SetAutoFirst( const BOOL bNew ) { bAutoFirst = bNew; } + + // abfragen / setzen der Prozent-Werte + inline void SetPropLeft( const USHORT nProp = 100 ) + { nPropLeftMargin = nProp; } + inline void SetPropRight( const USHORT nProp = 100 ) + { nPropRightMargin = nProp;} + inline USHORT GetPropLeft() const { return nPropLeftMargin; } + inline USHORT GetPropRight() const { return nPropRightMargin;} + + // Die "UI/Text-Schnittstelle": + inline void SetTxtLeft( const long nL, const USHORT nProp = 100 ); + inline long GetTxtLeft() const { return nTxtLeft; } + + inline void SetTxtFirstLineOfst( const short nF, const USHORT nProp = 100 ); + inline short GetTxtFirstLineOfst() const { return nFirstLineOfst; } + inline void SetPropTxtFirstLineOfst( const USHORT nProp = 100 ) + { nPropFirstLineOfst = nProp; } + inline USHORT GetPropTxtFirstLineOfst() const + { return nPropFirstLineOfst; } + inline void SetTxtFirstLineOfstValue( const short nValue ) + { nFirstLineOfst = nValue; } +}; + +inline SvxLRSpaceItem &SvxLRSpaceItem::operator=( const SvxLRSpaceItem &rCpy ) +{ + nFirstLineOfst = rCpy.nFirstLineOfst; + nTxtLeft = rCpy.nTxtLeft; + nLeftMargin = rCpy.nLeftMargin; + nRightMargin = rCpy.nRightMargin; + nPropFirstLineOfst = rCpy.nPropFirstLineOfst; + nPropLeftMargin = rCpy.nPropLeftMargin; + nPropRightMargin = rCpy.nPropRightMargin; + bAutoFirst = rCpy.bAutoFirst; + return *this; +} + +inline void SvxLRSpaceItem::SetLeft( const long nL, const USHORT nProp ) +{ + nLeftMargin = (nL * nProp) / 100; + nTxtLeft = nLeftMargin; + nPropLeftMargin = nProp; +} +inline void SvxLRSpaceItem::SetRight( const long nR, const USHORT nProp ) +{ + nRightMargin = (nR * nProp) / 100; + nPropRightMargin = nProp; +} +inline void SvxLRSpaceItem::SetTxtFirstLineOfst( const short nF, + const USHORT nProp ) +{ + nFirstLineOfst = short((long(nF) * nProp ) / 100); + nPropFirstLineOfst = nProp; + AdjustLeft(); +} + +inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const USHORT nProp ) +{ + nTxtLeft = (nL * nProp) / 100; + nPropLeftMargin = nProp; + AdjustLeft(); +} + +#endif + diff --git a/svx/inc/svx/lspcitem.hxx b/svx/inc/svx/lspcitem.hxx new file mode 100644 index 000000000000..e73a3aed11f7 --- /dev/null +++ b/svx/inc/svx/lspcitem.hxx @@ -0,0 +1,130 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: lspcitem.hxx,v $ + * $Revision: 1.4.216.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_LSPCITEM_HXX +#define _SVX_LSPCITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#include <svx/svxenum.hxx> + +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxLineSpacingItem ---------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt den Abstand zwischen den Zeilen. +*/ + +#define LINE_SPACE_DEFAULT_HEIGHT 200 +class SVX_DLLPUBLIC SvxLineSpacingItem : public SfxEnumItemInterface +{ + friend SvStream& operator<<( SvStream&, SvxLineSpacingItem& ); //$ ostream + + short nInterLineSpace; + USHORT nLineHeight; + BYTE nPropLineSpace; + SvxLineSpace eLineSpace; + SvxInterLineSpace eInterLineSpace; + +public: + TYPEINFO(); + + // Der Writer verlaesst sich auf eine Default-Hoehe von 200! + // Eigentlich wuerde ich alle Werte mit 0 initialisieren, aber wer kann + // die Folgen beim Writer absehen ? + // => lieber einen krummen Wert als Default, aber der Programmierer + // sieht, dass dort etwas besonderes passiert. + + SvxLineSpacingItem( USHORT nHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + + // Methoden zum Abfragen und Aendern + // Interlinespace wird zur Hoehe addiert. + inline short GetInterLineSpace() const { return nInterLineSpace; } + inline void SetInterLineSpace( const short nSpace ) + { + nInterLineSpace = nSpace; + eInterLineSpace = SVX_INTER_LINE_SPACE_FIX; + } + + // Bestimmt absolute oder minimale Zeilenhoehe. + inline USHORT GetLineHeight() const { return nLineHeight; } + inline void SetLineHeight( const USHORT nHeight ) + { + nLineHeight = nHeight; + eLineSpace = SVX_LINE_SPACE_MIN; + } + + // Vergroessert oder verkleinert die Zeilenhoehe. + BYTE GetPropLineSpace() const { return nPropLineSpace; } + inline void SetPropLineSpace( const BYTE nProp ) + { + nPropLineSpace = nProp; + eInterLineSpace = SVX_INTER_LINE_SPACE_PROP; + } + + inline SvxLineSpace &GetLineSpaceRule() { return eLineSpace; } + inline SvxLineSpace GetLineSpaceRule() const { return eLineSpace; } + + inline SvxInterLineSpace &GetInterLineSpaceRule() { return eInterLineSpace; } + inline SvxInterLineSpace GetInterLineSpaceRule() const { return eInterLineSpace; } + + virtual USHORT GetValueCount() const; + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual USHORT GetEnumValue() const; + virtual void SetEnumValue( USHORT nNewVal ); +}; + +#endif + diff --git a/svx/inc/svx/msdffdef.hxx b/svx/inc/svx/msdffdef.hxx new file mode 100644 index 000000000000..400eb4be9e54 --- /dev/null +++ b/svx/inc/svx/msdffdef.hxx @@ -0,0 +1,1226 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: msdffdef.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _MSDFFDEF_HXX +#define _MSDFFDEF_HXX + + +#include <tools/solar.h> +#include <tools/stream.hxx> +#ifndef _TABLE_HXX +#include <tools/table.hxx> +#endif +#include <tools/string.hxx> +#include <tools/gen.hxx> +#include "svx/svxdllapi.h" + +#define DFF_COMMON_RECORD_HEADER_SIZE 8 + +#define DFF_PSFLAG_CONTAINER 0x0F // If the version field of a record + // header takes on this value, the + // record header marks the start of + // a container. + +#define DFF_PST_Unknown 0 +#define DFF_PST_SubContainerCompleted 1 +#define DFF_PST_IRRAtom 2 +#define DFF_PST_PSS 3 +#define DFF_PST_SubContainerException 4 +#define DFF_PST_ClientSignal1 6 +#define DFF_PST_ClientSignal2 7 +#define DFF_PST_PowerPointStateInfoAtom 10 +#define DFF_PST_Document 1000 +#define DFF_PST_DocumentAtom 1001 +#define DFF_PST_EndDocument 1002 +#define DFF_PST_SlidePersist 1003 +#define DFF_PST_SlideBase 1004 +#define DFF_PST_SlideBaseAtom 1005 +#define DFF_PST_Slide 1006 +#define DFF_PST_SlideAtom 1007 +#define DFF_PST_Notes 1008 +#define DFF_PST_NotesAtom 1009 +#define DFF_PST_Environment 1010 +#define DFF_PST_SlidePersistAtom 1011 +#define DFF_PST_Scheme 1012 +#define DFF_PST_SchemeAtom 1013 +#define DFF_PST_DocViewInfo 1014 +#define DFF_PST_SslideLayoutAtom 1015 +#define DFF_PST_MainMaster 1016 +#define DFF_PST_SSSlideInfoAtom 1017 +#define DFF_PST_SlideViewInfo 1018 +#define DFF_PST_GuideAtom 1019 +#define DFF_PST_ViewInfo 1020 +#define DFF_PST_ViewInfoAtom 1021 +#define DFF_PST_SlideViewInfoAtom 1022 +#define DFF_PST_VBAInfo 1023 +#define DFF_PST_VBAInfoAtom 1024 +#define DFF_PST_SSDocInfoAtom 1025 +#define DFF_PST_Summary 1026 +#define DFF_PST_Texture 1027 +#define DFF_PST_VBASlideInfo 1028 +#define DFF_PST_VBASlideInfoAtom 1029 +#define DFF_PST_DocRoutingSlip 1030 +#define DFF_PST_OutlineViewInfo 1031 +#define DFF_PST_SorterViewInfo 1032 +#define DFF_PST_ExObjList 1033 +#define DFF_PST_ExObjListAtom 1034 +#define DFF_PST_PPDrawingGroup 1035 +#define DFF_PST_PPDrawing 1036 +#define DFF_PST_NamedShows 1040 +#define DFF_PST_NamedShow 1041 +#define DFF_PST_NamedShowSlides 1042 +#define DFF_PST_List 2000 +#define DFF_PST_FontCollection 2005 +#define DFF_PST_ListPlaceholder 2017 +#define DFF_PST_BookmarkCollection 2019 +#define DFF_PST_SoundCollection 2020 +#define DFF_PST_SoundCollAtom 2021 +#define DFF_PST_Sound 2022 +#define DFF_PST_SoundData 2023 +#define DFF_PST_BookmarkSeedAtom 2025 +#define DFF_PST_GuideList 2026 +#define DFF_PST_RunArray 2028 +#define DFF_PST_RunArrayAtom 2029 +#define DFF_PST_ArrayElementAtom 2030 +#define DFF_PST_Int4ArrayAtom 2031 +#define DFF_PST_ColorSchemeAtom 2032 +#define DFF_PST_OEShape 3008 +#define DFF_PST_ExObjRefAtom 3009 +#define DFF_PST_OEPlaceholderAtom 3011 +#define DFF_PST_GrColor 3020 +#define DFF_PST_GrectAtom 3025 +#define DFF_PST_GratioAtom 3031 +#define DFF_PST_Gscaling 3032 +#define DFF_PST_GpointAtom 3034 +#define DFF_PST_OEShapeAtom 3035 +#define DFF_PST_OutlineTextRefAtom 3998 +#define DFF_PST_TextHeaderAtom 3999 +#define DFF_PST_TextCharsAtom 4000 +#define DFF_PST_StyleTextPropAtom 4001 +#define DFF_PST_BaseTextPropAtom 4002 +#define DFF_PST_TxMasterStyleAtom 4003 +#define DFF_PST_TxCFStyleAtom 4004 +#define DFF_PST_TxPFStyleAtom 4005 +#define DFF_PST_TextRulerAtom 4006 +#define DFF_PST_TextBookmarkAtom 4007 +#define DFF_PST_TextBytesAtom 4008 +#define DFF_PST_TxSIStyleAtom 4009 +#define DFF_PST_TextSpecInfoAtom 4010 +#define DFF_PST_DefaultRulerAtom 4011 +#define DFF_PST_FontEntityAtom 4023 +#define DFF_PST_FontEmbedData 4024 +#define DFF_PST_TypeFace 4025 +#define DFF_PST_CString 4026 +#define DFF_PST_ExternalObject 4027 +#define DFF_PST_MetaFile 4033 +#define DFF_PST_ExOleObj 4034 +#define DFF_PST_ExOleObjAtom 4035 +#define DFF_PST_ExPlainLinkAtom 4036 +#define DFF_PST_CorePict 4037 +#define DFF_PST_CorePictAtom 4038 +#define DFF_PST_ExPlainAtom 4039 +#define DFF_PST_SrKinsoku 4040 +#define DFF_PST_Handout 4041 +#define DFF_PST_ExEmbed 4044 +#define DFF_PST_ExEmbedAtom 4045 +#define DFF_PST_ExLink 4046 +#define DFF_PST_ExLinkAtom_old 4047 +#define DFF_PST_BookmarkEntityAtom 4048 +#define DFF_PST_ExLinkAtom 4049 +#define DFF_PST_SrKinsokuAtom 4050 +#define DFF_PST_ExHyperlinkAtom 4051 +#define DFF_PST_ExPlain 4053 +#define DFF_PST_ExPlainLink 4054 +#define DFF_PST_ExHyperlink 4055 +#define DFF_PST_SlideNumberMCAtom 4056 +#define DFF_PST_HeadersFooters 4057 +#define DFF_PST_HeadersFootersAtom 4058 +#define DFF_PST_RecolorEntryAtom 4062 +#define DFF_PST_TxInteractiveInfoAtom 4063 +#define DFF_PST_EmFormatAtom 4065 +#define DFF_PST_CharFormatAtom 4066 +#define DFF_PST_ParaFormatAtom 4067 +#define DFF_PST_MasterText 4068 +#define DFF_PST_RecolorInfoAtom 4071 +#define DFF_PST_ExQuickTime 4073 +#define DFF_PST_ExQuickTimeMovie 4074 +#define DFF_PST_ExQuickTimeMovieData 4075 +#define DFF_PST_ExSubscription 4076 +#define DFF_PST_ExSubscriptionSection 4077 +#define DFF_PST_ExControl 4078 +#define DFF_PST_ExControlAtom 4091 +#define DFF_PST_SlideListWithText 4080 +#define DFF_PST_AnimationInfoAtom 4081 +#define DFF_PST_InteractiveInfo 4082 +#define DFF_PST_InteractiveInfoAtom 4083 +#define DFF_PST_SlideList 4084 +#define DFF_PST_UserEditAtom 4085 +#define DFF_PST_CurrentUserAtom 4086 +#define DFF_PST_DateTimeMCAtom 4087 +#define DFF_PST_GenericDateMCAtom 4088 +#define DFF_PST_HeaderMCAtom 4089 +#define DFF_PST_FooterMCAtom 4090 +#define DFF_PST_ExMediaAtom 4100 +#define DFF_PST_ExVideo 4101 +#define DFF_PST_ExAviMovie 4102 +#define DFF_PST_ExMCIMovie 4103 +#define DFF_PST_ExMIDIAudio 4109 +#define DFF_PST_ExCDAudio 4110 +#define DFF_PST_ExWAVAudioEmbedded 4111 +#define DFF_PST_ExWAVAudioLink 4112 +#define DFF_PST_ExOleObjStg 4113 +#define DFF_PST_ExCDAudioAtom 4114 +#define DFF_PST_ExWAVAudioEmbeddedAtom 4115 +#define DFF_PST_AnimationInfo 4116 +#define DFF_PST_RTFDateTimeMCAtom 4117 +#define DFF_PST_ProgTags 5000 +#define DFF_PST_ProgStringTag 5001 +#define DFF_PST_ProgBinaryTag 5002 +#define DFF_PST_BinaryTagData 5003 +#define DFF_PST_PrintOptions 6000 +#define DFF_PST_PersistPtrFullBlock 6001 +#define DFF_PST_PersistPtrIncrementalBlock 6002 +#define DFF_PST_RulerIndentAtom 10000 +#define DFF_PST_GscalingAtom 10001 +#define DFF_PST_GrColorAtom 10002 +#define DFF_PST_GLPointAtom 10003 +#define DFF_PST_GlineAtom 10004 + +// Record Name FBT-Value Instance Contents Wrd Exl Ppt Ver + +#define DFF_msofbtDggContainer 0xF000 // per-document data X X X +#define DFF_msofbtDgg 0xF006 // an FDGG and several FIDCLs X X X 0 +#define DFF_msofbtCLSID 0xF016 // the CLSID of the application that put the data on the clipboard C C C 0 +#define DFF_msofbtOPT 0xF00B // count of properties the document-wide default shape properties X X X 3 +#define DFF_msofbtColorMRU 0xF11A // count of colors the colors in the MRU swatch X X X 0 +#define DFF_msofbtSplitMenuColors 0xF11E // count of colors the colors in the top-level split menus X X X 0 +#define DFF_msofbtBstoreContainer 0xF001 // count of BLIPs all images in the document (JPEGs, metafiles, etc.) X X X +#define DFF_msofbtBSE 0xF007 // BLIP type an FBSE (one per BLIP) X X X 2 +#define DFF_msofbtBlipFirst 0xF018 // range of fbts reserved for various kinds of BLIPs X X X +#define DFF_msofbtBlipLast 0xF117 // range of fbts reserved for various kinds of BLIPs X X X + +#define DFF_msofbtDgContainer 0xF002 // per-sheet/page/slide data X X X +#define DFF_msofbtDg 0xF008 // drawing ID an FDG X X X 0 +#define DFF_msofbtRegroupItems 0xF118 // count of regroup entries several FRITs X X X 0 +#define DFF_msofbtColorScheme 0xF120 // count of colors the colors of the source host's color scheme C C 0 +#define DFF_msofbtSpgrContainer 0xF003 // several SpContainers, the first of which is the group shape itself X X X +#define DFF_msofbtSpContainer 0xF004 // a shape X X X +#define DFF_msofbtSpgr 0xF009 // an FSPGR; only present if the shape is a group shape X X X 1 +#define DFF_msofbtSp 0xF00A // shape type an FSP X X X 2 +#define DFF_msofbtTextbox 0xF00C // RTF text C C C 0 +#define DFF_msofbtClientTextbox 0xF00D // host-defined the text in the textbox, in host-defined format X X X +#define DFF_msofbtAnchor 0xF00E // a RECT, in 100000ths of an inch C C C 0 +#define DFF_msofbtChildAnchor 0xF00F // a RECT, in units relative to the parent group X X X 0 +#define DFF_msofbtClientAnchor 0xF010 // host-defined the location of the shape, in a host-defined format X X X +#define DFF_msofbtClientData 0xF011 // host-defined host-specific data X X X +#define DFF_msofbtOleObject 0xF11F // a serialized IStorage for an OLE object C C C 0 +#define DFF_msofbtDeletedPspl 0xF11D // an FPSPL; only present in top-level deleted shapes X 0 +#define DFF_msofbtUDefProp 0xF122 // range of fbts reserved for various kinds of BLIPs X X X +#define DFF_msofbtSolverContainer 0xF005 // count of rules the rules governing shapes X X X +#define DFF_msofbtConnectorRule 0xF012 // an FConnectorRule X X 1 +#define DFF_msofbtAlignRule 0xF013 // an FAlignRule X X X 0 +#define DFF_msofbtArcRule 0xF014 // an FARCRU X X X 0 +#define DFF_msofbtClientRule 0xF015 // host-defined host-defined +#define DFF_msofbtCalloutRule 0xF017 // an FCORU X X X 0 + +#define DFF_msofbtSelection 0xF119 // an FDGSL followed by the SPIDs of the shapes in the selection X 0 + +// Werte fuer den ULONG im DFF_PST_TextHeaderAtom +enum DFF_TextHeader { + DFFTH_TITLE, + DFFTH_BODY, + DFFTH_NOTES, + DFFTH_NOTUSED, + DFFTH_OTHER, // Text in a Shape + DFFTH_CENTERBODY, // Subtitle in Title-Slide + DFFTH_CENTERTITLE, // Title in Title-Slide + DFFTH_HALFBODY, // Body in two-column slide + DFFTH_QUARTERBODY // Body in four-body slide +}; + + +// Shape Properties +// 1pt = 12700 EMU (English Metric Units) +// 1pt = 20 Twip = 20/1440" = 1/72" +// 1twip=635 EMU +// 1" = 12700*72 = 914400 EMU +// 1" = 25.4mm +// 1mm = 36000 EMU +// Transform +#define DFF_Prop_Rotation 4 // Fixed Point 16.16 degrees +// Protection +#define DFF_Prop_LockRotation 119 // BOOL No rotation +#define DFF_Prop_LockAspectRatio 120 // BOOL Don't allow changes in aspect ratio +#define DFF_Prop_LockPosition 121 // BOOL Don't allow the shape to be moved +#define DFF_Prop_LockAgainstSelect 122 // BOOL Shape may not be selected +#define DFF_Prop_LockCropping 123 // BOOL No cropping this shape +#define DFF_Prop_LockVertices 124 // BOOL Edit Points not allowed +#define DFF_Prop_LockText 125 // BOOL Do not edit text +#define DFF_Prop_LockAdjustHandles 126 // BOOL Do not adjust +#define DFF_Prop_LockAgainstGrouping 127 // BOOL Do not group this shape +// Text +#define DFF_Prop_lTxid 128 // LONG id for the text, value determined by the host +#define DFF_Prop_dxTextLeft 129 // LONG margins relative to shape's inscribed text rectangle (in EMUs) +#define DFF_Prop_dyTextTop 130 // LONG +#define DFF_Prop_dxTextRight 131 // LONG +#define DFF_Prop_dyTextBottom 132 // LONG +#define DFF_Prop_WrapText 133 // MSO_WRAPMODE Wrap text at shape margins +#define DFF_Prop_scaleText 134 // LONG Text zoom/scale (used if fFitTextToShape) +#define DFF_Prop_anchorText 135 // MSO_ANCHOR How to anchor the text +#define DFF_Prop_txflTextFlow 136 // MSO_TXFL Text flow +#define DFF_Prop_cdirFont 137 // MSO_CDIR Font rotation +#define DFF_Prop_hspNext 138 // MSO_HSP ID of the next shape (used by Word for linked textboxes) +#define DFF_Prop_txdir 139 // MSO_TXDIR Bi-Di Text direction +#define DFF_Prop_SelectText 187 // BOOL TRUE if single click selects text, FALSE if two clicks +#define DFF_Prop_AutoTextMargin 188 // BOOL use host's margin calculations +#define DFF_Prop_RotateText 189 // BOOL Rotate text with shape +#define DFF_Prop_FitShapeToText 190 // BOOL Size shape to fit text size +#define DFF_Prop_FitTextToShape 191 // BOOL Size text to fit shape size +// GeoText +#define DFF_Prop_gtextUNICODE 192 // WCHAR* UNICODE text string +#define DFF_Prop_gtextRTF 193 // char* RTF text string +#define DFF_Prop_gtextAlign 194 // MSO_GEOTEXTALIGN alignment on curve +#define DFF_Prop_gtextSize 195 // LONG default point size +#define DFF_Prop_gtextSpacing 196 // LONG fixed point 16.16 +#define DFF_Prop_gtextFont 197 // WCHAR* font family name +#define DFF_Prop_gtextFReverseRows 240 // BOOL 8000 Reverse row order +#define DFF_Prop_fGtext 241 // BOOL 4000 Has text effect +#define DFF_Prop_gtextFVertical 242 // BOOL 2000 Rotate characters +#define DFF_Prop_gtextFKern 243 // BOOL 1000 Kern characters +#define DFF_Prop_gtextFTight 244 // BOOL 800 Tightening or tracking +#define DFF_Prop_gtextFStretch 245 // BOOL 400 Stretch to fit shape +#define DFF_Prop_gtextFShrinkFit 246 // BOOL 200 Char bounding box +#define DFF_Prop_gtextFBestFit 247 // BOOL 100 Scale text-on-path +#define DFF_Prop_gtextFNormalize 248 // BOOL 80 Stretch char height +#define DFF_Prop_gtextFDxMeasure 249 // BOOL 40 Do not measure along path +#define DFF_Prop_gtextFBold 250 // BOOL 20 Bold font +#define DFF_Prop_gtextFItalic 251 // BOOL 10 Italic font +#define DFF_Prop_gtextFUnderline 252 // BOOL 8 Underline font +#define DFF_Prop_gtextFShadow 253 // BOOL 4 Shadow font +#define DFF_Prop_gtextFSmallcaps 254 // BOOL 2 Small caps font +#define DFF_Prop_gtextFStrikethrough 255 // BOOL 1 Strike through font +// Blip +#define DFF_Prop_cropFromTop 256 // LONG 16.16 fraction times total image width or height, as appropriate. +#define DFF_Prop_cropFromBottom 257 // LONG +#define DFF_Prop_cropFromLeft 258 // LONG +#define DFF_Prop_cropFromRight 259 // LONG +#define DFF_Prop_pib 260 // IMsoBlip* Blip to display +#define DFF_Prop_pibName 261 // WCHAR* Blip file name +#define DFF_Prop_pibFlags 262 // MSO_BLIPFLAGS Blip flags +#define DFF_Prop_pictureTransparent 263 // LONG transparent color (none if ~0UL) +#define DFF_Prop_pictureContrast 264 // LONG contrast setting +#define DFF_Prop_pictureBrightness 265 // LONG brightness setting +#define DFF_Prop_pictureGamma 266 // LONG 16.16 gamma +#define DFF_Prop_pictureId 267 // LONG Host-defined ID for OLE objects (usually a pointer) +#define DFF_Prop_pictureDblCrMod 268 // MSO_CLR Modification used if shape has double shadow +#define DFF_Prop_pictureFillCrMod 269 // MSO_CLR +#define DFF_Prop_pictureLineCrMod 270 // MSO_CLR +#define DFF_Prop_pibPrint 271 // IMsoBlip* Blip to display when printing +#define DFF_Prop_pibPrintName 272 // WCHAR* Blip file name +#define DFF_Prop_pibPrintFlags 273 // MSO_BLIPFLAGS Blip flags +#define DFF_Prop_fNoHitTestPicture 316 // BOOL Do not hit test the picture +#define DFF_Prop_pictureGray 317 // BOOL grayscale display +#define DFF_Prop_pictureBiLevel 318 // BOOL bi-level display +#define DFF_Prop_pictureActive 319 // BOOL Server is active (OLE objects only) +// Geometry +#define DFF_Prop_geoLeft 320 // LONG Defines the G (geometry) coordinate space. +#define DFF_Prop_geoTop 321 // LONG +#define DFF_Prop_geoRight 322 // LONG +#define DFF_Prop_geoBottom 323 // LONG +#define DFF_Prop_shapePath 324 // MSO_SHAPEPATH +#define DFF_Prop_pVertices 325 // IMsoArray An array of points, in G units. +#define DFF_Prop_pSegmentInfo 326 // IMsoArray +#define DFF_Prop_adjustValue 327 // LONG Adjustment values corresponding to the positions of the +#define DFF_Prop_adjust2Value 328 // LONG adjust handles of the shape. The number of values used +#define DFF_Prop_adjust3Value 329 // LONG and their allowable ranges vary from shape type to shape type. +#define DFF_Prop_adjust4Value 330 // LONG +#define DFF_Prop_adjust5Value 331 // LONG +#define DFF_Prop_adjust6Value 332 // LONG +#define DFF_Prop_adjust7Value 333 // LONG +#define DFF_Prop_adjust8Value 334 // LONG +#define DFF_Prop_adjust9Value 335 // LONG +#define DFF_Prop_adjust10Value 336 // LONG +#define DFF_Prop_connectorPoints 337 // IMsoArray +#define DFF_Prop_stretchPointX 339 // LONG +#define DFF_Prop_stretchPointY 340 // LONG +#define DFF_Prop_Handles 341 // H* +#define DFF_Prop_pFormulas 342 // LONG +#define DFF_Prop_textRectangles 343 // LONG +#define DFF_Prop_connectorType 344 // LONG ->0=none, 1=segments, 2=custom, 3=rect +#define DFF_Prop_fShadowOK 378 // BOOL Shadow may be set +#define DFF_Prop_f3DOK 379 // BOOL 3D may be set +#define DFF_Prop_fLineOK 380 // BOOL Line style may be set +#define DFF_Prop_fGtextOK 381 // BOOL Text effect (FontWork) supported +#define DFF_Prop_fFillShadeShapeOK 382 // BOOL +#define DFF_Prop_fFillOK 383 // BOOL OK to fill the shape through the UI or VBA? +// FillStyle +#define DFF_Prop_fillType 384 // MSO_FILLTYPE Type of fill +#define DFF_Prop_fillColor 385 // MSO_CLR Foreground color +#define DFF_Prop_fillOpacity 386 // LONG Fixed 16.16 +#define DFF_Prop_fillBackColor 387 // MSO_CLR Background color +#define DFF_Prop_fillBackOpacity 388 // LONG Shades only +#define DFF_Prop_fillCrMod 389 // MSO_CLR Modification for BW views +#define DFF_Prop_fillBlip 390 // IMsoBlip* Pattern/texture +#define DFF_Prop_fillBlipName 391 // WCHAR* Blip file name +#define DFF_Prop_fillBlipFlags 392 // MSO_BLIPFLAGS Blip flags +#define DFF_Prop_fillWidth 393 // LONG How big (A units) to make a metafile texture. +#define DFF_Prop_fillHeight 394 // LONG +#define DFF_Prop_fillAngle 395 // LONG Fade angle - degrees in 16.16 +#define DFF_Prop_fillFocus 396 // LONG Linear shaded fill focus percent +#define DFF_Prop_fillToLeft 397 // LONG Fraction 16.16 +#define DFF_Prop_fillToTop 398 // LONG Fraction 16.16 +#define DFF_Prop_fillToRight 399 // LONG Fraction 16.16 +#define DFF_Prop_fillToBottom 400 // LONG Fraction 16.16 +#define DFF_Prop_fillRectLeft 401 // LONG For shaded fills, use the specified rectangle instead of the shape's bounding rect to define how large the fade is going to be. +#define DFF_Prop_fillRectTop 402 // LONG +#define DFF_Prop_fillRectRight 403 // LONG +#define DFF_Prop_fillRectBottom 404 // LONG +#define DFF_Prop_fillDztype 405 // MSO_DZTYPE +#define DFF_Prop_fillShadePreset 406 // LONG Special shades +#define DFF_Prop_fillShadeColors 407 // IMsoArray a preset array of colors +#define DFF_Prop_fillOriginX 408 // LONG +#define DFF_Prop_fillOriginY 409 // LONG +#define DFF_Prop_fillShapeOriginX 410 // LONG +#define DFF_Prop_fillShapeOriginY 411 // LONG +#define DFF_Prop_fillShadeType 412 // MSO_SHADETYPE Type of shading, if a shaded (gradient) fill. +#define DFF_Prop_fFilled 443 // BOOL Is shape filled? +#define DFF_Prop_fHitTestFill 444 // BOOL Should we hit test fill? +#define DFF_Prop_fillShape 445 // BOOL Register pattern on shape +#define DFF_Prop_fillUseRect 446 // BOOL Use the large rect? +#define DFF_Prop_fNoFillHitTest 447 // BOOL Hit test a shape as though filled +// LineStyle +#define DFF_Prop_lineColor 448 // MSO_CLR Color of line +#define DFF_Prop_lineOpacity 449 // LONG Not implemented +#define DFF_Prop_lineBackColor 450 // MSO_CLR Background color +#define DFF_Prop_lineCrMod 451 // MSO_CLR Modification for BW views +#define DFF_Prop_lineType 452 // MSO_LINETYPE Type of line +#define DFF_Prop_lineFillBlip 453 // IMsoBlip* Pattern/texture +#define DFF_Prop_lineFillBlipName 454 // WCHAR* Blip file name +#define DFF_Prop_lineFillBlipFlags 455 // MSO_BLIPFLAGS Blip flags +#define DFF_Prop_lineFillWidth 456 // LONG How big (A units) to make a metafile texture. +#define DFF_Prop_lineFillHeight 457 // LONG +#define DFF_Prop_lineFillDztype 458 // MSO_DZTYPE How to interpret fillWidth/Height numbers. +#define DFF_Prop_lineWidth 459 // LONG A units; 1pt == 12700 EMUs +#define DFF_Prop_lineMiterLimit 460 // LONG ratio (16.16) of width +#define DFF_Prop_lineStyle 461 // MSO_LINESTYLE Draw parallel lines? +#define DFF_Prop_lineDashing 462 // MSO_LINEDASHING Can be overridden by: +#define DFF_Prop_lineDashStyle 463 // IMsoArray As Win32 ExtCreatePen +#define DFF_Prop_lineStartArrowhead 464 // MSO_LINEEND Arrow at start +#define DFF_Prop_lineEndArrowhead 465 // MSO_LINEEND Arrow at end +#define DFF_Prop_lineStartArrowWidth 466 // MSO_LINEENDWIDTH Arrow at start +#define DFF_Prop_lineStartArrowLength 467 // MSO_LINEENDLENGTH Arrow at end +#define DFF_Prop_lineEndArrowWidth 468 // MSO_LINEENDWIDTH Arrow at start +#define DFF_Prop_lineEndArrowLength 469 // MSO_LINEENDLENGTH Arrow at end +#define DFF_Prop_lineJoinStyle 470 // MSO_LINEJOIN How to join lines +#define DFF_Prop_lineEndCapStyle 471 // MSO_LINECAP How to end lines +#define DFF_Prop_fArrowheadsOK 507 // BOOL Allow arrowheads if prop. is set +#define DFF_Prop_fLine 508 // BOOL Any line? +#define DFF_Prop_fHitTestLine 509 // BOOL Should we hit test lines? +#define DFF_Prop_lineFillShape 510 // BOOL Register pattern on shape +#define DFF_Prop_fNoLineDrawDash 511 // BOOL Draw a dashed line if no line +// ShadowStyle +#define DFF_Prop_shadowType 512 // MSO_SHADOWTYPE Type of effect +#define DFF_Prop_shadowColor 513 // MSO_CLR Foreground color +#define DFF_Prop_shadowHighlight 514 // MSO_CLR Embossed color +#define DFF_Prop_shadowCrMod 515 // MSO_CLR Modification for BW views +#define DFF_Prop_shadowOpacity 516 // LONG Fixed 16.16 +#define DFF_Prop_shadowOffsetX 517 // LONG Offset shadow +#define DFF_Prop_shadowOffsetY 518 // LONG Offset shadow +#define DFF_Prop_shadowSecondOffsetX 519 // LONG Double offset shadow +#define DFF_Prop_shadowSecondOffsetY 520 // LONG Double offset shadow +#define DFF_Prop_shadowScaleXToX 521 // LONG 16.16 +#define DFF_Prop_shadowScaleYToX 522 // LONG 16.16 +#define DFF_Prop_shadowScaleXToY 523 // LONG 16.16 +#define DFF_Prop_shadowScaleYToY 524 // LONG 16.16 +#define DFF_Prop_shadowPerspectiveX 525 // LONG 16.16 / weight +#define DFF_Prop_shadowPerspectiveY 526 // LONG 16.16 / weight +#define DFF_Prop_shadowWeight 527 // LONG scaling factor +#define DFF_Prop_shadowOriginX 528 // LONG +#define DFF_Prop_shadowOriginY 529 // LONG +#define DFF_Prop_fShadow 574 // BOOL Any shadow? +#define DFF_Prop_fshadowObscured 575 // BOOL Excel5-style shadow +// PerspectiveStyle +#define DFF_Prop_perspectiveType 576 // MSO_XFORMTYPE Where transform applies +#define DFF_Prop_perspectiveOffsetX 577 // LONG The LONG values define a transformation matrix, effectively, each value is scaled by the perspectiveWeight parameter. +#define DFF_Prop_perspectiveOffsetY 578 // LONG +#define DFF_Prop_perspectiveScaleXToX 579 // LONG +#define DFF_Prop_perspectiveScaleYToX 580 // LONG +#define DFF_Prop_perspectiveScaleXToY 581 // LONG +#define DFF_Prop_perspectiveScaleYToY 582 // LONG +#define DFF_Prop_perspectivePerspectiveX 583 // LONG +#define DFF_Prop_perspectivePerspectiveY 584 // LONG +#define DFF_Prop_perspectiveWeight 585 // LONG Scaling factor +#define DFF_Prop_perspectiveOriginX 586 // LONG +#define DFF_Prop_perspectiveOriginY 587 // LONG +#define DFF_Prop_fPerspective 639 // BOOL On/off +// 3D Object +#define DFF_Prop_c3DSpecularAmt 640 // LONG Fixed-point 16.16 +#define DFF_Prop_c3DDiffuseAmt 641 // LONG Fixed-point 16.16 +#define DFF_Prop_c3DShininess 642 // LONG Default gives OK results +#define DFF_Prop_c3DEdgeThickness 643 // LONG Specular edge thickness +#define DFF_Prop_c3DExtrudeForward 644 // LONG Distance of extrusion in EMUs +#define DFF_Prop_c3DExtrudeBackward 645 // LONG +#define DFF_Prop_c3DExtrudePlane 646 // LONG Extrusion direction +#define DFF_Prop_c3DExtrusionColor 647 // MSO_CLR Basic color of extruded part of shape; the lighting model used will determine the exact shades used when rendering. +#define DFF_Prop_c3DCrMod 648 // MSO_CLR Modification for BW views +#define DFF_Prop_f3D 700 // BOOL Does this shape have a 3D effect? +#define DFF_Prop_fc3DMetallic 701 // BOOL Use metallic specularity? +#define DFF_Prop_fc3DUseExtrusionColor 702 // BOOL +#define DFF_Prop_fc3DLightFace 703 // BOOL +// 3D Style +#define DFF_Prop_c3DYRotationAngle 704 // LONG degrees (16.16) about y axis +#define DFF_Prop_c3DXRotationAngle 705 // LONG degrees (16.16) about x axis +#define DFF_Prop_c3DRotationAxisX 706 // LONG These specify the rotation axis; only their relative magnitudes matter. +#define DFF_Prop_c3DRotationAxisY 707 // LONG +#define DFF_Prop_c3DRotationAxisZ 708 // LONG +#define DFF_Prop_c3DRotationAngle 709 // LONG degrees (16.16) about axis +#define DFF_Prop_c3DRotationCenterX 710 // LONG rotation center x (16.16 or g-units) +#define DFF_Prop_c3DRotationCenterY 711 // LONG rotation center y (16.16 or g-units) +#define DFF_Prop_c3DRotationCenterZ 712 // LONG rotation center z (absolute (emus)) +#define DFF_Prop_c3DRenderMode 713 // MSO_3DRENDERMODE Full,wireframe, or bcube +#define DFF_Prop_c3DTolerance 714 // LONG pixels (16.16) +#define DFF_Prop_c3DXViewpoint 715 // LONG X view point (emus) +#define DFF_Prop_c3DYViewpoint 716 // LONG Y view point (emus) +#define DFF_Prop_c3DZViewpoint 717 // LONG Z view distance (emus) +#define DFF_Prop_c3DOriginX 718 // LONG +#define DFF_Prop_c3DOriginY 719 // LONG +#define DFF_Prop_c3DSkewAngle 720 // LONG degree (16.16) skew angle +#define DFF_Prop_c3DSkewAmount 721 // LONG Percentage skew amount +#define DFF_Prop_c3DAmbientIntensity 722 // LONG Fixed point intensity +#define DFF_Prop_c3DKeyX 723 // LONG Key light source direc- +#define DFF_Prop_c3DKeyY 724 // LONG tion; only their relative +#define DFF_Prop_c3DKeyZ 725 // LONG magnitudes matter +#define DFF_Prop_c3DKeyIntensity 726 // LONG Fixed point intensity +#define DFF_Prop_c3DFillX 727 // LONG Fill light source direc- +#define DFF_Prop_c3DFillY 728 // LONG tion; only their relative +#define DFF_Prop_c3DFillZ 729 // LONG magnitudes matter +#define DFF_Prop_c3DFillIntensity 730 // LONG Fixed point intensity +#define DFF_Prop_fc3DConstrainRotation 763 // BOOL +#define DFF_Prop_fc3DRotationCenterAuto 764 // BOOL +#define DFF_Prop_fc3DParallel 765 // BOOL Parallel projection? +#define DFF_Prop_fc3DKeyHarsh 766 // BOOL Is key lighting harsh? +#define DFF_Prop_fc3DFillHarsh 767 // BOOL Is fill lighting harsh? +// Shape +#define DFF_Prop_hspMaster 769 // MSO_HSP master shape +#define DFF_Prop_cxstyle 771 // MSO_CXSTYLE Type of connector +#define DFF_Prop_bWMode 772 // MSO_BWMODE Settings for modifications to be made when in different forms of black-and-white mode. +#define DFF_Prop_bWModePureBW 773 // MSO_BWMODE +#define DFF_Prop_bWModeBW 774 // MSO_BWMODE +#define DFF_Prop_fOleIcon 826 // BOOL For OLE objects, whether the object is in icon form +#define DFF_Prop_fPreferRelativeResize 827 // BOOL For UI only. Prefer relative resizing. +#define DFF_Prop_fLockShapeType 828 // BOOL Lock the shape type (don't allow Change Shape) +#define DFF_Prop_fDeleteAttachedObject 830 // BOOL +#define DFF_Prop_fBackground 831 // BOOL If TRUE, this is the background shape. + +// Callout +#define DFF_Prop_spcot 832 // MSO_SPCOT Callout type +#define DFF_Prop_dxyCalloutGap 833 // LONG Distance from box to first point.(EMUs) +#define DFF_Prop_spcoa 834 // MSO_SPCOA Callout angle +#define DFF_Prop_spcod 835 // MSO_SPCOD Callout drop type +#define DFF_Prop_dxyCalloutDropSpecified 836 // LONG if mso_spcodSpecified, the actual drop distance +#define DFF_Prop_dxyCalloutLengthSpecified 837 // LONG if fCalloutLengthSpecified, the actual distance +#define DFF_Prop_fCallout 889 // BOOL Is the shape a callout? +#define DFF_Prop_fCalloutAccentBar 890 // BOOL does callout have accent bar +#define DFF_Prop_fCalloutTextBorder 891 // BOOL does callout have a text border +#define DFF_Prop_fCalloutMinusX 892 // BOOL +#define DFF_Prop_fCalloutMinusY 893 // BOOL +#define DFF_Prop_fCalloutDropAuto 894 // BOOL If true, then we occasionally invert the drop distance +#define DFF_Prop_fCalloutLengthSpecified 895 // BOOL if true, we look at dxyCalloutLengthSpecified + +// GroupShape +#define DFF_Prop_wzName 896 // WCHAR* Shape Name (present only if explicitly set) +#define DFF_Prop_wzDescription 897 // WCHAR* alternate text +#define DFF_Prop_pihlShape 898 // IHlink* The hyperlink in the shape. +#define DFF_Prop_pWrapPolygonVertices 899 // IMsoArray The polygon that text will be wrapped around (Word) +#define DFF_Prop_dxWrapDistLeft 900 // LONG Left wrapping distance from text (Word) +#define DFF_Prop_dyWrapDistTop 901 // LONG Top wrapping distance from text (Word) +#define DFF_Prop_dxWrapDistRight 902 // LONG Right wrapping distance from text (Word) +#define DFF_Prop_dyWrapDistBottom 903 // LONG Bottom wrapping distance from text (Word) +#define DFF_Prop_lidRegroup 904 // LONG Regroup ID +#define DFF_Prop_tableProperties 927 // LONG +#define DFF_Prop_tableRowProperties 928 // LONG* +#define DFF_Prop_fEditedWrap 953 // BOOL Has the wrap polygon been edited? +#define DFF_Prop_fBehindDocument 954 // BOOL Word-only (shape is behind text) +#define DFF_Prop_fOnDblClickNotify 955 // BOOL Notify client on a double click +#define DFF_Prop_fIsButton 956 // BOOL A button shape (i.e., clicking performs an action). Set for shapes with attached hyperlinks or macros. +#define DFF_Prop_fOneD 957 // BOOL 1D adjustment +#define DFF_Prop_fHidden 958 // BOOL Do not display +#define DFF_Prop_fPrint 959 // BOOL Print this shape +// entsprechende BitFlags +#define DFF_PBit_EditedWrap 0x00000040 +#define DFF_PBit_BehindDocument 0x00000020 +#define DFF_PBit_OnDblClickNotify 0x00000010 +#define DFF_PBit_IsButton 0x00000008 +#define DFF_PBit_OneD 0x00000004 +#define DFF_PBit_Hidden 0x00000002 +#define DFF_PBit_Print 0x00000001 + +//--------------------------------------------------------------------------- +// Dreh- und Angelpunkt: der Shape-Typ +//--------------------------------------------------------------------------- +typedef enum + { + mso_sptMin = 0, + mso_sptNotPrimitive = mso_sptMin, + mso_sptRectangle = 1, + mso_sptRoundRectangle = 2, + mso_sptEllipse = 3, + mso_sptDiamond = 4, + mso_sptIsocelesTriangle = 5, + mso_sptRightTriangle = 6, + mso_sptParallelogram = 7, + mso_sptTrapezoid = 8, + mso_sptHexagon = 9, + mso_sptOctagon = 10, + mso_sptPlus = 11, + mso_sptStar = 12, + mso_sptArrow = 13, + mso_sptThickArrow = 14, + mso_sptHomePlate = 15, + mso_sptCube = 16, + mso_sptBalloon = 17, + mso_sptSeal = 18, + mso_sptArc = 19, + mso_sptLine = 20, + mso_sptPlaque = 21, + mso_sptCan = 22, + mso_sptDonut = 23, + mso_sptTextSimple = 24, + mso_sptTextOctagon = 25, + mso_sptTextHexagon = 26, + mso_sptTextCurve = 27, + mso_sptTextWave = 28, + mso_sptTextRing = 29, + mso_sptTextOnCurve = 30, + mso_sptTextOnRing = 31, + mso_sptStraightConnector1 = 32, + mso_sptBentConnector2 = 33, + mso_sptBentConnector3 = 34, + mso_sptBentConnector4 = 35, + mso_sptBentConnector5 = 36, + mso_sptCurvedConnector2 = 37, + mso_sptCurvedConnector3 = 38, + mso_sptCurvedConnector4 = 39, + mso_sptCurvedConnector5 = 40, + mso_sptCallout1 = 41, + mso_sptCallout2 = 42, + mso_sptCallout3 = 43, + mso_sptAccentCallout1 = 44, + mso_sptAccentCallout2 = 45, + mso_sptAccentCallout3 = 46, + mso_sptBorderCallout1 = 47, + mso_sptBorderCallout2 = 48, + mso_sptBorderCallout3 = 49, + mso_sptAccentBorderCallout1 = 50, + mso_sptAccentBorderCallout2 = 51, + mso_sptAccentBorderCallout3 = 52, + mso_sptRibbon = 53, + mso_sptRibbon2 = 54, + mso_sptChevron = 55, + mso_sptPentagon = 56, + mso_sptNoSmoking = 57, + mso_sptSeal8 = 58, + mso_sptSeal16 = 59, + mso_sptSeal32 = 60, + mso_sptWedgeRectCallout = 61, + mso_sptWedgeRRectCallout = 62, + mso_sptWedgeEllipseCallout = 63, + mso_sptWave = 64, + mso_sptFoldedCorner = 65, + mso_sptLeftArrow = 66, + mso_sptDownArrow = 67, + mso_sptUpArrow = 68, + mso_sptLeftRightArrow = 69, + mso_sptUpDownArrow = 70, + mso_sptIrregularSeal1 = 71, + mso_sptIrregularSeal2 = 72, + mso_sptLightningBolt = 73, + mso_sptHeart = 74, + mso_sptPictureFrame = 75, + mso_sptQuadArrow = 76, + mso_sptLeftArrowCallout = 77, + mso_sptRightArrowCallout = 78, + mso_sptUpArrowCallout = 79, + mso_sptDownArrowCallout = 80, + mso_sptLeftRightArrowCallout = 81, + mso_sptUpDownArrowCallout = 82, + mso_sptQuadArrowCallout = 83, + mso_sptBevel = 84, + mso_sptLeftBracket = 85, + mso_sptRightBracket = 86, + mso_sptLeftBrace = 87, + mso_sptRightBrace = 88, + mso_sptLeftUpArrow = 89, + mso_sptBentUpArrow = 90, + mso_sptBentArrow = 91, + mso_sptSeal24 = 92, + mso_sptStripedRightArrow = 93, + mso_sptNotchedRightArrow = 94, + mso_sptBlockArc = 95, + mso_sptSmileyFace = 96, + mso_sptVerticalScroll = 97, + mso_sptHorizontalScroll = 98, + mso_sptCircularArrow = 99, + mso_sptNotchedCircularArrow = 100, + mso_sptUturnArrow = 101, + mso_sptCurvedRightArrow = 102, + mso_sptCurvedLeftArrow = 103, + mso_sptCurvedUpArrow = 104, + mso_sptCurvedDownArrow = 105, + mso_sptCloudCallout = 106, + mso_sptEllipseRibbon = 107, + mso_sptEllipseRibbon2 = 108, + mso_sptFlowChartProcess = 109, + mso_sptFlowChartDecision = 110, + mso_sptFlowChartInputOutput = 111, + mso_sptFlowChartPredefinedProcess = 112, + mso_sptFlowChartInternalStorage = 113, + mso_sptFlowChartDocument = 114, + mso_sptFlowChartMultidocument = 115, + mso_sptFlowChartTerminator = 116, + mso_sptFlowChartPreparation = 117, + mso_sptFlowChartManualInput = 118, + mso_sptFlowChartManualOperation = 119, + mso_sptFlowChartConnector = 120, + mso_sptFlowChartPunchedCard = 121, + mso_sptFlowChartPunchedTape = 122, + mso_sptFlowChartSummingJunction = 123, + mso_sptFlowChartOr = 124, + mso_sptFlowChartCollate = 125, + mso_sptFlowChartSort = 126, + mso_sptFlowChartExtract = 127, + mso_sptFlowChartMerge = 128, + mso_sptFlowChartOfflineStorage = 129, + mso_sptFlowChartOnlineStorage = 130, + mso_sptFlowChartMagneticTape = 131, + mso_sptFlowChartMagneticDisk = 132, + mso_sptFlowChartMagneticDrum = 133, + mso_sptFlowChartDisplay = 134, + mso_sptFlowChartDelay = 135, + mso_sptTextPlainText = 136, + mso_sptTextStop = 137, + mso_sptTextTriangle = 138, + mso_sptTextTriangleInverted = 139, + mso_sptTextChevron = 140, + mso_sptTextChevronInverted = 141, + mso_sptTextRingInside = 142, + mso_sptTextRingOutside = 143, + mso_sptTextArchUpCurve = 144, + mso_sptTextArchDownCurve = 145, + mso_sptTextCircleCurve = 146, + mso_sptTextButtonCurve = 147, + mso_sptTextArchUpPour = 148, + mso_sptTextArchDownPour = 149, + mso_sptTextCirclePour = 150, + mso_sptTextButtonPour = 151, + mso_sptTextCurveUp = 152, + mso_sptTextCurveDown = 153, + mso_sptTextCascadeUp = 154, + mso_sptTextCascadeDown = 155, + mso_sptTextWave1 = 156, + mso_sptTextWave2 = 157, + mso_sptTextWave3 = 158, + mso_sptTextWave4 = 159, + mso_sptTextInflate = 160, + mso_sptTextDeflate = 161, + mso_sptTextInflateBottom = 162, + mso_sptTextDeflateBottom = 163, + mso_sptTextInflateTop = 164, + mso_sptTextDeflateTop = 165, + mso_sptTextDeflateInflate = 166, + mso_sptTextDeflateInflateDeflate = 167, + mso_sptTextFadeRight = 168, + mso_sptTextFadeLeft = 169, + mso_sptTextFadeUp = 170, + mso_sptTextFadeDown = 171, + mso_sptTextSlantUp = 172, + mso_sptTextSlantDown = 173, + mso_sptTextCanUp = 174, + mso_sptTextCanDown = 175, + mso_sptFlowChartAlternateProcess = 176, + mso_sptFlowChartOffpageConnector = 177, + mso_sptCallout90 = 178, + mso_sptAccentCallout90 = 179, + mso_sptBorderCallout90 = 180, + mso_sptAccentBorderCallout90 = 181, + mso_sptLeftRightUpArrow = 182, + mso_sptSun = 183, + mso_sptMoon = 184, + mso_sptBracketPair = 185, + mso_sptBracePair = 186, + mso_sptSeal4 = 187, + mso_sptDoubleWave = 188, + mso_sptActionButtonBlank = 189, + mso_sptActionButtonHome = 190, + mso_sptActionButtonHelp = 191, + mso_sptActionButtonInformation = 192, + mso_sptActionButtonForwardNext = 193, + mso_sptActionButtonBackPrevious = 194, + mso_sptActionButtonEnd = 195, + mso_sptActionButtonBeginning = 196, + mso_sptActionButtonReturn = 197, + mso_sptActionButtonDocument = 198, + mso_sptActionButtonSound = 199, + mso_sptActionButtonMovie = 200, + mso_sptHostControl = 201, + mso_sptTextBox = 202, + mso_sptMax = 0x0FFF, + mso_sptNil = mso_sptMax + } MSO_SPT; + +// verschiedene enums aus der OfficeDraw-Doku, Appendix D - Anfang +// +// beachte: in Abweichung von der MS-Doku beginnen alle +// mit "mso_" statt mit "mso" +// +enum MSO_ShapePath { + mso_shapeLines, // A line of straight segments + mso_shapeLinesClosed, // A closed polygonal object + mso_shapeCurves, // A line of Bezier curve segments + mso_shapeCurvesClosed, // A closed shape with curved edges + mso_shapeComplex // pSegmentInfo must be non-empty +}; + +enum MSO_WrapMode { + mso_wrapSquare, + mso_wrapByPoints, + mso_wrapNone, + mso_wrapTopBottom, + mso_wrapThrough +}; + +enum MSO_BWMode { + mso_bwColor, // only used for predefined shades + mso_bwAutomatic, // depends on object type + mso_bwGrayScale, // shades of gray only + mso_bwLightGrayScale, // shades of light gray only + mso_bwInverseGray, // dark gray mapped to light gray, etc. + mso_bwGrayOutline, // pure gray and white + mso_bwBlackTextLine, // black text and lines, all else grayscale + mso_bwHighContrast, // pure black and white mode (no grays) + mso_bwBlack, // solid black + mso_bwWhite, // solid white + mso_bwDontShow, // object not drawn + mso_bwNumModes // number of Black and white modes +}; + +enum MSO_Anchor { + mso_anchorTop, + mso_anchorMiddle, + mso_anchorBottom, + mso_anchorTopCentered, + mso_anchorMiddleCentered, + mso_anchorBottomCentered, + mso_anchorTopBaseline, + mso_anchorBottomBaseline, + mso_anchorTopCenteredBaseline, + mso_anchorBottomCenteredBaseline +}; + +enum MSO_CDir { + mso_cdir0, // Right + mso_cdir90, // Down + mso_cdir180, // Left + mso_cdir270 // Up +}; + +// connector style +enum MSO_ConnectorStyle { + mso_cxstyleStraight = 0, + mso_cxstyleBent, + mso_cxstyleCurved, + mso_cxstyleNone +}; + +// MSO_TXFL -- text flow +enum MSO_TextFlow { + mso_txflHorzN, // Horizontal non-@ + mso_txflTtoBA, // Top to Bottom @-font + mso_txflBtoT, // Bottom to Top non-@ + mso_txflTtoBN, // Top to Bottom non-@ + mso_txflHorzA, // Horizontal @-font + mso_txflVertN // Vertical, non-@ +}; + +// MSO_TXDIR - text direction (needed for Bi-Di support) +enum MSO_TextDir { + mso_txdirLTR, // left-to-right text direction + mso_txdirRTL, // right-to-left text direction + mso_txdirContext // context text direction +}; + +// MSO_SPCOT -- Callout Type +enum MSO_SPCalloutType { + mso_spcotRightAngle = 1, + mso_spcotOneSegment = 2, + mso_spcotTwoSegment = 3, + mso_spcotThreeSegment = 4 +}; + +// MSO_SPCOA -- Callout Angle +enum MSO_SPCalloutAngle { + mso_spcoaAny, + mso_spcoa30, + mso_spcoa45, + mso_spcoa60, + mso_spcoa90, + mso_spcoa0 +}; + +// MSO_SPCOD -- Callout Drop +enum MSO_SPCalloutDrop { + mso_spcodTop, + mso_spcodCenter, + mso_spcodBottom, + mso_spcodSpecified +}; + +// MSO_GEOTEXTALIGN - FontWork alignment +enum MSO_GeoTextAlign { + mso_alignTextStretch, /* Stretch each line of text to fit width. */ + mso_alignTextCenter, /* Center text on width. */ + mso_alignTextLeft, /* Left justify. */ + mso_alignTextRight, /* Right justify. */ + mso_alignTextLetterJust, /* Spread letters out to fit width. */ + mso_alignTextWordJust, /* Spread words out to fit width. */ + mso_alignTextInvalid /* Invalid */ +}; + +// MSO_BLIPFLAGS - flags for pictures +enum MSO_BlipFlags { + mso_blipflagDefault = 0, + mso_blipflagComment = 0, // Blip name is a comment + mso_blipflagFile, // Blip name is a file name + mso_blipflagURL, // Blip name is a full URL + mso_blipflagType = 3, // Mask to extract type + /* Or the following flags with any of the above. */ + mso_blipflagDontSave = 4, // A "dont" is the depression in the metal + // body work of an automobile caused when a + // cyclist violently thrusts his or her nose + // at it, thus a DontSave is another name for + // a cycle lane. + mso_blipflagDoNotSave = 4, // For those who prefer English + mso_blipflagLinkToFile = 8 +}; + +enum MSO_3DRenderMode { + mso_FullRender, // Generate a full rendering + mso_Wireframe, // Generate a wireframe + mso_BoundingCube // Generate a bounding cube +}; + +enum MSO_XFormType { + mso_xformAbsolute, // Apply transform in absolute space centered on shape + mso_xformShape, // Apply transform to shape geometry + mso_xformDrawing // Apply transform in drawing space +}; + +enum MSO_ShadowType { + mso_shadowOffset, // N pixel offset shadow + mso_shadowDouble, // Use second offset too + mso_shadowRich, // Rich perspective shadow (cast relative to shape) + mso_shadowShape, // Rich perspective shadow (cast in shape space) + mso_shadowDrawing, // Perspective shadow cast in drawing space + mso_shadowEmbossOrEngrave +}; + +// MSO_DZTYPE - the type of a (length) measurement +enum MSO_DZType { + mso_dztypeMin = 0, + mso_dztypeDefault = 0, // Default size, ignore the values + mso_dztypeA = 1, // Values are in EMUs + mso_dztypeV = 2, // Values are in pixels + mso_dztypeShape = 3, // Values are 16.16 fractions of shape size + mso_dztypeFixedAspect = 4, // Aspect ratio is fixed + mso_dztypeAFixed = 5, // EMUs, fixed aspect ratio + mso_dztypeVFixed = 6, // Pixels, fixed aspect ratio + mso_dztypeShapeFixed = 7, // Proportion of shape, fixed aspect ratio + mso_dztypeFixedAspectEnlarge + = 8, // Aspect ratio is fixed, favor larger size + mso_dztypeAFixedBig = 9, // EMUs, fixed aspect ratio + mso_dztypeVFixedBig = 10, // Pixels, fixed aspect ratio + mso_dztypeShapeFixedBig= 11, // Proportion of shape, fixed aspect ratio + mso_dztypeMax = 11 +}; + +enum MSO_FillType { + mso_fillSolid, // Fill with a solid color + mso_fillPattern, // Fill with a pattern (bitmap) + mso_fillTexture, // A texture (pattern with its own color map) + mso_fillPicture, // Center a picture in the shape + mso_fillShade, // Shade from start to end points + mso_fillShadeCenter, // Shade from bounding rectangle to end point + mso_fillShadeShape, // Shade from shape outline to end point + mso_fillShadeScale, // Similar to mso_fillShade, but the fillAngle + // is additionally scaled by the aspect ratio of + // the shape. If shape is square, it is the + // same as mso_fillShade. + mso_fillShadeTitle, // special type - shade to title --- for PP + mso_fillBackground // Use the background fill color/pattern +}; + +// MSO_SHADETYPE - how to interpret the colors in a shaded fill. +enum MSO_ShadeType { + mso_shadeNone = 0, // Interpolate without correction between RGBs + mso_shadeGamma = 1, // Apply gamma correction to colors + mso_shadeSigma = 2, // Apply a sigma transfer function to position + mso_shadeBand = 4, // Add a flat band at the start of the shade + mso_shadeOneColor = 8, // This is a one color shade + + /* A parameter for the band or sigma function can be stored in the top + 16 bits of the value - this is a proportion of *each* band of the + shade to make flat (or the approximate equal value for a sigma + function). NOTE: the parameter is not used for the sigma function, + instead a built in value is used. This value should not be changed + from the default! */ + mso_shadeParameterShift = 16, + mso_shadeParameterMask = 0xffff0000, + + mso_shadeDefault = (mso_shadeGamma|mso_shadeSigma| + (16384<<mso_shadeParameterShift)) +}; + +// MSOLINESTYLE - compound line style +enum MSO_LineStyle { + mso_lineSimple, // Single line (of width lineWidth) + mso_lineDouble, // Double lines of equal width + mso_lineThickThin, // Double lines, one thick, one thin + mso_lineThinThick, // Double lines, reverse order + mso_lineTriple // Three lines, thin, thick, thin +}; + +// MSO_LINETYPE - how to "fill" the line contour +enum MSO_LineType { + mso_lineSolidType, // Fill with a solid color + mso_linePattern, // Fill with a pattern (bitmap) + mso_lineTexture, // A texture (pattern with its own color map) + mso_linePicture // Center a picture in the shape +}; + +// MSO_LINEDASHING - dashed line style +enum MSO_LineDashing { + mso_lineSolid, // Solid (continuous) pen + mso_lineDashSys, // PS_DASH system dash style + mso_lineDotSys, // PS_DOT system dash style + mso_lineDashDotSys, // PS_DASHDOT system dash style + mso_lineDashDotDotSys, // PS_DASHDOTDOT system dash style + mso_lineDotGEL, // square dot style + mso_lineDashGEL, // dash style + mso_lineLongDashGEL, // long dash style + mso_lineDashDotGEL, // dash short dash + mso_lineLongDashDotGEL, // long dash short dash + mso_lineLongDashDotDotGEL // long dash short dash short dash +}; + +// MSO_LINEEND - line end effect +enum MSO_LineEnd { + mso_lineNoEnd, + mso_lineArrowEnd, + mso_lineArrowStealthEnd, + mso_lineArrowDiamondEnd, + mso_lineArrowOvalEnd, + mso_lineArrowOpenEnd +}; + +// MSO_LINEENDWIDTH - size of arrowhead +enum MSO_LineEndWidth { + mso_lineNarrowArrow, + mso_lineMediumWidthArrow, + mso_lineWideArrow +}; + +// MSO_LINEENDLENGTH - size of arrowhead +enum MSO_LineEndLength { + mso_lineShortArrow, + mso_lineMediumLenArrow, + mso_lineLongArrow +}; + +// MSO_LINEJOIN - line join style. +enum MSO_LineJoin { + mso_lineJoinBevel, // Join edges by a straight line + mso_lineJoinMiter, // Extend edges until they join + mso_lineJoinRound // Draw an arc between the two edges +}; + +// MSO_LINECAP - line cap style (applies to ends of dash segments too). +enum MSO_LineCap { + mso_lineEndCapRound, // Rounded ends - the default + mso_lineEndCapSquare, // Square protrudes by half line width + mso_lineEndCapFlat // Line ends at end point +}; +// verschiedene enums aus der OfficeDraw-Doku, Appendix D - Ende + +// BStore-Container +// FBSE - File Blip Store Entry +typedef struct _MSOF_BSE { + BYTE btWin32; // Required type on Win32 + BYTE btMacOS; // Required type on Mac + BYTE rgbUid[16]; // Identifier of blip + USHORT tag; // currently unused + ULONG size; // Blip size in stream + ULONG cRef; // Reference count on the blip + ULONG /*MSOFO*/ foDelay; // File offset in the delay stream + BYTE usage; // How this blip is used (MSOBLIPUSAGE) + BYTE cbName; // length of the blip name + BYTE unused2; // for the future + BYTE unused3; // for the future +} MSO_FBSE; + +typedef enum { + mso_blipUsageDefault, // All non-texture fill blips get this. + mso_blipUsageTexture, + mso_blipUsageMax = 255 // Since this is stored in a byte +} MSO_BLIPUSAGE; + +typedef enum { // GEL provided types... + mso_blipERROR = 0, // An error occured during loading + mso_blipUNKNOWN, // An unknown blip type + mso_blipEMF, // Windows Enhanced Metafile + mso_blipWMF, // Windows Metafile + mso_blipPICT, // Macintosh PICT + mso_blipJPEG, // JFIF + mso_blipPNG, // PNG + mso_blipDIB, // Windows DIB + mso_blipFirstClient = 32, // First client defined blip type + mso_blipLastClient = 255 // Last client defined blip type +} MSO_BLIPTYPE; + +typedef enum { + mso_biUNKNOWN = 0, + mso_biWMF = 0x216, // Metafile header then compressed WMF + mso_biEMF = 0x3D4, // Metafile header then compressed EMF + mso_biPICT = 0x542, // Metafile header then compressed PICT + mso_biPNG = 0x6E0, // One byte tag then PNG data + mso_biJFIF = 0x46A, // One byte tag then JFIF data + mso_biJPEG = mso_biJFIF, + mso_biDIB = 0x7A8, // One byte tag then DIB data + mso_biClient=0x800 // Clients should set this bit +} MSO_BI; // Blip signature as encoded in the MSO_FBH.inst + +typedef enum { + mso_compressionDeflate = 0, + mso_compressionNone = 254, // Used only if compression fails + mso_compressionTest = 255 // For testing only +} MSO_BLIPCOMPRESSION; + +typedef enum { + mso_filterAdaptive = 0, // PNG type - not used/supported for metafile + mso_filterNone = 254, + mso_filterTest = 255 // For testing only +} MSO_BLIPFILTER; + +typedef enum { + mso_syscolorButtonFace, // COLOR_BTNFACE + mso_syscolorWindowText, // COLOR_WINDOWTEXT + mso_syscolorMenu, // COLOR_MENU + mso_syscolorHighlight, // COLOR_HIGHLIGHT + mso_syscolorHighlightText, // COLOR_HIGHLIGHTTEXT + mso_syscolorCaptionText, // COLOR_CAPTIONTEXT + mso_syscolorActiveCaption, // COLOR_ACTIVECAPTION + mso_syscolorButtonHighlight, // COLOR_BTNHIGHLIGHT + mso_syscolorButtonShadow, // COLOR_BTNSHADOW + mso_syscolorButtonText, // COLOR_BTNTEXT + mso_syscolorGrayText, // COLOR_GRAYTEXT + mso_syscolorInactiveCaption, // COLOR_INACTIVECAPTION + mso_syscolorInactiveCaptionText, // COLOR_INACTIVECAPTIONTEXT + mso_syscolorInfoBackground, // COLOR_INFOBK + mso_syscolorInfoText, // COLOR_INFOTEXT + mso_syscolorMenuText, // COLOR_MENUTEXT + mso_syscolorScrollbar, // COLOR_SCROLLBAR + mso_syscolorWindow, // COLOR_WINDOW + mso_syscolorWindowFrame, // COLOR_WINDOWFRAME + mso_syscolor3DLight, // COLOR_3DLIGHT + mso_syscolorMax, // Count of system colors + + mso_colorFillColor = 0xF0, // Use the fillColor property + mso_colorLineOrFillColor, // Use the line color only if there is a line + mso_colorLineColor, // Use the lineColor property + mso_colorShadowColor, // Use the shadow color + mso_colorThis, // Use this color (only valid as described below) + mso_colorFillBackColor, // Use the fillBackColor property + mso_colorLineBackColor, // Use the lineBackColor property + mso_colorFillThenLine, // Use the fillColor unless no fill and line + mso_colorIndexMask = 0xFF, // Extract the color index + + mso_colorProcessMask =0xFFFF00,// All the processing bits + mso_colorModificationMask =0x0F00, // Just the function + mso_colorModFlagMask =0xF000, // Just the additional flags + mso_colorDarken =0x0100, // Darken color by parameter/255 + mso_colorLighten =0x0200, // Lighten color by parameter/255 + mso_colorAdd =0x0300, // Add grey level RGB(param,param,param) + mso_colorSubtract =0x0400, // Subtract grey level RGB(p,p,p) + mso_colorReverseSubtract =0x0500, // Subtract from grey level RGB(p,p,p) + /* In the following "black" means maximum component value, white minimum. + The operation is per component, to guarantee white combine with + mso_colorGray */ + mso_colorBlackWhite =0x0600, // Black if < uParam, else white (>=) + mso_colorInvert =0x2000, // Invert color (at the *end*) + mso_colorInvert128 =0x4000, // Invert by toggling the top bit + mso_colorGray =0x8000, // Make the color gray (before the above!) + mso_colorBParamMask =0xFF0000,// Parameter used as above + mso_colorBParamShift = 16 // To extract the parameter value +} MSO_SYSCOLORINDEX; + +#ifdef Hier_noch_was_aus_der_Doku +/* The secondary, or data, UID - should always be set. */ +BYTE m_rgbUid[16]; +/* The primary UID - this defaults to 0, in which case the primary ID is + that of the internal data. NOTE!: The primary UID is only saved to disk + if (blip_instance ^ blip_signature == 1). Blip_instance is MSO_FBH.inst and + blip_signature is one of the values defined in MSO_BI */ +BYTE m_rgbUidPrimary[16]; // optional based on the above check + +/* Metafile Blip overhead = 34 bytes. m_cb gives the number of + bytes required to store an uncompressed version of the file, m_cbSave + is the compressed size. m_mfBounds gives the boundary of all the + drawing calls within the metafile (this may just be the bounding box + or it may allow some whitespace, for a WMF this comes from the + SetWindowOrg and SetWindowExt records of the metafile). */ +int m_cb; // Cache of the metafile size +RECT m_rcBounds; // Boundary of metafile drawing commands +POINT m_ptSize; // Size of metafile in EMUs +int m_cbSave; // Cache of saved size (size of m_pvBits) +BYTE m_fCompression; // MSO_BLIPCOMPRESSION +BYTE m_fFilter; // always mso_filterNone +void *m_pvBits; // Compressed bits of metafile. + +/* The secondary, or data, UID - should always be set. */ +BYTE m_rgbUid[16]; +/* The primary UID - this defaults to 0, in which case the primary ID is + that of the internal data. NOTE!: The primary UID is only saved to disk + if (blip_instance ^ blip_signature == 1). Blip_instance is MSO_FBH.finst and + blip_signature is one of the values defined in MSO_BI*/ +BYTE m_rgbUidPrimary[16]; // optional based on the above check +BYTE m_bTag; +void *m_pvBits; // raster bits of the blip. +#endif + +#endif diff --git a/svx/inc/svx/mutxhelp.hxx b/svx/inc/svx/mutxhelp.hxx new file mode 100644 index 000000000000..559eed80914f --- /dev/null +++ b/svx/inc/svx/mutxhelp.hxx @@ -0,0 +1,47 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: mutxhelp.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_MUTXHELP_HXX +#define _SVX_MUTXHELP_HXX + +#include <osl/mutex.hxx> + +class SvxMutexHelper +{ +private: + ::osl::Mutex maMutex; + +public: + ::osl::Mutex& getMutex() { return maMutex; } +}; + +#endif + + diff --git a/svx/inc/svx/nhypitem.hxx b/svx/inc/svx/nhypitem.hxx new file mode 100644 index 000000000000..6cca0508a53d --- /dev/null +++ b/svx/inc/svx/nhypitem.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: nhypitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_NHYPITEM_HXX +#define _SVX_NHYPITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxNoHyphenItem ------------------------------------------------- + +/* [Beschreibung] + + PB: ??? +*/ + +class SVX_DLLPUBLIC SvxNoHyphenItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxNoHyphenItem( const BOOL bHyphen /*= TRUE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxNoHyphenItem& operator=(const SvxNoHyphenItem& rNHH) + { + SetValue( rNHH.GetValue() ); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/numdef.hxx b/svx/inc/svx/numdef.hxx new file mode 100644 index 000000000000..72e5edcde5b7 --- /dev/null +++ b/svx/inc/svx/numdef.hxx @@ -0,0 +1,33 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: numdef.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#define SVX_MAX_NUM 10 // max. moegliche Numerierungsebenen +#define SVX_DEF_BULLET (0xF000 + 149)// Charakter fuer Aufzaehlungen + diff --git a/svx/inc/svx/numfmtsh.hxx b/svx/inc/svx/numfmtsh.hxx new file mode 100644 index 000000000000..7aee6f6bbb65 --- /dev/null +++ b/svx/inc/svx/numfmtsh.hxx @@ -0,0 +1,270 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: numfmtsh.hxx,v $ + * $Revision: 1.3.242.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_NUMFMTSH_HXX +#define _SVX_NUMFMTSH_HXX + +// include --------------------------------------------------------------- + +#include <tools/string.hxx> +#include <i18npool/lang.h> + +#ifndef _SVSTDARR_ULONGS +#define _SVSTDARR_ULONGS +#endif +#ifndef _SVSTDARR_USHORTS +#define _SVSTDARR_USHORTS +#endif +#ifndef _SVSTDARR_STRINGS +#define _SVSTDARR_STRINGS +#endif +#include "svx/svxdllapi.h" + +#include <svl/svstdarr.hxx> + +// forward --------------------------------------------------------------- + +class Color; +class SvNumberFormatter; +class SvNumberFormatTable; +class SvStrings; +class SvStringsDtor; +class NfCurrencyEntry; +// enum ------------------------------------------------------------------ + +enum SvxNumberValueType +{ + SVX_VALUE_TYPE_UNDEFINED = 0, + SVX_VALUE_TYPE_NUMBER, + SVX_VALUE_TYPE_STRING +}; + +// define ---------------------------------------------------------------- + +#define CAT_ALL 0 // Reihenfolge der Kategorie- +#define CAT_USERDEFINED 1 // ListBox-Eintraege in der TabPage +#define CAT_NUMBER 2 +#define CAT_PERCENT 3 +#define CAT_CURRENCY 4 +#define CAT_DATE 5 +#define CAT_TIME 6 +#define CAT_SCIENTIFIC 7 +#define CAT_FRACTION 8 +#define CAT_BOOLEAN 9 +#define CAT_TEXT 10 + +#define SELPOS_NONE -1 + +#define NUMBERFORMAT_ENTRY_NEW_CURRENCY NUMBERFORMAT_ENTRY_NOT_FOUND-1 + +typedef NfCurrencyEntry* NfShCurrencyEntryPtr; +SV_DECL_PTRARR( NfShCurrencyEntries, NfShCurrencyEntryPtr, 8, 1 ) + + +class SvxDelStrgs: public SvStrings +{ + +public: + ~SvxDelStrgs() { DeleteAndDestroy(0,Count());} + +}; + +// class SvxNumberFormatShell -------------------------------------------- + +class SVX_DLLPUBLIC SvxNumberFormatShell +{ +public: + SvxNumberFormatShell( SvNumberFormatter* pNumFormatter, + sal_uInt32 nFormatKey, + SvxNumberValueType eNumValType, + const String& rNumStr ); + + SvxNumberFormatShell( SvNumberFormatter* pNumFormatter, + sal_uInt32 nFormatKey, + SvxNumberValueType eNumValType, + double nNumVal, + const String* pNumStr = NULL ); + + ~SvxNumberFormatShell(); + + + static SvxNumberFormatShell* Create( SvNumberFormatter* pNumFormatter, + sal_uInt32 nFormatKey, + SvxNumberValueType eNumValType, + const String& rNumStr ); + + static SvxNumberFormatShell* Create( SvNumberFormatter* pNumFormatter, + sal_uInt32 nFormatKey, + SvxNumberValueType eNumValType, + double nNumVal, + const String* pNumStr = NULL ); + + + void GetInitSettings( USHORT& nCatLbPos, + LanguageType& rLangType, + USHORT& nFmtLbSelPos, + SvStrings& rFmtEntries, + String& rPrevString, + Color*& rpPrevColor ); + + void CategoryChanged( USHORT nCatLbPos, + short& rFmtSelPos, + SvStrings& rFmtEntries ); + + void LanguageChanged( LanguageType eLangType, + short& rFmtSelPos, + SvStrings& rFmtEntries ); + + void FormatChanged( USHORT nFmtLbPos, + String& rPreviewStr, + Color*& rpFontColor ); + + BOOL AddFormat( String& rFormat, + xub_StrLen& rErrPos, + USHORT& rCatLbSelPos, + short& rFmtSelPos, + SvStrings& rFmtEntries ); + + BOOL RemoveFormat( const String& rFormat, + USHORT& rCatLbSelPos, + short& rFmtSelPos, + SvStrings& rFmtEntries ); + + void MakeFormat( String& rFormat, + BOOL bThousand, + BOOL bNegRed, + USHORT nPrecision, + USHORT nLeadingZeroes, + USHORT nCurrencyEntryPos); + + void GetOptions( const String& rFormat, + BOOL& rThousand, + BOOL& rNegRed, + USHORT& rPrecision, + USHORT& rLeadingZeroes, + USHORT& rCatLbPos ); + + void MakePreviewString( const String& rFormatStr, + String& rPreviewStr, + Color*& rpFontColor ); + + void MakePrevStringFromVal( const String& rFormatStr, //@ 19.09.97 + String& rPreviewStr, + Color*& rpFontColor, + double nValue); + + BOOL IsUserDefined( const String& rFmtString ); + BOOL IsTmpCurrencyFormat( const String& rFmtString ); + BOOL FindEntry( const String& rFmtString, sal_uInt32* pAt = NULL ); + + void ValidateNewEntries( BOOL bValidate = TRUE ) { bUndoAddList = !bValidate; } + sal_uInt32 GetUpdateDataCount() const; + void GetUpdateData( sal_uInt32* pDelArray, const sal_uInt32 nSize ); + + void SetCurNumFmtKey( sal_uInt32 nNew ) { nCurFormatKey = nNew; } + void SetCurLanguage( LanguageType eNew ) { eCurLanguage = eNew; } + sal_uInt32 GetCurNumFmtKey() const { return nCurFormatKey; } + LanguageType GetCurLanguage() const { return eCurLanguage; } + + /** Returns the name of Standard, General, ... for the + current language. */ + String GetStandardName() const; + + String GetComment4Entry(short nEntry); + short GetCategory4Entry(short nEntry); + BOOL GetUserDefined4Entry(short nEntry); + String GetFormat4Entry(short nEntry); + void SetComment4Entry(short nEntry,String aCommentString); + + BOOL IsBankingSymbol(USHORT nPos); + void SetCurrencySymbol(USHORT nPos); + sal_uInt32 GetCurrencySymbol(); + USHORT FindCurrencyFormat( const String& rFmtString ); + USHORT FindCurrencyFormat(const NfCurrencyEntry* pTmpCurrencyEntry,BOOL bTmpBanking); + NfCurrencyEntry* GetCurCurrencyEntry(); + void SetCurCurrencyEntry(NfCurrencyEntry*); + short GetListPos4Entry(sal_uInt32 nIdx); + short GetListPos4Entry( const String& rFmtString ); + + void GetCurrencySymbols( SvStringsDtor& rList, USHORT* pPos ); + void GetCurrencySymbols( SvStringsDtor& rList, BOOL bFlag ); + + USHORT FindCurrencyTableEntry( const String& rFmtString, BOOL &bTestBanking ); + BOOL IsInTable(USHORT nPos,BOOL bTmpBanking,const String &rFmtString); + + void GetCurrencyFormats(SvStrings& rList); + +private: + static const double DEFAULT_NUMVALUE; // 123456789 + + SvNumberFormatter* pFormatter; + SvNumberFormatTable* pCurFmtTable; + SvxNumberValueType eValType; + String aValStr; + double nValNum; + BOOL bUndoAddList; + SvULongs aAddList; + SvULongs aDelList; + SvULongs aCurEntryList; + sal_uInt32 nInitFormatKey; + sal_uInt32 nCurFormatKey; + short nCurCategory; + LanguageType eCurLanguage; + SvUShorts aCurCurrencyList; + NfCurrencyEntry* pCurCurrencyEntry; + BOOL bBankingSymbol; + USHORT nCurCurrencyEntryPos; + SvStrings aCurrencyFormatList; + +#ifdef _SVX_NUMFMTSH_CXX + SVX_DLLPRIVATE short FillEntryList_Impl( SvStrings& rList ); + SVX_DLLPRIVATE void FillEListWithStd_Impl( SvStrings& rList,USHORT aPrivCat, short &Pos); + SVX_DLLPRIVATE short FillEListWithFormats_Impl( SvStrings& rList,short nSelPos, + NfIndexTableOffset eOffsetStart, + NfIndexTableOffset eOffsetEnd); + + SVX_DLLPRIVATE short FillEListWithDateTime_Impl( SvStrings& rList,short nSelPos); + + SVX_DLLPRIVATE short FillEListWithCurrency_Impl( SvStrings& rList,short nSelPos); + SVX_DLLPRIVATE short FillEListWithSysCurrencys( SvStrings& rList,short nSelPos); + SVX_DLLPRIVATE short FillEListWithUserCurrencys( SvStrings& rList,short nSelPos); + + SVX_DLLPRIVATE short FillEListWithUsD_Impl( SvStrings& rList, sal_uInt16 nPrivCat, short Pos ); + SVX_DLLPRIVATE BOOL IsRemoved_Impl( sal_uInt32 nKey ); + SVX_DLLPRIVATE BOOL IsAdded_Impl( sal_uInt32 nKey ); + SVX_DLLPRIVATE void GetPreviewString_Impl( String& rString, + Color*& rpColor ); + SVX_DLLPRIVATE void PosToCategory_Impl( USHORT nPos, short& rCategory ); + SVX_DLLPRIVATE void CategoryToPos_Impl( short nCategory, USHORT& rPos ); +#endif +}; + + +#endif + diff --git a/svx/inc/svx/numinf.hxx b/svx/inc/svx/numinf.hxx new file mode 100644 index 000000000000..b1525a8f56a6 --- /dev/null +++ b/svx/inc/svx/numinf.hxx @@ -0,0 +1,103 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: numinf.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_NUMINF_HXX +#define _SVX_NUMINF_HXX + +// include --------------------------------------------------------------- + +#include <svl/itempool.hxx> +#include <svx/numfmtsh.hxx> +#include "svx/svxdllapi.h" + +// class SvxNumberInfoItem ----------------------------------------------- + + + +/* +[Beschreibung] +Dieses Item dient als Transport-Medium fuer einen Number-Formatter. +*/ + +class SVX_DLLPUBLIC SvxNumberInfoItem : public SfxPoolItem +{ +public: + TYPEINFO(); + + SvxNumberInfoItem( const USHORT nId ); + SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, + const USHORT nId ); + SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const String& rVal, + const USHORT nId ); + SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const double& rVal, + const USHORT nId ); + // if both double and String are supplied, String is used for text formats + SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const double& rVal, + const String& rValueStr, const USHORT nId ); + SvxNumberInfoItem( const SvxNumberInfoItem& ); + ~SvxNumberInfoItem(); + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + SvNumberFormatter* GetNumberFormatter() const { return pFormatter; } + void SetNumberFormatter( SvNumberFormatter* pNumFrmt ); + const String& GetValueString() const { return aStringVal; } + void SetStringValue( const String& rNewVal ); + double GetValueDouble() const { return nDoubleVal; } + void SetDoubleValue( const double& rNewVal ); + + const sal_uInt32* GetDelArray() const { return pDelFormatArr; } + void SetDelFormatArray( const sal_uInt32* pData, + const sal_uInt32 nCount ); + + SvxNumberValueType GetValueType() const { return eValueType; } + sal_uInt32 GetDelCount() const { return nDelCount; } + +private: + SvNumberFormatter* pFormatter; + SvxNumberValueType eValueType; + String aStringVal; + double nDoubleVal; + + sal_uInt32* pDelFormatArr; + sal_uInt32 nDelCount; +}; + + + +#endif + diff --git a/svx/inc/svx/numitem.hxx b/svx/inc/svx/numitem.hxx new file mode 100644 index 000000000000..01f4f34ea363 --- /dev/null +++ b/svx/inc/svx/numitem.hxx @@ -0,0 +1,403 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: numitem.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_NUMITEM_HXX +#define _SVX_NUMITEM_HXX + +// include --------------------------------------------------------------- + +#include <tools/link.hxx> +#include <tools/string.hxx> +#include <svl/poolitem.hxx> +#include <svx/svxenum.hxx> +#include <tools/gen.hxx> +#ifndef _SVX_NUMDEF_HXX //autogen +#include <svx/numdef.hxx> +#endif +#ifndef _SV_COLOR_HXX //autogen +#include <tools/color.hxx> +#endif +#include <cppuhelper/weakref.hxx> +#include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/style/NumberingType.hpp> +#include <unotools/fontcvt.hxx> +#include "svx/svxdllapi.h" + +class SvxBrushItem; +class Font; +class Graphic; +class SvxNodeNum; +class BitmapEx; +namespace com{namespace sun{ namespace star{ + namespace text{ + class XNumberingFormatter; + } +}}} + +// ----------------------------------------------------------------------- +//Feature-Flags (only USHORT!) +#define NUM_CONTINUOUS 0x0001 // fortlaufende Numerierung moeglich? +#define NUM_CHAR_TEXT_DISTANCE 0x0002 // Abstand Symbol<->Text? +#define NUM_CHAR_STYLE 0x0004 // Zeichenvorlagen? +#define NUM_BULLET_REL_SIZE 0x0008 // rel. Bulletgroesse? +#define NUM_BULLET_COLOR 0x0010 // Bullet color +#define NUM_SYMBOL_ALIGNMENT 0x0040 // alignment soll unter den Optionen angezeigt werden +#define NUM_NO_NUMBERS 0x0080 // Numberierungen sind nicht erlaubt +#define NUM_ENABLE_LINKED_BMP 0x0100 // linked bitmaps are available +#define NUM_ENABLE_EMBEDDED_BMP 0x0200 // embedded bitmaps are available + +#define SVX_NO_NUM 200 // Markierung fuer keine Numerierung +#define SVX_NO_NUMLEVEL 0x20 + +#define LINK_TOKEN 0x80 //indicate linked bitmaps - for use in dialog only +class SVX_DLLPUBLIC SvxNumberType +{ + static sal_Int32 nRefCount; + static com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter; + + sal_Int16 nNumType; + sal_Bool bShowSymbol; // Symbol auch anzeigen? + +public: + SvxNumberType(sal_Int16 nType = com::sun::star::style::NumberingType::ARABIC); + SvxNumberType(const SvxNumberType& rType); + ~SvxNumberType(); + + String GetNumStr( ULONG nNo ) const; + String GetNumStr( ULONG nNo, const com::sun::star::lang::Locale& rLocale ) const; + + void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;} + sal_Int16 GetNumberingType() const {return nNumType;} + + void SetShowSymbol(sal_Bool bSet) {bShowSymbol = bSet;} + sal_Bool IsShowSymbol()const{return bShowSymbol;} + + sal_Bool IsTxtFmt() const + { + return com::sun::star::style::NumberingType::NUMBER_NONE != nNumType && + com::sun::star::style::NumberingType::CHAR_SPECIAL != nNumType && + com::sun::star::style::NumberingType::BITMAP != nNumType; + } +}; + +class SVX_DLLPUBLIC SvxNumberFormat : public SvxNumberType +{ +public: + // --> OD 2008-01-08 #newlistlevelattrs# + enum SvxNumPositionAndSpaceMode + { + LABEL_WIDTH_AND_POSITION, + LABEL_ALIGNMENT + }; + enum SvxNumLabelFollowedBy + { + LISTTAB, + SPACE, + NOTHING + }; + // <-- + +private: + String sPrefix; + String sSuffix; + + SvxAdjust eNumAdjust; + + BYTE nInclUpperLevels; //Nummern aus der vorigen Ebenen uebernehmen + USHORT nStart; //Start der Zaehlung + + sal_Unicode cBullet; //Symbol + USHORT nBulletRelSize; //proz. Groesse des Bullets + Color nBulletColor; //Bullet color + + // --> OD 2008-01-08 #newlistlevelattrs# + // mode indicating, if the position and spacing of the list label is + // determined by the former attributes (nFirstLineOffset, nAbsLSpace, + // nLSpace and nCharTextDistance) called position and spacing via label + // width and position (LABEL_WIDTH_AND_POSITION) or by the new attributes + // (meLabelFollowedBy, mnListtabPos, mnFirstLineIndent and mnIndentAt) + // called position and spacing via label alignment. + // Note 1: Attribute <eNumAdjust> is relevant for both modes. + // Note 2: The values of the former attributes are treated as 0, if mode + // LABEL_ALIGNMENT is active. + SvxNumPositionAndSpaceMode mePositionAndSpaceMode; + // <-- + + short nFirstLineOffset; //Erstzeileneinzug + short nAbsLSpace; //Abstand Rand<->Nummer + short nLSpace; //relative Einrueckung zum Vorgaenger + short nCharTextDistance; //Abstand Nummer<->Text + + // --> OD 2008-01-08 #newlistlevelattrs# + // specifies what follows the list label before the text of the first line + // of the list item starts + SvxNumLabelFollowedBy meLabelFollowedBy; + // specifies an additional list tab stop position for meLabelFollowedBy = LISTTAB + long mnListtabPos; + // specifies the first line indent + long mnFirstLineIndent; + // specifies the indent before the text, e.g. in L2R-layout the left margin + long mnIndentAt; + // <-- + + SvxBrushItem* pGraphicBrush; // + sal_Int16 eVertOrient; // vert. Ausrichtung einer Bitmap + + Size aGraphicSize; // immer! in 1/100 mm + Font* pBulletFont; // Pointer auf den BulletFont + + String sCharStyleName; // Zeichenvorlage + + BitmapEx* pScaledImageCache; // Image scaled to aGraphicSize, only cached for WINDOW/VDEV + + DECL_STATIC_LINK( SvxNumberFormat, GraphicArrived, void * ); + virtual void NotifyGraphicArrived(); +public: + // --> OD 2008-01-09 #newlistlevelattrs# + SvxNumberFormat( sal_Int16 nNumberingType, + SvxNumPositionAndSpaceMode ePositionAndSpaceMode = LABEL_WIDTH_AND_POSITION ); + // <-- + SvxNumberFormat(const SvxNumberFormat& rFormat); + SvxNumberFormat(SvStream &rStream); + + virtual ~SvxNumberFormat(); + + SvStream& Store(SvStream &rStream, FontToSubsFontConverter pConverter); + + SvxNumberFormat& operator=( const SvxNumberFormat& ); + BOOL operator==( const SvxNumberFormat& ) const; + BOOL operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);} + + void SetNumAdjust(SvxAdjust eSet) {eNumAdjust = eSet;} + SvxAdjust GetNumAdjust() const {return eNumAdjust;} + void SetPrefix(const String& rSet) { sPrefix = rSet;} + const String& GetPrefix() const { return sPrefix;} + void SetSuffix(const String& rSet) { sSuffix = rSet;} + const String& GetSuffix() const { return sSuffix;} + + void SetCharFmtName(const String& rSet){ sCharStyleName = rSet; } + virtual const String& GetCharFmtName()const; + + void SetBulletFont(const Font* pFont); + const Font* GetBulletFont() const {return pBulletFont;} + void SetBulletChar(sal_Unicode cSet){cBullet = cSet;} + sal_Unicode GetBulletChar()const {return cBullet;} + void SetBulletRelSize(USHORT nSet) {nBulletRelSize = nSet;} + USHORT GetBulletRelSize() const { return nBulletRelSize;} + void SetBulletColor(Color nSet){nBulletColor = nSet;} + Color GetBulletColor()const {return nBulletColor;} + + void SetIncludeUpperLevels( BYTE nSet ) { nInclUpperLevels = nSet;} + BYTE GetIncludeUpperLevels()const { return nInclUpperLevels;} + void SetStart(USHORT nSet) {nStart = nSet;} + USHORT GetStart() const {return nStart;} + + virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0); + const SvxBrushItem* GetBrush() const {return pGraphicBrush;} + void SetGraphic( const String& rName ); + virtual void SetVertOrient(sal_Int16 eSet); + virtual sal_Int16 GetVertOrient() const; + void SetGraphicSize(const Size& rSet) {aGraphicSize = rSet;} + const Size& GetGraphicSize() const {return aGraphicSize;} + + // --> OD 2008-01-09 #newlistlevelattrs# + SvxNumPositionAndSpaceMode GetPositionAndSpaceMode() const; + void SetPositionAndSpaceMode( SvxNumPositionAndSpaceMode ePositionAndSpaceMode ); + // <-- + + void SetLSpace(short nSet) {nLSpace = nSet;} + // --> OD 2008-01-09 #newlistlevelattrs# + short GetLSpace() const; + // <-- + void SetAbsLSpace(short nSet) {nAbsLSpace = nSet;} + // --> OD 2008-01-09 #newlistlevelattrs# + short GetAbsLSpace() const; + // <-- + void SetFirstLineOffset(short nSet) { nFirstLineOffset = nSet;} + // --> OD 2008-01-09 #newlistlevelattrs# + short GetFirstLineOffset() const; + // <-- + void SetCharTextDistance(short nSet) { nCharTextDistance = nSet; } + // --> OD 2008-01-09 #newlistlevelattrs# + short GetCharTextDistance() const; + // <-- + + // --> OD 2008-01-09 #newlistlevelattrs# + void SetLabelFollowedBy( const SvxNumLabelFollowedBy eLabelFollowedBy ); + SvxNumLabelFollowedBy GetLabelFollowedBy() const; + void SetListtabPos( const long nListtabPos ); + long GetListtabPos() const; + void SetFirstLineIndent( const long nFirstLineIndent ); + long GetFirstLineIndent() const; + void SetIndentAt( const long nIndentAt ); + long GetIndentAt() const; + // <-- + + static Size GetGraphicSizeMM100(const Graphic* pGraphic); + static String CreateRomanString( ULONG nNo, BOOL bUpper ); +}; + +enum SvxNumRuleType +{ + SVX_RULETYPE_NUMBERING, + SVX_RULETYPE_OUTLINE_NUMBERING, + SVX_RULETYPE_PRESENTATION_NUMBERING, + SVX_RULETYPE_END +}; + +class SVX_DLLPUBLIC SvxNumRule +{ + USHORT nLevelCount; // Anzahl der unterstuetzten Levels + ULONG nFeatureFlags; // was wird unterstuetzt? + SvxNumRuleType eNumberingType; // was fuer eine Numerierung + BOOL bContinuousNumbering; // fortlaufende Numerierung + + SvxNumberFormat* aFmts[SVX_MAX_NUM]; + BOOL aFmtsSet[SVX_MAX_NUM]; //Flags ueber Gueltigkeit der Ebenen + + static sal_Int32 nRefCount; + com::sun::star::lang::Locale aLocale; +public: + // --> OD 2008-02-11 #newlistlevelattrs# + SvxNumRule( ULONG nFeatures, + USHORT nLevels, + BOOL bCont, + SvxNumRuleType eType = SVX_RULETYPE_NUMBERING, + SvxNumberFormat::SvxNumPositionAndSpaceMode + eDefaultNumberFormatPositionAndSpaceMode + = SvxNumberFormat::LABEL_WIDTH_AND_POSITION ); + // <-- + SvxNumRule(const SvxNumRule& rCopy); + SvxNumRule(SvStream &rStream); + virtual ~SvxNumRule(); + + int operator==( const SvxNumRule& ) const; + int operator!=( const SvxNumRule& rRule ) const {return !(*this == rRule);} + + SvxNumRule& operator=( const SvxNumRule& ); + + SvStream& Store(SvStream &rStream); + + const SvxNumberFormat* Get(USHORT nLevel)const; + const SvxNumberFormat& GetLevel(USHORT nLevel)const; + void SetLevel(USHORT nLevel, const SvxNumberFormat& rFmt, BOOL bIsValid = TRUE); + void SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt); + + BOOL IsContinuousNumbering()const + {return bContinuousNumbering;} + void SetContinuousNumbering(BOOL bSet) + {bContinuousNumbering = bSet;} + + USHORT GetLevelCount() const {return nLevelCount;} + BOOL IsFeatureSupported(ULONG nFeature) const + {return 0 != (nFeatureFlags & nFeature);} + ULONG GetFeatureFlags() const {return nFeatureFlags;} + void SetFeatureFlag( ULONG nFlag, BOOL bSet = TRUE ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; } + + String MakeNumString( const SvxNodeNum&, BOOL bInclStrings = TRUE ) const; + + SvxNumRuleType GetNumRuleType() const { return eNumberingType; } + void SetNumRuleType( const SvxNumRuleType& rType ) { eNumberingType = rType; } + + BOOL UnLinkGraphics(); +}; +/* -----------------27.10.98 13:04------------------- + * + * --------------------------------------------------*/ +class SVX_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem +{ + SvxNumRule* pNumRule; +public: + SvxNumBulletItem(SvxNumRule& rRule); + SvxNumBulletItem(SvxNumRule& rRule, USHORT nWhich ); + SvxNumBulletItem(const SvxNumBulletItem& rCopy); + virtual ~SvxNumBulletItem(); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + USHORT GetVersion( USHORT nFileVersion ) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual int operator==( const SfxPoolItem& ) const; + + SvxNumRule* GetNumRule() const {return pNumRule;} + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; +/* -----------------28.10.98 15:21------------------- + * + * --------------------------------------------------*/ +class SvxNodeNum +{ + USHORT nLevelVal[ SVX_MAX_NUM ]; // Nummern aller Levels + USHORT nSetValue; // vorgegebene Nummer + BYTE nMyLevel; // akt. Level + BOOL bStartNum; // Numerierung neu starten + +public: + inline SvxNodeNum( BYTE nLevel = SVX_NO_NUM, USHORT nSetVal = USHRT_MAX ); + inline SvxNodeNum& operator=( const SvxNodeNum& rCpy ); + + BYTE GetLevel() const { return nMyLevel; } + void SetLevel( BYTE nVal ) { nMyLevel = nVal; } + + BOOL IsStart() const { return bStartNum; } + void SetStart( BOOL bFlag = TRUE ) { bStartNum = bFlag; } + + USHORT GetSetValue() const { return nSetValue; } + void SetSetValue( USHORT nVal ) { nSetValue = nVal; } + + const USHORT* GetLevelVal() const { return nLevelVal; } + USHORT* GetLevelVal() { return nLevelVal; } +}; + +SvxNodeNum::SvxNodeNum( BYTE nLevel, USHORT nSetVal ) + : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( FALSE ) +{ + memset( nLevelVal, 0, sizeof( nLevelVal ) ); +} + +inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy ) +{ + nSetValue = rCpy.nSetValue; + nMyLevel = rCpy.nMyLevel; + bStartNum = rCpy.bStartNum; + + memcpy( nLevelVal, rCpy.nLevelVal, sizeof( nLevelVal ) ); + return *this; +} + +/* -------------------------------------------------- + * + * --------------------------------------------------*/ +SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevel, SvxNumRuleType eType ); + +#endif + diff --git a/svx/inc/svx/obj3d.hxx b/svx/inc/svx/obj3d.hxx new file mode 100644 index 000000000000..30a22938f888 --- /dev/null +++ b/svx/inc/svx/obj3d.hxx @@ -0,0 +1,329 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: obj3d.hxx,v $ + * $Revision: 1.5.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_OBJ3D_HXX +#define _E3D_OBJ3D_HXX + +#include <svx/svdoattr.hxx> +#include <svx/svdobj.hxx> +#include <svx/volume3d.hxx> +#include <svx/def3d.hxx> +#include <svx/svdpage.hxx> +#include <svx/deflt3d.hxx> +#include <vcl/bitmap.hxx> +#include <svx/svx3ditems.hxx> +#include <svx/xflclit.hxx> +#include <svl/itemset.hxx> +#include <basegfx/polygon/b3dpolypolygon.hxx> +#include <basegfx/point/b2dpoint.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> +#include <basegfx/vector/b2enums.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SfxPoolItem; +class Viewport3D; +class E3dScene; +class E3dPolyScene; + +namespace basegfx { class B3DPolyPolygon; } +namespace sdr { namespace properties { + class BaseProperties; + class E3dProperties; + class E3dCompoundProperties; + class E3dExtrudeProperties; + class E3dLatheProperties; + class E3dSphereProperties; +}} + +/************************************************************************* +|* +|* GeoData relevant fuer Undo-Actions +|* +\************************************************************************/ + +class E3DObjGeoData : public SdrObjGeoData +{ +public: + basegfx::B3DRange maLocalBoundVol; // umschliessendes Volumen des Objekts + basegfx::B3DHomMatrix maTransformation; // lokale Transformation + + E3DObjGeoData() {} +}; + +/************************************************************************* +|* +|* Liste fuer 3D-Objekte +|* +\************************************************************************/ + +class E3dObjList : public SdrObjList +{ +public: + TYPEINFO(); + E3dObjList(SdrModel* pNewModel = 0, SdrPage* pNewPage = 0, E3dObjList* pNewUpList = 0); + SVX_DLLPUBLIC E3dObjList(const E3dObjList& rSrcList); + SVX_DLLPUBLIC virtual ~E3dObjList(); + + virtual void NbcInsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND, const SdrInsertReason* pReason=NULL); + virtual void InsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND, const SdrInsertReason* pReason=NULL); + virtual SdrObject* NbcRemoveObject(ULONG nObjNum); + virtual SdrObject* RemoveObject(ULONG nObjNum); +}; + +/************************************************************************* +|* +|* Basisklasse fuer 3D-Objekte +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dObject : public SdrAttrObj +{ + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // to allow sdr::properties::E3dProperties access to StructureChanged() + friend class sdr::properties::E3dProperties; + + // Aus der E3dObjList und E3dDragMethod alles erlauben + friend class E3dObjList; + friend class E3dDragMethod; + + protected: + E3dObjList maSubList; // Subliste (Childobjekte) + + basegfx::B3DRange maLocalBoundVol; // umschliessendes Volumen des Objekts (aus geometrieerzeugung) + basegfx::B3DHomMatrix maTransformation; // lokale Transformation + basegfx::B3DHomMatrix maFullTransform; // globale Transformation (inkl. Parents) + + // Flags + unsigned mbTfHasChanged : 1; + unsigned mbIsSelected : 1; + + public: + void SetBoundVolInvalid(); + + protected: + void SetTransformChanged(); + virtual void NewObjectInserted(const E3dObject* p3DObj); + virtual void StructureChanged(); + basegfx::B3DRange RecalcBoundVolume() const; + +protected: + // E3dObject is only a helper class (for E3DScene and E3DCompoundObject) + // and no instances should be created from anyone, so i move the constructors + // to protected area + E3dObject(); + E3dObject(BOOL bIsFromChart); + +public: + TYPEINFO(); + virtual void RecalcSnapRect(); + virtual void SetRectsDirty(sal_Bool bNotMyself = sal_False); + + virtual ~E3dObject(); + + virtual UINT32 GetObjInventor() const; + virtual UINT16 GetObjIdentifier() const; + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + + virtual void NbcSetLayer(SdrLayerID nLayer); + + virtual void SetObjList(SdrObjList* pNewObjList); + virtual void SetPage(SdrPage* pNewPage); + virtual void SetModel(SdrModel* pNewModel); + virtual void NbcMove(const Size& rSize); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual SdrObjList* GetSubList() const; + + // 3D-Objekt in die Gruppe einfuegen; Eigentumsuebergang! + virtual void Insert3DObj(E3dObject* p3DObj); + void Remove3DObj(E3dObject* p3DObj); + + E3dObject* GetParentObj() const; + virtual E3dScene* GetScene() const; + + const basegfx::B3DRange& GetBoundVolume() const; + void InvalidateBoundVolume(); + + // komplette Transformation inklusive aller Parents berechnen + const basegfx::B3DHomMatrix& GetFullTransform() const; + + // Transformationsmatrix abfragen bzw. (zurueck)setzen + const basegfx::B3DHomMatrix& GetTransform() const; + virtual void NbcSetTransform(const basegfx::B3DHomMatrix& rMatrix); + virtual void SetTransform(const basegfx::B3DHomMatrix& rMatrix); + + // [FG] 2D-Rotationen, werden hier als Rotationen um die Z-Achse, die in den Bildschirm zeigt, + // implementiert plus eine Verschiebung der Scene. Dies bedeutet auch die Scene (E3dScene) + // muss diese Routine in der Klasse als virtual definieren. + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + + // get wireframe polygon for local object. No transform is applied. + basegfx::B3DPolyPolygon CreateWireframe() const; + + // TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert". + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + USHORT GetLogicalGroup() { return 0; } + virtual void operator=(const SdrObject&); + + virtual SdrObjGeoData *NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + + // Selektion Setzen/Lesen + bool GetSelected() const { return mbIsSelected; } + void SetSelected(bool bNew); + + // Aufbrechen + virtual BOOL IsBreakObjPossible(); + virtual SdrAttrObj* GetBreakObj(); +}; + +/************************************************************************* +|* +|* Klasse fuer alle zusammengesetzen Objekte (Cube, Lathe, Scene, Extrude) +|* Diese Klasse erspart ein paar ISA-Abfragen und sie beschleunigt das +|* Verhalten ungemein, da alle Attribute usw. fuer die untergeordneten +|* Polygone hierueber gehalten werden. Die Polygone duerfen nur Attribute +|* halten, wenn sie direkt einer Szene untergeordnet sind. +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dCompoundObject : public E3dObject +{ + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // to allow sdr::properties::E3dCompoundProperties access to SetGeometryValid() + friend class sdr::properties::E3dCompoundProperties; + friend class sdr::properties::E3dExtrudeProperties; + friend class sdr::properties::E3dLatheProperties; + friend class sdr::properties::E3dSphereProperties; + +protected: + // Material des Objektes + Color aMaterialAmbientColor; + + // Attribute zur Geometrieerzeugung + unsigned bCreateNormals : 1; + unsigned bCreateTexture : 1; + +protected: + void SetDefaultAttributes(E3dDefaultAttributes& rDefault); + + // convert given basegfx::B3DPolyPolygon to screen coor + basegfx::B2DPolyPolygon TransformToScreenCoor(const basegfx::B3DPolyPolygon& rCandidate); + +public : + TYPEINFO(); + + E3dCompoundObject(); + E3dCompoundObject(E3dDefaultAttributes& rDefault); + virtual ~E3dCompoundObject(); + + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + virtual sal_uInt32 GetHdlCount() const; + virtual void AddToHdlList(SdrHdlList& rHdlList) const; + + // DoubleSided: TRUE/FALSE + BOOL GetDoubleSided() const + { return ((const Svx3DDoubleSidedItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); } + + // NormalsKind: 0 == FALSE/FALSE, 1 == TRUE/FALSE, else == TRUE/TRUE + sal_uInt16 GetNormalsKind() const + { return ((const Svx3DNormalsKindItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue(); } + + // NormalsInvert: TRUE/FALSE + BOOL GetNormalsInvert() const + { return ((const Svx3DNormalsInvertItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); } + + // TextureProjX: 0 == FALSE/FALSE, 1 == TRUE/FALSE, else == TRUE/TRUE + sal_uInt16 GetTextureProjectionX() const + { return ((const Svx3DTextureProjectionXItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue(); } + + // TextureProjY: 0 == FALSE/FALSE, 1 == TRUE/FALSE, else == TRUE/TRUE + sal_uInt16 GetTextureProjectionY() const + { return ((const Svx3DTextureProjectionYItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue(); } + + // Shadow3D: TRUE/FALSE + BOOL GetShadow3D() const + { return ((const Svx3DShadow3DItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); } + + // MaterialColor: Color + Color GetMaterialColor() const + { return ((const Svx3DMaterialColorItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_COLOR)).GetValue(); } + + // MaterialEmission: Color + Color GetMaterialEmission() const + { return ((const Svx3DMaterialEmissionItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue(); } + + // MaterialSpecular: Color + Color GetMaterialSpecular() const + { return ((const Svx3DMaterialSpecularItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue(); } + + // MaterialSpecularIntensity: + sal_uInt16 GetMaterialSpecularIntensity() const + { return ((const Svx3DMaterialSpecularIntensityItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); } + + // TextureFilter: TRUE/FALSE + BOOL GetTextureFilter() const + { return ((const Svx3DTextureFilterItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); } + + // #i28528# + // Added extra Item (Bool) for chart2 to be able to show reduced line geometry + BOOL GetReducedLineGeometry() const + { return ((const Svx3DReducedLineGeometryItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY)).GetValue(); } + + virtual UINT16 GetObjIdentifier() const; + virtual void RecalcSnapRect(); + + // Parameter Geometrieerzeugung setzen/lesen + BOOL GetCreateNormals() const { return bCreateNormals; } + void SetCreateNormals(BOOL bNew); + + BOOL GetCreateTexture() const { return bCreateTexture; } + void SetCreateTexture(BOOL bNew); + + // Copy-Operator + virtual void operator=(const SdrObject&); + + // Material des Objektes + const Color& GetMaterialAmbientColor() const { return aMaterialAmbientColor; } + void SetMaterialAmbientColor(const Color& rColor); + + // #110988# + sal_Bool IsAOrdNumRemapCandidate(E3dScene*& prScene) const; +}; + +#endif // _E3D_OBJ3D_HXX diff --git a/svx/inc/svx/orphitem.hxx b/svx/inc/svx/orphitem.hxx new file mode 100644 index 000000000000..676e245c3770 --- /dev/null +++ b/svx/inc/svx/orphitem.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: orphitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ORPHITEM_HXX +#define _SVX_ORPHITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} +#include "svx/svxdllapi.h" + +// class SvxOrphansItem -------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt die Anzahl der Zeilen fuer die Schusterjungenregelung. +*/ + +class SVX_DLLPUBLIC SvxOrphansItem: public SfxByteItem +{ + friend SvStream & operator<<( SvStream & aS, SvxOrphansItem & ); +public: + TYPEINFO(); + + SvxOrphansItem( const BYTE nL /*= 0*/, const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxOrphansItem& operator=( const SvxOrphansItem& rOrphans ) + { + SetValue( rOrphans.GetValue() ); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/outliner.hxx b/svx/inc/svx/outliner.hxx new file mode 100644 index 000000000000..e87ed9bd6114 --- /dev/null +++ b/svx/inc/svx/outliner.hxx @@ -0,0 +1,1050 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: outliner.hxx,v $ + * $Revision: 1.6.16.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _OUTLINER_HXX +#define _OUTLINER_HXX + +#include <tools/gen.hxx> +#include <tools/string.hxx> +#include <tools/debug.hxx> + +#include <svl/brdcst.hxx> + +#include <svx/editdata.hxx> +#include <i18npool/lang.h> +#include <tools/color.hxx> +#include <vcl/graph.hxx> +#include <tools/list.hxx> +#include <tools/link.hxx> +#include <rsc/rscsfx.hxx> +#include "svx/svxdllapi.h" + +#include <goodies/grfmgr.hxx> + +#include <tools/rtti.hxx> // wegen typedef TypeId +#include <vector> + +class OutlinerEditEng; +class Outliner; +class EditView; +class EditUndo; +class ParagraphList; +class OutlinerParaObject; +class SvStream; +class SvxBulletItem; +class SvxFont; +class SvxSearchItem; +class SvxFieldItem; +class OLUndoRemove; +class Window; +class KeyEvent; +class MouseEvent; +class Pointer; +class CommandEvent; +class MapMode; +class OutputDevice; +class PolyPolygon; +class SfxStyleSheetPool; +class SfxStyleSheet; +class SfxItemPool; +class SfxItemSet; +class SvxNumBulletItem; +class SvxNumberFormat; +class SvxLRSpaceItem; +class SfxUndoManager; +class EditEngine; +class SvKeyValueIterator; +class SvxForbiddenCharactersTable; +#include <com/sun/star/uno/Reference.h> + +#include <vos/ref.hxx> +#include <svx/svxfont.hxx> +#include <svx/eedata.hxx> +#include <svx/paragraphdata.hxx> + +class SvxFieldData; +////////////////////////////////////////////////////////////////////////////// + +namespace com { namespace sun { namespace star { namespace linguistic2 { + class XSpellChecker1; + class XHyphenator; +}}}} +namespace svx{ +struct SpellPortion; +typedef std::vector<SpellPortion> SpellPortions; +} + +namespace basegfx { class B2DPolyPolygon; } + +// nur interner Gebrauch! +#define PARAFLAG_DROPTARGET 0x1000 +#define PARAFLAG_DROPTARGET_EMPTY 0x2000 +#define PARAFLAG_HOLDDEPTH 0x4000 +#define PARAFLAG_SETBULLETTEXT 0x8000 +#define PARAFLAG_ISPAGE 0x0100 + +// Undo-Action-Ids +#define OLUNDO_DEPTH EDITUNDO_USER +// #define OLUNDO_HEIGHT EDITUNDO_USER+1 +#define OLUNDO_EXPAND EDITUNDO_USER+2 +#define OLUNDO_COLLAPSE EDITUNDO_USER+3 +// #define OLUNDO_REMOVE EDITUNDO_USER+4 +#define OLUNDO_ATTR EDITUNDO_USER+5 +#define OLUNDO_INSERT EDITUNDO_USER+6 +// #define OLUNDO_MOVEPARAGRAPHS EDITUNDO_USER+7 +#define OLUNDO_CHECKPARA EDITUNDO_USER+8 + +class Paragraph : protected ParagraphData +{ +private: + friend class Outliner; + friend class ParagraphList; + friend class OutlinerView; + friend class OutlinerParaObject; + friend class OutlinerEditEng; + friend class OLUndoDepth; + friend class OutlinerUndoCheckPara; + friend class OutlinerUndoChangeParaFlags; + + Paragraph& operator=(const Paragraph& rPara ); + + USHORT nFlags; + XubString aBulText; + Size aBulSize; + BOOL bVisible; + + BOOL IsVisible() const { return bVisible; } + void SetText( const XubString& rText ) { aBulText = rText; aBulSize.Width() = -1; } + void Invalidate() { aBulSize.Width() = -1; } + void SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.Width() = -1; } + const XubString& GetText() const { return aBulText; } + + Paragraph( sal_Int16 nDepth ); + Paragraph( const Paragraph& ); + Paragraph( const ParagraphData& ); + ~Paragraph(); + + sal_Int16 GetDepth() const { return nDepth; } + + sal_Int16 GetNumberingStartValue() const { return mnNumberingStartValue; } + void SetNumberingStartValue( sal_Int16 nNumberingStartValue ); + + sal_Bool IsParaIsNumberingRestart() const { return mbParaIsNumberingRestart; } + void SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart ); + + void SetFlag( USHORT nFlag ) { nFlags |= nFlag; } + void RemoveFlag( USHORT nFlag ) { nFlags &= ~nFlag; } + bool HasFlag( USHORT nFlag ) const { return (nFlags & nFlag) != 0; } +}; + +struct ParaRange +{ + USHORT nStartPara; + USHORT nEndPara; + + ParaRange( USHORT nS, USHORT nE ) { nStartPara = nS, nEndPara = nE; } + + void Adjust(); + USHORT Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); } +}; + +inline void ParaRange::Adjust() +{ + if ( nStartPara > nEndPara ) + { + USHORT nTmp = nStartPara; + nStartPara = nEndPara; + nEndPara = nTmp; + } +} + +#define OL_ROOTPARENT (Paragraph*)NULL + +class SVX_DLLPUBLIC OutlinerView +{ + friend class Outliner; + +private: + + Outliner* pOwner; + EditView* pEditView; + + // Drag & Drop + BOOL bBeginDragAtMove_OLDMEMBER; + BOOL bInDragMode; + Point aDDStartPosRef; + Point aDDStartPosPix; + ULONG nDDStartPara; + ULONG nDDStartParaVisChildCount; + ULONG nDDCurPara; + USHORT nDDStartDepth; + USHORT nDDCurDepth; + USHORT nDDMaxDepth; + BOOL bDDChangingDepth; + BOOL bDDCursorVisible; + long* pHorTabArrDoc; + long nDDScrollLRBorderWidthWin; // Left Right + long nDDScrollTBBorderWidthWin; // Top Bottom + long nDDScrollLROffs; + long nDDScrollTDOffs; + + void* pDummy; + ULONG nDummy; + + enum MouseTarget { + MouseText = 0, + MouseBullet = 1, + MouseHypertext = 2, // ausserhalb OutputArea + MouseOutside = 3, // ausserhalb OutputArea + MouseDontKnow = 4 + }; + MouseTarget OLD_ePrevMouseTarget; + +#ifdef _OUTLINER_CXX + + SVX_DLLPRIVATE void ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand ); + + SVX_DLLPRIVATE ULONG ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget); + SVX_DLLPRIVATE void ImpToggleExpand( Paragraph* pParentPara ); + SVX_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds ); + SVX_DLLPRIVATE void ImpHideDDCursor(); + SVX_DLLPRIVATE void ImpShowDDCursor(); + SVX_DLLPRIVATE void ImpPaintDDCursor(); + + SVX_DLLPRIVATE void ImpDragScroll( const Point& rPosPix ); + SVX_DLLPRIVATE void ImpScrollLeft(); + SVX_DLLPRIVATE void ImpScrollRight(); + SVX_DLLPRIVATE void ImpScrollUp(); + SVX_DLLPRIVATE void ImpScrollDown(); + + SVX_DLLPRIVATE ULONG ImpGetInsertionPara( const Point& rPosPixel ); + SVX_DLLPRIVATE Point ImpGetDocPos( const Point& rPosPixel ); + SVX_DLLPRIVATE Pointer ImpGetMousePointer( MouseTarget eTarget ); + SVX_DLLPRIVATE USHORT ImpInitPaste( ULONG& rStart ); + SVX_DLLPRIVATE void ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize); + SVX_DLLPRIVATE USHORT ImpCalcSelectedPages( BOOL bIncludeFirstSelected ); + SVX_DLLPRIVATE BOOL ImpIsIndentingPages(); + +#endif + +public: + OutlinerView( Outliner* pOut, Window* pWindow ); + virtual ~OutlinerView(); + + EditView& GetEditView() const { return *pEditView; } + + void Scroll( long nHorzScroll, long nVertScroll ); + + void Paint( const Rectangle& rRect ); + BOOL PostKeyEvent( const KeyEvent& rKEvt ); + BOOL MouseButtonDown( const MouseEvent& ); + BOOL MouseButtonUp( const MouseEvent& ); + BOOL MouseMove( const MouseEvent& ); + + void ShowCursor( BOOL bGotoCursor = TRUE ); + void HideCursor(); + + void SetOutliner( Outliner* pOutliner ); + Outliner* GetOutliner() const { return pOwner; } + + void SetWindow( Window* pWindow ); + Window* GetWindow() const; + + void SetReadOnly( BOOL bReadOnly ); + BOOL IsReadOnly() const; + + void SetOutputArea( const Rectangle& rRect ); + Rectangle GetOutputArea() const; + + Rectangle GetVisArea() const; + + List* CreateSelectionList(); + + // gibt Anzahl selektierter Absaetze zurueck + // MT 07/00: Who needs this? + ULONG Select( Paragraph* pParagraph, + BOOL bSelect=TRUE, + BOOL bWChilds=TRUE); + + String GetSelected() const; + void SelectRange( ULONG nFirst, USHORT nCount ); + void SetAttribs( const SfxItemSet& ); + void Indent( short nDiff ); + void AdjustDepth( short nDX ); // Spaeter gegeb Indent ersetzen! + + BOOL AdjustHeight( long nDY ); + void AdjustDepth( Paragraph* pPara, short nDX, + BOOL bWithChilds = FALSE ); + void AdjustHeight( Paragraph* pPara, long nDY, + BOOL bWithChilds=FALSE ); + + ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + ULONG Write( SvStream& rOutput, EETextFormat eFormat ); + + void InsertText( const String& rNew, BOOL bSelect = FALSE ); + void InsertText( const OutlinerParaObject& rParaObj ); + void Expand(); + void Collapse(); + void Expand( Paragraph* ); + void Collapse( Paragraph* ); + void ExpandAll(); + void CollapseAll(); + + void SetBackgroundColor( const Color& rColor ); + Color GetBackgroundColor(); + + SfxItemSet GetAttribs(); + + void Cut(); + void Copy(); + void Paste(); + void PasteSpecial(); + void EnablePaste( BOOL bEnable ); + + void Undo(); + void Redo(); + + void SetStyleSheet( SfxStyleSheet* ); + SfxStyleSheet* GetStyleSheet() const; + + void SetControlWord( ULONG nWord ); + ULONG GetControlWord() const; + + void SetAnchorMode( EVAnchorMode eMode ); + EVAnchorMode GetAnchorMode() const; + + Pointer GetPointer( const Point& rPosPixel ); + void Command( const CommandEvent& rCEvt ); + void RemoveCharAttribs( ULONG nPara, USHORT nWhich = 0 ); + + void CompleteAutoCorrect(); + + EESpellState StartSpeller( BOOL bMultipleDoc = FALSE ); + EESpellState StartThesaurus(); + USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem ); + + // for text conversion + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ); + + void TransliterateText( sal_Int32 nTransliterationMode ); + + ESelection GetSelection(); + + USHORT GetSelectedScriptType() const; + + void SetVisArea( const Rectangle& rRec ); + void SetSelection( const ESelection& ); + + void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0, BOOL bKeepLanguages = FALSE ); + void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs ); + BOOL HasSelection() const; + + void InsertField( const SvxFieldItem& rFld ); + const SvxFieldItem* GetFieldUnderMousePointer() const; + const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const; + const SvxFieldItem* GetFieldAtSelection() const; + + /** enables numbering for the selected paragraphs if the numbering of the first paragraph is off + or disables numbering for the selected paragraphs if the numbering of the first paragraph is on + */ + void ToggleBullets(); + + /** enables numbering for the selected paragraphs that are not enabled and ignore all selected + paragraphs that already have numbering enabled. + */ + void EnableBullets(); + + BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE ); + BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE ); + void SpellIgnoreWord(); + void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 ); + + void SetInvalidateMore( USHORT nPixel ); + USHORT GetInvalidateMore() const; + + String GetSurroundingText() const;
+ Selection GetSurroundingTextSelection() const; +}; + +//#if 0 // _SOLAR__PRIVATE +DECLARE_LIST(ViewList,OutlinerView*) +//#else +//typedef List ViewList; +//#endif + +class SVX_DLLPUBLIC DrawPortionInfo +{ +public: + const Point& mrStartPos; + const String& mrText; + sal_uInt16 mnTextStart; + sal_uInt16 mnTextLen; + sal_uInt16 mnPara; + xub_StrLen mnIndex; + const SvxFont& mrFont; + const sal_Int32* mpDXArray; + + const EEngineData::WrongSpellVector* mpWrongSpellVector; + const SvxFieldData* mpFieldData; + const ::com::sun::star::lang::Locale* mpLocale; + const Color maOverlineColor; + const Color maTextLineColor; + + // #101498# BiDi level needs to be transported, too. + BYTE mnBiDiLevel; + + // bitfield + unsigned mbEndOfLine : 1; + unsigned mbEndOfParagraph : 1; + unsigned mbEndOfBullet : 1; + + BYTE GetBiDiLevel() const { return mnBiDiLevel; } + sal_Bool IsRTL() const; + + DrawPortionInfo( + const Point& rPos, + const String& rTxt, + sal_uInt16 nTxtStart, + sal_uInt16 nTxtLen, + const SvxFont& rFnt, + sal_uInt16 nPar, + xub_StrLen nIdx, + const sal_Int32* pDXArr, + const EEngineData::WrongSpellVector* pWrongSpellVector, + const SvxFieldData* pFieldData, + const ::com::sun::star::lang::Locale* pLocale, + const Color& rOverlineColor, + const Color& rTextLineColor, + BYTE nBiDiLevel, + bool bEndOfLine, + bool bEndOfParagraph, + bool bEndOfBullet) + : mrStartPos(rPos), + mrText(rTxt), + mnTextStart(nTxtStart), + mnTextLen(nTxtLen), + mnPara(nPar), + mnIndex(nIdx), + mrFont(rFnt), + mpDXArray(pDXArr), + mpWrongSpellVector(pWrongSpellVector), + mpFieldData(pFieldData), + mpLocale(pLocale), + maOverlineColor(rOverlineColor), + maTextLineColor(rTextLineColor), + mnBiDiLevel(nBiDiLevel), + mbEndOfLine(bEndOfLine), + mbEndOfParagraph(bEndOfParagraph), + mbEndOfBullet(bEndOfBullet) + {} +}; + +class SVX_DLLPUBLIC DrawBulletInfo +{ +public: + const GraphicObject maBulletGraphicObject; + Point maBulletPosition; + Size maBulletSize; + + DrawBulletInfo( + const GraphicObject& rBulletGraphicObject, + const Point& rBulletPosition, + const Size& rBulletSize) + : maBulletGraphicObject(rBulletGraphicObject), + maBulletPosition(rBulletPosition), + maBulletSize(rBulletSize) + {} +}; + +struct SVX_DLLPUBLIC PaintFirstLineInfo +{ + USHORT mnPara; + const Point& mrStartPos; + long mnBaseLineY; + const Point& mrOrigin; + short mnOrientation; + OutputDevice* mpOutDev; + + PaintFirstLineInfo( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) + : mnPara( nPara ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mnOrientation( nOrientation ), mpOutDev( pOutDev ) + {} +}; + +class SdrPage; + +class EditFieldInfo +{ +private: + Outliner* pOutliner; + const SvxFieldItem& rFldItem; + + Color* pTxtColor; + Color* pFldColor; + + String aRepresentation; + + USHORT nPara; + xub_StrLen nPos; + BOOL bSimpleClick; + + EditFieldInfo(); + EditFieldInfo( const EditFieldInfo& ); + + SdrPage* mpSdrPage; + +public: + EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, USHORT nPa, xub_StrLen nPo ) + : rFldItem( rFItem ) + { + pOutliner = pOutl; + nPara = nPa; nPos = nPo; + pTxtColor = 0; pFldColor = 0; bSimpleClick = FALSE; + mpSdrPage = 0; + } + ~EditFieldInfo() + { + delete pTxtColor; + delete pFldColor; + } + + Outliner* GetOutliner() const { return pOutliner; } + + const SvxFieldItem& GetField() const { return rFldItem; } + + Color* GetTxtColor() const { return pTxtColor; } + void SetTxtColor( const Color& rColor ) + { delete pTxtColor; pTxtColor = new Color( rColor ); } + + Color* GetFldColor() const { return pFldColor; } + void SetFldColor( const Color& rColor ) + { delete pFldColor; pFldColor = new Color( rColor ); } + void ClearFldColor() + { delete pFldColor; pFldColor = 0; } + + USHORT GetPara() const { return nPara; } + xub_StrLen GetPos() const { return nPos; } + + BOOL IsSimpleClick() const { return bSimpleClick; } + void SetSimpleClick( BOOL bSimple ) { bSimpleClick = bSimple; } + + const String& GetRepresentation() const { return aRepresentation; } + String& GetRepresentation() { return aRepresentation; } + void SetRepresentation( const String& rStr ) { aRepresentation = rStr; } + + void SetSdrPage( SdrPage* pPage ) { mpSdrPage = pPage; } + SdrPage* GetSdrPage() const { return mpSdrPage; } +}; + +struct EBulletInfo +{ + BOOL bVisible; + USHORT nType; // see SvxNumberType + String aText; + SvxFont aFont; + Graphic aGraphic; + USHORT nParagraph; + Rectangle aBounds; + + EBulletInfo() : bVisible( FALSE ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {} +}; + +#define OUTLINERMODE_DONTKNOW 0x0000 +#define OUTLINERMODE_TEXTOBJECT 0x0001 +#define OUTLINERMODE_TITLEOBJECT 0x0002 +#define OUTLINERMODE_OUTLINEOBJECT 0x0003 +#define OUTLINERMODE_OUTLINEVIEW 0x0004 + +#define OUTLINERMODE_USERMASK 0x00FF + +#define OUTLINERMODE_SUBTITLE (0x0100|OUTLINERMODE_TEXTOBJECT) +#define OUTLINERMODE_NOTE (0x0200|OUTLINERMODE_TEXTOBJECT) + +class SVX_DLLPUBLIC Outliner : public SfxBroadcaster +{ + friend class OutlinerView; + friend class OutlinerEditEng; + friend class OutlinerParaObject; + friend class OLUndoExpand; + friend class OutlinerUndoChangeDepth; + friend class OutlinerUndoCheckPara; + friend class OutlinerUndoChangeParaFlags; + + OutlinerEditEng* pEditEngine; + + ParagraphList* pParaList; + ViewList aViewList; + + Paragraph* pHdlParagraph; + ULONG mnFirstSelPage; + Link aDrawPortionHdl; + Link aDrawBulletHdl; + Link aExpandHdl; + Link aParaInsertedHdl; + Link aParaRemovingHdl; + Link aDepthChangedHdl; + Link aWidthArrReqHdl; + Link aBeginMovingHdl; + Link aEndMovingHdl; + Link aIndentingPagesHdl; + Link aRemovingPagesHdl; + Link aFieldClickedHdl; + Link aCalcFieldValueHdl; + Link maPaintFirstLineHdl; + Link maBeginPasteOrDropHdl; + Link maEndPasteOrDropHdl; + + sal_Int16 nDepthChangedHdlPrevDepth; + USHORT mnDepthChangeHdlPrevFlags; + sal_Int16 nMaxDepth; + const sal_Int16 nMinDepth; + USHORT nFirstPage; + + USHORT nOutlinerMode; + + BOOL bIsExpanding; // Nur in Expand/Collaps-Hdl gueltig, mal umstellen + BOOL bFirstParaIsEmpty; + BOOL bBlockInsCallback; + BOOL bStrippingPortions; + BOOL bPasting; + + ULONG nDummy; + +#ifdef _OUTLINER_CXX + + DECL_LINK( ParaVisibleStateChangedHdl, Paragraph* ); + DECL_LINK( BeginMovingParagraphsHdl, MoveParagraphsInfo* ); + DECL_LINK( EndMovingParagraphsHdl, MoveParagraphsInfo* ); + DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* ); + DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* ); + DECL_LINK( EditEngineNotifyHdl, EENotify* ); + void ImplCheckParagraphs( USHORT nStart, USHORT nEnd ); + BOOL ImplHasBullet( USHORT nPara ) const; + Size ImplGetBulletSize( USHORT nPara ); + sal_uInt16 ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt ); + void ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds ); + String ImplGetBulletText( USHORT nPara ); + void ImplCheckNumBulletItem( USHORT nPara ); + void ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, BOOL bUndoAction = FALSE ); + void ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle = NULL ); + + void ImplBlockInsertionCallbacks( BOOL b ); + + void ImplCheckStyleSheet( USHORT nPara, BOOL bReplaceExistingStyle ); + void ImpRecalcBulletIndent( ULONG nPara ); + + const SvxBulletItem& ImpGetBullet( ULONG nPara, USHORT& ); + void ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara ); + bool ImpConvertEdtToOut( sal_uInt32 nPara, EditView* pView = 0 ); + + void ImpTextPasted( ULONG nStartPara, USHORT nCount ); + long ImpCalcMaxBulletWidth( USHORT nPara, const SvxBulletItem& rBullet ); + Font ImpCalcBulletFont( USHORT nPara ) const; + Rectangle ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos ); + long ImpGetTextIndent( ULONG nPara ); + BOOL ImpCanIndentSelectedPages( OutlinerView* pCurView ); + BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView ); + BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT nFirstPage, USHORT nPages ); + + USHORT ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } + void ImplCheckDepth( sal_Int16& rnDepth ) const; +#endif + +protected: + void ParagraphInserted( USHORT nParagraph ); + void ParagraphDeleted( USHORT nParagraph ); + void ParaAttribsChanged( USHORT nParagraph ); + + virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); + + void InvalidateBullet( Paragraph* pPara, ULONG nPara ); + void PaintBullet( USHORT nPara, const Point& rStartPos, + const Point& rOrigin, short nOrientation, + OutputDevice* pOutDev ); + + // used by OutlinerEditEng. Allows Outliner objects to provide + // bullet access to the EditEngine. + virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const; + +public: + + Outliner( SfxItemPool* pPool, USHORT nOutlinerMode ); + virtual ~Outliner(); + + void Init( USHORT nOutlinerMode ); + USHORT GetMode() const { return nOutlinerMode; } + + void SetVertical( BOOL bVertical ); + BOOL IsVertical() const; + + void SetFixedCellHeight( BOOL bUseFixedCellHeight ); + BOOL IsFixedCellHeight() const; + + void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); + EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; + + USHORT GetScriptType( const ESelection& rSelection ) const; + LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const; + + void SetAsianCompressionMode( USHORT nCompressionMode ); + USHORT GetAsianCompressionMode() const; + + void SetKernAsianPunctuation( BOOL bEnabled ); + BOOL IsKernAsianPunctuation() const; + + void SetAddExtLeading( BOOL b ); + BOOL IsAddExtLeading() const; + + ULONG InsertView( OutlinerView* pView, ULONG nIndex=LIST_APPEND); + OutlinerView* RemoveView( OutlinerView* pView ); + OutlinerView* RemoveView( ULONG nIndex ); + OutlinerView* GetView( ULONG nIndex ) const; + ULONG GetViewCount() const; + + Paragraph* Insert( const String& rText, ULONG nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 ); + void SetText( const OutlinerParaObject& ); + void AddText( const OutlinerParaObject& ); + void SetText( const String& rText, Paragraph* pParagraph ); + String GetText( Paragraph* pPara, ULONG nParaCount=1 ) const; + + OutlinerParaObject* CreateParaObject( USHORT nStartPara = 0, USHORT nParaCount = 0xFFFF ) const; + + const SfxItemSet& GetEmptyItemSet() const; + + void SetRefMapMode( const MapMode& ); + MapMode GetRefMapMode() const; + + void SetBackgroundColor( const Color& rColor ); + Color GetBackgroundColor() const; + + sal_Int16 GetMinDepth() const { return -1; } + + void SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParas = FALSE ); + sal_Int16 GetMaxDepth() const { return nMaxDepth; } + + void SetUpdateMode( BOOL bUpdate ); + BOOL GetUpdateMode() const; + + void Clear(); + + void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); + + ULONG GetParagraphCount() const; + Paragraph* GetParagraph( ULONG nAbsPos ) const; + + BOOL HasParent( Paragraph* pParagraph ) const; + BOOL HasChilds( Paragraph* pParagraph ) const; + ULONG GetChildCount( Paragraph* pParent ) const; + BOOL IsExpanded( Paragraph* pPara ) const; +// Paragraph* GetParagraph( Paragraph* pParent, ULONG nRelPos ) const; + Paragraph* GetParent( Paragraph* pParagraph ) const; +// ULONG GetRelPos( Paragraph* pParent, Paragraph* pPara ) const; + ULONG GetAbsPos( Paragraph* pPara ); + + sal_Int16 GetDepth( ULONG nPara ) const; + void SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth ); + + void SetVisible( Paragraph* pPara, BOOL bVisible ); + BOOL IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); } + + void EnableUndo( BOOL bEnable ); + BOOL IsUndoEnabled() const; + void UndoActionStart( USHORT nId ); + void UndoActionEnd( USHORT nId ); + void InsertUndo( EditUndo* pUndo ); + BOOL IsInUndo(); + + void ClearModifyFlag(); + BOOL IsModified() const; + + Paragraph* GetHdlParagraph() const { return pHdlParagraph; } + BOOL IsExpanding() const { return bIsExpanding; } + + virtual void ExpandHdl(); + void SetExpandHdl( const Link& rLink ) { aExpandHdl = rLink; } + Link GetExpandHdl() const { return aExpandHdl; } + + virtual void ParagraphInsertedHdl(); + void SetParaInsertedHdl(const Link& rLink){aParaInsertedHdl=rLink;} + Link GetParaInsertedHdl() const { return aParaInsertedHdl; } + + virtual void ParagraphRemovingHdl(); + void SetParaRemovingHdl(const Link& rLink){aParaRemovingHdl=rLink;} + Link GetParaRemovingHdl() const { return aParaRemovingHdl; } + + virtual void DepthChangedHdl(); + void SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;} + Link GetDepthChangedHdl() const { return aDepthChangedHdl; } + sal_Int16 GetPrevDepth() const { return nDepthChangedHdlPrevDepth; } + USHORT GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; } + + virtual long RemovingPagesHdl( OutlinerView* ); + void SetRemovingPagesHdl(const Link& rLink){aRemovingPagesHdl=rLink;} + Link GetRemovingPagesHdl() const { return aRemovingPagesHdl; } + virtual long IndentingPagesHdl( OutlinerView* ); + void SetIndentingPagesHdl(const Link& rLink){aIndentingPagesHdl=rLink;} + Link GetIndentingPagesHdl() const { return aIndentingPagesHdl; } + // nur gueltig in den beiden oberen Handlern + USHORT GetSelPageCount() const { return nDepthChangedHdlPrevDepth; } + // nur gueltig in den beiden oberen Handlern + ULONG GetFirstSelPage() const { return mnFirstSelPage; } + + void SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; } + Link GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; } + + void SetFieldClickedHdl(const Link& rLink ) { aFieldClickedHdl= rLink; } + Link GetFieldClickedHdl() const { return aFieldClickedHdl; } + + void SetDrawPortionHdl(const Link& rLink){aDrawPortionHdl=rLink;} + Link GetDrawPortionHdl() const { return aDrawPortionHdl; } + + void SetDrawBulletHdl(const Link& rLink){aDrawBulletHdl=rLink;} + Link GetDrawBulletHdl() const { return aDrawBulletHdl; } + + void SetPaintFirstLineHdl(const Link& rLink) { maPaintFirstLineHdl = rLink; } + Link GetPaintFirstLineHdl() const { return maPaintFirstLineHdl; } + + void SetModifyHdl( const Link& rLink ); + Link GetModifyHdl() const; + + void SetNotifyHdl( const Link& rLink ); + Link GetNotifyHdl() const; + + void SetStatusEventHdl( const Link& rLink ); + Link GetStatusEventHdl() const; + + void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect ); + void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos ); + void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 ); + + const Size& GetPaperSize() const; + void SetPaperSize( const Size& rSize ); + + void SetFirstPageNumber( USHORT n ) { nFirstPage = n; } + USHORT GetFirstPageNumber() const { return nFirstPage; } + + void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon ); + void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon); + void ClearPolygon(); + const PolyPolygon* GetPolygon(); + + const Size& GetMinAutoPaperSize() const; + void SetMinAutoPaperSize( const Size& rSz ); + + const Size& GetMaxAutoPaperSize() const; + void SetMaxAutoPaperSize( const Size& rSz ); + + void SetDefTab( USHORT nTab ); + USHORT GetDefTab() const; + + BOOL IsFlatMode() const; + void SetFlatMode( BOOL bFlat ); + + void EnableAutoColor( BOOL b ); + BOOL IsAutoColorEnabled() const; + + void ForceAutoColor( BOOL b ); + BOOL IsForceAutoColor() const; + + EBulletInfo GetBulletInfo( USHORT nPara ); + + void SetWordDelimiters( const String& rDelimiters ); + String GetWordDelimiters() const; + String GetWord( USHORT nPara, xub_StrLen nIndex ); + + void StripPortions(); + + // #101498# + virtual void DrawingText( + const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen, + const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + const EEngineData::WrongSpellVector* pWrongSpellVector, + const SvxFieldData* pFieldData, + bool bEndOfLine, + bool bEndOfParagraph, + bool bEndOfBullet, + const ::com::sun::star::lang::Locale* pLocale, + const Color& rOverlineColor, + const Color& rTextLineColor); + + Size CalcTextSize(); + + Point GetDocPos( Paragraph* pPara ); + + void SetStyleSheetPool( SfxStyleSheetPool* pSPool ); + SfxStyleSheetPool* GetStyleSheetPool(); + + BOOL IsInSelectionMode() const; + + void SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle ); + SfxStyleSheet* GetStyleSheet( ULONG nPara ); + + void SetParaAttribs( USHORT nPara, const SfxItemSet& ); + SfxItemSet GetParaAttribs( USHORT nPara ); + + void Remove( Paragraph* pPara, ULONG nParaCount ); + BOOL Expand( Paragraph* ); + BOOL Collapse( Paragraph* ); + + void SetParaFlag( Paragraph* pPara, sal_uInt16 nFlag ); + void RemoveParaFlag( Paragraph* pPara, sal_uInt16 nFlag ); + bool HasParaFlag( const Paragraph* pPara, sal_uInt16 nFlag ) const; + + // gibt ein Array mit den Bulletbreiten der n Einrueckebenen + // zurueck. Letzter Wert muss -1 sein. Wird vom Outliner geloescht. + Link GetWidthArrReqHdl() const{ return aWidthArrReqHdl; } + void SetWidthArrReqHdl(const Link& rLink){aWidthArrReqHdl=rLink; } + + void SetControlWord( ULONG nWord ); + ULONG GetControlWord() const; + + Link GetBeginMovingHdl() const { return aBeginMovingHdl; } + void SetBeginMovingHdl(const Link& rLink) {aBeginMovingHdl=rLink;} + Link GetEndMovingHdl() const {return aEndMovingHdl;} + void SetEndMovingHdl( const Link& rLink){aEndMovingHdl=rLink;} + + ULONG GetLineCount( ULONG nParagraph ) const; + USHORT GetLineLen( ULONG nParagraph, USHORT nLine ) const; + ULONG GetLineHeight( ULONG nParagraph, ULONG nLine = 0 ); + + // nFormat muss ein Wert aus dem enum EETextFormat sein (wg.CLOOKS) + ULONG Read( SvStream& rInput, const String& rBaseURL, USHORT, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + + SfxUndoManager& GetUndoManager(); + + void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); + void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); + void QuickInsertLineBreak( const ESelection& rSel ); + + // nur fuer EditEngine-Modus + void QuickInsertText( const String& rText, const ESelection& rSel ); + void QuickDelete( const ESelection& rSel ); + void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); + void QuickFormatDoc( BOOL bFull = FALSE ); + + BOOL UpdateFields(); + void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL ); + + virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); + + void SetSpeller( ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller ); + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > + GetSpeller(); + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > + GetHyphenator() const; + void SetHyphenator( ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator >& xHyph ); + + void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ); + vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const; + + // Depricated + void SetDefaultLanguage( LanguageType eLang ); + LanguageType GetDefaultLanguage() const; + + BOOL HasOnlineSpellErrors() const; + void CompleteOnlineSpelling(); + + EESpellState HasSpellErrors(); + BOOL HasText( const SvxSearchItem& rSearchItem ); + virtual BOOL SpellNextDocument(); + + // for text conversion + sal_Bool HasConvertibleTextPortion( LanguageType nLang ); + virtual BOOL ConvertNextDocument(); + + void SetEditTextObjectPool( SfxItemPool* pPool ); + SfxItemPool* GetEditTextObjectPool() const; + + void SetRefDevice( OutputDevice* pRefDev ); + OutputDevice* GetRefDevice() const; + + USHORT GetFirstLineOffset( ULONG nParagraph ); + + ULONG GetTextHeight() const; + ULONG GetTextHeight( ULONG nParagraph ) const; + Point GetDocPosTopLeft( ULONG nParagraph ); + Point GetDocPos( const Point& rPaperPos ) const; + BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 ); + BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBuuletPos ); + + void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 ); + void GetGlobalCharStretching( USHORT& rX, USHORT& rY ); + void DoStretchChars( USHORT nX, USHORT nY ); + void EraseVirtualDevice(); + + void SetBigTextObjectStart( USHORT nStartAtPortionCount ); + USHORT GetBigTextObjectStart() const; + BOOL ShouldCreateBigTextObject() const; + + const EditEngine& GetEditEngine() const { return *((EditEngine*)pEditEngine); } + + // this is needed for StarOffice Api + void SetLevelDependendStyleSheet( USHORT nPara ); + + USHORT GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } + + void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc); + //spell and return a sentence + bool SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking ); + // put spell position to start of current sentence + void PutSpellingToSentenceStart( EditView& rEditView ); + //applies a changed sentence + void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking ); + void EndSpelling(); + + /** sets a link that is called at the beginning of a drag operation at an edit view */ + void SetBeginDropHdl( const Link& rLink ); + Link GetBeginDropHdl() const; + + /** sets a link that is called at the end of a drag operation at an edit view */ + void SetEndDropHdl( const Link& rLink ); + Link GetEndDropHdl() const; + + /** sets a link that is called before a drop or paste operation. */ + void SetBeginPasteOrDropHdl( const Link& rLink ); + Link GetBeginPasteOrDropHdl() const { return maBeginPasteOrDropHdl; } + + /** sets a link that is called after a drop or paste operation. */ + void SetEndPasteOrDropHdl( const Link& rLink ); + Link GetEndPasteOrDropHdl() const { return maEndPasteOrDropHdl; } + + virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara ); + virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue ); + + virtual sal_Bool IsParaIsNumberingRestart( sal_uInt16 nPara ); + virtual void SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart ); +}; + +#endif + diff --git a/svx/inc/svx/outlobj.hxx b/svx/inc/svx/outlobj.hxx new file mode 100644 index 000000000000..0311fa914422 --- /dev/null +++ b/svx/inc/svx/outlobj.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: outlobj.hxx,v $ + * $Revision: 1.5.78.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _OUTLOBJ_HXX +#define _OUTLOBJ_HXX + +////////////////////////////////////////////////////////////////////////////// + +#include <tools/solar.h> +#include <tools/string.hxx> +#include <rsc/rscsfx.hxx> +#include <svx/paragraphdata.hxx> +#include "svx/svxdllapi.h" + +class EditTextObject; +class ImplOutlinerParaObject; + +////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC OutlinerParaObject +{ +private: + ImplOutlinerParaObject* mpImplOutlinerParaObject; + + void ImplMakeUnique(); + +public: + // constructors/destructor + OutlinerParaObject( + const EditTextObject& rEditTextObject, + const ParagraphDataVector& rParagraphDataVector = ParagraphDataVector(), + bool bIsEditDoc = true); + OutlinerParaObject(const OutlinerParaObject& rCandidate); + ~OutlinerParaObject(); + + // assignment operator + OutlinerParaObject& operator=(const OutlinerParaObject& rCandidate); + + // compare operator + bool operator==(const OutlinerParaObject& rCandidate) const; + bool operator!=(const OutlinerParaObject& rCandidate) const { return !operator==(rCandidate); } + + // #i102062# + bool isWrongListEqual(const OutlinerParaObject& rCompare) const; + + // outliner mode access + sal_uInt16 GetOutlinerMode() const; + void SetOutlinerMode(sal_uInt16 nNew); + + // vertical access + bool IsVertical() const; + void SetVertical(bool bNew); + + // data read access + sal_uInt32 Count() const; + sal_Int16 GetDepth(sal_uInt16 nPara) const; + const EditTextObject& GetTextObject() const; + bool IsEditDoc() const; + const ParagraphData& GetParagraphData(sal_uInt32 nIndex) const; + + // portion info support + void ClearPortionInfo(); + + // StyleSheet support + bool ChangeStyleSheets(const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily); + void ChangeStyleSheetName(SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName); + void SetStyleSheets(sal_uInt16 nLevel, const XubString rNewName, const SfxStyleFamily& rNewFamily); +}; + +////////////////////////////////////////////////////////////////////////////// + +#endif diff --git a/svx/inc/svx/pagectrl.hxx b/svx/inc/svx/pagectrl.hxx new file mode 100644 index 000000000000..60a65c9c3b47 --- /dev/null +++ b/svx/inc/svx/pagectrl.hxx @@ -0,0 +1,173 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: pagectrl.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PAGECTRL_HXX +#define _SVX_PAGECTRL_HXX + +// include --------------------------------------------------------------- + +#include <vcl/window.hxx> +#include "svx/svxdllapi.h" + +// forward --------------------------------------------------------------- + +class SvxBoxItem; +struct PageWindow_Impl; + +// class SvxPageWindow --------------------------------------------------- + +class SVX_DLLPUBLIC SvxPageWindow : public Window +{ + using Window::GetBorder; + +private: + Size aWinSize; + Size aSize; + + long nTop; + long nBottom; + long nLeft; + long nRight; + Color aColor; + + PageWindow_Impl* pImpl; + + long nHdLeft; + long nHdRight; + long nHdDist; + long nHdHeight; + Color aHdColor; + SvxBoxItem* pHdBorder; + + long nFtLeft; + long nFtRight; + long nFtDist; + long nFtHeight; + Color aFtColor; + SvxBoxItem* pFtBorder; + + BOOL bFooter :1; + BOOL bHeader :1; + BOOL bTable :1; + BOOL bHorz :1; + BOOL bVert :1; + + USHORT eUsage; + + String aLeftText; + String aRightText; + +protected: + virtual void Paint( const Rectangle& rRect ); + + virtual void DrawPage( const Point& rPoint, + const BOOL bSecond, + const BOOL bEnabled ); + +public: + SvxPageWindow( Window* pParent, const ResId& rId ); + ~SvxPageWindow(); + + void SetWidth( long nW ) { aSize.Width() = nW; } + void SetHeight( long nH ) { aSize.Height() = nH; } + + void SetSize( const Size& rSz ) { aSize = rSz; } + const Size& GetSize() const { return aSize; } + + void SetTop( long nNew ) { nTop = nNew; } + void SetBottom( long nNew ) { nBottom = nNew; } + void SetLeft( long nNew ) { nLeft = nNew; } + void SetRight( long nNew ) { nRight = nNew; } + void SetColor( const Color& rNew ) { aColor = rNew; } + void SetBorder( const SvxBoxItem& rNew ); + void SetBitmap( Bitmap* pBmp ); + + long GetTop() const { return nTop; } + long GetBottom() const { return nBottom;} + long GetLeft() const { return nLeft; } + long GetRight() const { return nRight; } + + const Color& GetColor() const { return aColor; } + const SvxBoxItem& GetBorder() const; + + void SetHdLeft( long nNew ) { nHdLeft = nNew; } + void SetHdRight( long nNew ) { nHdRight = nNew; } + void SetHdDist( long nNew ) { nHdDist = nNew; } + void SetHdHeight( long nNew ) { nHdHeight = nNew; } + void SetHdColor( const Color& aNew ) { aHdColor = aNew; } + void SetHdBorder( const SvxBoxItem& rNew ); + + long GetHdLeft() const { return nHdLeft; } + long GetHdRight() const { return nHdRight; } + long GetHdDist() const { return nHdDist; } + long GetHdHeight() const { return nHdHeight;} + + const Color& GetHdColor() const { return aHdColor; } + const SvxBoxItem& GetHdBorder() const { return *pHdBorder; } + + void SetFtLeft( long nNew ) { nFtLeft = nNew; } + void SetFtRight( long nNew ) { nFtRight = nNew; } + void SetFtDist( long nNew ) { nFtDist = nNew; } + void SetFtHeight( long nNew ) { nFtHeight = nNew; } + void SetFtColor( const Color& aNew ) { aFtColor = aNew; } + void SetFtBorder( const SvxBoxItem& rNew ); + + long GetFtLeft() const { return nFtLeft; } + long GetFtRight() const { return nFtRight; } + long GetFtDist() const { return nFtDist; } + long GetFtHeight() const { return nFtHeight;} + + const Color& GetFtColor() const { return aFtColor; } + const SvxBoxItem& GetFtBorder() const { return *pFtBorder; } + + void SetUsage( USHORT eU ) { eUsage = eU; } + USHORT GetUsage() const { return eUsage;} + + void SetHeader( BOOL bNew ) { bHeader = bNew; } + BOOL GetHeader() const { return bHeader;} + void SetFooter( BOOL bNew ) { bFooter = bNew; } + BOOL GetFooter() const { return bFooter;} + + void SetTable( BOOL bNew ) { bTable = bNew; } + BOOL GetTable() const { return bTable;} + void SetHorz( BOOL bNew ) { bHorz = bNew; } + BOOL GetHorz() const { return bHorz;} + void SetVert( BOOL bNew ) { bVert = bNew; } + BOOL GetVert() const { return bVert;} + + void EnableFrameDirection(sal_Bool bEnable); + //uses enum SvxFrameDirection + void SetFrameDirection(sal_Int32 nFrameDirection); + + void ResetBackground(); +}; + +#endif // #ifndef _SVX_PAGECTRL_HXX + + diff --git a/svx/inc/svx/pageitem.hxx b/svx/inc/svx/pageitem.hxx new file mode 100644 index 000000000000..a9f611474a1b --- /dev/null +++ b/svx/inc/svx/pageitem.hxx @@ -0,0 +1,160 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: pageitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PAGEITEM_HXX +#define _SVX_PAGEITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#include <tools/string.hxx> +#include "svx/svxdllapi.h" + + +/*-------------------------------------------------------------------- + Beschreibung: SvxNumType + --------------------------------------------------------------------*/ + +enum SvxNumType +{ + SVX_CHARS_UPPER_LETTER, + SVX_CHARS_LOWER_LETTER, + SVX_ROMAN_UPPER, + SVX_ROMAN_LOWER, + SVX_ARABIC, + SVX_NUMBER_NONE, + SVX_CHAR_SPECIAL, + SVX_PAGEDESC +}; + +/*-------------------------------------------------------------------- + Beschreibung: Benutzung der Seite + --------------------------------------------------------------------*/ + +enum SvxPageUsage +{ + SVX_PAGE_LEFT = 0x0001, + SVX_PAGE_RIGHT = 0x0002, + SVX_PAGE_ALL = 0x0003, + SVX_PAGE_MIRROR = 0x0007, + SVX_PAGE_HEADERSHARE = 0x0040, + SVX_PAGE_FOOTERSHARE = 0x0080 +}; + +/*-------------------------------------------------------------------- + Beschreibung: Teile der Seitenbeschreibung + --------------------------------------------------------------------*/ + + + +/* +[Beschreibung] +Dieses Item beschreibt ein Seiten-Attribut (Name der Vorlage, Numerierung, +Portrait oder Landscape, Layout). +*/ + +class SVX_DLLPUBLIC SvxPageItem: public SfxPoolItem +{ +private: + String aDescName; // Name der Vorlage + SvxNumType eNumType; // Numerierung + BOOL bLandscape; // Portrait / Landscape + USHORT eUse; // Layout + +public: + + TYPEINFO(); + SvxPageItem( const USHORT nId ); + SvxPageItem( const SvxPageItem& rItem ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual int operator==( const SfxPoolItem& ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Create( SvStream&, USHORT ) const; + virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + + // Ausrichtung + USHORT GetPageUsage() const { return eUse; } + void SetPageUsage(USHORT eU) { eUse= eU; } + + BOOL IsLandscape() const { return bLandscape; } + void SetLandscape(BOOL bL) { bLandscape = bL; } + + // Numerierung + SvxNumType GetNumType() const { return eNumType; } + void SetNumType(SvxNumType eNum) { eNumType = eNum; } + + // Name des Descriptors + const String& GetDescName() const { return aDescName; } + void SetDescName(const String& rStr) { aDescName = rStr; } +}; + + + +/*-------------------------------------------------------------------- + Beschreibung: Container fuer Header/Footer-Attribute + --------------------------------------------------------------------*/ + + + +/* +[Beschreibung] +Dieses Item dient als Container fuer Header- und Footer-Attribute. +*/ + +class SVX_DLLPUBLIC SvxSetItem: public SfxSetItem +{ +public: + SvxSetItem( const USHORT nId, const SfxItemSet& rSet ); + SvxSetItem( const SvxSetItem& rItem ); + SvxSetItem( const USHORT nId, SfxItemSet* pSet ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; + virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const; +}; + + + + +#endif + diff --git a/svx/inc/svx/paperinf.hxx b/svx/inc/svx/paperinf.hxx new file mode 100644 index 000000000000..9e2503a56ea8 --- /dev/null +++ b/svx/inc/svx/paperinf.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: paperinf.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PAPERINF_HXX +#define _SVX_PAPERINF_HXX + +// INCLUDE --------------------------------------------------------------- + +#include <vcl/print.hxx> +#include <vcl/mapmod.hxx> +#include <svx/svxenum.hxx> +#include "svx/svxdllapi.h" + +// forward --------------------------------------------------------------- + +class Printer; +class Size; +class String; + +// class SvxPaperInfo ----------------------------------------------------- + +class SVX_DLLPUBLIC SvxPaperInfo +{ +public: + static Size GetDefaultPaperSize( MapUnit eUnit = MAP_TWIP ); + static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MAP_TWIP ); + static Size GetPaperSize( const Printer* pPrinter ); + static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = FALSE ); + static long GetSloppyPaperDimension( long nSize, MapUnit eUnit = MAP_TWIP ); + static String GetName( Paper ePaper ); +}; + +// INLINE ----------------------------------------------------------------- + +inline Size &Swap(Size &rSize) +{ + const long lVal = rSize.Width(); + rSize.Width() = rSize.Height(); + rSize.Height() = lVal; + return rSize; +} + +inline Size &LandscapeSwap(Size &rSize) +{ + if ( rSize.Height() > rSize.Width() ) + Swap( rSize ); + return rSize; +} + +#endif diff --git a/svx/inc/svx/paragraphdata.hxx b/svx/inc/svx/paragraphdata.hxx new file mode 100644 index 000000000000..ddd98a15e176 --- /dev/null +++ b/svx/inc/svx/paragraphdata.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: outlobj.hxx,v $ + * $Revision: 1.5.78.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _PARAGRAPH_DATA_HXX +#define _PARAGRAPH_DATA_HXX + +#include <tools/solar.h> +#include <vector> + +////////////////////////////////////////////////////////////////////////////// +// MT 07/00: Only for internal use, oder some kind like hPara for the few +// functions where you need it outside ( eg. moving paragraphs... ) +// +// AW: Unfortunately NOT only local (formally in outliner.hxx), but also +// used in outlobj.hxx. Moved to own header + +class ParagraphData +{ + friend class Paragraph; + friend class OutlinerParaObject; + +protected: + sal_Int16 nDepth; + sal_Int16 mnNumberingStartValue; + sal_Bool mbParaIsNumberingRestart; + +public: + ParagraphData( const ParagraphData& ); + ParagraphData(); + + ParagraphData& operator=( const ParagraphData& ); + + // compare operator + bool operator==(const ParagraphData& rCandidate) const; + + // data read access + sal_Int16 getDepth() const { return nDepth; } +}; + +////////////////////////////////////////////////////////////////////////////// + +typedef ::std::vector< ParagraphData > ParagraphDataVector; + +////////////////////////////////////////////////////////////////////////////// + +#endif // _PARAGRAPH_DATA_HXX + +// eof diff --git a/svx/inc/svx/paraprev.hxx b/svx/inc/svx/paraprev.hxx new file mode 100644 index 000000000000..ac167c6e818e --- /dev/null +++ b/svx/inc/svx/paraprev.hxx @@ -0,0 +1,116 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: paraprev.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PARAPREV_HXX +#define _SVX_PARAPREV_HXX + +// include --------------------------------------------------------------- + +#include <vcl/window.hxx> +#include <svx/svxenum.hxx> +#include "svx/svxdllapi.h" + +// enum ------------------------------------------------------------------ + +enum SvxPrevLineSpace +{ + SVX_PREV_LINESPACE_1 = 0, + SVX_PREV_LINESPACE_15, + SVX_PREV_LINESPACE_2, + SVX_PREV_LINESPACE_PROP, + SVX_PREV_LINESPACE_MIN, + SVX_PREV_LINESPACE_DURCH +}; + +// class SvxParaPrevWindow ----------------------------------------------- + +class SVX_DLLPUBLIC SvxParaPrevWindow : public Window +{ + using Window::Draw; +private: + Size aWinSize; + Size aSize; + + // Einzuege + long nLeftMargin; + long nRightMargin; + short nFirstLineOfst; + // Abstaende + USHORT nUpper; + USHORT nLower; + // Ausrichtung + SvxAdjust eAdjust; + // Letzte Zeile im Blocksatz + SvxAdjust eLastLine; + // Zeilenabstand + SvxPrevLineSpace eLine; + USHORT nLineVal; + + String aText; + Rectangle Lines[9]; + +protected: + virtual void Paint( const Rectangle& rRect ); + + void DrawParagraph( BOOL bAll ); + +public: + SvxParaPrevWindow( Window* pParent, const ResId& rId ); + + void SetFirstLineOfst( short nNew ) { nFirstLineOfst = nNew; } + void SetLeftMargin( long nNew ) { nLeftMargin = nNew; } + void SetRightMargin( long nNew ) { nRightMargin = nNew; } + void SetUpper( USHORT nNew ) { nUpper = nNew; } + void SetLower( USHORT nNew ) { nLower = nNew; } + void SetAdjust( SvxAdjust eNew ) { eAdjust = eNew; } + void SetLastLine( SvxAdjust eNew ) { eLastLine = eNew; } + void SetLineSpace( SvxPrevLineSpace eNew, USHORT nNew = 0 ) + { eLine = eNew; nLineVal = nNew; } + void SetText( const String& rStr ) { aText = rStr; } + void SetSize( Size aNew ) { aSize = aNew; } + + short GetFirstLineOfst() const { return nFirstLineOfst; } + long GetLeftMargin() const { return nLeftMargin; } + long GetRightMargin() const { return nRightMargin; } + USHORT GetUpper() const { return nUpper; } + USHORT GetLower() const { return nLower; } + SvxAdjust GetAdjust() const { return eAdjust; } + + SvxPrevLineSpace GetLineEnum() const { return eLine; } + USHORT GetLineValue() const { return nLineVal; } + String GetText() const { return aText; } + Size GetSize() const { return aSize; } + + void OutputSizeChanged(); + + void Draw( BOOL bAll ) { DrawParagraph( bAll ); } +}; + +#endif + diff --git a/svx/inc/svx/paravertalignitem.hxx b/svx/inc/svx/paravertalignitem.hxx new file mode 100644 index 000000000000..a7026422cc97 --- /dev/null +++ b/svx/inc/svx/paravertalignitem.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: paravertalignitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PARAVERTALIGNITEM_HXX +#define _SVX_PARAVERTALIGNITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxParaVertAlignItem ---------------------------------------------- + +/* [Description] + + This item defines the character alignment in the lines of a paragraph. + Currently the alignment can be none (i.e. baseline), top, center or bottom. + +*/ + +class SVX_DLLPUBLIC SvxParaVertAlignItem : public SfxUInt16Item +{ +public: + enum { AUTOMATIC, BASELINE, TOP, CENTER, BOTTOM }; + TYPEINFO(); + + SvxParaVertAlignItem( sal_uInt16 nValue /*= 0*/, + const sal_uInt16 nId ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * = 0 ) const; + + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId ) const; + + inline SvxParaVertAlignItem& operator=( const SvxParaVertAlignItem& rItem ) + { + SetValue( rItem.GetValue() ); + return *this; + } + + virtual int operator==( const SfxPoolItem& ) const; + +}; + +#endif + diff --git a/svx/inc/svx/pbinitem.hxx b/svx/inc/svx/pbinitem.hxx new file mode 100644 index 000000000000..f6a490cd8316 --- /dev/null +++ b/svx/inc/svx/pbinitem.hxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: pbinitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PBINITEM_HXX +#define _SVX_PBINITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// define ---------------------------------------------------------------- + +#define PAPERBIN_PRINTER_SETTINGS ((BYTE)0xFF) + +// class SvxPaperBinItem ------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt die Auswahl eines Papierschachts des Drucker. +*/ + +class SVX_DLLPUBLIC SvxPaperBinItem : public SfxByteItem +{ +public: + TYPEINFO(); + + inline SvxPaperBinItem( const USHORT nId , + const BYTE nTray = PAPERBIN_PRINTER_SETTINGS ); + inline SvxPaperBinItem &operator=( const SvxPaperBinItem &rCpy ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream &, USHORT ) const; + virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +inline SvxPaperBinItem::SvxPaperBinItem( const USHORT nId, const BYTE nT ) + : SfxByteItem( nId, nT ) +{} + +inline SvxPaperBinItem &SvxPaperBinItem::operator=( + const SvxPaperBinItem &rCpy ) +{ + SetValue( rCpy.GetValue() ); + return *this; +} + +#endif + diff --git a/svx/inc/svx/pmdlitem.hxx b/svx/inc/svx/pmdlitem.hxx new file mode 100644 index 000000000000..edbf627c516b --- /dev/null +++ b/svx/inc/svx/pmdlitem.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: pmdlitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PMDLITEM_HXX +#define _SVX_PMDLITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/stritem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxPageModelItem ------------------------------------------------ + +/* +[Beschreibung] +Dieses Item enthaelt einen Namen einer Seitenvorlage. +*/ + +class SVX_DLLPUBLIC SvxPageModelItem : public SfxStringItem +{ +private: + BOOL bAuto; + +public: + TYPEINFO(); + + inline SvxPageModelItem( USHORT nWh ); + inline SvxPageModelItem( const String& rModel, BOOL bA /*= FALSE*/, + USHORT nWh ); + inline SvxPageModelItem& operator=( const SvxPageModelItem& rModel ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + BOOL IsAuto() const { return bAuto; } +}; + +inline SvxPageModelItem::SvxPageModelItem( USHORT nWh ) + : bAuto( FALSE ) +{ + SetWhich( nWh ); +} + +inline SvxPageModelItem::SvxPageModelItem( const String& rModel, BOOL bA, + USHORT nWh ) : + SfxStringItem( nWh, rModel ), + bAuto( bA ) +{} + +inline SvxPageModelItem& SvxPageModelItem::operator=( const SvxPageModelItem& rModel ) +{ + SetValue( rModel.GetValue() ); + return *this; +} + +#endif + diff --git a/svx/inc/svx/polygn3d.hxx b/svx/inc/svx/polygn3d.hxx new file mode 100644 index 000000000000..5bc9f9b8fb15 --- /dev/null +++ b/svx/inc/svx/polygn3d.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: polygn3d.hxx,v $ + * $Revision: 1.4.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_POLYGON3D_HXX +#define _E3D_POLYGON3D_HXX + +#include <svx/obj3d.hxx> +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC E3dPolygonObj : public E3dCompoundObject +{ +private: + // #110094# DrawContact section + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + // Parameter + basegfx::B3DPolyPolygon aPolyPoly3D; + basegfx::B3DPolyPolygon aPolyNormals3D; + basegfx::B2DPolyPolygon aPolyTexture2D; + BOOL bLineOnly; + + SVX_DLLPRIVATE void CreateDefaultNormals(); + SVX_DLLPRIVATE void CreateDefaultTexture(); + +public: + void SetPolyPolygon3D(const basegfx::B3DPolyPolygon& rNewPolyPoly3D); + void SetPolyNormals3D(const basegfx::B3DPolyPolygon& rNewPolyPoly3D); + void SetPolyTexture2D(const basegfx::B2DPolyPolygon& rNewPolyPoly2D); + + TYPEINFO(); + + E3dPolygonObj( + E3dDefaultAttributes& rDefault, + const basegfx::B3DPolyPolygon& rPolyPoly3D, + BOOL bLinOnly=FALSE); + E3dPolygonObj( + E3dDefaultAttributes& rDefault, + const basegfx::B3DPolyPolygon& rPolyPoly3D, + const basegfx::B3DPolyPolygon& rPolyNormals3D, + BOOL bLinOnly=FALSE); + E3dPolygonObj( + E3dDefaultAttributes& rDefault, + const basegfx::B3DPolyPolygon& rPolyPoly3D, + const basegfx::B3DPolyPolygon& rPolyNormals3D, + const basegfx::B2DPolyPolygon& rPolyTexture2D, + BOOL bLinOnly=FALSE); + + E3dPolygonObj(); + virtual ~E3dPolygonObj(); + + const basegfx::B3DPolyPolygon& GetPolyPolygon3D() const { return aPolyPoly3D; } + const basegfx::B3DPolyPolygon& GetPolyNormals3D() const { return aPolyNormals3D; } + const basegfx::B2DPolyPolygon& GetPolyTexture2D() const { return aPolyTexture2D; } + + virtual UINT16 GetObjIdentifier() const; + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + virtual void operator=(const SdrObject&); + + // LineOnly? + BOOL GetLineOnly() { return bLineOnly; } + void SetLineOnly(BOOL bNew); +}; + +#endif // _E3D_POLYGON3D_HXX diff --git a/svx/inc/svx/polypolygoneditor.hxx b/svx/inc/svx/polypolygoneditor.hxx new file mode 100644 index 000000000000..6201a5827843 --- /dev/null +++ b/svx/inc/svx/polypolygoneditor.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: polypolygoneditor.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_POLYPOLYGONEDITOR_HXX_ +#define _SDR_POLYPOLYGONEDITOR_HXX_ + +#include "svx/svxdllapi.h" + +#include "svx/ipolypolygoneditorcontroller.hxx" + +#include <basegfx/polygon/b2dpolypolygon.hxx> +#include <set> + +class SdrUShortCont; + +namespace sdr +{ + +/** this class implements some helper functions to edit a B2DPolyPolygon */ +class SVX_DLLPUBLIC PolyPolygonEditor +{ +public: + PolyPolygonEditor( const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed ); + + const basegfx::B2DPolyPolygon& GetPolyPolygon() const { return maPolyPolygon; } + + /** returns true if the B2DPolyPolygon was changed. + Warning: B2DPolyPolygon can be empty after this operation! + */ + bool DeletePoints( const std::set< sal_uInt16 >& rAbsPoints ); + + /** returns true if the B2DPolyPolygon was changed. + */ + bool SetSegmentsKind(SdrPathSegmentKind eKind, const std::set< sal_uInt16 >& rAbsPoints); + + /** returns true if the B2DPolyPolygon was changed. + */ + bool SetPointsSmooth( basegfx::B2VectorContinuity eFlags, const std::set< sal_uInt16 >& rAbsPoints); + + /** Outputs the realative position ( polygon number and point number in that polygon ) from the absolut point number. + False is returned if the given absolute point is greater not inside this B2DPolyPolygon + */ + static bool GetRelativePolyPoint( const basegfx::B2DPolyPolygon& rPoly, sal_uInt32 nAbsPnt, sal_uInt32& rPolyNum, sal_uInt32& rPointNum ); + +private: + basegfx::B2DPolyPolygon maPolyPolygon; + bool mbIsClosed; +}; + +} + +#endif diff --git a/svx/inc/svx/polysc3d.hxx b/svx/inc/svx/polysc3d.hxx new file mode 100644 index 000000000000..3fe0a997c358 --- /dev/null +++ b/svx/inc/svx/polysc3d.hxx @@ -0,0 +1,53 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: polysc3d.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_POLYSC3D_HXX +#define _E3D_POLYSC3D_HXX + +#include <svx/svdpage.hxx> +#include <svx/scene3d.hxx> + +/************************************************************************* +|* +|* 3D-Szene mit Darstellung durch 2D-Polygone +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dPolyScene : public E3dScene +{ +public: + TYPEINFO(); + E3dPolyScene(); + E3dPolyScene(E3dDefaultAttributes& rDefault); + + virtual UINT16 GetObjIdentifier() const; +}; + +#endif // _E3D_POLYSC3D_HXX diff --git a/svx/inc/svx/postitem.hxx b/svx/inc/svx/postitem.hxx new file mode 100644 index 000000000000..b662f64116b5 --- /dev/null +++ b/svx/inc/svx/postitem.hxx @@ -0,0 +1,95 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: postitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_POSTITEM_HXX +#define _SVX_POSTITEM_HXX + +// include --------------------------------------------------------------- + +#include <vcl/vclenum.hxx> +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxPostureItem -------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt die Font-Stellung (Italic) +*/ + +class SVX_DLLPUBLIC SvxPostureItem : public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxPostureItem( const FontItalic ePost /*= ITALIC_NONE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + SwEnumItem + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual USHORT GetValueCount() const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual int HasBoolValue() const; + virtual BOOL GetBoolValue() const; + virtual void SetBoolValue( BOOL bVal ); + + inline SvxPostureItem& operator=(const SvxPostureItem& rPost) { + SetValue( rPost.GetValue() ); + return *this; + } + + // enum cast + FontItalic GetPosture() const + { return (FontItalic)GetValue(); } + void SetPosture( FontItalic eNew ) + { SetValue( (USHORT)eNew ); } +}; + +#endif // #ifndef _SVX_POSTITEM_HXX + diff --git a/svx/inc/svx/prszitem.hxx b/svx/inc/svx/prszitem.hxx new file mode 100644 index 000000000000..f075358f7a24 --- /dev/null +++ b/svx/inc/svx/prszitem.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: prszitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_PRSZITEM_HXX +#define _SVX_PRSZITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxPropSizeItem ------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt die relative Schriftgroesse. +*/ + +class SVX_DLLPUBLIC SvxPropSizeItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + + SvxPropSizeItem( const USHORT nPercent /*= 100*/, + const USHORT nID ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxPropSizeItem& operator=(const SvxPropSizeItem& rPropSize) + { + SetValue( rPropSize.GetValue() ); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/rectenum.hxx b/svx/inc/svx/rectenum.hxx new file mode 100644 index 000000000000..a4570d392ac9 --- /dev/null +++ b/svx/inc/svx/rectenum.hxx @@ -0,0 +1,49 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: rectenum.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_RECTENUM_HXX +#define _SVX_RECTENUM_HXX + +// enum ------------------------------------------------------------------ + +enum RECT_POINT +{ + RP_LT, RP_MT, RP_RT, RP_LM, RP_MM, RP_RM, RP_LB, RP_MB, RP_RB +}; + +enum CTL_STYLE +{ + CS_RECT, + CS_LINE, + CS_ANGLE, + CS_SHADOW +}; + + +#endif diff --git a/svx/inc/svx/ruler.hxx b/svx/inc/svx/ruler.hxx new file mode 100644 index 000000000000..200f7f997471 --- /dev/null +++ b/svx/inc/svx/ruler.hxx @@ -0,0 +1,273 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ruler.hxx,v $ + * $Revision: 1.4.76.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_RULER_HXX +#define _SVX_RULER_HXX + +#include <vcl/menu.hxx> +#include <svtools/ruler.hxx> +#include <svl/lstner.hxx> +#include "svx/svxdllapi.h" + +class SvxProtectItem; +class SvxRulerItem; +class SfxBindings; +class SvxLongLRSpaceItem; +class SvxLongULSpaceItem; +class SvxTabStopItem; +class SvxLRSpaceItem; +class SvxPagePosSizeItem; +class SvxColumnItem; +class SfxRectangleItem; +class SvxObjectItem; +class SfxBoolItem; +struct SvxRuler_Impl; + +class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener +{ + friend class SvxRulerItem; + using Window::Notify; + + SvxRulerItem **pCtrlItem; + SvxLongLRSpaceItem *pLRSpaceItem; //Linker und Rechter Rand + SfxRectangleItem *pMinMaxItem; //Maxima fuers Draggen + SvxLongULSpaceItem *pULSpaceItem; //Oberer und Unterer Rand + SvxTabStopItem *pTabStopItem; //Tabstops + SvxLRSpaceItem *pParaItem; //Absaetze + SvxLRSpaceItem *pParaBorderItem; //Border distance + SvxPagePosSizeItem *pPagePosItem; //Seitenabstaende zum Lineal + SvxColumnItem *pColumnItem; //Spalten + SvxObjectItem *pObjectItem; //Objekt + Window *pEditWin; + SvxRuler_Impl *pRuler_Imp; + BOOL bAppSetNullOffset :1; + BOOL bHorz :1; + long lLogicNullOffset; // in logischen Koordinaten + long lAppNullOffset; // in logischen Koordinaten + long lMinFrame; // minimale Framebreite in Pixel + long lInitialDragPos; + USHORT nFlags; + enum { + NONE = 0x0000, + DRAG_OBJECT = 0x0001, + // letzte Spalte verkleinern, Shift + DRAG_OBJECT_SIZE_LINEAR = 0x0002, + DRAG_OBJECT_SIZE_PROPORTIONAL = 0x0004, // proportional, Ctrl + // nur aktuelle Zeile (Tabelle; Shift-Ctrl) + DRAG_OBJECT_ACTLINE_ONLY = 0x0008, + // aktuell gleiche Tastenbelegung + DRAG_OBJECT_LEFT_INDENT_ONLY = DRAG_OBJECT_SIZE_PROPORTIONAL + } + nDragType; + USHORT nDefTabType; + USHORT nTabCount; + USHORT nTabBufSize; + long lDefTabDist; + long lTabPos; + RulerTab *pTabs; // Tabpositionen in Pixel + RulerIndent *pIndents; // Absatzraender in Pixel + RulerBorder *pBorders; + USHORT nBorderCount; + RulerBorder *pObjectBorders; + SfxBindings *pBindings; + long nDragOffset; + long nMaxLeft; + long nMaxRight; + BOOL bValid; + BOOL bListening; + BOOL bActive; +//#if 0 // _SOLAR__PRIVATE + void StartListening_Impl(); + long GetCorrectedDragPos( BOOL bLeft = TRUE, BOOL bRight = TRUE ); + void DrawLine_Impl(long &lTabPos, int, BOOL Hori=TRUE); + USHORT GetObjectBordersOff(USHORT nIdx) const; + + // Seitenr"ander oder umgebender Rahmen + void UpdateFrame(const SvxLongLRSpaceItem *); + void UpdateFrame(const SvxLongULSpaceItem *); + void UpdateFrameMinMax(const SfxRectangleItem *); + // Absatzeinzuege + void UpdatePara(const SvxLRSpaceItem *); + // Border distance + void UpdateParaBorder(const SvxLRSpaceItem *); + // Tabs + void Update(const SvxTabStopItem *); + // Seitenposition und -breite + void Update(const SvxPagePosSizeItem *); + // Spalten + void Update(const SvxColumnItem *, USHORT nSID); + // Object Selektion + void Update(const SvxObjectItem *); + // Protect + void Update( const SvxProtectItem* ); + // left-to-right text + void UpdateTextRTL( const SfxBoolItem* ); + // Absatzeinzuege + void UpdatePara(); + void UpdateTabs(); + void UpdatePage(); + void UpdateFrame(); + void UpdateColumns(); + void UpdateObject(); + + long PixelHAdjust(long lPos, long lPos2) const; + long PixelVAdjust(long lPos, long lPos2) const; + long PixelAdjust(long lPos, long lPos2) const; + + long ConvertHPosPixel(long lPos) const; + long ConvertVPosPixel(long lPos) const; + long ConvertHSizePixel(long lSize) const; + long ConvertVSizePixel(long lSize) const; + + long ConvertPosPixel(long lPos) const; + long ConvertSizePixel(long lSize) const; + + long ConvertHPosLogic(long lPos) const; + long ConvertVPosLogic(long lPos) const; + long ConvertHSizeLogic(long lSize) const; + long ConvertVSizeLogic(long lSize) const; + + long ConvertPosLogic(long lPos) const; + long ConvertSizeLogic(long lSize) const; + + long GetFirstLineIndent() const; +// long GetLogicFirstLineIndent() const; + long GetLeftIndent() const; +// long GetLogicLeftIndent() const; + long GetRightIndent() const; + long GetLogicRightIndent() const; + long GetPageWidth() const; + + inline long GetLeftFrameMargin() const; + long GetRightFrameMargin() const; + + void CalcMinMax(); + + void EvalModifier(); + void DragMargin1(); + //adjust the left margin either after DragMargin1() or after DragBorders() + void AdjustMargin1(long lDiff); + void DragMargin2(); + void DragIndents(); + void DragTabs(); + void DragBorders(); + void DragObjectBorder(); + + void ApplyMargins(); + void ApplyIndents(); + void ApplyTabs(); + void ApplyBorders(); + void ApplyObject(); + + long GetFrameLeft() const; + void SetFrameLeft(long); + + long GetLeftMin() const; + long GetRightMax() const; + + DECL_LINK( TabMenuSelect, Menu * ); + DECL_LINK( MenuSelect, Menu * ); + void PrepareProportional_Impl(RulerType); + + USHORT GetNextVisible(USHORT nColumn); + USHORT GetPrevVisible(USHORT nColumn); +//#endif + + void Update(); + +enum UpdateType { + MOVE_ALL, + MOVE_LEFT, + MOVE_RIGHT + }; + void UpdateParaContents_Impl(long lDiff, UpdateType = MOVE_ALL); +protected: + virtual void Command( const CommandEvent& rCEvt ); + virtual void Click(); + virtual long StartDrag(); + virtual void Drag(); + virtual void EndDrag(); + virtual void ExtraDown(); + virtual void MouseMove( const MouseEvent& rMEvt ); + + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + + // Berechnung der Grenzwerte fuer Objectgrenzen + // Werte sind bezogen auf die Seite + virtual BOOL CalcLimits(long &nMax1, long &nMax2, BOOL bFirst) const; + BOOL IsActLastColumn( + BOOL bForceDontConsiderHidden = FALSE, USHORT nAct=USHRT_MAX) const ; + BOOL IsActFirstColumn( + BOOL bForceDontConsiderHidden = FALSE, USHORT nAct=USHRT_MAX) const; + USHORT GetActLeftColumn( + BOOL bForceDontConsiderHidden = FALSE, USHORT nAct=USHRT_MAX ) const; + USHORT GetActRightColumn ( + BOOL bForceDontConsiderHidden = FALSE, USHORT nAct=USHRT_MAX ) const; + long CalcPropMaxRight(USHORT nCol=USHRT_MAX) const; + +public: +#define SVXRULER_SUPPORT_TABS 0x0001 +#define SVXRULER_SUPPORT_PARAGRAPH_MARGINS 0x0002 +#define SVXRULER_SUPPORT_BORDERS 0x0004 +#define SVXRULER_SUPPORT_OBJECT 0x0008 +#define SVXRULER_SUPPORT_SET_NULLOFFSET 0x0010 +#define SVXRULER_SUPPORT_NEGATIVE_MARGINS 0x0020 +#define SVXRULER_SUPPORT_PARAGRAPH_MARGINS_VERTICAL 0x0040 +#define SVXRULER_SUPPORT_REDUCED_METRIC 0x0080 //shorten the context menu to select metric + + SvxRuler(Window* pParent, + Window *pEditWin, + USHORT nRulerFlags, + SfxBindings &rBindings, + WinBits nWinStyle = WB_STDRULER); + ~SvxRuler(); + + void SetMinFrameSize(long lSize); + long GetMinFrameSize() const ; + + USHORT GetRulerFlags() const { return nFlags; } + + void SetDefTabDist(long); + long GetDefTabDist() const; + + // Setzen / Erfragen NullOffset in logischen Einheiten + void SetNullOffsetLogic(long lOff = 0); + long GetNullOffsetLogic() const { return lAppNullOffset; } + + void SetActive(BOOL bOn = TRUE); + BOOL IsActive() const { return bActive; } + + void ForceUpdate() { Update(); } + + //#i24363# tab stops relative to indent + void SetTabsRelativeToIndent( BOOL bRel = TRUE ); +}; + +#endif + diff --git a/svx/inc/svx/scene3d.hxx b/svx/inc/svx/scene3d.hxx new file mode 100644 index 000000000000..718225aa990b --- /dev/null +++ b/svx/inc/svx/scene3d.hxx @@ -0,0 +1,256 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: scene3d.hxx,v $ + * $Revision: 1.5.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_SCENE3D_HXX +#define _E3D_SCENE3D_HXX + +#include <svx/camera3d.hxx> +#include <goodies/b3dtrans.hxx> +#include <tools/time.hxx> +#include <svx/svxdllapi.h> +#include <svx/obj3d.hxx> + +namespace sdr { namespace properties { + class BaseProperties; + class E3dSceneProperties; +}} + +namespace drawinglayer { namespace geometry { + class ViewInformation3D; +}} + +/************************************************************************* +|* +|* GeoData relevant fuer Undo-Actions +|* +\************************************************************************/ + +class E3DSceneGeoData : public E3DObjGeoData +{ +public: + Camera3D aCamera; + + E3DSceneGeoData() {} +}; + +// #110988# +class Imp3DDepthRemapper; + +/************************************************************************* +|* +|* Basisklasse fuer 3D-Szenen +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dScene : public E3dObject +{ + // BaseProperties section + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // to allow sdr::properties::E3dSceneProperties access to StructureChanged() + friend class sdr::properties::E3dSceneProperties; + + // #110094# DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + +protected: + // Transformationen + B3dCamera aCameraSet; + Camera3D aCamera; + + // #110988# + Imp3DDepthRemapper* mp3DDepthRemapper; + + // Flag to determine if only selected objects should be drawn + unsigned bDrawOnlySelected : 1; + + virtual void NewObjectInserted(const E3dObject* p3DObj); + virtual void StructureChanged(); + + void RebuildLists(); + + virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint); + +protected: + void SetDefaultAttributes(E3dDefaultAttributes& rDefault); + + // #110988# + void ImpCleanup3DDepthMapper(); + +public: + TYPEINFO(); + E3dScene(); + E3dScene(E3dDefaultAttributes& rDefault); + virtual ~E3dScene(); + + // access to cleanup of depth mapper + void Cleanup3DDepthMapper() { ImpCleanup3DDepthMapper(); } + + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + + // #110988# + sal_uInt32 RemapOrdNum(sal_uInt32 nOrdNum) const; + + // Perspective: enum ProjectionType { PR_PARALLEL, PR_PERSPECTIVE } + ProjectionType GetPerspective() const + { return (ProjectionType)((const Svx3DPerspectiveItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue(); } + + // Distance: + double GetDistance() const + { return (double)((const Svx3DDistanceItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); } + + // Focal length: before cm, now 1/10th mm (*100) + double GetFocalLength() const + { return ((const Svx3DFocalLengthItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); } + + // Two sided lighting: + BOOL GetTwoSidedLighting() const + { return ((const Svx3DTwoSidedLightingItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue(); } + + // Lightcolor: + Color GetLightColor1() const + { return ((const Svx3DLightcolor1Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); } + Color GetLightColor2() const + { return ((const Svx3DLightcolor2Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); } + Color GetLightColor3() const + { return ((const Svx3DLightcolor3Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); } + Color GetLightColor4() const + { return ((const Svx3DLightcolor4Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); } + Color GetLightColor5() const + { return ((const Svx3DLightcolor5Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); } + Color GetLightColor6() const + { return ((const Svx3DLightcolor6Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); } + Color GetLightColor7() const + { return ((const Svx3DLightcolor7Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); } + Color GetLightColor8() const + { return ((const Svx3DLightcolor8Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); } + + // Ambient color: + Color GetGlobalAmbientColor() const + { return ((const Svx3DAmbientcolorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue(); } + + // Light on/off: + BOOL GetLightOnOff1() const + { return ((const Svx3DLightOnOff1Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue(); } + BOOL GetLightOnOff2() const + { return ((const Svx3DLightOnOff2Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue(); } + BOOL GetLightOnOff3() const + { return ((const Svx3DLightOnOff3Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue(); } + BOOL GetLightOnOff4() const + { return ((const Svx3DLightOnOff4Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue(); } + BOOL GetLightOnOff5() const + { return ((const Svx3DLightOnOff5Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue(); } + BOOL GetLightOnOff6() const + { return ((const Svx3DLightOnOff6Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue(); } + BOOL GetLightOnOff7() const + { return ((const Svx3DLightOnOff7Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue(); } + BOOL GetLightOnOff8() const + { return ((const Svx3DLightOnOff8Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue(); } + + // Light direction: + basegfx::B3DVector GetLightDirection1() const + { return ((const Svx3DLightDirection1Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue(); } + basegfx::B3DVector GetLightDirection2() const + { return ((const Svx3DLightDirection2Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue(); } + basegfx::B3DVector GetLightDirection3() const + { return ((const Svx3DLightDirection3Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue(); } + basegfx::B3DVector GetLightDirection4() const + { return ((const Svx3DLightDirection4Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue(); } + basegfx::B3DVector GetLightDirection5() const + { return ((const Svx3DLightDirection5Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue(); } + basegfx::B3DVector GetLightDirection6() const + { return ((const Svx3DLightDirection6Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue(); } + basegfx::B3DVector GetLightDirection7() const + { return ((const Svx3DLightDirection7Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue(); } + basegfx::B3DVector GetLightDirection8() const + { return ((const Svx3DLightDirection8Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue(); } + + // ShadowSlant: + sal_uInt16 GetShadowSlant() const + { return ((const Svx3DShadowSlantItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); } + + // ShadeMode: 0 == FLAT, 1 == PHONG, 2 == SMOOTH, 3 == ForceDraft + sal_uInt16 GetShadeMode() const + { return ((const Svx3DShadeModeItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue(); } + + // set flag to draw only selected + void SetDrawOnlySelected(BOOL bNew) { bDrawOnlySelected = bNew; } + bool GetDrawOnlySelected() const { return bDrawOnlySelected; } + virtual UINT16 GetObjIdentifier() const; + + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual void NbcMove(const Size& rSize); + virtual void NbcResize(const Point& rRef, const Fraction& rXFact, + const Fraction& rYFact); + virtual void RecalcSnapRect(); + + virtual E3dScene* GetScene() const; + void SetCamera(const Camera3D& rNewCamera); + const Camera3D& GetCamera() const { return aCamera; } + void removeAllNonSelectedObjects(); + + virtual void operator=(const SdrObject&); + + virtual SdrObjGeoData *NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + + virtual void NbcSetTransform(const basegfx::B3DHomMatrix& rMatrix); + virtual void SetTransform(const basegfx::B3DHomMatrix& rMatrix); + + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + void RotateScene(const Point& rRef, long nWink, double sn, double cs); + + // TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert". + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + // Transformationen rausgeben + B3dCamera& GetCameraSet() { return aCameraSet; } + + // Aufbrechen + virtual BOOL IsBreakObjPossible(); + + basegfx::B3DVector GetShadowPlaneDirection() const; + void SetShadowPlaneDirection(const basegfx::B3DVector& rVec); + + // Polygon das waehrend des Erzeugens aufgezogen wird + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + + // create moves + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); // TRUE=Xor muss repainted werden + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + virtual FASTBOOL BckCreate(SdrDragStat& rStat); + virtual void BrkCreate(SdrDragStat& rStat); +}; + +#endif // _E3D_SCENE3D_HXX diff --git a/svx/inc/svx/scriptspaceitem.hxx b/svx/inc/svx/scriptspaceitem.hxx new file mode 100644 index 000000000000..660d3c9c2019 --- /dev/null +++ b/svx/inc/svx/scriptspaceitem.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: scriptspaceitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SRIPTSPACEITEM_HXX +#define _SVX_SRIPTSPACEITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxScriptSpaceItem ---------------------------------------------- + +/* [Description] + + This item describe the scriptype of the selected text and is only + used for the user interface. +*/ + +class SVX_DLLPUBLIC SvxScriptSpaceItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxScriptSpaceItem( sal_Bool bOn /*= sal_False*/, + const sal_uInt16 nId ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * = 0 ) const; + + inline SvxScriptSpaceItem& operator=(const SvxScriptSpaceItem& rItem ) + { + SetValue( rItem.GetValue() ); + return *this; + } + +}; + +#endif + diff --git a/svx/inc/svx/scripttypeitem.hxx b/svx/inc/svx/scripttypeitem.hxx new file mode 100644 index 000000000000..75af8bcd8397 --- /dev/null +++ b/svx/inc/svx/scripttypeitem.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: scripttypeitem.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SCRIPTTYPEITEM_HXX +#define _SVX_SCRIPTTYPEITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include <svl/languageoptions.hxx> +#include "svx/svxdllapi.h" + +// class SvxScriptTypeItem ---------------------------------------------- + +/* [Description] + + This item describe the scriptype of the selected text and is only + used for the user interface. +*/ + +SVX_DLLPUBLIC USHORT GetI18NScriptTypeOfLanguage( USHORT nLang ); +USHORT GetItemScriptType( short nI18NType ); +short GetI18NScriptType( USHORT nItemType ); + +class SvxScriptTypeItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + + SvxScriptTypeItem( sal_uInt16 nType = SCRIPTTYPE_LATIN ); + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + +}; + +class SVX_DLLPUBLIC SvxScriptSetItem : public SfxSetItem +{ +public: + TYPEINFO(); + + SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const; + + static const SfxPoolItem* GetItemOfScriptSet( const SfxItemSet& rSet, + USHORT nWhich ); + inline const SfxPoolItem* GetItemOfScriptSet( USHORT _nWhich ) const + { return SvxScriptSetItem::GetItemOfScriptSet( GetItemSet(), _nWhich ); } + + static const SfxPoolItem* GetItemOfScript( USHORT nSlotId, const SfxItemSet& rSet, USHORT nScript ); + + const SfxPoolItem* GetItemOfScript( USHORT nScript ) const; + + void PutItemForScriptType( USHORT nScriptType, const SfxPoolItem& rItem ); + + static void GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHORT& rLatin, USHORT& rAsian, USHORT& rComplex); + + void GetWhichIds( USHORT& rLatin, USHORT& rAsian, USHORT& rComplex) const; + + static void GetSlotIds( USHORT nSlotId, USHORT& rLatin, USHORT& rAsian, + USHORT& rComplex ); + inline void GetSlotIds( USHORT& rLatin, USHORT& rAsian, + USHORT& rComplex ) const + { GetSlotIds( Which(), rLatin, rAsian, rComplex ); } +}; + +#endif + diff --git a/svx/inc/svx/sdangitm.hxx b/svx/inc/svx/sdangitm.hxx new file mode 100644 index 000000000000..27205b49ec8b --- /dev/null +++ b/svx/inc/svx/sdangitm.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdangitm.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDANGITM_HXX +#define _SDANGITM_HXX + +#include <svl/intitem.hxx> +#include "svx/svxdllapi.h" + + +//------------------------------------------------------------ +// class SdrAngleItem +//------------------------------------------------------------ +class SVX_DLLPUBLIC SdrAngleItem: public SfxInt32Item { +public: + TYPEINFO(); + SdrAngleItem(): SfxInt32Item() {} + SdrAngleItem(USHORT nId, INT32 nAngle=0): SfxInt32Item(nId,nAngle) {} + SdrAngleItem(USHORT nId, SvStream& rIn): SfxInt32Item(nId,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String& rText, + const IntlWrapper * + pIntlWrapper = 0) const; + +#ifdef SDR_ISPOOLABLE + virtual int IsPoolable() const; +#endif +}; + + +#endif diff --git a/svx/inc/svx/sdasaitm.hxx b/svx/inc/svx/sdasaitm.hxx new file mode 100644 index 000000000000..9678dec88968 --- /dev/null +++ b/svx/inc/svx/sdasaitm.hxx @@ -0,0 +1,85 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdasaitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDASAITM_HXX +#define _SDASAITM_HXX + +#include <svl/poolitem.hxx> +#include <tools/list.hxx> + +class SdrCustomShapeAdjustmentValue +{ + sal_uInt32 nValue; + + friend class SdrCustomShapeAdjustmentItem; + + public : + + void SetValue( sal_Int32 nVal ) { nValue = nVal; }; + sal_Int32 GetValue() const { return nValue; }; + +}; + +class SdrCustomShapeAdjustmentItem : public SfxPoolItem +{ + List aAdjustmentValueList; + + public : + + TYPEINFO(); + SVX_DLLPUBLIC SdrCustomShapeAdjustmentItem(); + SdrCustomShapeAdjustmentItem( SvStream& rIn, sal_uInt16 nVersion ); + SVX_DLLPUBLIC ~SdrCustomShapeAdjustmentItem(); + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation, + SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric, + String &rText, const IntlWrapper * = 0) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItem ) const; + virtual SvStream& Store( SvStream&, sal_uInt16 nVersion ) const; + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + +#ifdef SDR_ISPOOLABLE + virtual int IsPoolable() const; +#endif + + sal_uInt32 GetCount() const { return aAdjustmentValueList.Count(); }; + SVX_DLLPUBLIC const SdrCustomShapeAdjustmentValue& GetValue( sal_uInt32 nIndex ) const; + SVX_DLLPUBLIC void SetValue( sal_uInt32 nIndex, + const SdrCustomShapeAdjustmentValue& rVal ); +}; + +#endif + diff --git a/svx/inc/svx/sdasitm.hxx b/svx/inc/svx/sdasitm.hxx new file mode 100644 index 000000000000..2499a857b965 --- /dev/null +++ b/svx/inc/svx/sdasitm.hxx @@ -0,0 +1,149 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdasitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDASITM_HXX +#define _SDASITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdooitm.hxx> +#include <svl/stritem.hxx> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/uno/Any.hxx> +#include <rtl/ustring.hxx> +#include <hash_map> +#include <map> +#include "svx/svxdllapi.h" + +class SdrCustomShapeEngineItem : public SfxStringItem +{ + public : + SdrCustomShapeEngineItem(); + SdrCustomShapeEngineItem( const String& rCustomShapeEngine ); +}; + +class SdrCustomShapeDataItem : public SfxStringItem +{ + public : + SdrCustomShapeDataItem(); + SdrCustomShapeDataItem( const String& rCustomShapeData ); +}; + +class SVX_DLLPUBLIC SdrCustomShapeGeometryItem : public SfxPoolItem +{ +public: + typedef std::pair < const ::rtl::OUString, const ::rtl::OUString > PropertyPair; + +private: + struct SVX_DLLPRIVATE PropertyEq + { + bool operator()( const rtl::OUString&, const rtl::OUString& ) const; + }; + struct SVX_DLLPRIVATE PropertyPairEq + { + bool operator()( const SdrCustomShapeGeometryItem::PropertyPair&, const SdrCustomShapeGeometryItem::PropertyPair& ) const; + }; + struct SVX_DLLPRIVATE PropertyPairHash + { + size_t operator()( const SdrCustomShapeGeometryItem::PropertyPair &r1 ) const; + }; + typedef std::hash_map < PropertyPair, sal_Int32, PropertyPairHash, PropertyPairEq > PropertyPairHashMap; + typedef std::hash_map< rtl::OUString, sal_Int32, rtl::OUStringHash, PropertyEq > PropertyHashMap; + + PropertyHashMap aPropHashMap; + PropertyPairHashMap aPropPairHashMap; + + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aPropSeq; + + public : + + TYPEINFO(); + + SdrCustomShapeGeometryItem(); + SdrCustomShapeGeometryItem( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& ); + SdrCustomShapeGeometryItem( SvStream& rIn, sal_uInt16 nVersion ); + ~SdrCustomShapeGeometryItem(); + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation, + SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric, + String &rText, const IntlWrapper * = 0) const; + + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItem ) const; + virtual SvStream& Store( SvStream&, sal_uInt16 nVersion ) const; + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& GetGeometry() const; + +#ifdef SDR_ISPOOLABLE + virtual int IsPoolable() const; +#endif + com::sun::star::uno::Any* GetPropertyValueByName( const rtl::OUString& rPropName ); + com::sun::star::uno::Any* GetPropertyValueByName( const rtl::OUString& rPropName, const rtl::OUString& rPropName2 ); + + void SetPropertyValue( const com::sun::star::beans::PropertyValue& rPropVal ); + void SetPropertyValue( const rtl::OUString& rSequenceName, const com::sun::star::beans::PropertyValue& rPropVal ); + + void ClearPropertyValue( const rtl::OUString& rPropertyName ); + void ClearPropertyValue( const rtl::OUString& rSequenceName, const rtl::OUString& rPropertyName ); +}; + +class SdrCustomShapeReplacementURLItem : public SfxStringItem +{ + public : + SdrCustomShapeReplacementURLItem(); + SdrCustomShapeReplacementURLItem( const String& rCustomShapeReplacementURL ); +}; + +//--------------------------- +// class SdrTextWordWrapItem +//--------------------------- +class SdrTextWordWrapItem : public SdrOnOffItem { +public: + SdrTextWordWrapItem( BOOL bAuto = FALSE ): SdrOnOffItem( SDRATTR_TEXT_WORDWRAP, bAuto ) {} + SdrTextWordWrapItem( SvStream& rIn ) : SdrOnOffItem( SDRATTR_TEXT_WORDWRAP, rIn ) {} +}; + +//------------------------------- +// class SdrTextAutoGrowSizeItem +//------------------------------- +class SdrTextAutoGrowSizeItem : public SdrOnOffItem { +public: + SdrTextAutoGrowSizeItem( BOOL bAuto = FALSE ): SdrOnOffItem( SDRATTR_TEXT_AUTOGROWSIZE, bAuto ) {} + SdrTextAutoGrowSizeItem( SvStream& rIn ) : SdrOnOffItem( SDRATTR_TEXT_AUTOGROWSIZE, rIn ) {} +}; + +#endif + diff --git a/svx/inc/svx/sderitm.hxx b/svx/inc/svx/sderitm.hxx new file mode 100644 index 000000000000..4c3a45ff1728 --- /dev/null +++ b/svx/inc/svx/sderitm.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sderitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDERITM_HXX +#define _SDERITM_HXX + +#include <svx/sdmetitm.hxx> +#include <svx/svddef.hxx> + +//------------------------------ +// class SdrEckenradiusItem +//------------------------------ +class SdrEckenradiusItem: public SdrMetricItem { +public: + SdrEckenradiusItem(long nRadius=0): SdrMetricItem(SDRATTR_ECKENRADIUS,nRadius) {} + SdrEckenradiusItem(SvStream& rIn) : SdrMetricItem(SDRATTR_ECKENRADIUS,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdgcoitm.hxx b/svx/inc/svx/sdgcoitm.hxx new file mode 100644 index 000000000000..e888cffc988d --- /dev/null +++ b/svx/inc/svx/sdgcoitm.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdgcoitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDGCOITM_HXX +#define _SDGCOITM_HXX + +#include <svx/sdprcitm.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +//----------------- +// SdrGrafRedItem - +//----------------- + +class SVX_DLLPUBLIC SdrGrafRedItem : public SdrSignedPercentItem +{ +public: + + TYPEINFO(); + + SdrGrafRedItem( short nRedPercent = 0 ) : SdrSignedPercentItem( SDRATTR_GRAFRED, nRedPercent ) {} + SdrGrafRedItem( SvStream& rIn ) : SdrSignedPercentItem( SDRATTR_GRAFRED, rIn ) {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; +}; + +//------------------- +// SdrGrafGreenItem - +//------------------- + +class SVX_DLLPUBLIC SdrGrafGreenItem : public SdrSignedPercentItem +{ +public: + + TYPEINFO(); + + SdrGrafGreenItem( short nGreenPercent = 0 ) : SdrSignedPercentItem( SDRATTR_GRAFGREEN, nGreenPercent ) {} + SdrGrafGreenItem( SvStream& rIn ) : SdrSignedPercentItem( SDRATTR_GRAFGREEN, rIn ) {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; +}; + +//------------------- +// SdrGrafBlueItem - +//------------------- + +class SVX_DLLPUBLIC SdrGrafBlueItem : public SdrSignedPercentItem +{ +public: + + TYPEINFO(); + + SdrGrafBlueItem( short nBluePercent = 0 ) : SdrSignedPercentItem( SDRATTR_GRAFBLUE, nBluePercent ) {} + SdrGrafBlueItem( SvStream& rIn ) : SdrSignedPercentItem( SDRATTR_GRAFBLUE, rIn ) {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; +}; + +#endif // _SDGCOITM_HXX diff --git a/svx/inc/svx/sdgcpitm.hxx b/svx/inc/svx/sdgcpitm.hxx new file mode 100644 index 000000000000..4df0e005111d --- /dev/null +++ b/svx/inc/svx/sdgcpitm.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdgcpitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDGCPITM_HXX +#define _SDGCPITM_HXX + +#include <svx/grfcrop.hxx> +#include <svx/svddef.hxx> + +//------------------ +// SdrGrafCropItem - +//------------------ + +class SVX_DLLPUBLIC SdrGrafCropItem : public SvxGrfCrop +{ +public: + + TYPEINFO(); + + SdrGrafCropItem( sal_Int32 nLeftCrop = 0, sal_Int32 nTopCrop = 0, + sal_Int32 nRightCrop = 0, sal_Int32 nBottomCrop = 0, + USHORT nWhichId = SDRATTR_GRAFCROP ) : + SvxGrfCrop( nLeftCrop, nRightCrop, nTopCrop, nBottomCrop, nWhichId ) {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; +}; + +#endif // _SDGCPITM_HXX diff --git a/svx/inc/svx/sdggaitm.hxx b/svx/inc/svx/sdggaitm.hxx new file mode 100644 index 000000000000..c20ec38e78d1 --- /dev/null +++ b/svx/inc/svx/sdggaitm.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdggaitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDGGAITM_HXX +#define _SDGGAITM_HXX + +#include <svl/intitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +//---------------------- +// SdrGrafGamma100Item - +//---------------------- + +class SVX_DLLPUBLIC SdrGrafGamma100Item : public SfxUInt32Item +{ +public: + + TYPEINFO(); + + SdrGrafGamma100Item( ULONG nGamma100 = 100 ) : SfxUInt32Item( SDRATTR_GRAFGAMMA, nGamma100 ) {} + SdrGrafGamma100Item( SvStream& rIn ) : SfxUInt32Item( SDRATTR_GRAFGAMMA, rIn ) {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +#endif // _SDGGAITM_HXX diff --git a/svx/inc/svx/sdginitm.hxx b/svx/inc/svx/sdginitm.hxx new file mode 100644 index 000000000000..10f57c5dc333 --- /dev/null +++ b/svx/inc/svx/sdginitm.hxx @@ -0,0 +1,55 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdginitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDGINITM_HXX +#define _SDGINITM_HXX + +#include <svx/sdooitm.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +//-------------------- +// SdrGrafInvertItem - +//-------------------- + +class SVX_DLLPUBLIC SdrGrafInvertItem : public SdrOnOffItem +{ +public: + + TYPEINFO(); + + SdrGrafInvertItem( BOOL bInvert = FALSE ) : SdrOnOffItem( SDRATTR_GRAFINVERT, bInvert ) {} + SdrGrafInvertItem( SvStream& rIn ) : SdrOnOffItem( SDRATTR_GRAFINVERT, rIn ) {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; +}; + +#endif // _SDGINITM_HXX diff --git a/svx/inc/svx/sdgluitm.hxx b/svx/inc/svx/sdgluitm.hxx new file mode 100644 index 000000000000..07306d4bccdb --- /dev/null +++ b/svx/inc/svx/sdgluitm.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdgluitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDGLUITM_HXX +#define _SDGLUITM_HXX + +#include <svx/sdprcitm.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +//----------------------- +// SdrGrafLuminanceItem - +//----------------------- + +class SVX_DLLPUBLIC SdrGrafLuminanceItem : public SdrSignedPercentItem +{ +public: + + TYPEINFO(); + + SdrGrafLuminanceItem( short nLuminancePercent = 0 ) : SdrSignedPercentItem( SDRATTR_GRAFLUMINANCE, nLuminancePercent ) {} + SdrGrafLuminanceItem( SvStream& rIn ) : SdrSignedPercentItem( SDRATTR_GRAFLUMINANCE, rIn ) {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; +}; + +//---------------------- +// SdrGrafContrastItem - +//---------------------- + +class SVX_DLLPUBLIC SdrGrafContrastItem : public SdrSignedPercentItem +{ +public: + + TYPEINFO(); + + SdrGrafContrastItem( short nContrastPercent = 0 ) : SdrSignedPercentItem( SDRATTR_GRAFCONTRAST, nContrastPercent ) {} + SdrGrafContrastItem( SvStream& rIn ) : SdrSignedPercentItem( SDRATTR_GRAFCONTRAST, rIn ) {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; +}; + +#endif // _SDGLUITM_HXX diff --git a/svx/inc/svx/sdgmoitm.hxx b/svx/inc/svx/sdgmoitm.hxx new file mode 100644 index 000000000000..0f27c6ef8ba4 --- /dev/null +++ b/svx/inc/svx/sdgmoitm.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdgmoitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDGMOITM_HXX +#define _SDGMOITM_HXX + +#include <goodies/grfmgr.hxx> +#include <svl/eitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +//------------------ +// SdrGrafModeItem - +//------------------ + +class SVX_DLLPUBLIC SdrGrafModeItem : public SfxEnumItem +{ +public: + + TYPEINFO(); + + SdrGrafModeItem( GraphicDrawMode eMode = GRAPHICDRAWMODE_STANDARD ) : SfxEnumItem( SDRATTR_GRAFMODE, (USHORT)eMode ) {} + SdrGrafModeItem( SvStream& rIn ) : SfxEnumItem( SDRATTR_GRAFMODE, rIn ) {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + virtual USHORT GetValueCount() const; + GraphicDrawMode GetValue() const { return (GraphicDrawMode) SfxEnumItem::GetValue(); } + + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String& rText, const IntlWrapper * = 0) const; + +}; + +#endif // _SDGMOITM_HXX diff --git a/svx/inc/svx/sdgtritm.hxx b/svx/inc/svx/sdgtritm.hxx new file mode 100644 index 000000000000..21be16fc1834 --- /dev/null +++ b/svx/inc/svx/sdgtritm.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdgtritm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDGTRITM_HXX +#define _SDGTRITM_HXX + +#include <svx/sdprcitm.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +//-------------------------- +// SdrGrafTransparenceItem - +//-------------------------- + +class SVX_DLLPUBLIC SdrGrafTransparenceItem : public SdrPercentItem +{ +public: + + TYPEINFO(); + SdrGrafTransparenceItem( USHORT nTransparencePercent = 0 ) : SdrPercentItem( SDRATTR_GRAFTRANSPARENCE, nTransparencePercent ) {} + SdrGrafTransparenceItem( SvStream& rIn ) : SdrPercentItem( SDRATTR_GRAFTRANSPARENCE, rIn ) {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; +}; + +#endif // _SDGTRITM_HXX diff --git a/svx/inc/svx/sdmetitm.hxx b/svx/inc/svx/sdmetitm.hxx new file mode 100644 index 000000000000..b4f39d5fa76f --- /dev/null +++ b/svx/inc/svx/sdmetitm.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdmetitm.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDMETITM_HXX +#define _SDMETITM_HXX + +#include <svl/intitem.hxx> +#include "svx/svxdllapi.h" + + +//------------------------------------------------------------ +// class SdrAngleItem +// Fuer alle Metriken. GetPresentation liefert dann bei +// Value=2500 z.B. ein "25mm". +//------------------------------------------------------------ +class SVX_DLLPUBLIC SdrMetricItem: public SfxInt32Item { +public: + TYPEINFO(); + SdrMetricItem(): SfxInt32Item() {} + SdrMetricItem(USHORT nId, INT32 nVal=0): SfxInt32Item(nId,nVal) {} + SdrMetricItem(USHORT nId, SvStream& rIn): SfxInt32Item(nId,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual FASTBOOL HasMetrics() const; + virtual FASTBOOL ScaleMetrics(long nMul, long nDiv); + + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String& rText, const IntlWrapper * = 0) const; + +#ifdef SDR_ISPOOLABLE + virtual int IsPoolable() const; +#endif +}; + + +#endif diff --git a/svx/inc/svx/sdooitm.hxx b/svx/inc/svx/sdooitm.hxx new file mode 100644 index 000000000000..d8af5ef51428 --- /dev/null +++ b/svx/inc/svx/sdooitm.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdooitm.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDOOITM_HXX +#define _SDOOITM_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + + +//------------------------------------------------------------ +// class SdrOnOffItem +// hier liefert GetValueTextByVal() "an" oder "aus" +// anstelle von "TRUE" und "FALSE" +//------------------------------------------------------------ +class SVX_DLLPUBLIC SdrOnOffItem: public SfxBoolItem { +public: + TYPEINFO(); + SdrOnOffItem(): SfxBoolItem() {} + SdrOnOffItem(USHORT nId, BOOL bOn=FALSE): SfxBoolItem(nId,bOn) {} + SdrOnOffItem(USHORT nId, SvStream& rIn): SfxBoolItem(nId,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual String GetValueTextByVal(BOOL bVal) const; + + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; + +#ifdef SDR_ISPOOLABLE + virtual int IsPoolable() const; +#endif +}; + + +#endif diff --git a/svx/inc/svx/sdprcitm.hxx b/svx/inc/svx/sdprcitm.hxx new file mode 100644 index 000000000000..b9e17365629f --- /dev/null +++ b/svx/inc/svx/sdprcitm.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdprcitm.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDPRCITM_HXX +#define _SDPRCITM_HXX + +#include <svl/intitem.hxx> +#include "svx/svxdllapi.h" + + +//------------------------------------------------------------ +// class SdrPercentItem +// Ganze Prozente von 0 +//------------------------------------------------------------ + +class SVX_DLLPUBLIC SdrPercentItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + SdrPercentItem(): SfxUInt16Item() {} + SdrPercentItem(USHORT nId, UINT16 nVal=0): SfxUInt16Item(nId,nVal) {} + SdrPercentItem(USHORT nId, SvStream& rIn): SfxUInt16Item(nId,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; + +#ifdef SDR_ISPOOLABLE + virtual int IsPoolable() const; +#endif +}; + +//------------------------------------------------------------ +// class SdrSignedPercentItem +// Ganze Prozente von +/- +//------------------------------------------------------------ + +class SVX_DLLPUBLIC SdrSignedPercentItem : public SfxInt16Item +{ +public: + TYPEINFO(); + SdrSignedPercentItem(): SfxInt16Item() {} + SdrSignedPercentItem( USHORT nId, INT16 nVal = 0 ) : SfxInt16Item( nId,nVal ) {} + SdrSignedPercentItem( USHORT nId, SvStream& rIn ) : SfxInt16Item( nId,rIn ) {} + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0 ) const; + +#ifdef SDR_ISPOOLABLE + virtual int IsPoolable() const; +#endif +}; + + +#endif diff --git a/svx/inc/svx/sdr/animation/animationstate.hxx b/svx/inc/svx/sdr/animation/animationstate.hxx new file mode 100644 index 000000000000..01a1fe961e39 --- /dev/null +++ b/svx/inc/svx/sdr/animation/animationstate.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: animationstate.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_ANIMATION_ANIMATIONSTATE_HXX +#define _SDR_ANIMATION_ANIMATIONSTATE_HXX + +#include <sal/types.h> +#include <vector> +#include <svx/sdr/animation/scheduler.hxx> +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +namespace sdr +{ + namespace contact + { + class ViewObjectContact; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace animation + { + class PrimitiveAnimation : public Event + { + protected: + // the animated VOC + sdr::contact::ViewObjectContact& mrVOContact; + + // the vetor of animated primitives + drawinglayer::primitive2d::Primitive2DSequence maAnimatedPrimitives; + + // local helpers + double getSmallestNextTime(double fCurrentTime); + void prepareNextEvent(); + + public: + // basic constructor. + PrimitiveAnimation(sdr::contact::ViewObjectContact& rVOContact, const drawinglayer::primitive2d::Primitive2DSequence& rAnimatedPrimitives); + + // destructor + virtual ~PrimitiveAnimation(); + + // execute event, from base class Event + virtual void Trigger(sal_uInt32 nTime); + }; + } // end of namespace animation +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_ANIMATION_ANIMATIONSTATE_HXX + +// eof diff --git a/svx/inc/svx/sdr/animation/objectanimator.hxx b/svx/inc/svx/sdr/animation/objectanimator.hxx new file mode 100644 index 000000000000..3fcb52463bc8 --- /dev/null +++ b/svx/inc/svx/sdr/animation/objectanimator.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: objectanimator.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_ANIMATION_OBJECTANIMATOR_HXX +#define _SDR_ANIMATION_OBJECTANIMATOR_HXX + +#include <sal/types.h> +#include <vector> +#include <vcl/timer.hxx> +#include <svx/sdr/animation/scheduler.hxx> +#include <svx/sdr/animation/animationstate.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace animation + { + class primitiveAnimator : public Scheduler + { + public: + // basic constructor and destructor + primitiveAnimator(); + SVX_DLLPUBLIC virtual ~primitiveAnimator(); + }; + } // end of namespace animation +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_ANIMATION_OBJECTANIMATOR_HXX + +// eof diff --git a/svx/inc/svx/sdr/animation/scheduler.hxx b/svx/inc/svx/sdr/animation/scheduler.hxx new file mode 100644 index 000000000000..03fc8eccd9b4 --- /dev/null +++ b/svx/inc/svx/sdr/animation/scheduler.hxx @@ -0,0 +1,162 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: scheduler.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_ANIMATION_SCHEDULER_HXX +#define _SDR_ANIMATION_SCHEDULER_HXX + +#include <sal/types.h> +#include <vcl/timer.hxx> +#include <svx/svxdllapi.h> + +////////////////////////////////////////////////////////////////////////////// +// event class + +namespace sdr +{ + namespace animation + { + class Event + { + // time of event in ms + sal_uInt32 mnTime; + + // pointer for simply linked list + Event* mpNext; + + public: + // constructor/destructor + Event(sal_uInt32 nTime); + SVX_DLLPUBLIC virtual ~Event(); + + // access to mpNext + Event* GetNext() const; + void SetNext(Event* pNew); + + // get/set time + sal_uInt32 GetTime() const; + void SetTime(sal_uInt32 nNew); + + // execute event + virtual void Trigger(sal_uInt32 nTime) = 0; + }; + } // end of namespace animation +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// +// eventlist class + +namespace sdr +{ + namespace animation + { + class EventList + { + // pointer to first entry + Event* mpHead; + + public: + // constructor/destructor + EventList(); + SVX_DLLPUBLIC virtual ~EventList(); + + // insert/remove time dependent + void Insert(Event* pNew); + void Remove(Event* pOld); + + // clear list + void Clear(); + + // get first + Event* GetFirst(); + }; + } // end of namespace animation +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// +// scheduler class + +namespace sdr +{ + namespace animation + { + class Scheduler : public Timer + { + // time in ms + sal_uInt32 mnTime; + + // next delta time + sal_uInt32 mnDeltaTime; + + // list of events + EventList maList; + + // Flag which remembers if this timer is paused. Default + // is false. + bool mbIsPaused; + + public: + // constructor/destructor + Scheduler(); + SVX_DLLPUBLIC virtual ~Scheduler(); + + // From baseclass Timer, the timeout call + SVX_DLLPUBLIC virtual void Timeout(); + + // get time + sal_uInt32 GetTime(); + + // #i38135# + void SetTime(sal_uInt32 nTime); + + // reset + void Reset(sal_uInt32 nTime); + + // execute all ripe events, removes executed ones from the scheduler + void triggerEvents(); + + // re-start or stop timer according to event list + void checkTimeout(); + + // insert/remove events, wrapper to EventList methods + void InsertEvent(Event* pNew); + void RemoveEvent(Event* pOld); + + // get/set pause + bool IsPaused() const { return mbIsPaused; } + void SetPaused(bool bNew); + }; + } // end of namespace animation +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_ANIMATION_SCHEDULER_HXX + +// eof diff --git a/svx/inc/svx/sdr/attribute/sdrallattribute.hxx b/svx/inc/svx/sdr/attribute/sdrallattribute.hxx new file mode 100644 index 000000000000..a699c7f9a198 --- /dev/null +++ b/svx/inc/svx/sdr/attribute/sdrallattribute.hxx @@ -0,0 +1,202 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrallattribute.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_ATTRIBUTE_SDRALLATTRIBUTE_HXX +#define _SDR_ATTRIBUTE_SDRALLATTRIBUTE_HXX + +#include <sal/types.h> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +namespace drawinglayer { namespace attribute { + class SdrLineAttribute; + class SdrFillAttribute; + class SdrLineStartEndAttribute; + class SdrShadowAttribute; + class FillGradientAttribute; + class SdrTextAttribute; +}} + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + class SdrShadowTextAttribute + { + // shadow and text attributes + SdrShadowAttribute* mpShadow; // shadow attributes (if used) + SdrTextAttribute* mpTextAttribute; // text and text attributes (if used) + + public: + SdrShadowTextAttribute( + SdrShadowAttribute* pShadow = 0, + SdrTextAttribute* pTextAttribute = 0); + ~SdrShadowTextAttribute(); + + // copy constructor and assigment operator + SdrShadowTextAttribute(const SdrShadowTextAttribute& rCandidate); + SdrShadowTextAttribute& operator=(const SdrShadowTextAttribute& rCandidate); + + // compare operator + bool operator==(const SdrShadowTextAttribute& rCandidate) const; + + // bool access + bool isVisible() const { return (0 != mpTextAttribute); } + + // data access + const SdrShadowAttribute* getShadow() const { return mpShadow; } + const SdrTextAttribute* getText() const { return mpTextAttribute; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + class SdrFillTextAttribute + { + // shadow and text attributes + SdrFillAttribute* mpFill; // fill attributes (if used) + FillGradientAttribute* mpFillFloatTransGradient; // fill float transparence gradient (if used) + SdrTextAttribute* mpTextAttribute; // text and text attributes (if used) + + public: + SdrFillTextAttribute( + SdrFillAttribute* pFill = 0, + FillGradientAttribute* pFillFloatTransGradient = 0, + SdrTextAttribute* pTextAttribute = 0); + ~SdrFillTextAttribute(); + + // copy constructor and assigment operator + SdrFillTextAttribute(const SdrFillTextAttribute& rCandidate); + SdrFillTextAttribute& operator=(const SdrFillTextAttribute& rCandidate); + + // compare operator + bool operator==(const SdrFillTextAttribute& rCandidate) const; + + // bool access + bool isVisible() const { return ((mpTextAttribute) || (mpFill)); } + + // data access + const SdrFillAttribute* getFill() const { return mpFill; } + const FillGradientAttribute* getFillFloatTransGradient() const { return mpFillFloatTransGradient; } + const SdrTextAttribute* getText() const { return mpTextAttribute; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + class SdrLineShadowTextAttribute : public SdrShadowTextAttribute + { + // line, shadow, lineStartEnd and text attributes + SdrLineAttribute* mpLine; // line attributes (if used) + SdrLineStartEndAttribute* mpLineStartEnd; // line start end (if used) + + public: + SdrLineShadowTextAttribute( + SdrLineAttribute* pLine = 0, + SdrLineStartEndAttribute* pLineStartEnd = 0, + SdrShadowAttribute* pShadow = 0, + SdrTextAttribute* pTextAttribute = 0); + ~SdrLineShadowTextAttribute(); + + // copy constructor and assigment operator + SdrLineShadowTextAttribute(const SdrLineShadowTextAttribute& rCandidate); + SdrLineShadowTextAttribute& operator=(const SdrLineShadowTextAttribute& rCandidate); + + // compare operator + bool operator==(const SdrLineShadowTextAttribute& rCandidate) const; + + // bool access + bool isVisible() const { return (mpLine || (SdrShadowTextAttribute::isVisible())); } + + // data access + const SdrLineAttribute* getLine() const { return mpLine; } + const SdrLineStartEndAttribute* getLineStartEnd() const { return mpLineStartEnd; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + class SdrLineFillShadowTextAttribute : public SdrLineShadowTextAttribute + { + // add fill and transGradient attributes + SdrFillAttribute* mpFill; // fill attributes (if used) + FillGradientAttribute* mpFillFloatTransGradient; // fill float transparence gradient (if used) + + public: + SdrLineFillShadowTextAttribute( + SdrLineAttribute* pLine = 0, + SdrFillAttribute* pFill = 0, + SdrLineStartEndAttribute* pLineStartEnd = 0, + SdrShadowAttribute* pShadow = 0, + FillGradientAttribute* pFillFloatTransGradient = 0, + SdrTextAttribute* pTextAttribute = 0); + ~SdrLineFillShadowTextAttribute(); + + // copy constructor and assigment operator + SdrLineFillShadowTextAttribute(const SdrLineFillShadowTextAttribute& rCandidate); + SdrLineFillShadowTextAttribute& operator=(const SdrLineFillShadowTextAttribute& rCandidate); + + // compare operator + bool operator==(const SdrLineFillShadowTextAttribute& rCandidate) const; + + // bool access + bool isVisible() const { return (mpFill || (SdrLineShadowTextAttribute::isVisible())); } + + // data access + const SdrFillAttribute* getFill() const { return mpFill; } + const FillGradientAttribute* getFillFloatTransGradient() const { return mpFillFloatTransGradient; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_ATTRIBUTE_SDRALLATTRIBUTE_HXX + +// eof diff --git a/svx/inc/svx/sdr/attribute/sdrformtextattribute.hxx b/svx/inc/svx/sdr/attribute/sdrformtextattribute.hxx new file mode 100644 index 000000000000..77273bd9cb03 --- /dev/null +++ b/svx/inc/svx/sdr/attribute/sdrformtextattribute.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrtextattribute.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_ATTRIBUTE_SDRFORMTEXTATTRIBUTE_HXX +#define _SDR_ATTRIBUTE_SDRFORMTEXTATTRIBUTE_HXX + +#include <sal/types.h> +#include <svx/xenum.hxx> +#include <tools/color.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines +class SfxItemSet; +namespace drawinglayer { namespace attribute { class SdrFormTextOutlineAttribute; }} + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + class SdrFormTextAttribute + { + private: + // FormText (FontWork) Attributes + sal_Int32 mnFormTextDistance; // distance from line in upright direction + sal_Int32 mnFormTextStart; // shift from polygon start + sal_Int32 mnFormTextShdwXVal; // shadow distance or 10th degrees + sal_Int32 mnFormTextShdwYVal; // shadow distance or scaling + sal_uInt16 mnFormTextShdwTransp; // shadow transparence + XFormTextStyle meFormTextStyle; // on/off and char orientation + XFormTextAdjust meFormTextAdjust; // adjustment (left/right/center) and scale + XFormTextShadow meFormTextShadow; // shadow mode + Color maFormTextShdwColor; // shadow color + + // outline attributes; used when getFormTextOutline() is true and (for + // shadow) when getFormTextShadow() != XFTSHADOW_NONE + SdrFormTextOutlineAttribute* mpOutline; + SdrFormTextOutlineAttribute* mpShadowOutline; + + // bitfield + unsigned mbFormTextMirror : 1; // change orientation + unsigned mbFormTextOutline : 1; // show contour of objects + + public: + SdrFormTextAttribute(const SfxItemSet& rSet); + ~SdrFormTextAttribute(); + + // copy constructor and assigment operator + SdrFormTextAttribute(const SdrFormTextAttribute& rCandidate); + SdrFormTextAttribute& operator=(const SdrFormTextAttribute& rCandidate); + + // compare operator + bool operator==(const SdrFormTextAttribute& rCandidate) const; + + // data access + sal_Int32 getFormTextDistance() const { return mnFormTextDistance; } + sal_Int32 getFormTextStart() const { return mnFormTextStart; } + sal_Int32 getFormTextShdwXVal() const { return mnFormTextShdwXVal; } + sal_Int32 getFormTextShdwYVal() const { return mnFormTextShdwYVal; } + sal_uInt16 getFormTextShdwTransp() const { return mnFormTextShdwTransp; } + XFormTextStyle getFormTextStyle() const { return meFormTextStyle; } + XFormTextAdjust getFormTextAdjust() const { return meFormTextAdjust; } + XFormTextShadow getFormTextShadow() const { return meFormTextShadow; } + Color getFormTextShdwColor() const { return maFormTextShdwColor; } + + const SdrFormTextOutlineAttribute* getOutline() const { return mpOutline; } + const SdrFormTextOutlineAttribute* getShadowOutline() const { return mpShadowOutline; } + + bool getFormTextMirror() const { return mbFormTextMirror; } + bool getFormTextOutline() const { return mbFormTextOutline; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_ATTRIBUTE_SDRFORMTEXTATTRIBUTE_HXX + +// eof diff --git a/svx/inc/svx/sdr/attribute/sdrformtextoutlineattribute.hxx b/svx/inc/svx/sdr/attribute/sdrformtextoutlineattribute.hxx new file mode 100644 index 000000000000..8e11c97ed5c3 --- /dev/null +++ b/svx/inc/svx/sdr/attribute/sdrformtextoutlineattribute.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrtextattribute.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX +#define _SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX + +#include <sal/types.h> +#include <drawinglayer/attribute/lineattribute.hxx> +#include <drawinglayer/attribute/strokeattribute.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + class SdrFormTextOutlineAttribute + { + private: + // one set of attributes for FormText (FontWork) outline visualisation + LineAttribute maLineAttribute; + StrokeAttribute maStrokeAttribute; + sal_uInt8 mnTransparence; + + public: + SdrFormTextOutlineAttribute( + const LineAttribute& rLineAttribute, + const StrokeAttribute& rStrokeAttribute, + sal_uInt8 nTransparence); + + // compare operator + bool operator==(const SdrFormTextOutlineAttribute& rCandidate) const; + + // data read access + const LineAttribute& getLineAttribute() const { return maLineAttribute; } + const StrokeAttribute getStrokeAttribute() const { return maStrokeAttribute; } + sal_uInt8 getTransparence() const { return mnTransparence; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX + +// eof diff --git a/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx b/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx new file mode 100644 index 000000000000..1759eb18d319 --- /dev/null +++ b/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx @@ -0,0 +1,142 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrtextattribute.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX +#define _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX + +#include <sal/types.h> +#include <svx/xenum.hxx> +#include <svx/outlobj.hxx> +#include <svx/sdtaitm.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines +class SdrText; +namespace drawinglayer { namespace animation { class AnimationEntryList; }} +namespace drawinglayer { namespace attribute { class SdrFormTextAttribute; }} + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + class SdrTextAttribute + { + private: + // all-text attributes. The SdrText itself and a copy + // of te OPO + const SdrText* mpSdrText; + OutlinerParaObject maOutlinerParaObject; + + // Set when it's a FormText; contains all FormText attributes + SdrFormTextAttribute* mpSdrFormTextAttribute; + + // text distances + sal_Int32 maTextLeftDistance; + sal_Int32 maTextUpperDistance; + sal_Int32 maTextRightDistance; + sal_Int32 maTextLowerDistance; + + // #i101556# use versioning from text attributes to detect changes + sal_uInt32 maPropertiesVersion; + + // text alignments + SdrTextHorzAdjust maSdrTextHorzAdjust; + SdrTextVertAdjust maSdrTextVertAdjust; + + // bitfield + unsigned mbContour : 1; + unsigned mbFitToSize : 1; + unsigned mbHideContour : 1; + unsigned mbBlink : 1; + unsigned mbScroll : 1; + unsigned mbInEditMode : 1; + unsigned mbFixedCellHeight : 1; + + public: + SdrTextAttribute( + const SdrText& rSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr, + XFormTextStyle eFormTextStyle, + sal_Int32 aTextLeftDistance, + sal_Int32 aTextUpperDistance, + sal_Int32 aTextRightDistance, + sal_Int32 aTextLowerDistance, + SdrTextHorzAdjust aSdrTextHorzAdjust, + SdrTextVertAdjust aSdrTextVertAdjust, + bool bContour, + bool bFitToSize, + bool bHideContour, + bool bBlink, + bool bScroll, + bool bInEditMode, + bool bFixedCellHeight); + ~SdrTextAttribute(); + + // copy constructor and assigment operator + SdrTextAttribute(const SdrTextAttribute& rCandidate); + SdrTextAttribute& operator=(const SdrTextAttribute& rCandidate); + + // compare operator + bool operator==(const SdrTextAttribute& rCandidate) const; + + // data access + const SdrText& getSdrText() const { return *mpSdrText; } + const OutlinerParaObject& getOutlinerParaObject() const { return maOutlinerParaObject; } + bool isContour() const { return mbContour; } + bool isFitToSize() const { return mbFitToSize; } + bool isHideContour() const { return mbHideContour; } + bool isBlink() const { return mbBlink; } + bool isScroll() const { return mbScroll; } + bool isInEditMode() const { return mbInEditMode; } + bool isFixedCellHeight() const { return mbFixedCellHeight; } + const SdrFormTextAttribute* getSdrFormTextAttribute() const { return mpSdrFormTextAttribute; } + sal_Int32 getTextLeftDistance() const { return maTextLeftDistance; } + sal_Int32 getTextUpperDistance() const { return maTextUpperDistance; } + sal_Int32 getTextRightDistance() const { return maTextRightDistance; } + sal_Int32 getTextLowerDistance() const { return maTextLowerDistance; } + sal_uInt32 getPropertiesVersion() const { return maPropertiesVersion; } + SdrTextHorzAdjust getSdrTextHorzAdjust() const { return maSdrTextHorzAdjust; } + SdrTextVertAdjust getSdrTextVertAdjust() const { return maSdrTextVertAdjust; } + + // animation timing generation + void getBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const; + void getScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/displayinfo.hxx b/svx/inc/svx/sdr/contact/displayinfo.hxx new file mode 100644 index 000000000000..13336bb3175a --- /dev/null +++ b/svx/inc/svx/sdr/contact/displayinfo.hxx @@ -0,0 +1,132 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: displayinfo.hxx,v $ + * $Revision: 1.15 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_DISPLAYINFO_HXX +#define _SDR_CONTACT_DISPLAYINFO_HXX + +#include <sal/types.h> +#include <svx/svdsob.hxx> +#include <svtools/colorcfg.hxx> +#include <vcl/region.hxx> +#include <vector> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrPage; + +namespace sdr { namespace contact { + class ViewObjectContact; +}} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC DisplayInfo + { + protected: + // The Layers which shall be processed (visible) + SetOfByte maProcessLayers; + + // The redraw area, in logical coordinates of OutputDevice. If Region + // is empty, everything needs to be redrawn + Region maRedrawArea; + + // bitfield + + // Internal flag to know when the control layer is painted. Default is + // false. If set to true, painting of the page, page borders and + // the rasters will be suppressed as if mbPageProcessingActive is set (see there). + // This flag is set internally from the processing mechanism to avoid double page + // painting when the control layer needs to be painted as last layer + unsigned mbControlLayerProcessingActive : 1; + + // Internal flag to decide if page stuff (background, border, MasterPage, grid, etc...) + // will be processed at all. This flag is user-defined and will not be changed from the + // processing mechanism. Default is true, thus set to false if PagePainting should be suppressed. + // For more granular switching page stuff painting on and off, use the according flags at the + // view (->Is*Visible()) + unsigned mbPageProcessingActive : 1; + + // Internal flag to remember if EnteredGroupDrawMode is active. Default is true + // since this mode starts activated and gets switched off when reacing + // the current group level. Should only be changed by instances which do + // primitive processing + unsigned mbGhostedDrawModeActive : 1; + + // Internal flag to know if a MasterPage is processed as SubContent of another + // page. Initialized to false, this should only be changed from the instance which + // is processing the MasterPage asSubContent and knows what it does + unsigned mbSubContentActive : 1; + + public: + // basic constructor. + DisplayInfo(); + + // destructor + virtual ~DisplayInfo(); + + // access to ProcessLayers + void SetProcessLayers(const SetOfByte& rSet); + const SetOfByte& GetProcessLayers() const { return maProcessLayers; } + + // access to RedrawArea + void SetRedrawArea(const Region& rRegion); + const Region& GetRedrawArea() const { return maRedrawArea; } + + // Access to ControlLayerProcessingActive flag + void SetControlLayerProcessingActive(bool bDoPaint); + bool GetControlLayerProcessingActive() const { return mbControlLayerProcessingActive; } + + // Access to PageProcessingActive flag + void SetPageProcessingActive(bool bDoPaint); + bool GetPageProcessingActive() const { return mbPageProcessingActive; } + + // Save the original DrawMode from outdev + void ClearGhostedDrawMode(); + void SetGhostedDrawMode(); + bool IsGhostedDrawModeActive() const { return mbGhostedDrawModeActive; } + + // access to master page painting flag + bool GetSubContentActive() const { return mbSubContentActive; } + void SetSubContentActive(bool bNew); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_DISPLAYINFO_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/objectcontact.hxx b/svx/inc/svx/sdr/contact/objectcontact.hxx new file mode 100644 index 000000000000..c0388f152643 --- /dev/null +++ b/svx/inc/svx/sdr/contact/objectcontact.hxx @@ -0,0 +1,232 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: objectcontact.hxx,v $ + * $Revision: 1.13 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_OBJECTCONTACT_HXX +#define _SDR_CONTACT_OBJECTCONTACT_HXX + +#include <svx/sdr/animation/objectanimator.hxx> +#include "svx/svxdllapi.h" +#include <drawinglayer/geometry/viewinformation2d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SetOfByte; +class Rectangle; +class SdrPageView; +class OutputDevice; + +namespace sdr { namespace contact { + class DisplayInfo; + class ViewContact; + class ViewObjectContactRedirector; +}} + +namespace sdr { namespace event { + class TimerEventHandler; +}} + +namespace basegfx { + class B2DRange; + class B2DHomMatrix; +} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ObjectContact + { + private: + // make ViewObjectContact a friend to exclusively allow it to use + // AddViewObjectContact/RemoveViewObjectContact + friend class ViewObjectContact; + + // All VOCs which are created using this OC, thus remembering this OC + // as a reference. All those VOCs need to be deleted when the OC goes down. + // Registering and de-registering is done in the VOC constructors/destructors. + std::vector< ViewObjectContact* > maViewObjectContactVector; + + // A new ViewObjectContact was created and shall be remembered. + void AddViewObjectContact(ViewObjectContact& rVOContact); + + // A ViewObjectContact was deleted and shall be forgotten. + virtual void RemoveViewObjectContact(ViewObjectContact& rVOContact); + + // the primitiveAnimator which is used if this View and/or the contained primitives + // support animatedSwitchPrimitives + sdr::animation::primitiveAnimator maPrimitiveAnimator; + + // the EventHandler for e.g. asynchronious loading of graphics + sdr::event::TimerEventHandler* mpEventHandler; + + // The redirector. If set it is used to pipe all supported calls + // to the redirector + ViewObjectContactRedirector* mpViewObjectContactRedirector; + + // the Primitive2DParameters containing view information + drawinglayer::geometry::ViewInformation2D maViewInformation2D; + + // bitfield + // flag for preview renderer + unsigned mbIsPreviewRenderer : 1; + + // method to create a EventHandler. Needs to give a result. + sdr::event::TimerEventHandler* CreateEventHandler(); + + protected: + // Interface to allow derivates to travel over the registered VOC's + sal_uInt32 getViewObjectContactCount() const { return maViewObjectContactVector.size(); } + ViewObjectContact* getViewObjectContact(sal_uInt32 a) const { return maViewObjectContactVector[a]; } + + // interface to allow derivates to set PreviewRenderer flag + void setPreviewRenderer(bool bNew) { mbIsPreviewRenderer = bNew; } + + // interface to allow derivates to set ViewInformation2D + void updateViewInformation2D(const drawinglayer::geometry::ViewInformation2D& rViewInformation2D) { maViewInformation2D = rViewInformation2D; } + + public: + // basic constructor + ObjectContact(); + virtual ~ObjectContact(); + + // LazyInvalidate request. This is used from the VOCs to mark that they + // got invalidated by an ActionCanged() call. An active view needs to remember + // this and take action on it. Default implementation directly calls back + // triggerLazyInvalidate() wich promptly handles the request + virtual void setLazyInvalidate(ViewObjectContact& rVOC); + + // call this to support evtl. preparations for repaint. Default does nothing + virtual void PrepareProcessDisplay(); + + // Process the whole displaying + virtual void ProcessDisplay(DisplayInfo& rDisplayInfo); + + // test if visualizing of entered groups is switched on at all. Default + // implementation returns sal_False. + virtual bool DoVisualizeEnteredGroup() const; + + // get active group's (the entered group) ViewContact + virtual const ViewContact* getActiveViewContact() const; + + // Invalidate given rectangle at the window/output which is represented by + // this ObjectContact. Default does nothing. + virtual void InvalidatePartOfView(const basegfx::B2DRange& rRange) const; + + // Get info if given Rectangle is visible in this view + virtual bool IsAreaVisible(const basegfx::B2DRange& rRange) const; + + // Get info about the need to visualize GluePoints. The default + // is that it is not necessary. + virtual bool AreGluePointsVisible() const; + + // method to get the primitiveAnimator + sdr::animation::primitiveAnimator& getPrimitiveAnimator(); + + // method to get the EventHandler. It will + // return a existing one or create a new one using CreateEventHandler(). + sdr::event::TimerEventHandler& GetEventHandler() const; + + // delete the EventHandler + void DeleteEventHandler(); + + // test if there is an EventHandler without creating one on demand + bool HasEventHandler() const; + + // check if text animation is allowed. Default is sal_true. + virtual bool IsTextAnimationAllowed() const; + + // check if graphic animation is allowed. Default is sal_true. + virtual bool IsGraphicAnimationAllowed() const; + + // check if asynchronious graphis loading is allowed. Default is sal_False. + virtual bool IsAsynchronGraphicsLoadingAllowed() const; + + // access to ViewObjectContactRedirector + ViewObjectContactRedirector* GetViewObjectContactRedirector() const; + void SetViewObjectContactRedirector(ViewObjectContactRedirector* pNew); + + // check if buffering of MasterPages is allowed. Default is sal_False. + virtual bool IsMasterPageBufferingAllowed() const; + + // print? Default is false + virtual bool isOutputToPrinter() const; + + // window? Default is true + virtual bool isOutputToWindow() const; + + // VirtualDevice? Default is false + virtual bool isOutputToVirtualDevice() const; + + // recording MetaFile? Default is false + virtual bool isOutputToRecordingMetaFile() const; + + // pdf export? Default is false + virtual bool isOutputToPDFFile() const; + + // gray display mode + virtual bool isDrawModeGray() const; + + // gray display mode + virtual bool isDrawModeBlackWhite() const; + + // high contrast display mode + virtual bool isDrawModeHighContrast() const; + + // check if this is a preview renderer. Default is sal_False. + bool IsPreviewRenderer() const { return mbIsPreviewRenderer; } + + // get Primitive2DParameters for this view + const drawinglayer::geometry::ViewInformation2D& getViewInformation2D() const { return maViewInformation2D; } + + // access to SdrPageView. May return 0L like the default implementations do. Needs to be overloaded as needed. + virtual SdrPageView* TryToGetSdrPageView() const; + + // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed. + virtual OutputDevice* TryToGetOutputDevice() const; + + // reset ViewPort at internal ViewInformation2D. This is needed when the OC is used + // not for ProcessDisplay() but to get a VOC associated with it. When trying to get + // a sequence of primitives from the VOC then, the last initialized ViewPort from + // the last ProcessDisplay() is used for geometric visibility testing. If this is not + // wanted (like in such cases) this method is used. It will reuse the current + // ViewInformation2D, but clear the ViewPort (no ViewPort means all is visible) + void resetViewPort(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_OBJECTCONTACT_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/objectcontactofobjlistpainter.hxx b/svx/inc/svx/sdr/contact/objectcontactofobjlistpainter.hxx new file mode 100644 index 000000000000..0d15458e3571 --- /dev/null +++ b/svx/inc/svx/sdr/contact/objectcontactofobjlistpainter.hxx @@ -0,0 +1,147 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: objectcontactofobjlistpainter.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX +#define _SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX + +#include <svx/sdr/contact/objectcontact.hxx> +#include "svx/svxdllapi.h" +#include <svx/svdpage.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrPage; +class SdrObject; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ObjectContactPainter : public ObjectContact + { + protected: + // Hierarchy access methods + virtual sal_uInt32 GetPaintObjectCount() const = 0; + virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const = 0; + + public: + // basic constructor/destructor + ObjectContactPainter(); + virtual ~ObjectContactPainter(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + // typedef for transferring SdrObject + typedef ::std::vector< SdrObject* > SdrObjectVector; + + class SVX_DLLPUBLIC ObjectContactOfObjListPainter : public ObjectContactPainter + { + protected: + // Target OutputDevice + OutputDevice& mrTargetOutputDevice; + + // Set StartPoint for next run, also given in constructor + SdrObjectVector maStartObjects; + + // the processed page which is the base e.g. for PageNumberFields + const SdrPage* mpProcessedPage; + + // Hierarchy access methods + virtual sal_uInt32 GetPaintObjectCount() const; + virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const; + + public: + // basic constructor/destructor + ObjectContactOfObjListPainter( + OutputDevice& rTargetDevice, + const SdrObjectVector& rObjects, + const SdrPage* pProcessedPage); + virtual ~ObjectContactOfObjListPainter(); + + // Process the whole displaying + virtual void ProcessDisplay(DisplayInfo& rDisplayInfo); + + // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed. + virtual OutputDevice* TryToGetOutputDevice() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ObjectContactOfPagePainter : public ObjectContactPainter + { + protected: + // the original ObjectContact this painter is working on + ObjectContact& mrOriginalObjectContact; + + // Set StartPoint for next run, also given in constructor + SdrPageWeakRef mxStartPage; + + // Hierarchy access methods + virtual sal_uInt32 GetPaintObjectCount() const; + virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const; + + public: + // basic constructor + ObjectContactOfPagePainter( + const SdrPage* pPage, + ObjectContact& rOriginalObjectContact); + virtual ~ObjectContactOfPagePainter(); + + // set another page + void SetStartPage(const SdrPage* pPage); + const SdrPage* GetStartPage() const { return mxStartPage.get(); } + + // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed. + virtual OutputDevice* TryToGetOutputDevice() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/objectcontactofpageview.hxx b/svx/inc/svx/sdr/contact/objectcontactofpageview.hxx new file mode 100644 index 000000000000..10227d557dde --- /dev/null +++ b/svx/inc/svx/sdr/contact/objectcontactofpageview.hxx @@ -0,0 +1,156 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: objectcontactofpageview.hxx,v $ + * $Revision: 1.13 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX +#define _SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX + +#include <svx/sdr/contact/objectcontact.hxx> +#include <tools/gen.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrPageWindow; +class SdrPage; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ObjectContactOfPageView : public ObjectContact, public Timer + { + protected: + // the owner of this ObjectContactOfPageView. Set from constructor and not + // to be changed in any way. + SdrPageWindow& mrPageWindow; + + // Process the whole displaying, the real version + void DoProcessDisplay(DisplayInfo& rDisplayInfo); + + public: + // access to SdrPageWindow + SdrPageWindow& GetPageWindow() const { return mrPageWindow; } + + // access to SdrPage of PageView + SdrPage* GetSdrPage() const; + + // basic constructor, used from SdrPageView. + ObjectContactOfPageView(SdrPageWindow& rPageWindow); + virtual ~ObjectContactOfPageView(); + + // LazyInvalidate request. This is used from the VOCs to mark that they + // got invalidated by an ActionCanged() call. An active view needs to remember + // this and take action on it. Default implementation directly calls back + // triggerLazyInvalidate() wich promptly handles the request + virtual void setLazyInvalidate(ViewObjectContact& rVOC); + + // call this to support evtl. preparations for repaint + virtual void PrepareProcessDisplay(); + + // From baseclass Timer, the timeout call triggered by te LazyInvalidate mechanism + virtual void Timeout(); + + // Process the whole displaying + virtual void ProcessDisplay(DisplayInfo& rDisplayInfo); + + // test if visualizing of entered groups is switched on at all + virtual bool DoVisualizeEnteredGroup() const; + + // get active group's (the entered group) ViewContact + virtual const ViewContact* getActiveViewContact() const; + + // Invalidate given rectangle at the window/output which is represented by + // this ObjectContact. + virtual void InvalidatePartOfView(const basegfx::B2DRange& rRange) const; + + // Get info if given Rectangle is visible in this view + virtual bool IsAreaVisible(const basegfx::B2DRange& rRange) const; + + // Get info about the need to visualize GluePoints. The default + // is that it is not necessary. + virtual bool AreGluePointsVisible() const; + + // check if text animation is allowed. + virtual bool IsTextAnimationAllowed() const; + + // check if graphic animation is allowed. + virtual bool IsGraphicAnimationAllowed() const; + + // check if asynchronious graphis loading is allowed. Default is sal_False. + virtual bool IsAsynchronGraphicsLoadingAllowed() const; + + // check if buffering of MasterPages is allowed. Default is sal_False. + virtual bool IsMasterPageBufferingAllowed() const; + + // print? Default is false + virtual bool isOutputToPrinter() const; + + // window? Default is true + virtual bool isOutputToWindow() const; + + // VirtualDevice? Default is false + virtual bool isOutputToVirtualDevice() const; + + // recording MetaFile? Default is false + virtual bool isOutputToRecordingMetaFile() const; + + // pdf export? Default is false + virtual bool isOutputToPDFFile() const; + + // gray display mode + virtual bool isDrawModeGray() const; + + // gray display mode + virtual bool isDrawModeBlackWhite() const; + + // high contrast display mode + virtual bool isDrawModeHighContrast() const; + + // overloaded access to SdrPageView + virtual SdrPageView* TryToGetSdrPageView() const; + + // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed. + virtual OutputDevice* TryToGetOutputDevice() const; + + /** sets all UNO controls which are associated with this ObjectContact to + design or alive mode. + */ + void SetUNOControlsDesignMode( bool _bDesignMode ) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/objectcontacttools.hxx b/svx/inc/svx/sdr/contact/objectcontacttools.hxx new file mode 100644 index 000000000000..28ef32117ff3 --- /dev/null +++ b/svx/inc/svx/sdr/contact/objectcontacttools.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: objectcontacttools.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_OBJECTCONTACTTOOLS_HXX +#define _SDR_CONTACT_OBJECTCONTACTTOOLS_HXX + +#include <drawinglayer/geometry/viewinformation2d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class OutputDevice; + +namespace drawinglayer { namespace processor2d { + class BaseProcessor2D; +}} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + // create a mating VCL-Provessor for given OutputDevice. This includes + // looking for MetaFile-recording. The returned renderer changes owner, + // deletion is duty of the caller + drawinglayer::processor2d::BaseProcessor2D* createBaseProcessor2DFromOutputDevice( + OutputDevice& rTargetOutDev, + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D); + + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_OBJECTCONTACTTOOLS_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontact.hxx b/svx/inc/svx/sdr/contact/viewcontact.hxx new file mode 100644 index 000000000000..ef1b3d6128e8 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontact.hxx @@ -0,0 +1,175 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontact.hxx,v $ + * $Revision: 1.12 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACT_HXX +#define _SDR_CONTACT_VIEWCONTACT_HXX + +#include <sal/types.h> +#include <tools/gen.hxx> +#include "svx/svxdllapi.h" +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SetOfByte; +class SdrPage; +class SdrObject; + +namespace sdr +{ + namespace contact + { + class ObjectContact; + class ViewObjectContact; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewContact + { + private: + // make ViewObjectContact a friend to exclusively allow it to use + // AddViewObjectContact/RemoveViewObjectContact + friend class ViewObjectContact; + + // List of ViewObjectContacts. This contains all VOCs which were constructed + // with this VC. Since the VOCs remember a reference to this VC, this list needs + // to be kept and is used e.g. at destructor to destroy all VOCs. + // Registering and de-registering is done in the VOC constructors/destructors. + std::vector< ViewObjectContact* > maViewObjectContactVector; + + // Primitive2DSequence of the ViewContact. This contains all necessary information + // for the graphical visualisation and needs to be supported by all VCs which + // can be visualized. + drawinglayer::primitive2d::Primitive2DSequence mxViewIndependentPrimitive2DSequence; + + // A new ViewObjectContact was created and shall be remembered. + void AddViewObjectContact(ViewObjectContact& rVOContact); + + // A ViewObjectContact was deleted and shall be forgotten. + void RemoveViewObjectContact(ViewObjectContact& rVOContact); + + // internal tooling to delete VOCs + void deleteAllVOCs(); + + protected: + // Interface to allow derivates to travel over the registered VOC's + sal_uInt32 getViewObjectContactCount() const { return maViewObjectContactVector.size(); } + ViewObjectContact* getViewObjectContact(sal_uInt32 a) const { return maViewObjectContactVector[a]; } + + // Create a Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. Default is to create + // a standard ViewObjectContact containing the given ObjectContact and *this + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + // This method is responsible for creating the graphical visualisation data derived ONLY from + // the model data. It will be stored/buffered in mxViewIndependentPrimitive2DSequence. The default implementation + // creates a yellow replacement rectangle (1000, 1000, 5000, 3000) to visualize missing + // implementations. All implementations have to provide basic geometry here, this is the central + // visualisation method and will also be used for BoundRect computations in the long run. + // This means it's always an error when the default implementation is called and thus gets + // asserted there + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + // method for flushing View Independent Primitive2DSequence for VOC implementations + void flushViewIndependentPrimitive2DSequence() { mxViewIndependentPrimitive2DSequence.realloc(0); } + + // basic constructor. Since this is a base class only, it shall + // never be called directly + ViewContact(); + + // Methods to react on start getting viewed or stop getting + // viewed. This info is derived from the count of members of + // registered ViewObjectContacts. Default does nothing. + virtual void StartGettingViewed(); + virtual void StopGettingViewed(); + + public: + // basic destructor with needed cleanups + virtual ~ViewContact(); + + // get a Object-specific ViewObjectContact for a specific + // ObjectContact (->View). Always needs to return something. + ViewObjectContact& GetViewObjectContact(ObjectContact& rObjectContact); + + // Test if this ViewContact has ViewObjectContacts at all. This can + // be used to test if this ViewContact is visualized ATM or not + bool HasViewObjectContacts(bool bExcludePreviews = false) const; + + // Check if this primitive is animated in any OC (View) which means it has + // generated a PrimitiveAnimation in it's VOC + bool isAnimatedInAnyViewObjectContact() const; + + // Access to possible sub-hierarchy and parent. GetObjectCount() default is 0L + // and GetViewContact default pops up an assert since it's an error if + // GetObjectCount has a result != 0 and it's not overloaded. + virtual sal_uInt32 GetObjectCount() const; + virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const; + virtual ViewContact* GetParentContact() const; + + // React on insertion of a child into DRawHierarchy starting + // from this object + void ActionChildInserted(ViewContact& rChild); + + // React on changes of the object of this ViewContact + virtual void ActionChanged(); + + // access to SdrObject and/or SdrPage. May return 0L like the default + // implementations do. Needs to be overloaded as needed. + virtual SdrObject* TryToGetSdrObject() const; + virtual SdrPage* TryToGetSdrPage() const; + + // access to the local primitive. This will ensure that the primitive is + // current in comparing the local one with a fresh created incarnation + drawinglayer::primitive2d::Primitive2DSequence getViewIndependentPrimitive2DSequence() const; + + // add Gluepoints (if available) + virtual drawinglayer::primitive2d::Primitive2DSequence createGluePointPrimitive2DSequence() const; + + // delete all existing VOCs including DrawHierarchy which will invalidate all + // visualisations, too. Used mostly at object removal from DrawHierarchy to + // delete all existing VOCs by purpose, but can also be used for other purposes. + // It is always possible to delete the VOCs, these are re-created on demand + void flushViewObjectContacts(bool bWithHierarchy = true); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACT_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofe3d.hxx b/svx/inc/svx/sdr/contact/viewcontactofe3d.hxx new file mode 100644 index 000000000000..831a359d9c9f --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofe3d.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofe3d.hxx,v $ + * + * $Revision: 1.2.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3D_HXX +#define _SDR_CONTACT_VIEWCONTACTOFE3D_HXX + +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> +#include <drawinglayer/primitive3d/baseprimitive3d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +namespace sdr { namespace contact { + class ViewContactOfE3dScene; +}} + +namespace drawinglayer { namespace attribute { + class SdrLineAttribute; +}} + +namespace basegfx { + class BColor; + class B3DHomMatrix; +} + +class E3dObject; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3d : public ViewContactOfSdrObj + { + protected: + // Create a Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + public: + // basic constructor, used from E3dObject. + ViewContactOfE3d(E3dObject& rObj); + virtual ~ViewContactOfE3d(); + + // access to E3dObject + E3dObject& GetE3dObject() const + { + return (E3dObject&)GetSdrObject(); + } + + // public helpers + drawinglayer::primitive2d::Primitive2DSequence impCreateWithGivenPrimitive3DSequence( + const drawinglayer::primitive3d::Primitive3DSequence& rxContent3D) const; + + ////////////////////////////////////////////////////////////////////////////// + // primitive stuff + + protected: + // Primitive3DSequence of the ViewContact. This contains all necessary information + // for the graphical visualisation and needs to be supported by all 3D VCs which + // can be visualized. It does NOT contain the object transformation to be able to + // buffer for all possible usages + drawinglayer::primitive3d::Primitive3DSequence mxViewIndependentPrimitive3DSequence; + + // This method is responsible for creating the graphical visualisation data which is + // stored in mxViewIndependentPrimitive3DSequence, but without object transformation + virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const = 0; + + // This method is responsible for creating the graphical visualisation data derived ONLY from + // the model data. The default implementation will try to create a 3D to 2D embedding (will work + // when scene is known) which can then be used for 2D processing concerning ranges + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + // helper to enable test-visualisation of invisible 3D obects + drawinglayer::attribute::SdrLineAttribute* impCreateFallbackLineAttribute(const basegfx::BColor& rBColor) const; + + public: + // access to the local primitive without the object's local 3D transform. This is e.g. needed + // to get the not-yet transformed BoundVolume for e.g. interactions + drawinglayer::primitive3d::Primitive3DSequence getVIP3DSWithoutObjectTransform() const; + + // access to the local primitive. This will ensure that the list is + // current in comparing the local list content with a fresh created incarnation. It will + // use getVIP3DSWithoutObjectTransform and embed to 3d transform primitive when object's + // local 3d transform is used + drawinglayer::primitive3d::Primitive3DSequence getViewIndependentPrimitive3DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFE3D_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofe3dcube.hxx b/svx/inc/svx/sdr/contact/viewcontactofe3dcube.hxx new file mode 100644 index 000000000000..96ea1169d865 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofe3dcube.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofe3dcube.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DCUBE_HXX +#define _SDR_CONTACT_VIEWCONTACTOFE3DCUBE_HXX + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3D_HXX +#include <svx/sdr/contact/viewcontactofe3d.hxx> +#endif + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class E3dCubeObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3dCube : public ViewContactOfE3d + { + public: + // basic constructor, used from SdrObject. + ViewContactOfE3dCube(E3dCubeObj& rCubeObj); + virtual ~ViewContactOfE3dCube(); + + // access to SdrObject + E3dCubeObj& GetE3dCubeObj() const + { + return (E3dCubeObj&)GetE3dObject(); + } + + protected: + // This method is responsible for creating the graphical visualisation data which is + // stored in the local primitive list. Default creates a yellow replacement rectangle. + virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFE3DCUBE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofe3dextrude.hxx b/svx/inc/svx/sdr/contact/viewcontactofe3dextrude.hxx new file mode 100644 index 000000000000..83658c291613 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofe3dextrude.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofe3dextrude.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DEXTRUDE_HXX +#define _SDR_CONTACT_VIEWCONTACTOFE3DEXTRUDE_HXX + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3D_HXX +#include <svx/sdr/contact/viewcontactofe3d.hxx> +#endif + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class E3dExtrudeObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3dExtrude : public ViewContactOfE3d + { + public: + // basic constructor, used from SdrObject. + ViewContactOfE3dExtrude(E3dExtrudeObj& rExtrude); + virtual ~ViewContactOfE3dExtrude(); + + // access to SdrObject + E3dExtrudeObj& GetE3dExtrudeObj() const + { + return (E3dExtrudeObj&)GetE3dObject(); + } + + protected: + // This method is responsible for creating the graphical visualisation data which is + // stored in the local primitive list. Default creates a yellow replacement rectangle. + virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFE3DEXTRUDE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofe3dlathe.hxx b/svx/inc/svx/sdr/contact/viewcontactofe3dlathe.hxx new file mode 100644 index 000000000000..7c84bb2299d9 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofe3dlathe.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofe3dlathe.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DLATHE_HXX +#define _SDR_CONTACT_VIEWCONTACTOFE3DLATHE_HXX + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3D_HXX +#include <svx/sdr/contact/viewcontactofe3d.hxx> +#endif + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class E3dLatheObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3dLathe : public ViewContactOfE3d + { + public: + // basic constructor, used from SdrObject. + ViewContactOfE3dLathe(E3dLatheObj& rLathe); + virtual ~ViewContactOfE3dLathe(); + + // access to SdrObject + E3dLatheObj& GetE3dLatheObj() const + { + return (E3dLatheObj&)GetE3dObject(); + } + + protected: + // This method is responsible for creating the graphical visualisation data which is + // stored in the local primitive list. Default creates a yellow replacement rectangle. + virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFE3DLATHE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofe3dpolygon.hxx b/svx/inc/svx/sdr/contact/viewcontactofe3dpolygon.hxx new file mode 100644 index 000000000000..6834697ca678 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofe3dpolygon.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofe3dpolygon.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DPOLYGON_HXX +#define _SDR_CONTACT_VIEWCONTACTOFE3DPOLYGON_HXX + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3D_HXX +#include <svx/sdr/contact/viewcontactofe3d.hxx> +#endif + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class E3dPolygonObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3dPolygon : public ViewContactOfE3d + { + public: + // basic constructor, used from SdrObject. + ViewContactOfE3dPolygon(E3dPolygonObj& rPolygon); + virtual ~ViewContactOfE3dPolygon(); + + // access to SdrObject + E3dPolygonObj& GetE3dPolygonObj() const + { + return (E3dPolygonObj&)GetE3dObject(); + } + + protected: + // This method is responsible for creating the graphical visualisation data which is + // stored in the local primitive list. Default creates a yellow replacement rectangle. + virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFE3DPOLYGON_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofe3dscene.hxx b/svx/inc/svx/sdr/contact/viewcontactofe3dscene.hxx new file mode 100644 index 000000000000..415526b07d77 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofe3dscene.hxx @@ -0,0 +1,132 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofe3dscene.hxx,v $ + * $Revision: 1.5.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX +#define _SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX + +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> +#include <drawinglayer/primitive3d/baseprimitive3d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class E3dScene; + +namespace drawinglayer { + namespace geometry { + class ViewInformation3D; + } + namespace attribute { + class SdrSceneAttribute; + class SdrLightingAttribute; + } +} + +namespace basegfx { + class B3DRange; +} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewContactOfE3dScene : public ViewContactOfSdrObj + { + protected: + // Create a Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. Default is to create + // a standard ViewObjectContact containing the given ObjectContact and *this + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + public: + // basic constructor, used from SdrObject. + ViewContactOfE3dScene(E3dScene& rScene); + virtual ~ViewContactOfE3dScene(); + + // access to SdrObject + E3dScene& GetE3dScene() const + { + return (E3dScene&)GetSdrObject(); + } + + // React on changes of the object of this ViewContact + virtual void ActionChanged(); + + // access to ViewInformation3D and ObjectTransformation + const drawinglayer::geometry::ViewInformation3D& getViewInformation3D(const ::basegfx::B3DRange& rContentRange) const; + const drawinglayer::geometry::ViewInformation3D& getViewInformation3D() const; + const basegfx::B2DHomMatrix& getObjectTransformation() const; + + // attribute providers + const drawinglayer::attribute::SdrSceneAttribute& getSdrSceneAttribute() const; + const drawinglayer::attribute::SdrLightingAttribute& getSdrLightingAttribute() const; + + // scene primitive creators. If pLayerVisibility is given, a visibility test with the LayerID and the + // given SetOfByte is done. + drawinglayer::primitive2d::Primitive2DSequence createScenePrimitive2DSequence(const SetOfByte* pLayerVisibility) const; + + // helpers to get the sequence of all contained 3D primitives and it's range, + // regardless of layer or visibility constraints and using a neutral ViewInformation3D + drawinglayer::primitive3d::Primitive3DSequence getAllPrimitive3DSequence() const; + basegfx::B3DRange getAllContentRange3D() const; + + protected: + // the 3d transformation stack + drawinglayer::geometry::ViewInformation3D* mpViewInformation3D; + + // the object transformation + basegfx::B2DHomMatrix* mpObjectTransformation; + + // attributes + drawinglayer::attribute::SdrSceneAttribute* mpSdrSceneAttribute; + drawinglayer::attribute::SdrLightingAttribute* mpSdrLightingAttribute; + + // create methods for ViewInformation3D and ObjectTransformation + void createViewInformation3D(const ::basegfx::B3DRange& rContentRange); + void createObjectTransformation(); + + // attribute creators + void createSdrSceneAttribute(); + void createSdrLightingAttribute(); + + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofe3dsphere.hxx b/svx/inc/svx/sdr/contact/viewcontactofe3dsphere.hxx new file mode 100644 index 000000000000..1f91097eebde --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofe3dsphere.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofe3dsphere.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3DSPHERE_HXX +#define _SDR_CONTACT_VIEWCONTACTOFE3DSPHERE_HXX + +#ifndef _SDR_CONTACT_VIEWCONTACTOFE3D_HXX +#include <svx/sdr/contact/viewcontactofe3d.hxx> +#endif + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class E3dSphereObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3dSphere : public ViewContactOfE3d + { + public: + // basic constructor, used from SdrObject. + ViewContactOfE3dSphere(E3dSphereObj& rSphere); + virtual ~ViewContactOfE3dSphere(); + + // access to SdrObject + E3dSphereObj& GetE3dSphereObj() const + { + return (E3dSphereObj&)GetE3dObject(); + } + + protected: + // This method is responsible for creating the graphical visualisation data which is + // stored in the local primitive list. Default creates a yellow replacement rectangle. + virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFE3DSPHERE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofgraphic.hxx b/svx/inc/svx/sdr/contact/viewcontactofgraphic.hxx new file mode 100644 index 000000000000..136f43aed0aa --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofgraphic.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofgraphic.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFGRAPHIC_HXX +#define _SDR_CONTACT_VIEWCONTACTOFGRAPHIC_HXX + +#include <sal/types.h> +#include <svx/sdr/contact/viewcontactoftextobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrGrafObj; +namespace drawinglayer { namespace attribute { class SdrLineFillShadowTextAttribute; }} +class GraphicAttr; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfGraphic : public ViewContactOfTextObj + { + private: + // helpers for constructing various primitive visualisations in various states + drawinglayer::primitive2d::Primitive2DSequence createVIP2DSForPresObj( + const basegfx::B2DHomMatrix& rObjectMatrix, + const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute, + const GraphicAttr& rLocalGrafInfo) const; + drawinglayer::primitive2d::Primitive2DSequence createVIP2DSForDraft( + const basegfx::B2DHomMatrix& rObjectMatrix, + const drawinglayer::attribute::SdrLineFillShadowTextAttribute& rAttribute) const; + + protected: + // Create a Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + public: + // access to SdrObject + SdrGrafObj& GetGrafObject() const + { + return ((SdrGrafObj&)GetSdrObject()); + } + + // basic constructor, destructor + ViewContactOfGraphic(SdrGrafObj& rGrafObj); + virtual ~ViewContactOfGraphic(); + + // #i102380# + void flushGraphicObjects(); + + // helpers for viusualisation state + bool visualisationUsesPresObj() const; + bool visualisationUsesDraft() const; + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFGRAPHIC_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofgroup.hxx b/svx/inc/svx/sdr/contact/viewcontactofgroup.hxx new file mode 100644 index 000000000000..3304158d4355 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofgroup.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofgroup.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFGROUP_HXX +#define _SDR_CONTACT_VIEWCONTACTOFGROUP_HXX + +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrObjGroup; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfGroup : public ViewContactOfSdrObj + { + protected: + // Create a Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. Default is to create + // a standard ViewObjectContact containing the given ObjectContact and *this + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + // internal access to SdrObject + SdrObjGroup& GetSdrObjGroup() const + { + return (SdrObjGroup&)GetSdrObject(); + } + + public: + // basic constructor, used from SdrObject. + ViewContactOfGroup(SdrObjGroup& rGroup); + virtual ~ViewContactOfGroup(); + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFGROUP_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofmasterpagedescriptor.hxx b/svx/inc/svx/sdr/contact/viewcontactofmasterpagedescriptor.hxx new file mode 100644 index 000000000000..e86cbcbc3da1 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofmasterpagedescriptor.hxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofmasterpagedescriptor.hxx,v $ + * $Revision: 1.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFMASTERPAGEDESCRIPTOR_HXX +#define _SDR_CONTACT_VIEWCONTACTOFMASTERPAGEDESCRIPTOR_HXX + +#include <sal/types.h> +#include <svx/sdr/contact/viewcontact.hxx> +#include <svx/sdrmasterpagedescriptor.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations +class SfxItemSet; +class Bitmap; +class MapMode; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfMasterPageDescriptor : public ViewContact + { + protected: + // the owner of this ViewContact. Set from constructor and not + // to be changed in any way. + sdr::MasterPageDescriptor& mrMasterPageDescriptor; + + // Create a Object-Specific ViewObjectContact + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + // This method is responsible for creating the graphical visualisation data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + public: + // basic constructor + ViewContactOfMasterPageDescriptor(sdr::MasterPageDescriptor& rDescriptor); + + // The destructor. + virtual ~ViewContactOfMasterPageDescriptor(); + + // access to MasterPageDescriptor + sdr::MasterPageDescriptor& GetMasterPageDescriptor() const + { + return mrMasterPageDescriptor; + } + + // Access to possible sub-hierarchy and parent + virtual sal_uInt32 GetObjectCount() const; + virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const; + virtual ViewContact* GetParentContact() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFMASTERPAGEDESCRIPTOR_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofpageobj.hxx b/svx/inc/svx/sdr/contact/viewcontactofpageobj.hxx new file mode 100644 index 000000000000..ceae7fbc5af8 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofpageobj.hxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofpageobj.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFPAGEOBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFPAGEOBJ_HXX + +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrPageObj; +class SdrPage; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewContactOfPageObj : public ViewContactOfSdrObj + { + protected: + // Create a Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + // create graphical visualisation data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + // Access to referenced page + const SdrPage* GetReferencedPage() const; + + public: + // basic constructor, used from SdrObject. + ViewContactOfPageObj(SdrPageObj& rPageObj); + virtual ~ViewContactOfPageObj(); + + // #WIP# React on changes of the object of this ViewContact + virtual void ActionChanged(); + + // access to SdrObject + SdrPageObj& GetPageObj() const + { + return (SdrPageObj&)GetSdrObject(); + } + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFPAGEOBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrcaptionobj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrcaptionobj.hxx new file mode 100644 index 000000000000..df1e48f5598a --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrcaptionobj.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdrcaptionobj.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRCAPTIONOBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDRCAPTIONOBJ_HXX + +#include <svx/sdr/contact/viewcontactofsdrrectobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrCaptionObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrCaptionObj : public ViewContactOfSdrRectObj + { + protected: + // internal access to SdrCaptionObj + SdrCaptionObj& GetCaptionObj() const + { + return (SdrCaptionObj&)GetSdrObject(); + } + + public: + // basic constructor, used from SdrObject. + ViewContactOfSdrCaptionObj(SdrCaptionObj& rCaptionObj); + virtual ~ViewContactOfSdrCaptionObj(); + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDRCAPTIONOBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrcircobj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrcircobj.hxx new file mode 100644 index 000000000000..932431928c70 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrcircobj.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdrcircobj.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRCIRCOBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDRCIRCOBJ_HXX + +#include <svx/sdr/contact/viewcontactofsdrrectobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrCircObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrCircObj : public ViewContactOfSdrRectObj + { + protected: + // internal access to SdrCircObj + SdrCircObj& GetCircObj() const + { + return (SdrCircObj&)GetSdrObject(); + } + + public: + // basic constructor, used from SdrObject. + ViewContactOfSdrCircObj(SdrCircObj& rCircObj); + virtual ~ViewContactOfSdrCircObj(); + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDRCIRCOBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdredgeobj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdredgeobj.hxx new file mode 100644 index 000000000000..f1241cba3c71 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdredgeobj.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdredgeobj.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDREDGEOBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDREDGEOBJ_HXX + +#include <svx/sdr/contact/viewcontactoftextobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrEdgeObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrEdgeObj : public ViewContactOfTextObj + { + protected: + // internal access to SdrEdgeObj + SdrEdgeObj& GetEdgeObj() const + { + return (SdrEdgeObj&)GetSdrObject(); + } + + public: + // basic constructor, used from SdrObject. + ViewContactOfSdrEdgeObj(SdrEdgeObj& rEdgeObj); + virtual ~ViewContactOfSdrEdgeObj(); + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDREDGEOBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrmeasureobj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrmeasureobj.hxx new file mode 100644 index 000000000000..1b8b978af6c3 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrmeasureobj.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdrmeasureobj.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRMEASUREOBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDRMEASUREOBJ_HXX + +#include <svx/sdr/contact/viewcontactoftextobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrMeasureObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrMeasureObj : public ViewContactOfTextObj + { + protected: + // internal access to SdrMeasureObj + SdrMeasureObj& GetMeasureObj() const + { + return (SdrMeasureObj&)GetSdrObject(); + } + + public: + // basic constructor, used from SdrObject. + ViewContactOfSdrMeasureObj(SdrMeasureObj& rMeasureObj); + virtual ~ViewContactOfSdrMeasureObj(); + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDRMEASUREOBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrmediaobj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrmediaobj.hxx new file mode 100644 index 000000000000..1bb38972b779 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrmediaobj.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdrmediaobj.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRMEDIAOBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDRMEDIAOBJ_HXX + +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrMediaObj; +namespace avmedia { class MediaItem; } + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewContactOfSdrMediaObj : public ViewContactOfSdrObj + { + friend class ViewObjectContactOfSdrMediaObj; + + public: + + // basic constructor, used from SdrObject. + ViewContactOfSdrMediaObj( SdrMediaObj& rMediaObj ); + virtual ~ViewContactOfSdrMediaObj(); + + public: + + // access to SdrMediaObj + SdrMediaObj& GetSdrMediaObj() const + { + return (SdrMediaObj&)GetSdrObject(); + } + + bool hasPreferredSize() const; + Size getPreferredSize() const; + + void updateMediaItem( ::avmedia::MediaItem& rItem ) const; + void executeMediaItem( const ::avmedia::MediaItem& rItem ); + + protected: + + // Create a Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + // get notified if some properties have changed + virtual void mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState ); + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDRMEDIAOBJ_HXX diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrobj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrobj.hxx new file mode 100644 index 000000000000..7db0d450e9d6 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrobj.hxx @@ -0,0 +1,102 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdrobj.hxx,v $ + * $Revision: 1.12 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX + +#include <sal/types.h> +#include <svx/sdr/contact/viewcontact.hxx> +#include <svx/sdtakitm.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrObject; +class GeoStat; +class Bitmap; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewContactOfSdrObj : public ViewContact + { + protected: + // the owner of this ViewContact. Set from constructor and not + // to be changed in any way. + SdrObject& mrObject; + + // Remember AnimationKind of object. Used to find out if that kind + // has changed in ActionChanged() + SdrTextAniKind meRememberedAnimationKind; + + // Create a Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + public: + // access to SdrObject + SdrObject& GetSdrObject() const + { + return mrObject; + } + + // basic constructor, used from SdrObject. + ViewContactOfSdrObj(SdrObject& rObj); + virtual ~ViewContactOfSdrObj(); + + // Access to possible sub-hierarchy + virtual sal_uInt32 GetObjectCount() const; + virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const; + virtual ViewContact* GetParentContact() const; + + // React on changes of the object of this ViewContact + virtual void ActionChanged(); + + // overload for acessing the SdrObject + virtual SdrObject* TryToGetSdrObject() const; + + ////////////////////////////////////////////////////////////////////////////// + // primitive stuff + + // add Gluepoints (if available) + virtual drawinglayer::primitive2d::Primitive2DSequence createGluePointPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx new file mode 100644 index 000000000000..f1b515e8a198 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdrobjcustomshape.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDROBJCUSTOMSHAPE_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDROBJCUSTOMSHAPE_HXX + +#include <svx/sdr/contact/viewcontactoftextobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrObjCustomShape; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrObjCustomShape : public ViewContactOfTextObj + { + protected: + // internal access to SdrObjCustomShape + SdrObjCustomShape& GetCustomShapeObj() const + { + return (SdrObjCustomShape&)GetSdrObject(); + } + + // #i101684# internal tooling + basegfx::B2DRange getCorrectedTextBoundRect() const; + + public: + // basic constructor, used from SdrObject. + ViewContactOfSdrObjCustomShape(SdrObjCustomShape& rCustomShape); + virtual ~ViewContactOfSdrObjCustomShape(); + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDROBJCUSTOMSHAPE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx new file mode 100644 index 000000000000..27235de9e097 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx @@ -0,0 +1,85 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdrole2obj.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX + +#include <svx/sdr/contact/viewcontactofsdrrectobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrOle2Obj; +class Graphic; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrOle2Obj : public ViewContactOfSdrRectObj + { + protected: + // Create a Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + public: + // access to SdrOle2Obj + SdrOle2Obj& GetOle2Obj() const + { + return (SdrOle2Obj&)GetSdrObject(); + } + + // basic constructor, used from SdrObject. + ViewContactOfSdrOle2Obj(SdrOle2Obj& rOle2Obj); + virtual ~ViewContactOfSdrOle2Obj(); + + // helper for creating a OLE sequence for this object. It takes care od attributes, needed + // scaling (e.g. for EmptyPresObj's), the correct graphic and other stuff. It is used from + // createViewIndependentPrimitive2DSequence with false, and with evtl. HighContrast true + // from the VOC which knows that + drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceWithParameters(bool bHighContrast) const; + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data, just wraps to call createPrimitive2DSequenceWithParameters(false) + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrpage.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrpage.hxx new file mode 100644 index 000000000000..833e23384af2 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrpage.hxx @@ -0,0 +1,314 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdrpage.hxx,v $ + * $Revision: 1.10 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX + +#include <sal/types.h> +#include <svx/sdr/contact/viewcontact.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations +class SdrPage; + +namespace sdr { namespace contact { + class ViewContactOfSdrPage; +}} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfPageSubObject : public ViewContact + { + protected: + ViewContactOfSdrPage& mrParentViewContactOfSdrPage; + + public: + ViewContactOfPageSubObject(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfPageSubObject(); + + virtual ViewContact* GetParentContact() const; + const SdrPage& getPage() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfPageBackground : public ViewContactOfPageSubObject + { + protected: + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + public: + ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfPageBackground(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfPageShadow : public ViewContactOfPageSubObject + { + protected: + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + public: + ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfPageShadow(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfPageFill : public ViewContactOfPageSubObject + { + protected: + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + public: + ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfPageFill(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfMasterPage : public ViewContactOfPageSubObject + { + protected: + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + public: + ViewContactOfMasterPage(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfMasterPage(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfOuterPageBorder : public ViewContactOfPageSubObject + { + protected: + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + public: + ViewContactOfOuterPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfOuterPageBorder(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfInnerPageBorder : public ViewContactOfPageSubObject + { + protected: + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + public: + ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfInnerPageBorder(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfPageHierarchy : public ViewContactOfPageSubObject + { + protected: + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + public: + ViewContactOfPageHierarchy(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfPageHierarchy(); + + virtual sal_uInt32 GetObjectCount() const; + virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfGrid : public ViewContactOfPageSubObject + { + protected: + // bitfield + unsigned mbFront : 1; + + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + public: + ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront); + virtual ~ViewContactOfGrid(); + + bool getFront() const { return mbFront; } + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfHelplines : public ViewContactOfPageSubObject + { + protected: + // bitfield + unsigned mbFront : 1; + + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + + public: + ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront); + virtual ~ViewContactOfHelplines(); + + bool getFront() const { return mbFront; } + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrPage : public ViewContact + { + protected: + // the owner of this ViewContact. Set from constructor and not + // to be changed in any way. + SdrPage& mrPage; + + // helper viewContacts to build a clear paint hierarchy + ViewContactOfPageBackground maViewContactOfPageBackground; + ViewContactOfPageShadow maViewContactOfPageShadow; + ViewContactOfPageFill maViewContactOfPageFill; + ViewContactOfMasterPage maViewContactOfMasterPage; + ViewContactOfOuterPageBorder maViewContactOfOuterPageBorder; + ViewContactOfInnerPageBorder maViewContactOfInnerPageBorder; + ViewContactOfGrid maViewContactOfGridBack; + ViewContactOfHelplines maViewContactOfHelplinesBack; + ViewContactOfPageHierarchy maViewContactOfPageHierarchy; + ViewContactOfGrid maViewContactOfGridFront; + ViewContactOfHelplines maViewContactOfHelplinesFront; + + // Create a Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. Default is to create + // a standard ViewObjectContact containing the given ObjectContact and *this + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); + + public: + // access to SdrObject + SdrPage& GetSdrPage() const + { + return mrPage; + } + + // basic constructor, used from SdrPage. + ViewContactOfSdrPage(SdrPage& rObj); + virtual ~ViewContactOfSdrPage(); + + // Access to possible sub-hierarchy + virtual sal_uInt32 GetObjectCount() const; + virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const; + + // React on changes of the object of this ViewContact + virtual void ActionChanged(); + + // overload for acessing the SdrPage + virtual SdrPage* TryToGetSdrPage() const; + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrpathobj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrpathobj.hxx new file mode 100644 index 000000000000..6bb4671492d6 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrpathobj.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdrpathobj.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRPATHOBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDRPATHOBJ_HXX + +#include <svx/sdr/contact/viewcontactoftextobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrPathObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrPathObj : public ViewContactOfTextObj + { + protected: + // internal access to SdrPathObj + SdrPathObj& GetPathObj() const + { + return (SdrPathObj&)GetSdrObject(); + } + + public: + // basic constructor, used from SdrObject. + ViewContactOfSdrPathObj(SdrPathObj& rTextObj); + virtual ~ViewContactOfSdrPathObj(); + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDRPATHOBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrrectobj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrrectobj.hxx new file mode 100644 index 000000000000..850a5b6fce22 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrrectobj.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofsdrrectobj.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFSDRRECTOBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFSDRRECTOBJ_HXX + +#include <svx/sdr/contact/viewcontactoftextobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrRectObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrRectObj : public ViewContactOfTextObj + { + protected: + // internal access to SdrRectObj + SdrRectObj& GetRectObj() const + { + return (SdrRectObj&)GetSdrObject(); + } + + public: + // basic constructor, used from SdrObject. + ViewContactOfSdrRectObj(SdrRectObj& rTextObj); + virtual ~ViewContactOfSdrRectObj(); + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFSDRRECTOBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactoftextobj.hxx b/svx/inc/svx/sdr/contact/viewcontactoftextobj.hxx new file mode 100644 index 000000000000..1b158ade9538 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactoftextobj.hxx @@ -0,0 +1,68 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactoftextobj.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFTEXTOBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFTEXTOBJ_HXX + +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrTextObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewContactOfTextObj : public ViewContactOfSdrObj + { + protected: + // internal access to SdrTextObj + SdrTextObj& GetTextObj() const + { + return (SdrTextObj&)GetSdrObject(); + } + + public: + // basic constructor, used from SdrObject. + ViewContactOfTextObj(SdrTextObj& rTextObj); + virtual ~ViewContactOfTextObj(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFTEXTOBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewcontactofunocontrol.hxx new file mode 100644 index 000000000000..06efd4eb787b --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofunocontrol.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofunocontrol.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX +#define SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX + +/** === begin UNO includes === **/ +#include <com/sun/star/uno/Reference.hxx> +/** === end UNO includes === **/ +#include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx> +#include <svx/svxdllapi.h> + +#include <memory> + +class OutputDevice; +class Window; +class SdrUnoObj; +namespace com { namespace sun { namespace star { + namespace awt { + class XControl; + class XControlContainer; + } +} } } + +//........................................................................ +namespace sdr { namespace contact { +//........................................................................ + + //==================================================================== + //= ViewContactOfUnoControl + //==================================================================== + class ViewContactOfUnoControl_Impl; + class SVX_DLLPRIVATE ViewContactOfUnoControl : public ViewContactOfSdrObj + { + private: + ::std::auto_ptr< ViewContactOfUnoControl_Impl > m_pImpl; + + public: + // access to SdrObject + SdrUnoObj& GetSdrUnoObj() const + { + return ((SdrUnoObj&)GetSdrObject()); + } + + ViewContactOfUnoControl( SdrUnoObj& _rUnoObject ); + virtual ~ViewContactOfUnoControl(); + + /** access control to selected members + */ + struct SdrUnoObjAccessControl { friend class ::SdrUnoObj; private: SdrUnoObjAccessControl() { } }; + + /** retrieves a temporary XControl instance, whose parent is the given window + @seealso SdrUnoObj::GetTemporaryControlForWindow + */ + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > + getTemporaryControlForWindow( const Window& _rWindow, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _inout_ControlContainer ) const; + + protected: + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact( ObjectContact& _rObjectContact ); + + private: + ViewContactOfUnoControl(); // never implemented + ViewContactOfUnoControl( const ViewContactOfUnoControl& ); // never implemented + ViewContactOfUnoControl& operator=( const ViewContactOfUnoControl& ); // never implemented + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + +//........................................................................ +} } // namespace sdr::contact +//........................................................................ + +#endif // SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX +// eof diff --git a/svx/inc/svx/sdr/contact/viewcontactofvirtobj.hxx b/svx/inc/svx/sdr/contact/viewcontactofvirtobj.hxx new file mode 100644 index 000000000000..5373a6bc7c0b --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewcontactofvirtobj.hxx @@ -0,0 +1,73 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewcontactofvirtobj.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX +#define _SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX + +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations +class SdrVirtObj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewContactOfVirtObj : public ViewContactOfSdrObj + { + protected: + // internal access to SdrObject. Iplementation in *.cxx to avoid + // including SdrVirtObj here. + SdrVirtObj& GetVirtObj() const; + + public: + // basic constructor, used from SdrObject. + ViewContactOfVirtObj(SdrVirtObj& rObj); + virtual ~ViewContactOfVirtObj(); + + // Access to possible sub-hierarchy + virtual sal_uInt32 GetObjectCount() const; + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontact.hxx b/svx/inc/svx/sdr/contact/viewobjectcontact.hxx new file mode 100644 index 000000000000..0e52c6d6285b --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontact.hxx @@ -0,0 +1,160 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontact.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACT_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACT_HXX + +#include <sal/types.h> + +#include <vector> +#include <tools/debug.hxx> +#include <tools/gen.hxx> +#include "svx/svxdllapi.h" +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class Region; + +namespace sdr { namespace contact { + class DisplayInfo; + class ObjectContact; + class ViewContact; + class ViewObjectContactRedirector; +}} + +namespace sdr { namespace animation { + class PrimitiveAnimation; +}} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContact + { + private: + // must-exist and constant contacts + ObjectContact& mrObjectContact; + ViewContact& mrViewContact; + + // This range defines the object's BoundRect + basegfx::B2DRange maObjectRange; + + // PrimitiveSequence of the ViewContact. This contains all necessary information + // for the graphical visualisation and needs to be supported by all VCs which + // can be visualized. + drawinglayer::primitive2d::Primitive2DSequence mxPrimitive2DSequence; + + // the PrimitiveAnimation if Primitive2DSequence contains animations + sdr::animation::PrimitiveAnimation* mpPrimitiveAnimation; + + // bitfield + // This bool gets set when the object gets invalidated by ActionChanged() and + // can be used from the OC to late-invalidates + unsigned mbLazyInvalidate : 1; + + protected: + // make redirector a protected friend, it needs to call createPrimitives as default action + friend class ViewObjectContactRedirector; + + // Called from getPrimitive2DSequence() when vector has changed. Evaluate object animation + // and setup accordingly + void checkForPrimitive2DAnimations(); + + // This method is responsible for creating the graphical visualisation data which is + // stored/cached in the local primitive. Default gets view-independent Primitive + // from the ViewContact using ViewContact::getViewIndependentPrimitive2DSequence(), takes care of + // visibility, handles glue and ghosted. + // This method will not handle included hierarchies and not check geometric visibility. + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + // method for flushing Primitive2DSequence for VOC implementations + void flushPrimitive2DSequence() { mxPrimitive2DSequence.realloc(0); } + + public: + // basic constructor. + ViewObjectContact(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContact(); + + // access to ObjectContact + ObjectContact& GetObjectContact() const { return mrObjectContact; } + + // access to ViewContact + ViewContact& GetViewContact() const { return mrViewContact; } + + // get the oebject's size range + const basegfx::B2DRange& getObjectRange() const; + + // A ViewObjectContact was deleted and shall be forgotten. + void RemoveViewObjectContact(ViewObjectContact& rVOContact); + + // React on changes of the object of this ViewContact + virtual void ActionChanged(); + + // LazyInvalidate handling + void triggerLazyInvalidate(); + + // Check if this primitive is animated in any OC (View) which means it has + // generated a PrimitiveAnimation + bool isAnimated() const { return (0 != mpPrimitiveAnimation); } + + // Take some action when new objects are inserted + virtual void ActionChildInserted(ViewContact& rChild); + + // access to the local primitive. This will ensure that the local primitive is + // current in comparing the local one with a fresh created incarnation + // This method will not handle included hierarchies and not check visibility. + drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + // test this VOC for visibility concerning model-view stuff like e.g. Layer + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + + // test this VOC for ghosted mode + virtual bool isPrimitiveGhosted(const DisplayInfo& rDisplayInfo) const; + + // process this primitive: Eventually also recursively travel an existing hierarchy, + // e.g. for group objects, scenes or pages. This method will test geometrical visibility. + virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const; + + // just process the sub-hierarchy, used as tooling from getPrimitive2DSequenceHierarchy + drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACT_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofe3d.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofe3d.hxx new file mode 100644 index 000000000000..2b2e01a6eb29 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofe3d.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofe3d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> +#include <drawinglayer/primitive3d/baseprimitive3d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +namespace sdr { namespace contact { + class ViewObjectContactOfE3dScene; +}} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfE3d : public ViewObjectContactOfSdrObj + { + protected: + // Primitive3D sequence of the ViewContact. This contains all necessary information + // for the graphical visualisation and needs to be supported by all VCs which + // can be visualized. + drawinglayer::primitive3d::Primitive3DSequence mxPrimitive3DSequence; + + // This method is responsible for creating the graphical visualisation data which is + // stored/cached in the local primitive. Default gets view-independent Primitive3D + // from the ViewContact using ViewContact::getViewIndependentPrimitive3DSequence(), takes care of + // visibility and ghosted. + // This method will not handle included hierarchies and not check geometric visibility. + drawinglayer::primitive3d::Primitive3DSequence createPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const; + + // also overload the 2d method to deliver a 2d object with embedd3d 3d and the 3d transformation which is able to + // answer the get2DRange question accordingly + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + public: + ViewObjectContactOfE3d(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfE3d(); + + // access to the local primitive sequence. This will ensure that the list is + // current in comparing the local list content with a fresh created incarnation + // This method will not handle included hierarchies or visibility. + drawinglayer::primitive3d::Primitive3DSequence getPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofe3dscene.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofe3dscene.hxx new file mode 100644 index 000000000000..622fc7b92c1b --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofe3dscene.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofe3dscene.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFE3DSCENE_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTOFE3DSCENE_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfE3dScene : public ViewObjectContactOfSdrObj + { + protected: + // 2d primitive creator + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + public: + // basic constructor. + ViewObjectContactOfE3dScene(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfE3dScene(); + + // process this primitive: Eventually also recursively travel an existing hierarchy, + // e.g. for group objects, scenes or pages. This method will test geometrical visibility. + virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFE3DSCENE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofgraphic.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofgraphic.hxx new file mode 100644 index 000000000000..2664278749af --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofgraphic.hxx @@ -0,0 +1,85 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofgraphic.hxx,v $ + * + * $Revision: 1.2.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations +class SdrGrafObj; + +namespace sdr { namespace event { + class AsynchGraphicLoadingEvent; +}} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfGraphic : public ViewObjectContactOfSdrObj + { + private: + // allow async loading event helper to call tooling methods + friend class sdr::event::AsynchGraphicLoadingEvent; + + // Member which takes care for the asynch loading events which may be necessary + // for asynch graphics loading. + sdr::event::AsynchGraphicLoadingEvent* mpAsynchLoadEvent; + + // async graphics loading helpers. Only to be used internally or from the + // event helper class (in .cxx file) + bool impPrepareGraphicWithAsynchroniousLoading(); + bool impPrepareGraphicWithSynchroniousLoading(); + void doAsynchGraphicLoading(); + void forgetAsynchGraphicLoadingEvent(sdr::event::AsynchGraphicLoadingEvent* pEvent); + + protected: + SdrGrafObj& getSdrGrafObj(); + + // This method is responsible for creating the graphical visualisation data + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + public: + ViewObjectContactOfGraphic(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfGraphic(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofgroup.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofgroup.hxx new file mode 100644 index 000000000000..902ce95a9fc4 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofgroup.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofgroup.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFGROUP_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTOFGROUP_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfGroup : public ViewObjectContactOfSdrObj + { + public: + // basic constructor. + ViewObjectContactOfGroup(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfGroup(); + + // test this VOC for visibility concerning model-view stuff like e.g. Layer + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + + // This method recursively paints the draw hierarchy. + virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFGROUP_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx new file mode 100644 index 000000000000..d0bc75c7c18a --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofmasterpagedescriptor.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFMASTERPAGEDESCRIPTOR_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTOFMASTERPAGEDESCRIPTOR_HXX + +#include <svx/sdr/contact/viewobjectcontact.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +namespace sdr { + class MasterPageDescriptor; +} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfMasterPageDescriptor : public ViewObjectContact + { + public: + ViewObjectContactOfMasterPageDescriptor(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfMasterPageDescriptor(); + + // access to MasterPageDescriptor + sdr::MasterPageDescriptor& GetMasterPageDescriptor() const; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofpageobj.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofpageobj.hxx new file mode 100644 index 000000000000..79e610c3bc21 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofpageobj.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofpageobj.hxx,v $ + * + * $Revision: 1.2.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFPAGEOBJ_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTOFPAGEOBJ_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +namespace sdr { namespace contact { + class PagePrimitiveExtractor; +}} + +class SdrPage; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfPageObj : public ViewObjectContactOfSdrObj + { + private: + // the page painter helper + PagePrimitiveExtractor* mpExtractor; + + protected: + // This method is responsible for creating the graphical visualisation data which is + // stored/cached in the local primitive. + // This method will not handle included hierarchies and not check geometric visibility. + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + public: + ViewObjectContactOfPageObj(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageObj(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFPAGEOBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofsdrmediaobj.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofsdrmediaobj.hxx new file mode 100644 index 000000000000..6ea75e3cfa28 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofsdrmediaobj.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofsdrmediaobj.hxx,v $ + * $Revision: 1.9.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDRMEDIAOBJ_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTOFSDRMEDIAOBJ_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> +#include <svx/sdr/contact/viewobjectcontact.hxx> + +namespace avmedia { class MediaItem; } +class Window; + +namespace sdr +{ + namespace contact + { + class SdrMediaWindow; + + class ViewObjectContactOfSdrMediaObj : public ViewObjectContactOfSdrObj + { + public: + + ViewObjectContactOfSdrMediaObj( ObjectContact& rObjectContact, + ViewContact& rViewContact, + const ::avmedia::MediaItem& rMediaItem ); + virtual ~ViewObjectContactOfSdrMediaObj(); + + public: + + Window* getWindow() const; + + bool hasPreferredSize() const; + Size getPreferredSize() const; + + void updateMediaItem( ::avmedia::MediaItem& rItem ) const; + void executeMediaItem( const ::avmedia::MediaItem& rItem ); + + private: + + ::sdr::contact::SdrMediaWindow* mpMediaWindow; + + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_CONTACT_VIEWOBJECTCONTACTOFSDRMEDIAOBJ_HXX diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofsdrobj.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofsdrobj.hxx new file mode 100644 index 000000000000..50f6723372ae --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofsdrobj.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofsdrobj.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX + +#include <svx/sdr/contact/viewobjectcontact.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations +class SdrObject; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfSdrObj : public ViewObjectContact + { + protected: + const SdrObject& getSdrObject() const; + + public: + ViewObjectContactOfSdrObj(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfSdrObj(); + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofsdrole2obj.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofsdrole2obj.hxx new file mode 100644 index 000000000000..23c667767275 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofsdrole2obj.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofsdrole2obj.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROLE2OBJ_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROLE2OBJ_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations +class SdrOle2Obj; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfSdrOle2Obj : public ViewObjectContactOfSdrObj + { + protected: + const SdrOle2Obj& getSdrOle2Object() const; + + // This method is responsible for creating the graphical visualisation data + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + public: + ViewObjectContactOfSdrOle2Obj(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfSdrOle2Obj(); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROLE2OBJ_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofsdrpage.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofsdrpage.hxx new file mode 100644 index 000000000000..6e1e9254d64a --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofsdrpage.hxx @@ -0,0 +1,250 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofsdrpage.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX + +#include <svx/sdr/contact/viewobjectcontact.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrPage; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfPageSubObject : public ViewObjectContact + { + protected: + const SdrPage& getPage() const; + + public: + ViewObjectContactOfPageSubObject(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageSubObject(); + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + virtual bool isPrimitiveGhosted(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfPageBackground : public ViewObjectContactOfPageSubObject + { + protected: + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + public: + ViewObjectContactOfPageBackground(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageBackground(); + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfMasterPage : public ViewObjectContactOfPageSubObject + { + protected: + public: + ViewObjectContactOfMasterPage(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfMasterPage(); + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfPageFill : public ViewObjectContactOfPageSubObject + { + protected: + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + public: + ViewObjectContactOfPageFill(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageFill(); + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfPageShadow : public ViewObjectContactOfPageSubObject + { + public: + ViewObjectContactOfPageShadow(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageShadow(); + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfOuterPageBorder : public ViewObjectContactOfPageSubObject + { + public: + ViewObjectContactOfOuterPageBorder(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfOuterPageBorder(); + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfInnerPageBorder : public ViewObjectContactOfPageSubObject + { + public: + ViewObjectContactOfInnerPageBorder(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfInnerPageBorder(); + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfPageHierarchy : public ViewObjectContactOfPageSubObject + { + public: + ViewObjectContactOfPageHierarchy(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageHierarchy(); + + virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfPageGrid : public ViewObjectContactOfPageSubObject + { + protected: + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + public: + ViewObjectContactOfPageGrid(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageGrid(); + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfPageHelplines : public ViewObjectContactOfPageSubObject + { + protected: + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + public: + ViewObjectContactOfPageHelplines(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageHelplines(); + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + class SVX_DLLPUBLIC ViewObjectContactOfSdrPage : public ViewObjectContact + { + public: + ViewObjectContactOfSdrPage(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfSdrPage(); + + virtual drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx new file mode 100644 index 000000000000..d5f20cc0d571 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx @@ -0,0 +1,145 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactofunocontrol.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX +#define SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> + +/** === begin UNO includes === **/ +#include <com/sun/star/uno/Reference.hxx> +/** === end UNO includes === **/ +#include <rtl/ref.hxx> +#include <svx/svxdllapi.h> + +class OutputDevice; +class Window; +class SdrUnoObj; +namespace com { namespace sun { namespace star { + namespace awt { + class XControl; + class XControlContainer; + } +} } } + +//........................................................................ +namespace sdr { namespace contact { +//........................................................................ + + class ViewContactOfUnoControl; + class ObjectContactOfPageView; + //==================================================================== + //= ViewObjectContactOfUnoControl + //==================================================================== + class ViewObjectContactOfUnoControl_Impl; + class SVX_DLLPRIVATE ViewObjectContactOfUnoControl : public ViewObjectContactOfSdrObj + { + protected: + ::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pImpl; + + public: + ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); + /// determines whether an XControl already exists, and is currently visible + bool isControlVisible() const; + + /// returns the ->XControl instance belonging to the instance, creates it if necessary + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > + getControl(); + + /** retrieves a temporary XControl instance, whose parent is the given device + @seealso SdrUnoObj::GetTemporaryControlForWindow + */ + static ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > + getTemporaryControlForWindow( + const Window& _rWindow, + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _inout_ControlContainer, + const SdrUnoObj& _rUnoObject + ); + + /// ensures that the control belonging to this instances has a given visibility + void ensureControlVisibility( bool _bVisible ) const; + + /** sets the design/alive mode of the control + */ + void setControlDesignMode( bool _bDesignMode ) const; + + /** callback from impl class to react on changes of properties form the XControlModel + */ + void propertyChange(); + + /** React on changes of the object of this ViewContact + */ + virtual void ActionChanged(); + + /** to be called when any aspect of the control which requires view updates changed + */ + struct ImplAccess { friend class ViewObjectContactOfUnoControl_Impl; friend class ViewObjectContactOfUnoControl; private: ImplAccess() { } }; + void onControlChangedOrModified( ImplAccess ) { impl_onControlChangedOrModified(); } + + protected: + ~ViewObjectContactOfUnoControl(); + + // support for Primitive2D + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const; + + // visibility check + virtual bool isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const; + /// to be called when any aspect of the control which requires view updates changed + void impl_onControlChangedOrModified(); + + private: + ViewObjectContactOfUnoControl(); // never implemented + ViewObjectContactOfUnoControl( const ViewObjectContactOfUnoControl& ); // never implemented + ViewObjectContactOfUnoControl& operator=( const ViewObjectContactOfUnoControl& ); // never implemented + }; + + //==================================================================== + //= UnoControlPrintOrPreviewContact + //==================================================================== + class SVX_DLLPRIVATE UnoControlPrintOrPreviewContact : public ViewObjectContactOfUnoControl + { + public: + UnoControlPrintOrPreviewContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); + ~UnoControlPrintOrPreviewContact(); + + private: + UnoControlPrintOrPreviewContact(); // never implemented + UnoControlPrintOrPreviewContact( const UnoControlPrintOrPreviewContact& ); // never implemented + UnoControlPrintOrPreviewContact& operator=( const UnoControlPrintOrPreviewContact& ); // never implemented + + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const; + }; + +//........................................................................ +} } // namespace sdr::contact +//........................................................................ + +#endif // SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX + diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactredirector.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactredirector.hxx new file mode 100644 index 000000000000..c5b01284ccc0 --- /dev/null +++ b/svx/inc/svx/sdr/contact/viewobjectcontactredirector.hxx @@ -0,0 +1,77 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewobjectcontactredirector.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX +#define _SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX + +#include "svx/svxdllapi.h" +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +namespace sdr { namespace contact { + class DisplayInfo; + class ViewObjectContact; +}} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace contact + { + // This class provides a mechanism to redirect the paint mechanism for all or + // single ViewObjectContacts. An own derivation may be set at single ViewContacts + // or at the ObjectContact for redirecting all. If both is used, the one at single + // objects will have priority. + class SVX_DLLPUBLIC ViewObjectContactRedirector + { + public: + // basic constructor. + ViewObjectContactRedirector(); + + // The destructor. + virtual ~ViewObjectContactRedirector(); + + // all default implementations just call the same methods at the original. To do something + // different, overload the method and at least do what the method does. + virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence( + const sdr::contact::ViewObjectContact& rOriginal, + const sdr::contact::DisplayInfo& rDisplayInfo); + }; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX + +// eof diff --git a/svx/inc/svx/sdr/event/eventhandler.hxx b/svx/inc/svx/sdr/event/eventhandler.hxx new file mode 100644 index 000000000000..0f0ac6b2b377 --- /dev/null +++ b/svx/inc/svx/sdr/event/eventhandler.hxx @@ -0,0 +1,143 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: eventhandler.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_EVENT_EVENTHANDLER_HXX +#define _SDR_EVENT_EVENTHANDLER_HXX + +#include <sal/types.h> + +#include <vector> +#include <vcl/timer.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +namespace sdr +{ + namespace event + { + class BaseEvent; + class EventHandler; + + // typedefs for a list of BaseEvents + typedef ::std::vector< BaseEvent* > BaseEventVector; + } // end of namespace event +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace event + { + class BaseEvent + { + // the EventHandler this event is registered at + EventHandler& mrEventHandler; + + public: + // basic constructor. + BaseEvent(EventHandler& rEventHandler); + + // destructor + virtual ~BaseEvent(); + + // the called method if the event is triggered + virtual void ExecuteEvent() = 0; + }; + } // end of namespace event +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace event + { + class EventHandler + { + BaseEventVector maVector; + + // to allow BaseEvents to use the add/remove functionality + friend class BaseEvent; + + // methods to add/remove events. These are private since + // they are used from BaseEvent only. + void AddEvent(BaseEvent& rBaseEvent); + void RemoveEvent(BaseEvent& rBaseEvent); + + // access to a event, 0L when no more events + BaseEvent* GetEvent(); + + public: + // basic constructor. + EventHandler(); + + // destructor + virtual ~EventHandler(); + + // Trigger and consume the events + virtual void ExecuteEvents(); + + // for control + sal_Bool IsEmpty() const; + }; + } // end of namespace event +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace event + { + class TimerEventHandler : public EventHandler, public Timer + { + public: + // basic constructor. + TimerEventHandler(sal_uInt32 nTimeout = 1L); + + // destructor + virtual ~TimerEventHandler(); + + // The timer when it is triggered; from class Timer + virtual void Timeout(); + + // reset the timer + void Restart(); + }; + } // end of namespace event +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_EVENT_EVENTHANDLER_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx b/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx new file mode 100644 index 000000000000..23a720467710 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayanimatedbitmapex.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYANIMATEDBITMAPEX_HXX +#define _SDR_OVERLAY_OVERLAYANIMATEDBITMAPEX_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <vcl/bitmapex.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class SVX_DLLPUBLIC OverlayAnimatedBitmapEx : public OverlayObjectWithBasePosition + { + protected: + // the Bitmaps + BitmapEx maBitmapEx1; + BitmapEx maBitmapEx2; + + // position of the basePosition inside the Bitmaps, in pixels + sal_uInt16 mnCenterX1; + sal_uInt16 mnCenterY1; + sal_uInt16 mnCenterX2; + sal_uInt16 mnCenterY2; + + // #i53216# added CursorBlinkTime (in ms) + sal_uInt32 mnBlinkTime; + + // bitfield + // Flag to remember which state to draw. Inited with sal_False (0) + unsigned mbOverlayState : 1; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + // #i53216# check blink time value range (currently 25 < mnBlinkTime < 10000) + void impCheckBlinkTimeValueRange(); + + public: + OverlayAnimatedBitmapEx( + const basegfx::B2DPoint& rBasePos, + const BitmapEx& rBitmapEx1, + const BitmapEx& rBitmapEx2, + sal_uInt32 nBlinkTime = 500, + sal_uInt16 nCenX1 = 0, + sal_uInt16 nCenY1 = 0, + sal_uInt16 nCenX2 = 0, + sal_uInt16 nCenY2 = 0); + virtual ~OverlayAnimatedBitmapEx(); + + const BitmapEx& getBitmapEx1() const { return maBitmapEx1; } + const BitmapEx& getBitmapEx2() const { return maBitmapEx2; } + void setBitmapEx1(const BitmapEx& rNew); + void setBitmapEx2(const BitmapEx& rNew); + + sal_uInt16 getCenterX1() const { return mnCenterX1; } + sal_uInt16 getCenterY1() const { return mnCenterY1; } + sal_uInt16 getCenterX2() const { return mnCenterX2; } + sal_uInt16 getCenterY2() const { return mnCenterY2; } + void setCenterXY1(sal_uInt16 nNewX, sal_uInt16 nNewY); + void setCenterXY2(sal_uInt16 nNewX, sal_uInt16 nNewY); + + // #i53216# added CursorBlinkTime (in ms) + sal_uInt32 getBlinkTime() const { return mnBlinkTime; } + void setBlinkTime(sal_uInt32 nNew); + + // execute event from base class ::sdr::animation::Event. Default + // implementation does nothing and does not create a new event. + virtual void Trigger(sal_uInt32 nTime); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYANIMATEDBITMAPEX_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx b/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx new file mode 100644 index 000000000000..96295d0f9f80 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlaybitmapex.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYBITMAPEX_HXX +#define _SDR_OVERLAY_OVERLAYBITMAPEX_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <vcl/bitmapex.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class SVX_DLLPUBLIC OverlayBitmapEx : public OverlayObjectWithBasePosition + { + protected: + // the Bitmap itself + BitmapEx maBitmapEx; + + // position of the basePosition inside the Bitmap, in pixels + sal_uInt16 mnCenterX; + sal_uInt16 mnCenterY; + + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlayBitmapEx( + const basegfx::B2DPoint& rBasePos, + const BitmapEx& rBitmapEx, + sal_uInt16 nCenX = 0, sal_uInt16 nCenY = 0); + virtual ~OverlayBitmapEx(); + + const BitmapEx& getBitmapEx() const { return maBitmapEx; } + void setBitmapEx(const BitmapEx& rNew); + + sal_uInt16 getCenterX() const { return mnCenterX; } + sal_uInt16 getCenterY() const { return mnCenterY; } + void setCenterXY(sal_uInt16 nNewX, sal_uInt16 nNewY); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYBITMAPEX_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlaycrosshair.hxx b/svx/inc/svx/sdr/overlay/overlaycrosshair.hxx new file mode 100644 index 000000000000..35223ce44d04 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlaycrosshair.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlaycrosshair.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYCROSSHAIR_HXX +#define _SDR_OVERLAY_OVERLAYCROSSHAIR_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class OverlayCrosshairStriped : public OverlayObjectWithBasePosition + { + protected: + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlayCrosshairStriped(const basegfx::B2DPoint& rBasePos); + virtual ~OverlayCrosshairStriped(); + + // react on stripe definition change + virtual void stripeDefinitionHasChanged(); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYCROSSHAIR_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlayhatchrect.hxx b/svx/inc/svx/sdr/overlay/overlayhatchrect.hxx new file mode 100644 index 000000000000..aeb4c416f058 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayhatchrect.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlaybitmap.cxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYHATCHRECT_HXX +#define _SDR_OVERLAY_OVERLAYHATCHRECT_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <vcl/hatch.hxx> +#include <tools/gen.hxx> + +////////////////////////////////////////////////////////////////////////////// + +class PolyPolygon; + +namespace sdr +{ + namespace overlay + { + class OverlayHatchRect : public OverlayObjectWithBasePosition + { + // geometric definitions + basegfx::B2DPoint maSecondPosition; + const double mfDiscreteGrow; + const double mfDiscreteShrink; + const double mfHatchRotation; + const double mfRotation; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlayHatchRect( + const basegfx::B2DPoint& rBasePosition, + const basegfx::B2DPoint& rSecondPosition, + const Color& rHatchColor, + double fDiscreteGrow, + double fDiscreteShrink, + double fHatchRotation, + double fRotation); + + const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } + void setSecondPosition(const basegfx::B2DPoint&); + + // data read access + double getDiscreteGrow() const { return mfDiscreteGrow; } + double getDiscreteShrink() const { return mfDiscreteShrink; } + double getHatchRotation() const { return mfHatchRotation; } + double getRotation() const { return mfRotation; } + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYHATCHRECT_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlayhelpline.hxx b/svx/inc/svx/sdr/overlay/overlayhelpline.hxx new file mode 100644 index 000000000000..44baf5101e02 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayhelpline.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayhelpline.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYHELPLINE_HXX +#define _SDR_OVERLAY_OVERLAYHELPLINE_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <svx/svdhlpln.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class OverlayHelplineStriped : public OverlayObjectWithBasePosition + { + protected: + // remember HelpLineKind + SdrHelpLineKind meKind; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlayHelplineStriped( + const basegfx::B2DPoint& rBasePos, + SdrHelpLineKind eNewKind = SDRHELPLINE_POINT); + virtual ~OverlayHelplineStriped(); + + // dat read access + SdrHelpLineKind getKind() const { return meKind; } + + // react on stripe definition change + virtual void stripeDefinitionHasChanged(); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYHELPLINE_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlayline.hxx b/svx/inc/svx/sdr/overlay/overlayline.hxx new file mode 100644 index 000000000000..5c052b778fce --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayline.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayline.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYLINE_HXX +#define _SDR_OVERLAY_OVERLAYLINE_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class OverlayLineStriped : public OverlayObjectWithBasePosition + { + protected: + // second position in pixel + basegfx::B2DPoint maSecondPosition; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlayLineStriped( + const basegfx::B2DPoint& rBasePos, + const basegfx::B2DPoint& rSecondPos); + virtual ~OverlayLineStriped(); + + // change second position + const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } + void setSecondPosition(const basegfx::B2DPoint& rNew); + + // react on stripe definition change + virtual void stripeDefinitionHasChanged(); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYLINE_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlaymanager.hxx b/svx/inc/svx/sdr/overlay/overlaymanager.hxx new file mode 100644 index 000000000000..557a06a5f722 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlaymanager.hxx @@ -0,0 +1,154 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlaymanager.hxx,v $ + * + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYMANAGER_HXX +#define _SDR_OVERLAY_OVERLAYMANAGER_HXX + +#include <svx/sdr/animation/scheduler.hxx> +#include <svx/sdr/overlay/overlayobject.hxx> +#include <vcl/mapmod.hxx> +#include <tools/color.hxx> +#include "svx/svxdllapi.h" +#include <svtools/optionsdrawinglayer.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <drawinglayer/geometry/viewinformation2d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class OutputDevice; +class Region; + +namespace sdr { namespace overlay { + class OverlayObject; +}} + +namespace basegfx { + class B2DRange; +} + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class SVX_DLLPUBLIC OverlayManager : public ::sdr::animation::Scheduler + { + protected: + // the OutputDevice to work on, set on construction and not to be changed + OutputDevice& rmOutputDevice; + + // the vector of registered OverlayObjects + OverlayObjectVector maOverlayObjects; + + // Stripe support. All striped OverlayObjects use these stripe + // values. Changes change all those objects. + Color maStripeColorA; // defaults to Color(COL_BLACK) + Color maStripeColorB; // defaults to Color(COL_WHITE) + sal_uInt32 mnStripeLengthPixel; // defaults to 4L + + // hold an incarnation of Drawinglayer configuration options + SvtOptionsDrawinglayer maDrawinglayerOpt; + + // hold buffered the logic length of discrete vector (1.0, 0.0) and the + // view transformation belonging to it. Update happens in getDiscreteOne() + basegfx::B2DHomMatrix maViewTransformation; + drawinglayer::geometry::ViewInformation2D maViewInformation2D; + double mfDiscreteOne; + + // internal + void ImpDrawMembers(const basegfx::B2DRange& rRange, OutputDevice& rDestinationDevice) const; + void ImpStripeDefinitionChanged(); + void impApplyRemoveActions(OverlayObject& rTarget); + void impApplyAddActions(OverlayObject& rTarget); + + // return mfDiscreteOne to derivations, but also check for buffered local + // ViewTransformation and evtl. correct mfDiscreteOne + double getDiscreteOne() const; + + public: + // when handing over another OverlayManager at construction, the OverlayObjects + // will be taken over from it. The new one will have added all OverlayObjects + // while the handed over one will have none + OverlayManager( + OutputDevice& rOutputDevice, + OverlayManager* pOldOverlayManager = 0); + virtual ~OverlayManager(); + + // access to current ViewInformation2D; this call checks and evtl. updates ViewInformation2D + const drawinglayer::geometry::ViewInformation2D getCurrentViewInformation2D() const; + + // complete redraw + virtual void completeRedraw(const Region& rRegion, OutputDevice* pPreRenderDevice = 0) const; + + // flush. Do buffered updates. + virtual void flush(); + + // #i68597# part of content gets copied, react on it + virtual void copyArea(const Point& rDestPt, const Point& rSrcPt, const Size& rSrcSize); + + // restore part of background. Implemented form buffered versions only. + virtual void restoreBackground(const Region& rRegion) const; + + // get the OutputDevice + OutputDevice& getOutputDevice() const { return rmOutputDevice; } + + // add and remove OverlayObjects + void add(OverlayObject& rOverlayObject); + void remove(OverlayObject& rOverlayObject); + + // invalidate the given range at local OutputDevice + virtual void invalidateRange(const basegfx::B2DRange& rRange); + + // stripe support ColA + Color getStripeColorA() const { return maStripeColorA; } + void setStripeColorA(Color aNew= Color(COL_BLACK)); + + // stripe support ColB + Color getStripeColorB() const { return maStripeColorB; } + void setStripeColorB(Color aNew = Color(COL_WHITE)); + + // stripe support StripeLengthPixel + sal_uInt32 getStripeLengthPixel() const { return mnStripeLengthPixel; } + void setStripeLengthPixel(sal_uInt32 nNew = 5L); + + // access to maDrawinglayerOpt + const SvtOptionsDrawinglayer& getDrawinglayerOpt() const { return maDrawinglayerOpt; } + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYMANAGER_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx b/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx new file mode 100644 index 000000000000..9ced6a4d18ec --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx @@ -0,0 +1,116 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlaymanagerbuffered.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX +#define _SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX + +#include <svx/sdr/overlay/overlaymanager.hxx> +#include <basegfx/range/b2irange.hxx> +#include <vcl/virdev.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class VirtualDevice; + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class OverlayManagerBuffered : public OverlayManager + { + protected: + // The VirtualDevice for draw window content buffering, this + // is the view content without overlay + VirtualDevice maBufferDevice; + + // #i73602# The VirtualDevice for OverlayPaint buffering. This + // is an extra device to avoid flickering of overlay paints + VirtualDevice maOutputBufferDevice; + + // Timer for buffering + Timer maBufferTimer; + + // Range for buffering (in pixel to be independent from mapMode) + basegfx::B2IRange maBufferRememberedRangePixel; + + // bitfield + // Flag to decide if PreRendering shall be used for overlay refreshes. + // Default is false. + unsigned mbRefreshWithPreRendering : 1; + + // link for timer + DECL_LINK(ImpBufferTimerHandler, AutoTimer*); + + // Internal methods for buffering + void ImpPrepareBufferDevice(); + void ImpRestoreBackground() const ; + void ImpRestoreBackground(const Region& rRegionPixel) const; + void ImpSaveBackground(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L); + + public: + // when handing over another OverlayManager at construction, the OverlayObjects + // will be taken over from it. The new one will have added all OverlayObjects + // while the handed over one will have none + OverlayManagerBuffered( + OutputDevice& rOutputDevice, + OverlayManager* pOldOverlayManager = 0, + bool bRefreshWithPreRendering = false); + virtual ~OverlayManagerBuffered(); + + // complete redraw + virtual void completeRedraw(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L) const; + + // flush. Do buffered updates. + virtual void flush(); + + // #i68597# part of content gets copied, react on it + virtual void copyArea(const Point& rDestPt, const Point& rSrcPt, const Size& rSrcSize); + + // restore part of background. Implemented form buffered versions only. + virtual void restoreBackground(const Region& rRegion) const; + + // invalidate the given range at local OutputDevice + virtual void invalidateRange(const basegfx::B2DRange& rRange); + + // access to RefreshWithPreRendering Flag + bool DoRefreshWithPreRendering() const { return mbRefreshWithPreRendering; } + void SetRefreshWithPreRendering(bool bNew); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlayobject.hxx b/svx/inc/svx/sdr/overlay/overlayobject.hxx new file mode 100644 index 000000000000..ae31df8f6dee --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayobject.hxx @@ -0,0 +1,206 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayobject.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYOBJECT_HXX +#define _SDR_OVERLAY_OVERLAYOBJECT_HXX + +#include <basegfx/point/b2dpoint.hxx> +#include <basegfx/range/b2drange.hxx> +#include <tools/color.hxx> +#include <svx/sdr/animation/scheduler.hxx> +#include "svx/svxdllapi.h" +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> + +#include <vector> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class OutputDevice; + +namespace sdr +{ + namespace overlay + { + class OverlayManager; + } // end of namespace overlay +} // end of namespace sdr + +namespace basegfx +{ + class B2DPolygon; + class B2DPolyPolygon; + class B2DRange; +} // end of namespace basegfx + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class SVX_DLLPUBLIC OverlayObject : private ::boost::noncopyable, public ::sdr::animation::Event + { + private: + // Manager is allowed access to private Member mpOverlayManager + friend class OverlayManager; + + // pointer to OverlayManager, if object is added. Changed by + // OverlayManager, do not chnge Yourself. + OverlayManager* mpOverlayManager; + + // Primitive2DSequence of the OverlayObject + drawinglayer::primitive2d::Primitive2DSequence maPrimitive2DSequence; + + protected: + // access methods to maPrimitive2DSequence. The usage of this methods may allow + // later thread-safe stuff to be added if needed. Only to be used by getPrimitive2DSequence() + // implementations for buffering the last decomposition. + const drawinglayer::primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; } + void setPrimitive2DSequence(const drawinglayer::primitive2d::Primitive2DSequence& rNew) { maPrimitive2DSequence = rNew; } + + // the creation method for Primitive2DSequence. Called when getPrimitive2DSequence() + // sees that maPrimitive2DSequence is empty. Needs to be supported by all + // OverlayObject implementations. Default implementation will assert + // a missing implementation + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + // region in logical coordinates + basegfx::B2DRange maBaseRange; + + // base color of this OverlayObject + Color maBaseColor; + + // bitfield + // Flag for visibility + unsigned mbIsVisible : 1; + + // Flag to control hittability + unsigned mbIsHittable : 1; + + // Flag to hold info if this objects supports animation. Default is + // false. If true, the Trigger() method should be overloaded + // to implement the animation effect and to re-initiate the event. + unsigned mbAllowsAnimation : 1; + + // Flag tocontrol if this OverlayObject allows AntiAliased visualisation. + // Default is true, but e.g. for selection visualisation in SC and SW, + // it is switched to false + unsigned mbAllowsAntiAliase : 1; + + // set changed flag. Call after change, since the old range is invalidated + // and then the new one is calculated and invalidated, too. This will only + // work after the change. + virtual void objectChange(); + + // write access to AntiAliase flag. This is protected since + // only implementations are allowed to change this, preferrably in their + // constructor + void allowAntiAliase(bool bNew); + + public: + OverlayObject(Color aBaseColor); + virtual ~OverlayObject(); + + // get OverlayManager + OverlayManager* getOverlayManager() const { return mpOverlayManager; } + + // the access method for Primitive2DSequence. Will use createPrimitive2DSequence and + // setPrimitive2DSequence if needed. Overloading may be used to allow disposal of last + // created primitives to react on changed circumstances and to re-create primitives + virtual drawinglayer::primitive2d::Primitive2DSequence getOverlayObjectPrimitive2DSequence() const; + + // access to visibility state + bool isVisible() const { return mbIsVisible; } + void setVisible(bool bNew); + + // access to hittable flag + bool isHittable() const { return mbIsHittable; } + void setHittable(bool bNew); + + // read access to AntiAliase flag + bool allowsAntiAliase() const { return mbAllowsAntiAliase; } + + // read access to baseRange. This may trigger createBaseRange() if + // object is changed. + const basegfx::B2DRange& getBaseRange() const; + + // access to baseColor + Color getBaseColor() const { return maBaseColor; } + void setBaseColor(Color aNew); + + // execute event from base class ::sdr::animation::Event. Default + // implementation does nothing and does not create a new event. + virtual void Trigger(sal_uInt32 nTime); + + // acces to AllowsAnimation flag + bool allowsAnimation() const { return mbAllowsAnimation; } + + // stripe definition has changed. The OverlayManager does have + // support data to draw graphics in two colors striped. This + // method notifies the OverlayObject if that change takes place. + // Default implementation does nothing. + virtual void stripeDefinitionHasChanged(); + }; + + // typedefs for a vector of OverlayObjects + typedef ::std::vector< OverlayObject* > OverlayObjectVector; + + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class SVX_DLLPUBLIC OverlayObjectWithBasePosition : public OverlayObject + { + protected: + // base position in logical coordinates + basegfx::B2DPoint maBasePosition; + + public: + OverlayObjectWithBasePosition(const basegfx::B2DPoint& rBasePos, Color aBaseColor); + virtual ~OverlayObjectWithBasePosition(); + + // access to basePosition + const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } + void setBasePosition(const basegfx::B2DPoint& rNew); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYOBJECT_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlayobjectcell.hxx b/svx/inc/svx/sdr/overlay/overlayobjectcell.hxx new file mode 100644 index 000000000000..2f40c9385674 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayobjectcell.hxx @@ -0,0 +1,73 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayobjectcell.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYOBJECTCELL_HXX +#define _SDR_OVERLAY_OVERLAYOBJECTCELL_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> + +#include <vector> + +////////////////////////////////////////////////////////////////////////////// + +// #114409# +namespace sdr +{ + namespace overlay + { + enum CellOverlayType { CELL_OVERLAY_INVERT, CELL_OVERLAY_TRANSPARENT }; + + // OverlayObjectCell - used for cell cursor, selection and AutoFill handle + + class SVX_DLLPUBLIC OverlayObjectCell : public OverlayObject + { + public: + typedef ::std::vector< basegfx::B2DRange > RangeVector; + + private: + CellOverlayType mePaintType; + RangeVector maRectangles; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlayObjectCell( CellOverlayType eType, const Color& rColor, const RangeVector& rRects); + virtual ~OverlayObjectCell(); + }; + + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYLINE_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx b/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx new file mode 100644 index 000000000000..3f665f203e5d --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayobjectlist.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYOBJECTLIST_HXX +#define _SDR_OVERLAY_OVERLAYOBJECTLIST_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <tools/gen.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// + +#define DEFAULT_VALUE_FOR_HITTEST_PIXEL (2L) + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class SVX_DLLPUBLIC OverlayObjectList + { + protected: + // the vector of OverlayObjects + OverlayObjectVector maVector; + + // default value for HiTestPixel + sal_uInt32 getDefaultValueForHitTestPixel() const { return 4L; } + + public: + OverlayObjectList() {} + ~OverlayObjectList(); + + // clear list, this includes deletion of all contained objects + void clear(); + + // append/remove objects + void append(OverlayObject& rOverlayObject) { maVector.push_back(&rOverlayObject); } + void remove(OverlayObject& rOverlayObject); + + // access to objects + sal_uInt32 count() const { return maVector.size(); } + OverlayObject& getOverlayObject(sal_uInt32 nIndex) const { return *(maVector[nIndex]); } + + // Hittest with logical coordinates + bool isHitLogic(const basegfx::B2DPoint& rLogicPosition, double fLogicTolerance = 0.0) const; + + // Hittest with pixel coordinates and pixel tolerance + bool isHitPixel(const Point& rDiscretePosition, sal_uInt32 fDiscreteTolerance = DEFAULT_VALUE_FOR_HITTEST_PIXEL) const; + + // calculate BaseRange of all included OverlayObjects and return + basegfx::B2DRange getBaseRange() const; + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYOBJECTLIST_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlaypolypolygon.hxx b/svx/inc/svx/sdr/overlay/overlaypolypolygon.hxx new file mode 100644 index 000000000000..d7dc72df4d59 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlaypolypolygon.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlaypolypolygon.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYPOLYPOLYGON_HXX +#define _SDR_OVERLAY_OVERLAYPOLYPOLYGON_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <basegfx/polygon/b2dpolypolygon.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class SVX_DLLPUBLIC OverlayPolyPolygonStriped : public OverlayObject + { + protected: + // geometry + basegfx::B2DPolyPolygon maPolyPolygon; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlayPolyPolygonStriped(const basegfx::B2DPolyPolygon& rPolyPolygon); + virtual ~OverlayPolyPolygonStriped(); + + // change geometry + basegfx::B2DPolyPolygon getPolyPolygon() const { return maPolyPolygon; } + void setPolyPolygon(const basegfx::B2DPolyPolygon& rNew); + + // react on stripe definition change + virtual void stripeDefinitionHasChanged(); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYPOLYPOLYGON_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx b/svx/inc/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx new file mode 100644 index 000000000000..e94cfefcf327 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx @@ -0,0 +1,73 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlaysdrobject.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYPRIMITIVE2DSEQUENCEOBJECT_HXX +#define _SDR_OVERLAY_OVERLAYPRIMITIVE2DSEQUENCEOBJECT_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class SVX_DLLPUBLIC OverlayPrimitive2DSequenceObject : public OverlayObjectWithBasePosition + { + protected: + // the sequence of primitives to show + const drawinglayer::primitive2d::Primitive2DSequence maSequence; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + private: + // internal helper to create a drawinglayer::geometry::ViewInformation2D + // using a OutputDevice and local knowledge + drawinglayer::geometry::ViewInformation2D impCreateViewInformation2D(OutputDevice& rOutputDevice) const; + + public: + OverlayPrimitive2DSequenceObject(const drawinglayer::primitive2d::Primitive2DSequence& rSequence); + + virtual ~OverlayPrimitive2DSequenceObject(); + + // data read access + const drawinglayer::primitive2d::Primitive2DSequence& getSequence() const { return maSequence; } + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYPRIMITIVE2DSEQUENCEOBJECT_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlayrollingrectangle.hxx b/svx/inc/svx/sdr/overlay/overlayrollingrectangle.hxx new file mode 100644 index 000000000000..3120f02d950b --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayrollingrectangle.hxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayrollingrectangle.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYROOLINGRECTANGLE_HXX +#define _SDR_OVERLAY_OVERLAYROOLINGRECTANGLE_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class OverlayRollingRectangleStriped : public OverlayObjectWithBasePosition + { + protected: + // second position in pixel + basegfx::B2DPoint maSecondPosition; + + // bitfield + // Flag to switch on/off long lines to the OutputDevice bounds + unsigned mbExtendedLines : 1; + + // Flag to switch on/off the bounds itself + unsigned mbShowBounds : 1; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlayRollingRectangleStriped( + const basegfx::B2DPoint& rBasePos, + const basegfx::B2DPoint& rSecondPos, + bool bExtendedLines = false, + bool bShowBounds = true); + virtual ~OverlayRollingRectangleStriped(); + + // change second position + const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } + void setSecondPosition(const basegfx::B2DPoint& rNew); + + // change extended lines + bool getExtendedLines() const { return mbExtendedLines; } + void setExtendedLines(bool bNew); + + // change show bounds + bool getShowBounds() const { return mbShowBounds; } + void setShowBounds(bool bNew); + + // react on stripe definition change + virtual void stripeDefinitionHasChanged(); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYROOLINGRECTANGLE_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlayselection.hxx b/svx/inc/svx/sdr/overlay/overlayselection.hxx new file mode 100644 index 000000000000..17f32ee419e9 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayselection.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayline.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYSELECTION_HXX +#define _SDR_OVERLAY_OVERLAYSELECTION_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <vcl/region.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + // overlay type definition + enum OverlayType + { + OVERLAY_INVERT, + OVERLAY_SOLID, + OVERLAY_TRANSPARENT + }; + + class SVX_DLLPUBLIC OverlaySelection : public OverlayObject + { + protected: + // type of overlay + OverlayType meOverlayType; + + // geometry of overlay + std::vector< basegfx::B2DRange > maRanges; + + // Values of last primitive creation. These are checked in getOverlayObjectPrimitive2DSequence + // to evtl. get rid of last Primitive2DSequence. This ensures that these values are up-to-date + // and are usable when creating primitives + OverlayType maLastOverlayType; + sal_uInt16 mnLastTransparence; + + // bitfield + unsigned mbBorder : 1; + + // geometry creation for OverlayObject, can use local *Last* values + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlaySelection( + OverlayType eType, + const Color& rColor, + const std::vector< basegfx::B2DRange >& rRanges, + bool bBorder); + virtual ~OverlaySelection(); + + // data read access + OverlayType getOverlayType() const { return meOverlayType; } + const std::vector< basegfx::B2DRange >& getRanges() const { return maRanges; } + bool getBorder() const { return mbBorder; } + + // overloaded to check conditions for last createOverlayObjectPrimitive2DSequence + virtual drawinglayer::primitive2d::Primitive2DSequence getOverlayObjectPrimitive2DSequence() const; + + // data write access + void setRanges(const std::vector< basegfx::B2DRange >& rNew); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYSELECTION_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlaytools.hxx b/svx/inc/svx/sdr/overlay/overlaytools.hxx new file mode 100644 index 000000000000..830f3dc12586 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlaytools.hxx @@ -0,0 +1,281 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayobject.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYTOOLS_HXX +#define _SDR_OVERLAY_OVERLAYTOOLS_HXX + +#include <drawinglayer/primitive2d/primitivetools2d.hxx> +#include <vcl/bitmapex.hxx> + +////////////////////////////////////////////////////////////////////////////// +// Overlay helper class which holds a BotmapEx which is to be visualized +// at the given logic position with the Bitmap's pixel size, unscaled and +// unrotated (like a marker). The discrete pixel on the bitmap assocciated +// with the target position is given in discrete X,Y coordinates +namespace drawinglayer +{ + namespace primitive2d + { + class OverlayBitmapExPrimitive : public DiscreteMetricDependentPrimitive2D + { + private: + // The BitmapEx to use, PixelSize is used + BitmapEx maBitmapEx; + + // The logic position + basegfx::B2DPoint maBasePosition; + + // The pixel inside the BitmapEx which is assocciated with + // the target position (offset in the bitmap) + sal_uInt16 mnCenterX; + sal_uInt16 mnCenterY; + + protected: + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + OverlayBitmapExPrimitive( + const BitmapEx& rBitmapEx, + const basegfx::B2DPoint& rBasePosition, + sal_uInt16 nCenterX, + sal_uInt16 nCenterY); + + // data access + const BitmapEx& getBitmapEx() const { return maBitmapEx; } + const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } + sal_uInt16 getCenterX() const { return mnCenterX; } + sal_uInt16 getCenterY() const { return mnCenterY; } + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; + + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// Overlay helper class for a crosshair +namespace drawinglayer +{ + namespace primitive2d + { + class OverlayCrosshairPrimitive : public ViewportDependentPrimitive2D + { + private: + // The logic position + basegfx::B2DPoint maBasePosition; + + // The stripe colors and legth + basegfx::BColor maRGBColorA; + basegfx::BColor maRGBColorB; + double mfDiscreteDashLength; + + protected: + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + OverlayCrosshairPrimitive( + const basegfx::B2DPoint& rBasePosition, + const basegfx::BColor& rRGBColorA, + const basegfx::BColor& rRGBColorB, + double fDiscreteDashLength); + + // data access + const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } + const basegfx::BColor& getRGBColorA() const { return maRGBColorA; } + const basegfx::BColor& getRGBColorB() const { return maRGBColorB; } + double getDiscreteDashLength() const { return mfDiscreteDashLength; } + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; + + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// Overlay helper class for a hatch rectangle as used e.g. for text object +// selection hilighting +namespace drawinglayer +{ + namespace primitive2d + { + class OverlayHatchRectanglePrimitive : public DiscreteMetricDependentPrimitive2D + { + private: + // the logic rectangle definition + basegfx::B2DRange maObjectRange; + + // the hatch definition + double mfDiscreteHatchDistance; + double mfHatchRotation; + basegfx::BColor maHatchColor; + + // the dscrete grow and shrink of the box + double mfDiscreteGrow; + double mfDiscreteShrink; + + // the rotation of the primitive itself + double mfRotation; + + protected: + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + OverlayHatchRectanglePrimitive( + const basegfx::B2DRange& rObjectRange, + double fDiscreteHatchDistance, + double fHatchRotation, + const basegfx::BColor& rHatchColor, + double fDiscreteGrow, + double fDiscreteShrink, + double fRotation); + + // data access + const basegfx::B2DRange& getObjectRange() const { return maObjectRange; } + double getDiscreteHatchDistance() const { return mfDiscreteHatchDistance; } + double getHatchRotation() const { return mfHatchRotation; } + const basegfx::BColor& getHatchColor() const { return maHatchColor; } + double getDiscreteGrow() const { return mfDiscreteGrow; } + double getDiscreteShrink() const { return mfDiscreteShrink; } + double getRotation() const { return mfRotation; } + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; + + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// Overlay helper class for a striped helpline + +namespace drawinglayer +{ + namespace primitive2d + { + enum HelplineStyle + { + HELPLINESTYLE_POINT, + HELPLINESTYLE_VERTICAL, + HELPLINESTYLE_HORIZONTAL + }; + + class OverlayHelplineStripedPrimitive : public ViewportDependentPrimitive2D + { + private: + // The logic position + basegfx::B2DPoint maBasePosition; + + // the style + HelplineStyle meStyle; + + // The stripe colors and legth + basegfx::BColor maRGBColorA; + basegfx::BColor maRGBColorB; + double mfDiscreteDashLength; + + protected: + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + OverlayHelplineStripedPrimitive( + const basegfx::B2DPoint& rBasePosition, + HelplineStyle eStyle, + const basegfx::BColor& rRGBColorA, + const basegfx::BColor& rRGBColorB, + double fDiscreteDashLength); + + // data access + const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } + HelplineStyle getStyle() const { return meStyle; } + const basegfx::BColor& getRGBColorA() const { return maRGBColorA; } + const basegfx::BColor& getRGBColorB() const { return maRGBColorB; } + double getDiscreteDashLength() const { return mfDiscreteDashLength; } + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; + + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// Overlay helper class for rolling rectangle helplines. This primitive is +// only for the extended lines to the ends of the view + +namespace drawinglayer +{ + namespace primitive2d + { + class OverlayRollingRectanglePrimitive : public ViewportDependentPrimitive2D + { + private: + // The logic range + basegfx::B2DRange maRollingRectangle; + + // The stripe colors and legth + basegfx::BColor maRGBColorA; + basegfx::BColor maRGBColorB; + double mfDiscreteDashLength; + + protected: + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + OverlayRollingRectanglePrimitive( + const basegfx::B2DRange& aRollingRectangle, + const basegfx::BColor& rRGBColorA, + const basegfx::BColor& rRGBColorB, + double fDiscreteDashLength); + + // data access + const basegfx::B2DRange& getRollingRectangle() const { return maRollingRectangle; } + const basegfx::BColor& getRGBColorA() const { return maRGBColorA; } + const basegfx::BColor& getRGBColorB() const { return maRGBColorB; } + double getDiscreteDashLength() const { return mfDiscreteDashLength; } + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; + + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYTOOLS_HXX + +// eof diff --git a/svx/inc/svx/sdr/overlay/overlaytriangle.hxx b/svx/inc/svx/sdr/overlay/overlaytriangle.hxx new file mode 100644 index 000000000000..97b391047ba7 --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlaytriangle.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlaytriangle.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYTRIANGLE_HXX +#define _SDR_OVERLAY_OVERLAYTRIANGLE_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + class OverlayTriangle : public OverlayObjectWithBasePosition + { + protected: + // second and third position in pixel + basegfx::B2DPoint maSecondPosition; + basegfx::B2DPoint maThirdPosition; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlayTriangle( + const basegfx::B2DPoint& rBasePos, + const basegfx::B2DPoint& rSecondPos, + const basegfx::B2DPoint& rThirdPos, + Color aTriangleColor); + virtual ~OverlayTriangle(); + + // change second position + const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } + void setSecondPosition(const basegfx::B2DPoint& rNew); + + // change third position + const basegfx::B2DPoint& getThirdPosition() const { return maThirdPosition; } + void setThirdPosition(const basegfx::B2DPoint& rNew); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYTRIANGLE_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx b/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx new file mode 100644 index 000000000000..aa3785995b25 --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: primitiveFactory2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_PRIMITIVEFACTORY2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_PRIMITIVEFACTORY2D_HXX + +#include <com/sun/star/graphic/XPrimitiveFactory2D.hpp> +#include <cppuhelper/compbase1.hxx> +#include <comphelper/broadcasthelper.hxx> + +#include <svx/svxdllapi.h> + +////////////////////////////////////////////////////////////////////////////// +// UNO API helper methods + +namespace drawinglayer +{ + namespace primitive2d + { + SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL XPrimitiveFactory2DProvider_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// PrimitiveFactory2D class + +namespace drawinglayer +{ + namespace primitive2d + { + // typedef for PrimitiveFactory2DImplBase + typedef cppu::WeakComponentImplHelper1< ::com::sun::star::graphic::XPrimitiveFactory2D > PrimitiveFactory2DImplBase; + + // base class for C++ implementation of com::sun::star::graphic::XPrimitiveFactory2D + class PrimitiveFactory2D + : protected comphelper::OBaseMutex, + public PrimitiveFactory2DImplBase + { + private: + protected: + public: + // constructor + PrimitiveFactory2D(); + + // Methods from XPrimitiveFactory2D + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aParms ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXDrawPage( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xDrawPage, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aParms ) throw (::com::sun::star::uno::RuntimeException); + + // UNO API helpers + SVX_DLLPUBLIC static rtl::OUString getImplementationName_Static(); + SVX_DLLPUBLIC static com::sun::star::uno::Sequence< rtl::OUString > getSupportedServiceNames_Static(); + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_PRIMITIVEFACTORY2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx b/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx new file mode 100644 index 000000000000..e4a8fa01902f --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx @@ -0,0 +1,115 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrattributecreator.hxx,v $ + * + * $Revision: 1.2.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDRATTRIBUTECREATOR_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDRATTRIBUTECREATOR_HXX + +#include <sal/types.h> + +////////////////////////////////////////////////////////////////////////////// +// predefines +class SfxItemSet; +class SdrText; + +namespace drawinglayer { namespace attribute { + class SdrLineAttribute; + class SdrLineStartEndAttribute; + class SdrShadowAttribute; + class SdrFillAttribute; + class SdrTextAttribute; + class FillGradientAttribute; + class SdrFillBitmapAttribute; + class SdrShadowTextAttribute; + class SdrLineShadowTextAttribute; + class SdrLineFillShadowTextAttribute; + class SdrLineFillShadowAttribute; + class SdrSceneAttribute; + class SdrLightingAttribute; + class SdrFillTextAttribute; +}} + +namespace basegfx { + class B2DRange; +} + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + // SdrAttribute creators + attribute::SdrLineAttribute* createNewSdrLineAttribute(const SfxItemSet& rSet); + attribute::SdrLineStartEndAttribute* createNewSdrLineStartEndAttribute(const SfxItemSet& rSet, double fWidth); + attribute::SdrShadowAttribute* createNewSdrShadowAttribute(const SfxItemSet& rSet); + attribute::SdrFillAttribute* createNewSdrFillAttribute(const SfxItemSet& rSet); + + // #i101508# Support handing over given text-to-border distances + attribute::SdrTextAttribute* createNewSdrTextAttribute( + const SfxItemSet& rSet, + const SdrText& rText, + const sal_Int32* pLeft = 0, + const sal_Int32* pUpper = 0, + const sal_Int32* pRight = 0, + const sal_Int32* pLower = 0); + + attribute::FillGradientAttribute* createNewTransparenceGradientAttribute(const SfxItemSet& rSet); + attribute::SdrFillBitmapAttribute* createNewSdrFillBitmapAttribute(const SfxItemSet& rSet); + attribute::SdrShadowTextAttribute* createNewSdrShadowTextAttribute( + const SfxItemSet& rSet, + const SdrText& rText, + bool bSuppressText); // #i98072# added option to suppress text on demand + attribute::SdrLineShadowTextAttribute* createNewSdrLineShadowTextAttribute(const SfxItemSet& rSet, const SdrText& rText); + attribute::SdrLineFillShadowTextAttribute* createNewSdrLineFillShadowTextAttribute(const SfxItemSet& rSet, const SdrText& rText); + attribute::SdrLineFillShadowAttribute* createNewSdrLineFillShadowAttribute(const SfxItemSet& rSet, bool bSuppressFill); + attribute::SdrSceneAttribute* createNewSdrSceneAttribute(const SfxItemSet& rSet); + attribute::SdrLightingAttribute* createNewSdrLightingAttribute(const SfxItemSet& rSet); + + // #i101508# Support handing over given text-to-border distances + attribute::SdrFillTextAttribute* createNewSdrFillTextAttribute( + const SfxItemSet& rSet, + const SdrText* pSdrText, + const sal_Int32* pLeft = 0, + const sal_Int32* pUpper = 0, + const sal_Int32* pRight = 0, + const sal_Int32* pLower = 0); + + // helpers + void calculateRelativeCornerRadius(sal_Int32 nRadius, const ::basegfx::B2DRange& rObjectRange, double& rfCornerRadiusX, double& rfCornerRadiusY); + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDRATTRIBUTECREATOR_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx new file mode 100644 index 000000000000..177c42bfff17 --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrcaptionprimitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDRCAPTIONPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDRCAPTIONPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <drawinglayer/attribute/sdrattribute.hxx> +#include <svx/sdr/attribute/sdrallattribute.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrCaptionPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + ::basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; + ::basegfx::B2DPolygon maTail; + double mfCornerRadiusX; // [0.0..1.0] relative to 1/2 width + double mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrCaptionPrimitive2D( + const ::basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, + const ::basegfx::B2DPolygon& rTail, + double fCornerRadiusX = 0.0, + double fCornerRadiusY = 0.0); + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // data access + const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + const ::basegfx::B2DPolygon& getTail() const { return maTail; } + double getCornerRadiusX() const { return mfCornerRadiusX; } + double getCornerRadiusY() const { return mfCornerRadiusY; } + bool isCornerRadiusUsed() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); } + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDRCAPTIONPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx new file mode 100644 index 000000000000..5523480f1f51 --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrconnectorprimitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDRCONNECTORPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDRCONNECTORPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <drawinglayer/attribute/sdrattribute.hxx> +#include <svx/sdr/attribute/sdrallattribute.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrConnectorPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + attribute::SdrLineShadowTextAttribute maSdrLSTAttribute; + ::basegfx::B2DPolygon maUnitPolygon; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrConnectorPrimitive2D( + const attribute::SdrLineShadowTextAttribute& rSdrLSTAttribute, + const ::basegfx::B2DPolygon& rUnitPolygon); + + // data access + const attribute::SdrLineShadowTextAttribute& getSdrLSTAttribute() const { return maSdrLSTAttribute; } + const ::basegfx::B2DPolygon& getUnitPolygon() const { return maUnitPolygon; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDRCONNECTORPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx new file mode 100644 index 000000000000..72035eb99569 --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx @@ -0,0 +1,101 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrcustomshapeprimitive2d.hxx,v $ + * + * $Revision: 1.2.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDCUSTOMSHAPEPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDCUSTOMSHAPEPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <svx/sdr/attribute/sdrallattribute.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrCustomShapePrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + attribute::SdrShadowTextAttribute maSdrSTAttribute; + Primitive2DSequence maSubPrimitives; + basegfx::B2DHomMatrix maTextBox; + + // bitfield + // defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means + // that the text needs to be block formatted + unsigned mbWordWrap : 1; + + // defines that the object contains/is a 3D AutoShape. Needed for + // making exceptions with shadow generation + unsigned mb3DShape : 1; + + // #SJ# Allow text clipping against TextBox in special cases (used for SC)
+ unsigned mbForceTextClipToTextRange : 1;
+ + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrCustomShapePrimitive2D( + const attribute::SdrShadowTextAttribute& rSdrSTAttribute, + const Primitive2DSequence& rSubPrimitives, + const basegfx::B2DHomMatrix& rTextBox, + bool bWordWrap, + bool b3DShape, + bool bForceTextClipToTextRange); + + // data access + const attribute::SdrShadowTextAttribute& getSdrSTAttribute() const { return maSdrSTAttribute; } + const Primitive2DSequence& getSubPrimitives() const { return maSubPrimitives; } + const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; } + bool getWordWrap() const { return mbWordWrap; } + bool get3DShape() const { return mb3DShape; } + bool isForceTextClipToTextRange() const { return mbForceTextClipToTextRange; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDCUSTOMSHAPEPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx new file mode 100644 index 000000000000..0f46c2809597 --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrdecompositiontools.hxx,v $ + * + * $Revision: 1.2.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDRDECOMPOSITIONTOOLS_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDRDECOMPOSITIONTOOLS_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines +namespace basegfx { + class B2DPolygon; + class B2DPolyPolygon; + class B2DHomMatrix; +} + +namespace drawinglayer { namespace attribute { + class SdrFillAttribute; + class SdrLineAttribute; + class FillGradientAttribute; + class SdrShadowAttribute; + class SdrLineStartEndAttribute; + class SdrTextAttribute; +}} + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DReference createPolyPolygonFillPrimitive( + const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon, + const ::basegfx::B2DHomMatrix& rObjectTransform, + const attribute::SdrFillAttribute& rFill, + const attribute::FillGradientAttribute* pFillGradient = 0L); + + Primitive2DReference createPolygonLinePrimitive( + const ::basegfx::B2DPolygon& rUnitPolygon, + const ::basegfx::B2DHomMatrix& rObjectTransform, + const attribute::SdrLineAttribute& rLine, + const attribute::SdrLineStartEndAttribute* pStroke = 0L); + + Primitive2DReference createTextPrimitive( + const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon, + const ::basegfx::B2DHomMatrix& rObjectTransform, + const attribute::SdrTextAttribute& rText, + const attribute::SdrLineAttribute* pStroke, + bool bCellText, + bool bWordWrap, + bool bClipOnBounds); + + Primitive2DSequence createEmbeddedShadowPrimitive( + const Primitive2DSequence& rContent, + const attribute::SdrShadowAttribute& rShadow); + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDRDECOMPOSITIONTOOLS_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx new file mode 100644 index 000000000000..1d11c27ede71 --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrellipseprimitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDRELLIPSEPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDRELLIPSEPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <svx/sdr/attribute/sdrallattribute.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrEllipsePrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + ::basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrEllipsePrimitive2D( + const ::basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute); + + // data access + const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrEllipseSegmentPrimitive2D : public SdrEllipsePrimitive2D + { + private: + double mfStartAngle; + double mfEndAngle; + + // bitfield + unsigned mbCloseSegment : 1; + unsigned mbCloseUsingCenter : 1; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrEllipseSegmentPrimitive2D( + const ::basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, + double fStartAngle, + double fEndAngle, + bool bCloseSegment, + bool bCloseUsingCenter); + + // data access + double getStartAngle() const { return mfStartAngle; } + double getEndAngle() const { return mfEndAngle; } + bool getCloseSegment() const { return mbCloseSegment; } + bool getCloseUsingCenter() const { return mbCloseUsingCenter; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDRELLIPSEPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx new file mode 100644 index 000000000000..787c230d7b3d --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrgrafprimitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDRGRAFPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDRGRAFPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <drawinglayer/attribute/sdrattribute.hxx> +#include <svx/sdr/attribute/sdrallattribute.hxx> +#include <goodies/grfmgr.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrGrafPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + ::basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; + GraphicObject maGraphicObject; + GraphicAttr maGraphicAttr; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrGrafPrimitive2D( + const ::basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, + const GraphicObject& rGraphicObject, + const GraphicAttr& rGraphicAttr); + + // data access + const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + const GraphicObject& getGraphicObject() const { return maGraphicObject; } + const GraphicAttr& getGraphicAttr() const { return maGraphicAttr; } + bool isTransparent() const; + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDRGRAFPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx new file mode 100644 index 000000000000..3e998f23fd2b --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -0,0 +1,138 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrmeasureprimitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDRMEASUREPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDRMEASUREPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <drawinglayer/attribute/sdrattribute.hxx> +#include <svx/sdr/attribute/sdrallattribute.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +namespace drawinglayer { namespace primitive2d { + enum MeasureTextPosition + { + MEASURETEXTPOSITION_AUTOMATIC, + MEASURETEXTPOSITION_NEGATIVE, + MEASURETEXTPOSITION_CENTERED, + MEASURETEXTPOSITION_POSITIVE + }; +}} + +namespace drawinglayer { namespace attribute { + class SdrLineAttribute; +}} + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrMeasurePrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + attribute::SdrLineShadowTextAttribute maSdrLSTAttribute; + basegfx::B2DPoint maStart; + basegfx::B2DPoint maEnd; + MeasureTextPosition meHorizontal; + MeasureTextPosition meVertical; + double mfDistance; + double mfUpper; + double mfLower; + double mfLeftDelta; + double mfRightDelta; + + // bitfield + unsigned mbBelow : 1; + unsigned mbTextRotation : 1; + unsigned mbTextAutoAngle : 1; + + // internal decomposition helper + Primitive2DReference impCreatePart( + const attribute::SdrLineAttribute& rLineAttribute, + const basegfx::B2DHomMatrix& rObjectMatrix, + const basegfx::B2DPoint& rStart, + const basegfx::B2DPoint& rEnd, + bool bLeftActive, + bool bRightActive) const; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrMeasurePrimitive2D( + const attribute::SdrLineShadowTextAttribute& rSdrLSTAttribute, + const basegfx::B2DPoint& rStart, + const basegfx::B2DPoint& rEnd, + MeasureTextPosition eHorizontal, + MeasureTextPosition eVertical, + double fDistance, + double fUpper, + double fLower, + double fLeftDelta, + double fRightDelta, + bool bBelow, + bool bTextRotation, + bool bTextAutoAngle); + + // data access + const attribute::SdrLineShadowTextAttribute& getSdrLSTAttribute() const { return maSdrLSTAttribute; } + const basegfx::B2DPoint& getStart() const { return maStart; } + const basegfx::B2DPoint& getEnd() const { return maEnd; } + MeasureTextPosition getHorizontal() const { return meHorizontal; } + MeasureTextPosition getVertical() const { return meVertical; } + double getDistance() const { return mfDistance; } + double getUpper() const { return mfUpper; } + double getLower() const { return mfLower; } + double getLeftDelta() const { return mfLeftDelta; } + double getRightDelta() const { return mfRightDelta; } + bool getBelow() const { return mbBelow; } + bool getTextRotation() const { return mbTextRotation; } + bool getTextAutoAngle() const { return mbTextAutoAngle; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDRMEASUREPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx new file mode 100644 index 000000000000..2deaf474e12e --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrole2primitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDROLE2PRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDROLE2PRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <drawinglayer/attribute/sdrattribute.hxx> +#include <svx/sdr/attribute/sdrallattribute.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrOle2Primitive2D : public BasePrimitive2D + { + private: + Primitive2DSequence maOLEContent; + basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; + + public: + SdrOle2Primitive2D( + const Primitive2DSequence& rOLEContent, + const basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute); + + // data access + const Primitive2DSequence& getOLEContent() const { return maOLEContent; } + const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // local decomposition. + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDROLE2PRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx new file mode 100644 index 000000000000..ff04a6a5e79b --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrcaptionprimitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <svx/svdobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefinitions + +class SdrOle2Obj; + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrOleContentPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + SdrObjectWeakRef mpSdrOle2Obj; + basegfx::B2DHomMatrix maObjectTransform; + + // #i104867# The GraphicVersion number to identify in operator== if + // the graphic has changed, but without fetching it (which may + // be expensive, e.g. triggering chart creation) + sal_uInt32 mnGraphicVersion; + + // bitfield + unsigned mbHighContrast : 1; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrOleContentPrimitive2D( + const SdrOle2Obj& rSdrOle2Obj, + const basegfx::B2DHomMatrix& rObjectTransform, + sal_uInt32 nGraphicVersion, + bool bHighContrast); + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // The default implementation will use getDecomposition results to create the range + virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; + + // data access + const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; } + sal_uInt32 getGraphicVersion() const { return mnGraphicVersion; } + bool getHighContrast() const { return mbHighContrast; } + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx new file mode 100644 index 000000000000..d6de666d901f --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrpathprimitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDRPATHPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDRPATHPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <drawinglayer/attribute/sdrattribute.hxx> +#include <svx/sdr/attribute/sdrallattribute.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrPathPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; + basegfx::B2DPolyPolygon maUnitPolyPolygon; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrPathPrimitive2D( + const basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, + const basegfx::B2DPolyPolygon& rUnitPolyPolygon); + + // data access + const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + const basegfx::B2DPolyPolygon& getUnitPolyPolygon() const { return maUnitPolyPolygon; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDRPATHPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrprimitivetools.hxx b/svx/inc/svx/sdr/primitive2d/sdrprimitivetools.hxx new file mode 100644 index 000000000000..2d419e9cd45d --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrprimitivetools.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: primitiveFactory2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_PRIMITIVETOOLS_HXX +#define INCLUDED_SDR_PRIMITIVE2D_PRIMITIVETOOLS_HXX + +#include <vcl/bitmapex.hxx> +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +namespace basegfx { + class BColor; + class B2DHomMatrix; +} + +////////////////////////////////////////////////////////////////////////////// +// helper methods + +namespace drawinglayer +{ + namespace primitive2d + { + // create a 3x3 cross in given color as BitmapEx + BitmapEx createDefaultCross_3x3(const basegfx::BColor& rBColor); + + // create a 7x7 gluepoint symbol in given colors as BitmapEx + BitmapEx createDefaultGluepoint_7x7(const basegfx::BColor& rBColorA, const basegfx::BColor& rBColorB); + + // #i99123# + Primitive2DReference createFallbackHitTestPrimitive(const basegfx::B2DHomMatrix& rMatrix); + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_PRIMITIVETOOLS_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx new file mode 100644 index 000000000000..816956b188fe --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx @@ -0,0 +1,94 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrrectangleprimitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDRRECTANGLEPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDRRECTANGLEPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <drawinglayer/attribute/sdrattribute.hxx> +#include <svx/sdr/attribute/sdrallattribute.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrRectanglePrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; + double mfCornerRadiusX; // [0.0..1.0] relative to 1/2 width + double mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height + + // bitfield + // flag which decides if the HitArea should be the filled geometry + bool mbForceFillForHitTest : 1; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrRectanglePrimitive2D( + const basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, + double fCornerRadiusX, + double fCornerRadiusY, + bool bForceFillForHitTest); + + // data access + const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + double getCornerRadiusX() const { return mfCornerRadiusX; } + double getCornerRadiusY() const { return mfCornerRadiusY; } + bool isCornerRadiusUsed() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); } + bool getForceFillForHitTest() const { return mbForceFillForHitTest; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDRRECTANGLEPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx new file mode 100644 index 000000000000..ec35ff75f36d --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -0,0 +1,309 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrtextprimitive2d.hxx,v $ + * + * $Revision: 1.2.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDRTEXTPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDRTEXTPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/polygon/b2dpolypolygon.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <com/sun/star/drawing/XDrawPage.hpp> +#include <svx/outlobj.hxx> +#include <tools/color.hxx>
+#include <svx/sdr/attribute/sdrformtextattribute.hxx> +#include <tools/weakbase.hxx> +#include <svx/sdtaitm.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefines +class SdrText; + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrTextPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + // The text model data; this sould later just be the OutlinerParaObject or + // something equal + ::tools::WeakReference< SdrText > mrSdrText; + + // #i97628# + // The text content; now as local OutlinerParaObject copy (internally RefCounted and + // COW) and in exclusive, local form as needed in a primitive + const OutlinerParaObject maOutlinerParaObject; + + // remeber last VisualizingPage for which a decomposition was made. If the new target + // is not given or different, the decomposition needs to be potentially removed + // for supporting e.g. page number change on MasterPage objects or the different + // field renderings in SubGeometry and MasterPage mnode + com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > mxLastVisualizingPage; + + // remember last PageNumber for which a decomposition was made. This is only used + // when mbContainsPageField is true, else it is 0 + sal_Int16 mnLastPageNumber; + + // remember last PageCount for which a decomposition was made. This is only used + // when mbContainsPageCountField is true, else it is 0 + sal_Int16 mnLastPageCount; + + // #i101443# remember last TextBackgroundColor to decide if a new decomposition is + // needed because of background color change + Color maLastTextBackgroundColor; + + // bitfield + // is there a PageNumber, Header, Footer or DateTimeField used? Evaluated at construction + unsigned mbContainsPageField : 1; + unsigned mbContainsPageCountField : 1; + unsigned mbContainsOtherFields : 1; + + protected: + // support for XTEXT_PAINTSHAPE_BEGIN/XTEXT_PAINTSHAPE_END Metafile comments + Primitive2DSequence encapsulateWithTextHierarchyBlockPrimitive2D(const Primitive2DSequence& rCandidate) const; + + public: + SdrTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr); + + // get data + const SdrText* getSdrText() const { return mrSdrText.get(); } + const OutlinerParaObject& getOutlinerParaObject() const { return maOutlinerParaObject; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // own get2DDecomposition to take aspect of decomposition with or without spell checker + // into account + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + // transformed clone operator + virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const = 0; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrContourTextPrimitive2D : public SdrTextPrimitive2D + { + private: + // unit contour polygon (scaled to [0.0 .. 1.0]) + basegfx::B2DPolyPolygon maUnitPolyPolygon; + + // complete contour polygon transform (scale, rotate, shear, translate) + basegfx::B2DHomMatrix maObjectTransform; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrContourTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr, + const basegfx::B2DPolyPolygon& rUnitPolyPolygon, + const basegfx::B2DHomMatrix& rObjectTransform); + + // get data + const basegfx::B2DPolyPolygon& getUnitPolyPolygon() const { return maUnitPolyPolygon; } + const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // transformed clone operator + virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrPathTextPrimitive2D : public SdrTextPrimitive2D + { + private: + // the path to use. Each paragraph will use one Polygon. + basegfx::B2DPolyPolygon maPathPolyPolygon; + + // the Fontwork parameters + attribute::SdrFormTextAttribute maSdrFormTextAttribute; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrPathTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr, + const basegfx::B2DPolyPolygon& rPathPolyPolygon, + const attribute::SdrFormTextAttribute& rSdrFormTextAttribute); + + // get data + const basegfx::B2DPolyPolygon& getPathPolyPolygon() const { return maPathPolyPolygon; } + const attribute::SdrFormTextAttribute& getSdrFormTextAttribute() const { return maSdrFormTextAttribute; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // transformed clone operator + virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrBlockTextPrimitive2D : public SdrTextPrimitive2D + { + private: + // text range transformation from unit range ([0.0 .. 1.0]) to text range + basegfx::B2DHomMatrix maTextRangeTransform; + + // text alignments + SdrTextHorzAdjust maSdrTextHorzAdjust; + SdrTextVertAdjust maSdrTextVertAdjust; + + // bitfield + unsigned mbFixedCellHeight : 1; + unsigned mbUnlimitedPage : 1; // force layout with no text break + unsigned mbCellText : 1; // this is a cell text as block text + unsigned mbWordWrap : 1; // for CustomShapes text layout + unsigned mbClipOnBounds : 1; // for CustomShapes text layout + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrBlockTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr, + const basegfx::B2DHomMatrix& rTextRangeTransform, + SdrTextHorzAdjust aSdrTextHorzAdjust, + SdrTextVertAdjust aSdrTextVertAdjust, + bool bFixedCellHeight, + bool bUnlimitedPage, + bool bCellText, + bool bWordWrap, + bool bClipOnBounds); + + // get data + const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } + SdrTextHorzAdjust getSdrTextHorzAdjust() const { return maSdrTextHorzAdjust; } + SdrTextVertAdjust getSdrTextVertAdjust() const { return maSdrTextVertAdjust; } + bool isFixedCellHeight() const { return mbFixedCellHeight; } + bool getUnlimitedPage() const { return mbUnlimitedPage; } + bool getCellText() const { return mbCellText; } + bool getWordWrap() const { return mbWordWrap; } + bool getClipOnBounds() const { return mbClipOnBounds; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // transformed clone operator + virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrStretchTextPrimitive2D : public SdrTextPrimitive2D + { + private: + // text range transformation from unit range ([0.0 .. 1.0]) to text range + basegfx::B2DHomMatrix maTextRangeTransform; + + // bitfield + unsigned mbFixedCellHeight : 1; + + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrStretchTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr, + const basegfx::B2DHomMatrix& rTextRangeTransform, + bool bFixedCellHeight); + + // get data + const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } + bool isFixedCellHeight() const { return mbFixedCellHeight; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // transformed clone operator + virtual SdrTextPrimitive2D* createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDRTEXTPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx b/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx new file mode 100644 index 000000000000..d1b857f510c3 --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx @@ -0,0 +1,68 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svx_primitivetypes2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SVX_PRIMITIVE2D_PRIMITIVETYPES2D_HXX +#define INCLUDED_SVX_PRIMITIVE2D_PRIMITIVETYPES2D_HXX + +#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> + +////////////////////////////////////////////////////////////////////////////// + +#define PRIMITIVE2D_ID_SDRCAPTIONPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 0) +#define PRIMITIVE2D_ID_SDRCONNECTORPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 1) +#define PRIMITIVE2D_ID_SDRCUSTOMSHAPEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 2) +#define PRIMITIVE2D_ID_SDRELLIPSEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 3) +#define PRIMITIVE2D_ID_SDRELLIPSESEGMENTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 4) +#define PRIMITIVE2D_ID_SDRGRAFPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 5) +#define PRIMITIVE2D_ID_SDRMEASUREPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 6) +#define PRIMITIVE2D_ID_SDROLE2PRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 7) +#define PRIMITIVE2D_ID_SDRPATHPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 8) +#define PRIMITIVE2D_ID_SDRRECTANGLEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 9) +#define PRIMITIVE2D_ID_SDRCONTOURTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 10) +#define PRIMITIVE2D_ID_SDRPATHTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 11) +#define PRIMITIVE2D_ID_SDRBLOCKTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 12) +#define PRIMITIVE2D_ID_SDRSTRETCHTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 13) +#define PRIMITIVE2D_ID_SDRCELLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 14) +#define PRIMITIVE2D_ID_SDRBORDERLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 15) +#define PRIMITIVE2D_ID_OVERLAYBITMAPEXPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 16) +#define PRIMITIVE2D_ID_OVERLAYCROSSHAIRPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 17) +#define PRIMITIVE2D_ID_OVERLAYHATCHRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 18) +#define PRIMITIVE2D_ID_OVERLAYHELPLINESTRIPEDPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 19) +#define PRIMITIVE2D_ID_OVERLAYROLLINGRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 20) +#define PRIMITIVE2D_ID_SDRCONTROLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 21) +#define PRIMITIVE2D_ID_SDROLECONTENTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 22) + +////////////////////////////////////////////////////////////////////////////// + +#endif // INCLUDED_SVX_PRIMITIVE2D_PRIMITIVETYPES2D_HXX + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/svx/inc/svx/sdr/primitive3d/sdrattributecreator3d.hxx b/svx/inc/svx/sdr/primitive3d/sdrattributecreator3d.hxx new file mode 100644 index 000000000000..c7f37a16e274 --- /dev/null +++ b/svx/inc/svx/sdr/primitive3d/sdrattributecreator3d.hxx @@ -0,0 +1,67 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrattributecreator3d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PRIMITIVE3D_SDRATTRIBUTECREATOR3D_HXX +#define _SDR_PRIMITIVE3D_SDRATTRIBUTECREATOR3D_HXX + +#include <sal/types.h> + +////////////////////////////////////////////////////////////////////////////// +// predefines +class SfxItemSet; + +namespace drawinglayer { namespace attribute { + class Sdr3DObjectAttribute; +}} + +namespace basegfx { + class B2DRange; +} + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + // SdrAttribute creators + attribute::Sdr3DObjectAttribute* createNewSdr3DObjectAttribute(const SfxItemSet& rSet); + + // helpers + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PRIMITIVE3D_SDRATTRIBUTECREATOR3D_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/attributeproperties.hxx b/svx/inc/svx/sdr/properties/attributeproperties.hxx new file mode 100644 index 000000000000..5bdcda6e8116 --- /dev/null +++ b/svx/inc/svx/sdr/properties/attributeproperties.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: attributeproperties.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX +#define _SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX + +#include <svl/lstner.hxx> +#include <svx/sdr/properties/defaultproperties.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class SVX_DLLPUBLIC AttributeProperties : public DefaultProperties, public SfxListener + { + // add style sheet, do all the necessary handling + void ImpAddStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // remove StyleSheet, do all the necessary handling + void ImpRemoveStyleSheet(); + + protected: + // the SytleSheet of this object + SfxStyleSheet* mpStyleSheet; + + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& pPool); + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + AttributeProperties(SdrObject& rObj); + + // constructor for copying, but using new object + AttributeProperties(const AttributeProperties& rProps, SdrObject& rObj); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // destructor + virtual ~AttributeProperties(); + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const; + + // Move properties to a new ItemPool. + virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel = 0L); + + // Set new model. + virtual void SetModel(SdrModel* pOldModel, SdrModel* pNewModel); + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes(); + + // This is the Notify(...) from 2nd base class SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/captionproperties.hxx b/svx/inc/svx/sdr/properties/captionproperties.hxx new file mode 100644 index 000000000000..2b6665777650 --- /dev/null +++ b/svx/inc/svx/sdr/properties/captionproperties.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: captionproperties.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_CAPTIONPROPERTIES_HXX +#define _SDR_PROPERTIES_CAPTIONPROPERTIES_HXX + +#include <svx/sdr/properties/rectangleproperties.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class CaptionProperties : public RectangleProperties + { + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + CaptionProperties(SdrObject& rObj); + + // constructor for copying, but using new object + CaptionProperties(const CaptionProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~CaptionProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes(); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_PROPERTIES_CAPTIONPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/circleproperties.hxx b/svx/inc/svx/sdr/properties/circleproperties.hxx new file mode 100644 index 000000000000..7d8441e9e476 --- /dev/null +++ b/svx/inc/svx/sdr/properties/circleproperties.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: circleproperties.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_CIRCLEPROPERTIES_HXX +#define _SDR_PROPERTIES_CIRCLEPROPERTIES_HXX + +#include <svx/sdr/properties/rectangleproperties.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class CircleProperties : public RectangleProperties + { + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + CircleProperties(SdrObject& rObj); + + // constructor for copying, but using new object + CircleProperties(const CircleProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~CircleProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes(); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_CIRCLEPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/connectorproperties.hxx b/svx/inc/svx/sdr/properties/connectorproperties.hxx new file mode 100644 index 000000000000..1fbde6564c67 --- /dev/null +++ b/svx/inc/svx/sdr/properties/connectorproperties.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: connectorproperties.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_CONNECTORPROPERTIES_HXX +#define _SDR_PROPERTIES_CONNECTORPROPERTIES_HXX + +#include <svx/sdr/properties/textproperties.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class ConnectorProperties : public TextProperties + { + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + ConnectorProperties(SdrObject& rObj); + + // constructor for copying, but using new object + ConnectorProperties(const ConnectorProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~ConnectorProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_CONNECTORPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/customshapeproperties.hxx b/svx/inc/svx/sdr/properties/customshapeproperties.hxx new file mode 100644 index 000000000000..7cd70fb7b408 --- /dev/null +++ b/svx/inc/svx/sdr/properties/customshapeproperties.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: customshapeproperties.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX +#define _SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX + +#include <svx/sdr/properties/textproperties.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class CustomShapeProperties : public TextProperties + { + void UpdateTextFrameStatus(); + + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // test changeability for a single item + virtual sal_Bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) const; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + // react on Item change + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem); + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0); + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deleteion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich = 0); + + public: + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes(); + + // basic constructor + CustomShapeProperties(SdrObject& rObj); + + // constructor for copying, but using new object + CustomShapeProperties(const CustomShapeProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~CustomShapeProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // This is the notifyer from SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/defaultproperties.hxx b/svx/inc/svx/sdr/properties/defaultproperties.hxx new file mode 100644 index 000000000000..769edfea868d --- /dev/null +++ b/svx/inc/svx/sdr/properties/defaultproperties.hxx @@ -0,0 +1,115 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: defaultproperties.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_DEFAULTPROPERTIES_HXX +#define _SDR_PROPERTIES_DEFAULTPROPERTIES_HXX + +#include <svx/sdr/properties/properties.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class SVX_DLLPUBLIC DefaultProperties : public BaseProperties + { + protected: + // the to be used ItemSet + SfxItemSet* mpItemSet; + + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // test changeability for a single item + virtual sal_Bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) const; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0); + + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + DefaultProperties(SdrObject& rObj); + + // constructor for copying, but using new object + DefaultProperties(const DefaultProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~DefaultProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const; + + // set single item + virtual void SetObjectItem(const SfxPoolItem& rItem); + + // set single item direct, do not do any notifies or things like that + virtual void SetObjectItemDirect(const SfxPoolItem& rItem); + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0); + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deleteion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich = 0); + + // set complete item set + virtual void SetObjectItemSet(const SfxItemSet& rSet); + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created. + // Default implementation does nothing. + virtual void ForceDefaultAttributes(); + + // Scale the included ItemSet. + virtual void Scale(const Fraction& rScale); + }; + } // end of namespace properties +} // end of namespace sdr + +#endif //_SDR_PROPERTIES_DEFAULTPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/e3dcompoundproperties.hxx b/svx/inc/svx/sdr/properties/e3dcompoundproperties.hxx new file mode 100644 index 000000000000..9b2d121f10c7 --- /dev/null +++ b/svx/inc/svx/sdr/properties/e3dcompoundproperties.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: e3dcompoundproperties.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_E3DCOMPOUNDPROPERTIES_HXX +#define _SDR_PROPERTIES_E3DCOMPOUNDPROPERTIES_HXX + +#include <svx/sdr/properties/e3dproperties.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class SVX_DLLPUBLIC E3dCompoundProperties : public E3dProperties + { + protected: + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich); + + public: + // basic constructor + E3dCompoundProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dCompoundProperties(const E3dCompoundProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dCompoundProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const; + + // Get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may + // be overloaded e.g for group objects to return a merged ItemSet of the object. + // When using this method the returned ItemSet may contain items in the state + // SFX_ITEM_DONTCARE which means there were several such items with different + // values. + virtual const SfxItemSet& GetMergedItemSet() const; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, sal_Bool bClearAllItems = sal_False); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_PROPERTIES_E3DCOMPOUNDPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/e3dextrudeproperties.hxx b/svx/inc/svx/sdr/properties/e3dextrudeproperties.hxx new file mode 100644 index 000000000000..c9401dfdf97d --- /dev/null +++ b/svx/inc/svx/sdr/properties/e3dextrudeproperties.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: e3dextrudeproperties.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX +#define _SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX + +#include <svx/sdr/properties/e3dcompoundproperties.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class SVX_DLLPUBLIC E3dExtrudeProperties : public E3dCompoundProperties + { + protected: + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich); + + public: + // basic constructor + E3dExtrudeProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dExtrudeProperties(const E3dExtrudeProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dExtrudeProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/e3dlatheproperties.hxx b/svx/inc/svx/sdr/properties/e3dlatheproperties.hxx new file mode 100644 index 000000000000..934b585fb72b --- /dev/null +++ b/svx/inc/svx/sdr/properties/e3dlatheproperties.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: e3dlatheproperties.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX +#define _SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX + +#include <svx/sdr/properties/e3dcompoundproperties.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class SVX_DLLPUBLIC E3dLatheProperties : public E3dCompoundProperties + { + protected: + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich); + + public: + // basic constructor + E3dLatheProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dLatheProperties(const E3dLatheProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dLatheProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/e3dproperties.hxx b/svx/inc/svx/sdr/properties/e3dproperties.hxx new file mode 100644 index 000000000000..b87411764b63 --- /dev/null +++ b/svx/inc/svx/sdr/properties/e3dproperties.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: e3dproperties.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_E3DPROPERTIES_HXX +#define _SDR_PROPERTIES_E3DPROPERTIES_HXX + +#include <svx/sdr/properties/attributeproperties.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class SVX_DLLPUBLIC E3dProperties : public AttributeProperties + { + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + E3dProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dProperties(const E3dProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_PROPERTIES_E3DPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/e3dsceneproperties.hxx b/svx/inc/svx/sdr/properties/e3dsceneproperties.hxx new file mode 100644 index 000000000000..e84263128482 --- /dev/null +++ b/svx/inc/svx/sdr/properties/e3dsceneproperties.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: e3dsceneproperties.hxx,v $ + * $Revision: 1.6.226.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX +#define _SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX + +#include <svx/sdr/properties/e3dproperties.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class E3dSceneProperties : public E3dProperties + { + protected: + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich); + + public: + // basic constructor + E3dSceneProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dSceneProperties(const E3dSceneProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dSceneProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const; + + // get merged ItemSet. Normappl, this maps directly to GetObjectItemSet(), but may + // be overloaded e.g for group objects to return a merged ItemSet of the object. + // When using this method the returned ItemSet may contain items in the state + // SFX_ITEM_DONTCARE which means there were several such items with different + // values. + virtual const SfxItemSet& GetMergedItemSet() const; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, sal_Bool bClearAllItems = sal_False); + + // Set a single item, iterate over hierarchies if necessary. + virtual void SetMergedItem(const SfxPoolItem& rItem); + + // Clear a single item, iterate over hierarchies if necessary. + virtual void ClearMergedItem(const sal_uInt16 nWhich = 0); + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const; + + // Move properties to a new ItemPool. Default implementation does nothing. + virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel = 0L); + + // Special for scene: + void SetSceneItemsFromCamera(); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/e3dsphereproperties.hxx b/svx/inc/svx/sdr/properties/e3dsphereproperties.hxx new file mode 100644 index 000000000000..f949fd574c38 --- /dev/null +++ b/svx/inc/svx/sdr/properties/e3dsphereproperties.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: e3dsphereproperties.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX +#define _SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX + +#include <svx/sdr/properties/e3dcompoundproperties.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class E3dSphereProperties : public E3dCompoundProperties + { + protected: + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich); + + public: + // basic constructor + E3dSphereProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dSphereProperties(const E3dSphereProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dSphereProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX + +// eof + diff --git a/svx/inc/svx/sdr/properties/emptyproperties.hxx b/svx/inc/svx/sdr/properties/emptyproperties.hxx new file mode 100644 index 000000000000..85bb97dfeb07 --- /dev/null +++ b/svx/inc/svx/sdr/properties/emptyproperties.hxx @@ -0,0 +1,107 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: emptyproperties.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_EMPTYPROPERTIES_HXX +#define _SDR_PROPERTIES_EMPTYPROPERTIES_HXX + +#include <svx/sdr/properties/properties.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class SVX_DLLPUBLIC EmptyProperties : public BaseProperties + { + protected: + // the to be used ItemSet + SfxItemSet* mpEmptyItemSet; + + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // test changeability for a single item + virtual sal_Bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) const; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0); + + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + EmptyProperties(SdrObject& rObj); + + // constructor for copying, but using new object + EmptyProperties(const EmptyProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~EmptyProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const; + + // set single item + virtual void SetObjectItem(const SfxPoolItem& rItem); + + // set single item direct, do not do any notifies or things like that + virtual void SetObjectItemDirect(const SfxPoolItem& rItem); + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0); + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deleteion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich = 0); + + // set complete item set + virtual void SetObjectItemSet(const SfxItemSet& rSet); + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const; + }; + } // end of namespace properties +} // end of namespace sdr + +#endif //_SDR_PROPERTIES_EMPTYPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/graphicproperties.hxx b/svx/inc/svx/sdr/properties/graphicproperties.hxx new file mode 100644 index 000000000000..9dd9a2b1539c --- /dev/null +++ b/svx/inc/svx/sdr/properties/graphicproperties.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: graphicproperties.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_GRAPHICPROPERTIES_HXX +#define _SDR_PROPERTIES_GRAPHICPROPERTIES_HXX + +#include <svx/sdr/properties/rectangleproperties.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class GraphicProperties : public RectangleProperties + { + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + GraphicProperties(SdrObject& rObj); + + // constructor for copying, but using new object + GraphicProperties(const GraphicProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~GraphicProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes(); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_GRAPHICPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/groupproperties.hxx b/svx/inc/svx/sdr/properties/groupproperties.hxx new file mode 100644 index 000000000000..d5addc240945 --- /dev/null +++ b/svx/inc/svx/sdr/properties/groupproperties.hxx @@ -0,0 +1,132 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: groupproperties.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_GROUPPROPERTIES_HXX +#define _SDR_PROPERTIES_GROUPPROPERTIES_HXX + +#include <svx/sdr/properties/defaultproperties.hxx> + +///////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class GroupProperties : public DefaultProperties + { + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // test changeability for a single item + virtual sal_Bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) const; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0); + + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + GroupProperties(SdrObject& rObj); + + // copy constructor + GroupProperties(const GroupProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~GroupProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const; + + // get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may + // be overloaded e.g for group objects to return a merged ItemSet of the object. + // When using this method the returned ItemSet may contain items in the state + // SFX_ITEM_DONTCARE which means there were several such items with different + // values. + virtual const SfxItemSet& GetMergedItemSet() const; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, sal_Bool bClearAllItems = sal_False); + + // set single item + virtual void SetObjectItem(const SfxPoolItem& rItem); + + // set single item direct, do not do any notifies or things like that + virtual void SetObjectItemDirect(const SfxPoolItem& rItem); + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0); + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deleteion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich = 0); + + // Set a single item, iterate over hierarchies if necessary. + virtual void SetMergedItem(const SfxPoolItem& rItem); + + // Clear a single item, iterate over hierarchies if necessary. + virtual void ClearMergedItem(const sal_uInt16 nWhich = 0); + + // set complete item set + virtual void SetObjectItemSet(const SfxItemSet& rSet); + + // set a new StyleSheet + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // get the local StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes(); + + // Move properties to a new ItemPool. + virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel = 0L); + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes(); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_GROUPPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/itemsettools.hxx b/svx/inc/svx/sdr/properties/itemsettools.hxx new file mode 100644 index 000000000000..1e72a849ed56 --- /dev/null +++ b/svx/inc/svx/sdr/properties/itemsettools.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: itemsettools.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_ITEMSETTOOLS_HXX +#define _SDR_PROPERTIES_ITEMSETTOOLS_HXX + +#include <sal/types.h> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrObject; +class SfxItemSet; +class Rectangle; +class Fraction; + +////////////////////////////////////////////////////////////////////////////// +// class to remember broadcast start positions +namespace sdr +{ + namespace properties + { + class ItemChangeBroadcaster + { + sal_uInt32 mnCount; + void* mpData; + + public: + ItemChangeBroadcaster(const SdrObject& rObj); + ~ItemChangeBroadcaster(); + + sal_uInt32 GetRectangleCount() const; + const Rectangle& GetRectangle(sal_uInt32 nIndex) const; + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + void ScaleItemSet(SfxItemSet& rSet, const Fraction& rScale); + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_ITEMSETTOOLS_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/measureproperties.hxx b/svx/inc/svx/sdr/properties/measureproperties.hxx new file mode 100644 index 000000000000..d6c5adb0253e --- /dev/null +++ b/svx/inc/svx/sdr/properties/measureproperties.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: measureproperties.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_MEASUREPROPERTIES_HXX +#define _SDR_PROPERTIES_MEASUREPROPERTIES_HXX + +#include <svx/sdr/properties/textproperties.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class MeasureProperties : public TextProperties + { + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + MeasureProperties(SdrObject& rObj); + + // constructor for copying, but using new object + MeasureProperties(const MeasureProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~MeasureProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes(); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_MEASUREPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/pageproperties.hxx b/svx/inc/svx/sdr/properties/pageproperties.hxx new file mode 100644 index 000000000000..d235ca067933 --- /dev/null +++ b/svx/inc/svx/sdr/properties/pageproperties.hxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: pageproperties.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_PAGEPROPERTIES_HXX +#define _SDR_PROPERTIES_PAGEPROPERTIES_HXX + +#include <svx/sdr/properties/emptyproperties.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class PageProperties : public EmptyProperties + { + protected: + // create a new object specific itemset with object specific ranges. + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& pPool); + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0); + + public: + // basic constructor + PageProperties(SdrObject& rObj); + + // constructor for copying, but using new object + PageProperties(const PageProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~PageProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // get itemset. Overloaded here to allow creating the empty itemset + // without asserting + virtual const SfxItemSet& GetObjectItemSet() const; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const; + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_PAGEPROPERTIES_HXX + +// eof + + diff --git a/svx/inc/svx/sdr/properties/properties.hxx b/svx/inc/svx/sdr/properties/properties.hxx new file mode 100644 index 000000000000..2c4512236cb7 --- /dev/null +++ b/svx/inc/svx/sdr/properties/properties.hxx @@ -0,0 +1,200 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: properties.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_PROPERTIES_HXX +#define _SDR_PROPERTIES_PROPERTIES_HXX + +#include <sal/types.h> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class SdrObject; +class SfxItemSet; +class SfxPoolItem; +class SfxStyleSheet; +class Fraction; +class SfxItemPool; +class SdrModel; + +namespace sdr +{ + namespace properties + { + class ItemChangeBroadcaster; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class SVX_DLLPUBLIC BaseProperties + { + protected: + // the owner of this Properties. Set from constructor and not + // to be changed in any way. + SdrObject& mrObject; + + // create a new object specific itemset with object specific ranges. + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& pPool) = 0; + + // internal access to SdrObject + SdrObject& GetSdrObject() const + { + return mrObject; + } + + // Test changeability for a single item. If a implementation wants to prevent + // changing an item this method may be overloaded. + virtual sal_Bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) const = 0; + + // Do the internal ItemChange. If only nWhich is given, the item needs to be cleared. + // Also needs to handle if nWhich and pNewItem is 0, which means to clear all items. + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) = 0; + + // Called after ItemChange() is done for all items. Allows local reactions on + // specific item changes + virtual void PostItemChange(const sal_uInt16 nWhich) = 0; + + // Internally react on ItemSet changes. The given ItemSet contains all changed items, the new ones. + virtual void ItemSetChanged(const SfxItemSet& rSet) = 0; + + public: + // basic constructor, used from SdrObject. + BaseProperties(SdrObject& rObj); + + // constructor for copying, but using new object. Used from the Clone() + // method. + BaseProperties(const BaseProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~BaseProperties(); + + // Clone() operator, normally just calls the local copy constructor, + // see above. + virtual BaseProperties& Clone(SdrObject& rObj) const = 0; + + // Get the local ItemSet. This directly returns the local ItemSet of the object. No + // merging of ItemSets is done for e.g. Group objects. + virtual const SfxItemSet& GetObjectItemSet() const = 0; + + // get merged ItemSet. Normappl, this maps directly to GetObjectItemSet(), but may + // be overloaded e.g for group objects to return a merged ItemSet of the object. + // When using this method the returned ItemSet may contain items in the state + // SFX_ITEM_DONTCARE which means there were several such items with different + // values. + virtual const SfxItemSet& GetMergedItemSet() const; + + // Sets all items which are on state SFX_ITEM_SET in rSet at the local ItemSet. + // Uses AllowItemChange(), ItemChange(), PostItemChange() and ItemSetChanged() calls. + virtual void SetObjectItemSet(const SfxItemSet& rSet) = 0; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, sal_Bool bClearAllItems = sal_False); + + // Set single item at the local ItemSet. Uses AllowItemChange(), + // ItemChange(), PostItemChange() and ItemSetChanged() calls. + virtual void SetObjectItem(const SfxPoolItem& rItem) = 0; + + // Set a single item direct. Only uses AllowItemChange() and ItemChange(), + // but not PostItemChange() and ItemSetChanged() calls. + virtual void SetObjectItemDirect(const SfxPoolItem& rItem) = 0; + + // Clear a single local item. Uses AllowItemChange(), + // ItemChange(), PostItemChange() and ItemSetChanged() calls. + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) = 0; + + // Set a single item, iterate over hierarchies if necessary. Default + // Implementation falls back to ClearObjectItem(). + virtual void SetMergedItem(const SfxPoolItem& rItem); + + // Clear a single item, iterate over hierarchies if necessary. Default + // Implementation falls back to ClearObjectItem(). + virtual void ClearMergedItem(const sal_uInt16 nWhich = 0); + + // Clear single item direct. Only uses AllowItemChange() and ItemChange(), + // but not PostItemChange() and ItemSetChanged() calls. + // Also supports complete deletion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich = 0) = 0; + + // Set a new StyleSheet. Registers as listener at the StyleSheet to get knowledge + // of StyleSheet changes. + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr) = 0; + + // Get the installed StyleSheet. + virtual SfxStyleSheet* GetStyleSheet() const = 0; + + // Scale the local ItemSet as far as it contains metric items. This needs to be + // overloaded to do it for hierarchical objects like e.g. groups. + virtual void Scale(const Fraction& rScale); + + // Move local items to a new ItemPool. This needs to be + // overloaded to do it for hierarchical objects like e.g. groups. + virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel = 0L); + + // Set new model. + virtual void SetModel(SdrModel* pOldModel, SdrModel* pNewModel); + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes(); + + // syntactical sugar for ItemSet accesses. Broadcasts before and after the changes + // to invalidate views in old and new BoundRects. As soon as the repaint mechanism + // will be changed these broadcasts will no longer be needed. + //void SetItemAndBroadcast(const SfxPoolItem& rItem); + //void ClearItemAndBroadcast(const sal_uInt16 nWhich = 0); + void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, sal_Bool bClearAllItems = sal_False); + + // Just a convenient shortcut for GetObjectItemSet().Get(nWhich). + const SfxPoolItem& GetItem(const sal_uInt16 nWhich) const; + + // support for convenient broadcasting. Used from SetMergedItemAndBroadcast(), + // ClearItemAndBroadcast() and SetItemSetAndBroadcast(), see above. + // But also from inside SdrObjects. + void BroadcastItemChange(const ItemChangeBroadcaster& rChange); + + // #i101556# add versioning mechanism; used from e.g. text attribute set to + // allow detection of e.g. style sheet or single text attribute changes. The + // default implementation returns 0 (zero) + virtual sal_uInt32 getVersion() const; + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_PROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/rectangleproperties.hxx b/svx/inc/svx/sdr/properties/rectangleproperties.hxx new file mode 100644 index 000000000000..e9a2a41bcbb3 --- /dev/null +++ b/svx/inc/svx/sdr/properties/rectangleproperties.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: rectangleproperties.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_RECTANGLEPROPERTIES_HXX +#define _SDR_PROPERTIES_RECTANGLEPROPERTIES_HXX + +#include <svx/sdr/properties/textproperties.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class SVX_DLLPUBLIC RectangleProperties : public TextProperties + { + protected: + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + RectangleProperties(SdrObject& rObj); + + // constructor for copying, but using new object + RectangleProperties(const RectangleProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~RectangleProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_RECTANGLEPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/properties/textproperties.hxx b/svx/inc/svx/sdr/properties/textproperties.hxx new file mode 100644 index 000000000000..77a19818f55a --- /dev/null +++ b/svx/inc/svx/sdr/properties/textproperties.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: textproperties.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PROPERTIES_TEXTPROPERTIES_HXX +#define _SDR_PROPERTIES_TEXTPROPERTIES_HXX + +#include <svx/sdr/properties/attributeproperties.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace properties + { + class SVX_DLLPUBLIC TextProperties : public AttributeProperties + { + private: + // #i101556# versioning support + sal_uInt32 maVersion; + + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0); + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet); + + public: + // basic constructor + TextProperties(SdrObject& rObj); + + // constructor for copying, but using new object + TextProperties(const TextProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~TextProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes(); + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes(); + + // This is the notifyer from SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + + // Set single item at the local ItemSet. *Does not use* AllowItemChange(), + // ItemChange(), PostItemChange() and ItemSetChanged() calls. + void SetObjectItemNoBroadcast(const SfxPoolItem& rItem); + + // #i101556# versioning support + virtual sal_uInt32 getVersion() const; + }; + } // end of namespace properties +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PROPERTIES_TEXTPROPERTIES_HXX + +// eof diff --git a/svx/inc/svx/sdr/table/tabledesign.hxx b/svx/inc/svx/sdr/table/tabledesign.hxx new file mode 100644 index 000000000000..80c6fa048e25 --- /dev/null +++ b/svx/inc/svx/sdr/table/tabledesign.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tabledesign.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_TABLE_DESIGN_HXX +#define _SDR_TABLE_DESIGN_HXX + +#include "svx/svxdllapi.h" + +#include <com/sun/star/container/XNameAccess.hpp> + +namespace sdr { namespace table { + +const sal_Int32 first_row_style = 0; +const sal_Int32 last_row_style = 1; +const sal_Int32 first_column_style = 2; +const sal_Int32 last_column_style = 3; +const sal_Int32 even_rows_style = 4; +const sal_Int32 odd_rows_style = 5; +const sal_Int32 even_columns_style = 6; +const sal_Int32 odd_columns_style = 7; +const sal_Int32 body_style = 8; +const sal_Int32 background_style = 9; +const sal_Int32 style_count = 10; + +extern SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > CreateTableDesignFamily(); + +} } + + +#endif diff --git a/svx/inc/svx/sdrcomment.hxx b/svx/inc/svx/sdrcomment.hxx new file mode 100644 index 000000000000..10f5d0b59a76 --- /dev/null +++ b/svx/inc/svx/sdrcomment.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrcomment.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_COMMENT_HXX +#define _SDR_COMMENT_HXX + +#include <sal/types.h> +#include <tools/date.hxx> +#include <rtl/ustring.hxx> +#include <basegfx/point/b2dpoint.hxx> + +#include <vector> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + class Comment + { + // counting ID + sal_uInt32 mnID; + + // creation date + Date maCreationDate; + + // name of creator + ::rtl::OUString maUserName; + + // text content + ::rtl::OUString maText; + + // position + basegfx::B2DPoint maPosition; + + public: + Comment( + sal_uInt32 nID, + Date aCreationDate, + const ::rtl::OUString& rUserName, + const ::rtl::OUString& rText, + const basegfx::B2DPoint& rPosition); + ~Comment(); + + // operator for sorting the vector by mnID + sal_Bool operator<(const Comment& rCandidate) const { return (mnID < rCandidate.mnID); } + + // comparison operators + sal_Bool operator==(const Comment& rCandidate) const; + sal_Bool operator!=(const Comment& rCandidate) const { return !(operator==(rCandidate)); } + + // access to ID, read only + sal_uInt32 GetID() const { return mnID; } + + // access to CreationDate + Date GetCreationDate() const { return maCreationDate; } + void SetCreationDate(Date aNewDate); + + // access to UserName + const ::rtl::OUString& GetUserName() const { return maUserName; } + void SetUserName(const ::rtl::OUString& rNewName); + + // access to text + const ::rtl::OUString& GetText() const { return maText; } + void SetText(const ::rtl::OUString& rNewText); + + // access to position + const basegfx::B2DPoint& GetPosition() const { return maPosition; } + void SetPosition(const basegfx::B2DPoint& rNewPos); + }; + + // typedef for list of sdr::Comment + typedef ::std::vector< Comment > CommentVector; +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_COMMENT_HXX +// eof diff --git a/svx/inc/svx/sdrhittesthelper.hxx b/svx/inc/svx/sdrhittesthelper.hxx new file mode 100644 index 000000000000..037f7fa813a5 --- /dev/null +++ b/svx/inc/svx/sdrhittesthelper.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdetc.hxx,v $ + * $Revision: 1.4.152.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDRHITTESTHELPER_HXX +#define _SDRHITTESTHELPER_HXX + +#include "svx/svxdllapi.h" +#include <tools/string.hxx> +#include <tools/gen.hxx> + +///////////////////////////////////////////////////////////////////// +// #i101872# new Object HitTest as View-tooling + +class SdrObject; +class SdrPageView; +class SetOfByte; +class SdrObjList; +namespace sdr { namespace contact { class ViewObjectContact; }} +namespace basegfx { class B2DPoint; } + +///////////////////////////////////////////////////////////////////// +// Wrappers for classic Sdr* Mode/View classes + +SVX_DLLPUBLIC SdrObject* SdrObjectPrimitiveHit( + const SdrObject& rObject, + const Point& rPnt, + sal_uInt16 nTol, + const SdrPageView& rSdrPageView, + const SetOfByte* pVisiLayer, + bool bTextOnly); + +SVX_DLLPUBLIC SdrObject* SdrObjListPrimitiveHit( + const SdrObjList& rList, + const Point& rPnt, + sal_uInt16 nTol, + const SdrPageView& rSdrPageView, + const SetOfByte* pVisiLayer, + bool bTextOnly); + +///////////////////////////////////////////////////////////////////// +// the pure HitTest based on a VOC + +SVX_DLLPUBLIC bool ViewObjectContactPrimitiveHit( + const sdr::contact::ViewObjectContact& rVOC, + const basegfx::B2DPoint& rHitPosition, + double fLogicHitTolerance, + bool bTextOnly); + +///////////////////////////////////////////////////////////////////// + +#endif //_SDRHITTESTHELPER_HXX + +///////////////////////////////////////////////////////////////////// +// eof diff --git a/svx/inc/svx/sdrmasterpagedescriptor.hxx b/svx/inc/svx/sdrmasterpagedescriptor.hxx new file mode 100644 index 000000000000..b0593ab48774 --- /dev/null +++ b/svx/inc/svx/sdrmasterpagedescriptor.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrmasterpagedescriptor.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_MASTERPAGEDESCRIPTOR_HXX +#define _SDR_MASTERPAGEDESCRIPTOR_HXX + +#include <svx/sdrpageuser.hxx> +#include <svx/svdsob.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predeclarations +class SdrObject; + +namespace sdr +{ + namespace contact + { + class ViewContact; + } // end of namespace contact +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + class MasterPageDescriptor : public sdr::PageUser + { + SdrPage& maOwnerPage; + SdrPage& maUsedPage; + SetOfByte maVisibleLayers; + + // ViewContact part + sdr::contact::ViewContact* mpViewContact; + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + // assignment operator defined, but not implemented + void operator=(const MasterPageDescriptor& rCandidate); + + public: + MasterPageDescriptor(SdrPage& aOwnerPage, SdrPage& aUsedPage); + virtual ~MasterPageDescriptor(); + + // ViewContact part + sdr::contact::ViewContact& GetViewContact() const; + + // this method is called form the destructor of the referenced page. + // do all necessary action to forget the page. It is not necessary to call + // RemovePageUser(), that is done form the destructor. + virtual void PageInDestruction(const SdrPage& rPage); + + // member access to UsedPage + SdrPage& GetUsedPage() const { return maUsedPage; } + + // member access to OwnerPage + SdrPage& GetOwnerPage() const { return maOwnerPage; } + + // member access to VisibleLayers + const SetOfByte& GetVisibleLayers() const { return maVisibleLayers; } + void SetVisibleLayers(const SetOfByte& rNew); + + // operators + sal_Bool operator==(const MasterPageDescriptor& rCandidate) const; + sal_Bool operator!=(const MasterPageDescriptor& rCandidate) const; + + // #i42075# Get the correct BackgroundObject + SdrObject* GetBackgroundObject() const; + }; +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_MASTERPAGEDESCRIPTOR_HXX +// eof diff --git a/svx/inc/svx/sdrobjectuser.hxx b/svx/inc/svx/sdrobjectuser.hxx new file mode 100644 index 000000000000..a3b9bf084a66 --- /dev/null +++ b/svx/inc/svx/sdrobjectuser.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrobjectuser.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OBJECTUSER_HXX +#define _SDR_OBJECTUSER_HXX + +#include <vector> + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// predeclarations +class SdrObject; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// To make things more safe, allow users of the page to register at it. The users need to be derived +// from sdr::PageUser to get a call. The users do not need to call RemovePageUser() at the page +// when they get called from PageInDestruction(). + +namespace sdr +{ + class ObjectUser + { + public: + // this method is called form the destructor of the referenced page. + // do all necessary action to forget the page. It is not necessary to call + // RemovePageUser(), that is done form the destructor. + virtual void ObjectInDestruction(const SdrObject& rObject) = 0; + }; + + // typedef for ObjectUserVector + typedef ::std::vector< ObjectUser* > ObjectUserVector; +} // end of namespace sdr + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OBJECTUSER_HXX +// eof diff --git a/svx/inc/svx/sdrpageuser.hxx b/svx/inc/svx/sdrpageuser.hxx new file mode 100644 index 000000000000..96cea320c857 --- /dev/null +++ b/svx/inc/svx/sdrpageuser.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrpageuser.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_PAGEUSER_HXX +#define _SDR_PAGEUSER_HXX + +#include <vector> + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// predeclarations +class SdrPage; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// To make things more safe, allow users of the page to register at it. The users need to be derived +// from sdr::PageUser to get a call. The users do not need to call RemovePageUser() at the page +// when they get called from PageInDestruction(). + +namespace sdr +{ + class PageUser + { + public: + // this method is called form the destructor of the referenced page. + // do all necessary action to forget the page. It is not necessary to call + // RemovePageUser(), that is done form the destructor. + virtual void PageInDestruction(const SdrPage& rPage) = 0; + }; + + // typedef for PageUserVector + typedef ::std::vector< PageUser* > PageUserVector; +} // end of namespace sdr + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_PAGEUSER_HXX +// eof diff --git a/svx/inc/svx/sdrpagewindow.hxx b/svx/inc/svx/sdrpagewindow.hxx new file mode 100644 index 000000000000..87806b4a72e4 --- /dev/null +++ b/svx/inc/svx/sdrpagewindow.hxx @@ -0,0 +1,145 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrpagewindow.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDRPAGEWINDOW_HXX +#define _SDRPAGEWINDOW_HXX + +#include <tools/debug.hxx> +#include <com/sun/star/awt/XWindowListener.hpp> +#include <com/sun/star/beans/XPropertyChangeListener.hpp> +#include <com/sun/star/awt/XControlContainer.hpp> +#include <com/sun/star/util/XModeChangeListener.hpp> +#include <cppuhelper/implbase4.hxx> +#include <svx/svdtypes.hxx> // fuer SdrLayerID +#include <svl/svarray.hxx> +#include <tools/contnr.hxx> +#include <svx/sdrpagewindow.hxx> +#include "svx/svxdllapi.h" + +#include <vector> + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// predeclarations + +class Region; +class SdrUnoObj; +class SdrPageView; + +// #110094# +namespace sdr +{ + namespace contact + { + class ObjectContact; + class ViewObjectContactRedirector; + } // end of namespace contact + + namespace overlay + { + class OverlayManager; + } // end of namespace overlay +} // end of namespace sdr + +namespace basegfx +{ + class B2DRange; +} // end of namespace basegfx + +class SdrUnoControlList; +class SdrPaintWindow; +class Link; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrPageWindow +{ + // #110094# ObjectContact section + sdr::contact::ObjectContact* mpObjectContact; + + // the SdrPageView this window belongs to + SdrPageView& mrPageView; + + // the PaintWindow to paint on. Here is access to OutDev etc. + // #i72752# change to pointer to allow patcing it in DrawLayer() if necessary + SdrPaintWindow* mpPaintWindow; + SdrPaintWindow* mpOriginalPaintWindow; + + // UNO stuff for xControls + void* mpDummy; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > mxControlContainer; + + // #110094# ObjectContact section + sdr::contact::ObjectContact* CreateViewSpecificObjectContact(); + +public: + SdrPageWindow(SdrPageView& rNewPageView, SdrPaintWindow& rPaintWindow); + ~SdrPageWindow(); + + // data read accesses + SdrPageView& GetPageView() const { return mrPageView; } + SdrPaintWindow& GetPaintWindow() const { return *mpPaintWindow; } + const SdrPaintWindow* GetOriginalPaintWindow() const { return mpOriginalPaintWindow; } + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > GetControlContainer( bool _bCreateIfNecessary = true ) const; + + // OVERLAYMANAGER + ::sdr::overlay::OverlayManager* GetOverlayManager() const; + + // #i72752# allow patcing SdrPaintWindow from SdrPageView::DrawLayer if needed + void patchPaintWindow(SdrPaintWindow& rPaintWindow); + void unpatchPaintWindow(); + + // the repaint method. For migration from pPaintProc, use one more parameter + void PrePaint(); + void PrepareRedraw(const Region& rReg); + void RedrawAll(sdr::contact::ViewObjectContactRedirector* pRedirector) const; + void RedrawLayer(const SdrLayerID* pId, sdr::contact::ViewObjectContactRedirector* pRedirector) const; + + // Invalidate call, used from ObjectContact(OfPageView) in InvalidatePartOfView(...) + void InvalidatePageWindow(const basegfx::B2DRange& rRange); + + // #110094# ObjectContact section + sdr::contact::ObjectContact& GetObjectContact() const; + /// determines whether there already exists an ObjectContact + bool HasObjectContact() const; + + // #i26631# + void ResetObjectContact(); + + /** sets all elements in the view which support a design and a alive mode into the given mode + */ + void SetDesignMode( bool _bDesignMode ) const; +}; + +// typedefs for a list of SdrPageWindow +typedef ::std::vector< SdrPageWindow* > SdrPageWindowVector; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SDRPAGEWINDOW_HXX diff --git a/svx/inc/svx/sdshcitm.hxx b/svx/inc/svx/sdshcitm.hxx new file mode 100644 index 000000000000..5d3930d2a5e8 --- /dev/null +++ b/svx/inc/svx/sdshcitm.hxx @@ -0,0 +1,49 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdshcitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDSHCITM_HXX +#define _SDSHCITM_HXX + +#include <svx/xcolit.hxx> +#include <svx/svddef.hxx> + +//--------------------- +// class SdrShadowColorItem +//--------------------- +class SdrShadowColorItem: public XColorItem { +public: + SdrShadowColorItem() {} + SdrShadowColorItem(long nIndex, const Color& rTheColor): XColorItem(SDRATTR_SHADOWCOLOR,nIndex,rTheColor) {} + + SdrShadowColorItem(const String& rName, const Color& rTheColor): XColorItem(SDRATTR_SHADOWCOLOR,rName,rTheColor) {} + +// SdrShadowColorItem(SvStream& rIn): XColorItem(SDRATTR_SHADOWCOLOR,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdshitm.hxx b/svx/inc/svx/sdshitm.hxx new file mode 100644 index 000000000000..00873b1182c3 --- /dev/null +++ b/svx/inc/svx/sdshitm.hxx @@ -0,0 +1,47 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdshitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDSHITM_HXX +#define _SDSHITM_HXX + +#ifndef _SDOOITEM_HXX +#include <svx/sdooitm.hxx> +#endif +#include <svx/svddef.hxx> + +//------------------------------ +// class SdrShadowItem +//------------------------------ +class SdrShadowItem: public SdrOnOffItem { +public: + SdrShadowItem(BOOL bShadow=FALSE): SdrOnOffItem(SDRATTR_SHADOW, bShadow) {} + SdrShadowItem(SvStream& rIn): SdrOnOffItem(SDRATTR_SHADOW, rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdshtitm.hxx b/svx/inc/svx/sdshtitm.hxx new file mode 100644 index 000000000000..4ab36d118cff --- /dev/null +++ b/svx/inc/svx/sdshtitm.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdshtitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDSHTITM_HXX +#define _SDSHTITM_HXX + +#include <svx/sdprcitm.hxx> +#include <svx/svddef.hxx> + +//--------------------- +// class SdrShadowTransparenceItem +//--------------------- +class SdrShadowTransparenceItem: public SdrPercentItem { +public: + SdrShadowTransparenceItem(USHORT nTransp=0): SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE,nTransp) {} + SdrShadowTransparenceItem(SvStream& rIn) : SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdsxyitm.hxx b/svx/inc/svx/sdsxyitm.hxx new file mode 100644 index 000000000000..2eace3120bd5 --- /dev/null +++ b/svx/inc/svx/sdsxyitm.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdsxyitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDSXYITM_HXX +#define _SDSXYITM_HXX + +#include <svx/sdmetitm.hxx> +#include <svx/svddef.hxx> + +//--------------------- +// class SdrShadowXDistItem +//--------------------- +class SdrShadowXDistItem: public SdrMetricItem { +public: + SdrShadowXDistItem(long nDist=0) : SdrMetricItem(SDRATTR_SHADOWXDIST,nDist) {} + SdrShadowXDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_SHADOWXDIST,rIn) {} +}; + +//--------------------- +// class SdrShadowYDistItem +//--------------------- +class SdrShadowYDistItem: public SdrMetricItem { +public: + SdrShadowYDistItem(long nDist=0) : SdrMetricItem(SDRATTR_SHADOWYDIST,nDist) {} + SdrShadowYDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_SHADOWYDIST,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdtaaitm.hxx b/svx/inc/svx/sdtaaitm.hxx new file mode 100644 index 000000000000..27b8cde80a10 --- /dev/null +++ b/svx/inc/svx/sdtaaitm.hxx @@ -0,0 +1,50 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtaaitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDTAAITM_HXX +#define _SDTAAITM_HXX + +#include <svl/intitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC SdrTextAniAmountItem: public SfxInt16Item { +public: + TYPEINFO(); + SdrTextAniAmountItem(INT16 nVal=0): SfxInt16Item(SDRATTR_TEXT_ANIAMOUNT,nVal) {} + SdrTextAniAmountItem(SvStream& rIn): SfxInt16Item(SDRATTR_TEXT_ANIAMOUNT,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual FASTBOOL HasMetrics() const; + virtual FASTBOOL ScaleMetrics(long nMul, long nDiv); + + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sdtacitm.hxx b/svx/inc/svx/sdtacitm.hxx new file mode 100644 index 000000000000..b34aaa5c2c0a --- /dev/null +++ b/svx/inc/svx/sdtacitm.hxx @@ -0,0 +1,43 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtacitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef sdtacitm_hxx +#define sdtacitm_hxx + +#include <svl/intitem.hxx> +#include <svx/svddef.hxx> + +// Anzahl der Durchlaeufe. 0=Endlos. +class SdrTextAniCountItem: public SfxUInt16Item { +public: + SdrTextAniCountItem(UINT16 nVal=0): SfxUInt16Item(SDRATTR_TEXT_ANICOUNT,nVal) {} + SdrTextAniCountItem(SvStream& rIn): SfxUInt16Item(SDRATTR_TEXT_ANICOUNT,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdtaditm.hxx b/svx/inc/svx/sdtaditm.hxx new file mode 100644 index 000000000000..bff071dab476 --- /dev/null +++ b/svx/inc/svx/sdtaditm.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtaditm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDTADITM_HXX +#define _SDTADITM_HXX + +#include <svl/eitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +//------------------------------ +// class SdrTextAniDirectionItem +//------------------------------ + +enum SdrTextAniDirection {SDRTEXTANI_LEFT, + SDRTEXTANI_RIGHT, + SDRTEXTANI_UP, + SDRTEXTANI_DOWN}; + +class SVX_DLLPUBLIC SdrTextAniDirectionItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrTextAniDirectionItem(SdrTextAniDirection eDir=SDRTEXTANI_LEFT): SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION,(USHORT)eDir) {} + SdrTextAniDirectionItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 4; } + SdrTextAniDirection GetValue() const { return (SdrTextAniDirection)SfxEnumItem::GetValue(); } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueTextByPos(USHORT nPos) const; + + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sdtagitm.hxx b/svx/inc/svx/sdtagitm.hxx new file mode 100644 index 000000000000..b20d780195da --- /dev/null +++ b/svx/inc/svx/sdtagitm.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtagitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDTAGITM_HXX +#define _SDTAGITM_HXX + +#include <svx/sdooitm.hxx> +#include <svx/svddef.hxx> + +//------------------------------------ +// class SdrTextAutoGrowHeightItem +//------------------------------------ +class SdrTextAutoGrowHeightItem: public SdrOnOffItem { +public: + SdrTextAutoGrowHeightItem(BOOL bAuto=TRUE): SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT,bAuto) {} + SdrTextAutoGrowHeightItem(SvStream& rIn) : SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT,rIn) {} +}; + +//------------------------------------ +// class SdrTextAutoGrowWidthItem +//------------------------------------ +class SdrTextAutoGrowWidthItem: public SdrOnOffItem { +public: + SdrTextAutoGrowWidthItem(BOOL bAuto=FALSE): SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH,bAuto) {} + SdrTextAutoGrowWidthItem(SvStream& rIn) : SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdtaiitm.hxx b/svx/inc/svx/sdtaiitm.hxx new file mode 100644 index 000000000000..6379f94a3bcf --- /dev/null +++ b/svx/inc/svx/sdtaiitm.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtaiitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDTAIITM_HXX +#define _SDTAIITM_HXX + +#include <svx/sdynitm.hxx> +#include <svx/svddef.hxx> + +class SdrTextAniStartInsideItem: public SdrYesNoItem { +public: + SdrTextAniStartInsideItem(BOOL bOn=FALSE): SdrYesNoItem(SDRATTR_TEXT_ANISTARTINSIDE,bOn) {} + SdrTextAniStartInsideItem(SvStream& rIn) : SdrYesNoItem(SDRATTR_TEXT_ANISTARTINSIDE,rIn) {} +}; + +class SdrTextAniStopInsideItem: public SdrYesNoItem { +public: + SdrTextAniStopInsideItem(BOOL bOn=FALSE): SdrYesNoItem(SDRATTR_TEXT_ANISTOPINSIDE,bOn) {} + SdrTextAniStopInsideItem(SvStream& rIn) : SdrYesNoItem(SDRATTR_TEXT_ANISTOPINSIDE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdtaitm.hxx b/svx/inc/svx/sdtaitm.hxx new file mode 100644 index 000000000000..ca816c5581ed --- /dev/null +++ b/svx/inc/svx/sdtaitm.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtaitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDTAITM_HXX +#define _SDTAITM_HXX + +#include <svl/eitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +//------------------------------ +// class SdrTextVertAdjustItem +//------------------------------ + +// Implementiert werden zunaechst nur TOP und CENTER, neustens auch BOTTOM +enum SdrTextVertAdjust {SDRTEXTVERTADJUST_TOP, // Kopfbuendig (so wie man es normalerweise kennt) + SDRTEXTVERTADJUST_CENTER, // Zentriert (z.B. fuer die Titeltexte im Draw) + SDRTEXTVERTADJUST_BOTTOM, // Fussbuendig + SDRTEXTVERTADJUST_BLOCK // #103516# support vertical full with supported now + /*,SDRTEXTVERTADJUST_STRETCH*/}; // Auch die Buchstaben in der Hoehe verzerren (ni) + +class SVX_DLLPUBLIC SdrTextVertAdjustItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrTextVertAdjustItem(SdrTextVertAdjust eAdj=SDRTEXTVERTADJUST_TOP): SfxEnumItem(SDRATTR_TEXT_VERTADJUST,(USHORT)eAdj) {} + SdrTextVertAdjustItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_VERTADJUST,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 5; } + SdrTextVertAdjust GetValue() const { return (SdrTextVertAdjust)SfxEnumItem::GetValue(); } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +//------------------------------ +// class SdrTextHorzAdjustItem +//------------------------------ + +enum SdrTextHorzAdjust {SDRTEXTHORZADJUST_LEFT, // Linksbuendig verankert + SDRTEXTHORZADJUST_CENTER, // Zentriert (z.B. fuer die Titeltexte im Draw) + SDRTEXTHORZADJUST_RIGHT, // Rechtsbuendig verankert + SDRTEXTHORZADJUST_BLOCK // So wie es frueher war: Gesamte Textrahmenbreite verwenden, Absatzformatierung macht wieder Sinn + /*,SDRTEXTHORZADJUST_STRETCH*/}; // FitToSize in X-Richtung (ni). + +class SVX_DLLPUBLIC SdrTextHorzAdjustItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrTextHorzAdjustItem(SdrTextHorzAdjust eAdj=SDRTEXTHORZADJUST_BLOCK): SfxEnumItem(SDRATTR_TEXT_HORZADJUST,(USHORT)eAdj) {} + SdrTextHorzAdjustItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_HORZADJUST,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 5; } + SdrTextHorzAdjust GetValue() const { return (SdrTextHorzAdjust)SfxEnumItem::GetValue(); } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sdtakitm.hxx b/svx/inc/svx/sdtakitm.hxx new file mode 100644 index 000000000000..ef91d76f0374 --- /dev/null +++ b/svx/inc/svx/sdtakitm.hxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtakitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef SDTAKITM_HXX +#define SDTAKITM_HXX + +#include <svl/eitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +//------------------------------ +// class SdrTextAniKindItem +//------------------------------ + +enum SdrTextAniKind {SDRTEXTANI_NONE, + SDRTEXTANI_BLINK, + SDRTEXTANI_SCROLL, + SDRTEXTANI_ALTERNATE, + SDRTEXTANI_SLIDE}; + +// - SDRTEXTANI_BLINK: +// Einfach nur Blinken. Direction und Amount ohne Wirkung. +// Frequenz siehe Delay, 0=0.5Hz (Delay=250). +// Count=Anzahl der blinker. 0=Endlos. +// StartInside: FALSE=beginnend mit Pause, TRUE=Beginnend mit Puls +// StopInside: FALSE=Nach Count blinkern nicht sichtbar, TRUE=sichtbar +// (nur wenn Count!=0) +// - SDRTEXTANI_SCROLL: +// Schrift laeuft rein, laeuft vollstaendig durch. Wenn ganz verschwunden +// geht's wieder von vorne los. +// Delay in ms, Sonderfall Delay=0 wird auf 50ms defaulted (20Hz) +// Count=Durchlaufanzahl (0=Endlos) +// Direction: ist eben die Richtung in die gescrollt wird. +// StartInside: FALSE=Schrift wird auch beim ersten Durchlauf reingescrollt +// TRUE=Der linke Teil der Schrift steht beim ersten Durchlauf +// bereits da (im sichtbaren "Scrollbereich") +// StopInside: FALSE=Schrift wird auch beim letzten Durchlauf vollstaendig +// rausgescrollt +// TRUE=Schrift wird beim letzten Durchlauf nicht rausgescrollt +// (nur wenn Count!=0) +// Amount: Schrittweite in logischen Einheiten. Negative Werte bedeuten +// Pixel statt log. Einheiten. Wenn Amount=0, dann wird auf +// 1 Pixel defaulted. +// - SDRTEXTANI_ALTERNATE: +// Wie SDRTEXTANI_SCROLL, nur wird nicht gescrollt bis Schrift ganz +// verschwunden, sondern bis der letzte Teil vollstaendig sichtbar ist. Dann +// wird die Richtung umgekehrt und zuruekgescrollt. +// Count=Anzahl der Durchlaeufe=Anzahl der Richtungswechsel-1 +// Bei Count=1 ist SDRTEXTANI_ALTERNATE also identisch mit SDRTEXTANI_SCROLL +// Direction ist die Startrichtung +// Alle andern Parameter wie SDRTEXTANI_SCROLL +// - SDRTEXTANI_SLIDE: +// Schrift wird nur reingeschoben bis zur Originalposition. +// -> also wie SCROLL mit StartInside=FALSE, StopInside=TRUE +// und Count=1. Count=0 wird als Count=1 interpretiert. +// Fuer jeden Count>1 wird der Text jedoch ruekwaerts wieder vollstaendig +// rausgeschoben (aehnlich wie ALTERNATE) und dann wieder reingeschoben. +// StopInside wird nicht ausgewertet, weil immer Inside gestoppt wird. +// StartInside wird nicht ausgewertet, weil immer Outside gestartet wird. +// Alle andern Parameter wie SDRTEXTANI_SCROLL +// StartInside,StopInside: Bei TRUE ist die anfaengliche/entgueltige +// Textposition abhaengig von der Textverankerung am Zeichenobjekt. Sie +// entspricht der Textposition bei normalem Paint (ohne Laufschrift). + +class SVX_DLLPUBLIC SdrTextAniKindItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrTextAniKindItem(SdrTextAniKind eKind=SDRTEXTANI_NONE): SfxEnumItem(SDRATTR_TEXT_ANIKIND,(USHORT)eKind) {} + SdrTextAniKindItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_ANIKIND,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 5; } + SdrTextAniKind GetValue() const { return (SdrTextAniKind)SfxEnumItem::GetValue(); } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sdtayitm.hxx b/svx/inc/svx/sdtayitm.hxx new file mode 100644 index 000000000000..84d82d561522 --- /dev/null +++ b/svx/inc/svx/sdtayitm.hxx @@ -0,0 +1,47 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtayitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDTAYITM_HXX +#define _SDTAYITM_HXX + +#include <svl/intitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC SdrTextAniDelayItem: public SfxUInt16Item { +public: + TYPEINFO(); + SdrTextAniDelayItem(UINT16 nVal=0): SfxUInt16Item(SDRATTR_TEXT_ANIDELAY,nVal) {} + SdrTextAniDelayItem(SvStream& rIn): SfxUInt16Item(SDRATTR_TEXT_ANIDELAY,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sdtcfitm.hxx b/svx/inc/svx/sdtcfitm.hxx new file mode 100644 index 000000000000..928422ba51dc --- /dev/null +++ b/svx/inc/svx/sdtcfitm.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtcfitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDTCFITM_HXX +#define _SDTCFITM_HXX + +#include <svx/sdooitm.hxx> +#include <svx/svddef.hxx> + +//------------------------------------ +// class SdrTextContourFrameItem +//------------------------------------ +class SdrTextContourFrameItem: public SdrOnOffItem { +public: + SdrTextContourFrameItem(BOOL bOn=FALSE): SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME,bOn) {} + SdrTextContourFrameItem(SvStream& rIn) : SdrOnOffItem(SDRATTR_TEXT_CONTOURFRAME,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdtditm.hxx b/svx/inc/svx/sdtditm.hxx new file mode 100644 index 000000000000..15c1bdd0b7ec --- /dev/null +++ b/svx/inc/svx/sdtditm.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtditm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef SDTMITM_HXX +#define SDTMITM_HXX + +#include <svx/sdmetitm.hxx> +#include <svx/svddef.hxx> + +//---------------------------------------------- +// class SdrTextLeft/Right/Upper/LowerDistItem +//---------------------------------------------- +class SdrTextLeftDistItem: public SdrMetricItem { +public: + SdrTextLeftDistItem(long nHgt=0): SdrMetricItem(SDRATTR_TEXT_LEFTDIST,nHgt) {} + SdrTextLeftDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_TEXT_LEFTDIST,rIn) {} +}; + +class SdrTextRightDistItem: public SdrMetricItem { +public: + SdrTextRightDistItem(long nHgt=0): SdrMetricItem(SDRATTR_TEXT_RIGHTDIST,nHgt) {} + SdrTextRightDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_TEXT_RIGHTDIST,rIn) {} +}; + +class SdrTextUpperDistItem: public SdrMetricItem { +public: + SdrTextUpperDistItem(long nHgt=0): SdrMetricItem(SDRATTR_TEXT_UPPERDIST,nHgt) {} + SdrTextUpperDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_TEXT_UPPERDIST,rIn) {} +}; + +class SdrTextLowerDistItem: public SdrMetricItem { +public: + SdrTextLowerDistItem(long nHgt=0): SdrMetricItem(SDRATTR_TEXT_LOWERDIST,nHgt) {} + SdrTextLowerDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_TEXT_LOWERDIST,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdtfchim.hxx b/svx/inc/svx/sdtfchim.hxx new file mode 100644 index 000000000000..d8fa20507980 --- /dev/null +++ b/svx/inc/svx/sdtfchim.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtfchim.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDTFCHIM_HXX +#define _SDTFCHIM_HXX + +#include <svx/svddef.hxx> + +class SVX_DLLPUBLIC SdrTextFixedCellHeightItem : public SfxBoolItem +{ +public: + + TYPEINFO(); + SdrTextFixedCellHeightItem( BOOL bUseFixedCellHeight = FALSE ); + SVX_DLLPRIVATE SdrTextFixedCellHeightItem( SvStream & rStream, sal_uInt16 nVersion ); + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation, + SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric, + String &rText, const IntlWrapper * = 0) const; + + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItem ) const; + SVX_DLLPRIVATE virtual SvStream& Store( SvStream&, sal_uInt16 nVersion ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + SVX_DLLPRIVATE virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; + + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + +#ifdef SDR_ISPOOLABLE + SVX_DLLPRIVATE virtual int IsPoolable() const; +#endif +}; + +#endif diff --git a/svx/inc/svx/sdtfsitm.hxx b/svx/inc/svx/sdtfsitm.hxx new file mode 100644 index 000000000000..467107d49812 --- /dev/null +++ b/svx/inc/svx/sdtfsitm.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtfsitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDTFSITM_HXX +#define _SDTFSITM_HXX + +#include <svl/eitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +enum SdrFitToSizeType {SDRTEXTFIT_NONE, // - kein FitToSize + SDRTEXTFIT_PROPORTIONAL, // - Alle Buchstaben proportional umgroessern + SDRTEXTFIT_ALLLINES, // - Zus. jede Zeile separat in der Breite stretchen + SDRTEXTFIT_RESIZEATTR}; // - Bei Rahmenumgroesserung (ausser Autogrow) wird + // die Schriftgroesse umattributiert (hart) + +// Bei SDRTEXTFIT_PROPORTIONAL und SDRTEXTFIT_ALLLINES gibt es kein AutoGrow und +// keine automatischen Umbrueche. +// Ist SDRTEXTFIT_RESIZEATTR gesetzt, so wird beim umgroessern des Textrahmens +// (ausser bei AutoGrow) die Schrift durch harte Attributierung ebenfalls +// umgegroessert. +// Bei AutoGrowingWidth gibt es ebenfalls keine automatischen Umbrueche (erst bei +// TextMaxFrameWidth). + +//-------------------------------- +// class SdrTextFitToSizeTypeItem +//-------------------------------- +class SVX_DLLPUBLIC SdrTextFitToSizeTypeItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrTextFitToSizeTypeItem(SdrFitToSizeType eFit=SDRTEXTFIT_NONE): SfxEnumItem(SDRATTR_TEXT_FITTOSIZE,(USHORT)eFit) {} + SdrTextFitToSizeTypeItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_FITTOSIZE,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 4; } + SdrFitToSizeType GetValue() const { return (SdrFitToSizeType)SfxEnumItem::GetValue(); } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; + virtual int HasBoolValue() const; + virtual BOOL GetBoolValue() const; + virtual void SetBoolValue(BOOL bVal); +}; + +#endif diff --git a/svx/inc/svx/sdtmfitm.hxx b/svx/inc/svx/sdtmfitm.hxx new file mode 100644 index 000000000000..e30d85be1034 --- /dev/null +++ b/svx/inc/svx/sdtmfitm.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdtmfitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDTMFITM_HXX +#define _SDTMFITM_HXX + +#include <svx/sdmetitm.hxx> +#include <svx/svddef.hxx> + +//------------------------------ +// class SdrTextMinFrameHeighItem +//------------------------------ +class SdrTextMinFrameHeightItem: public SdrMetricItem { +public: + SdrTextMinFrameHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT,nHgt) {} + SdrTextMinFrameHeightItem(SvStream& rIn): SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT,rIn) {} +}; + +//------------------------------ +// class SdrTextMaxFrameHeightItem +//------------------------------ +class SdrTextMaxFrameHeightItem: public SdrMetricItem { +public: + SdrTextMaxFrameHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT,nHgt) {} + SdrTextMaxFrameHeightItem(SvStream& rIn): SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT,rIn) {} +}; + +//------------------------------ +// class SdrTextMinFrameWidthItem +//------------------------------ +class SdrTextMinFrameWidthItem: public SdrMetricItem { +public: + SdrTextMinFrameWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH,nWdt) {} + SdrTextMinFrameWidthItem(SvStream& rIn): SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH,rIn) {} +}; + +//------------------------------ +// class SdrTextMaxFrameWidthItem +//------------------------------ +class SdrTextMaxFrameWidthItem: public SdrMetricItem { +public: + SdrTextMaxFrameWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH,nWdt) {} + SdrTextMaxFrameWidthItem(SvStream& rIn): SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sdynitm.hxx b/svx/inc/svx/sdynitm.hxx new file mode 100644 index 000000000000..88826007ef90 --- /dev/null +++ b/svx/inc/svx/sdynitm.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdynitm.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SDYNITM_HXX +#define _SDYNITM_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + + +//------------------------------------------------------------ +// class SdrYesNoItem +// hier liefert GetValueTextByVal() "ja" oder "nein" +// anstelle von "TRUE" und "FALSE" +//------------------------------------------------------------ +class SVX_DLLPUBLIC SdrYesNoItem: public SfxBoolItem { +public: + TYPEINFO(); + SdrYesNoItem(): SfxBoolItem() {} + SdrYesNoItem(USHORT nId, BOOL bOn=FALSE): SfxBoolItem(nId,bOn) {} + SdrYesNoItem(USHORT nId, SvStream& rIn): SfxBoolItem(nId,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual String GetValueTextByVal(BOOL bVal) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +#ifdef SDR_ISPOOLABLE + virtual int IsPoolable() const; +#endif +}; + + +#endif diff --git a/svx/inc/svx/selectioncontroller.hxx b/svx/inc/svx/selectioncontroller.hxx new file mode 100644 index 000000000000..b9c04b54c0dc --- /dev/null +++ b/svx/inc/svx/selectioncontroller.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: selectioncontroller.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SELECTIONCONTROLLER_HXX +#define _SELECTIONCONTROLLER_HXX + +#include "svx/svxdllapi.h" + +#include <boost/shared_ptr.hpp> + +#include <cppuhelper/weak.hxx> + +class KeyEvent; +class MouseEvent; +class Window; +class SfxItemSet; +class SfxRequest; +class SfxStyleSheet; +class SdrPage; +class SdrModel; + +namespace sdr +{ + +class SVX_DLLPUBLIC SelectionController: public cppu::OWeakObject +{ +public: + virtual bool onKeyInput(const KeyEvent& rKEvt, Window* pWin); + virtual bool onMouseButtonDown(const MouseEvent& rMEvt, Window* pWin); + virtual bool onMouseButtonUp(const MouseEvent& rMEvt, Window* pWin); + virtual bool onMouseMove(const MouseEvent& rMEvt, Window* pWin); + + virtual void onSelectionHasChanged(); + + virtual void GetState( SfxItemSet& rSet ); + virtual void Execute( SfxRequest& rReq ); + + virtual bool DeleteMarked(); + + virtual bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const; + virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll); + + virtual bool GetStyleSheet( SfxStyleSheet* &rpStyleSheet ) const; + virtual bool SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr ); + + virtual bool GetMarkedObjModel( SdrPage* pNewPage ); + virtual bool PasteObjModel( const SdrModel& rModel ); + + /** returns a format paint brush set from the current selection */ + virtual bool TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& rFormatSet ); + + /** applies a format paint brush set from the current selection. + if bNoCharacterFormats is true, no character attributes are changed. + if bNoParagraphFormats is true, no paragraph attributes are changed. + */ + virtual bool ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats ); +}; + +} + +#endif //_SELECTIONCONTROLLER_HXX + diff --git a/svx/inc/svx/shaditem.hxx b/svx/inc/svx/shaditem.hxx new file mode 100644 index 000000000000..90c33aef2410 --- /dev/null +++ b/svx/inc/svx/shaditem.hxx @@ -0,0 +1,117 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: shaditem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SHADITEM_HXX +#define _SVX_SHADITEM_HXX + +// include --------------------------------------------------------------- + +#include <tools/color.hxx> +#include <svl/eitem.hxx> +#include <svx/svxenum.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +namespace rtl +{ + class OUString; +} + +// class SvxShadowItem --------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt ein Schattenattribut (Farbe, Breite, Lage). +*/ + +#define SHADOW_TOP ((USHORT)0) +#define SHADOW_BOTTOM ((USHORT)1) +#define SHADOW_LEFT ((USHORT)2) +#define SHADOW_RIGHT ((USHORT)3) + +class SVX_DLLPUBLIC SvxShadowItem : public SfxEnumItemInterface +{ + Color aShadowColor; + USHORT nWidth; + SvxShadowLocation eLocation; +public: + TYPEINFO(); + + SvxShadowItem( const USHORT nId , + const Color *pColor = 0, const USHORT nWidth = 100 /*5pt*/, + const SvxShadowLocation eLoc = SVX_SHADOW_NONE ); + + inline SvxShadowItem& operator=( const SvxShadowItem& rFmtShadow ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual int ScaleMetrics( long nMult, long nDiv ); + virtual int HasMetrics() const; + + const Color& GetColor() const { return aShadowColor;} + void SetColor( const Color &rNew ) { aShadowColor = rNew; } + + USHORT GetWidth() const { return nWidth; } + SvxShadowLocation GetLocation() const { return eLocation; } + + void SetWidth( USHORT nNew ) { nWidth = nNew; } + void SetLocation( SvxShadowLocation eNew ) { eLocation = eNew; } + + //Breite des Schattens auf der jeweiligen Seite berechnen. + USHORT CalcShadowSpace( USHORT nShadow ) const; + + virtual USHORT GetValueCount() const; + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual USHORT GetEnumValue() const; + virtual void SetEnumValue( USHORT nNewVal ); +}; + +inline SvxShadowItem &SvxShadowItem::operator=( const SvxShadowItem& rFmtShadow ) +{ + aShadowColor = rFmtShadow.aShadowColor; + nWidth = rFmtShadow.GetWidth(); + eLocation = rFmtShadow.GetLocation(); + return *this; +} + +#endif // #ifndef _SVX_SHADITEM_HXX + diff --git a/svx/inc/svx/shapeproperty.hxx b/svx/inc/svx/shapeproperty.hxx new file mode 100755 index 000000000000..267b5e229d08 --- /dev/null +++ b/svx/inc/svx/shapeproperty.hxx @@ -0,0 +1,58 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +************************************************************************/ +
+#ifndef SVX_SHAPEPROPERTY_HXX +#define SVX_SHAPEPROPERTY_HXX + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +//........................................................................ +namespace svx +{ +//........................................................................ + + //==================================================================== + //= ShapeProperty + //==================================================================== + enum ShapeProperty + { + // generic (UNO) shape properties + eShapePosition, + eShapeSize, + // text doc shape properties + eTextShapeAnchorType, + // spreadsheet doc shape properties + eSpreadsheetAnchor, + + // invalid, not to be used + eInvalidShapeProperty + }; + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // SVX_SHAPEPROPERTY_HXX diff --git a/svx/inc/svx/shapepropertynotifier.hxx b/svx/inc/svx/shapepropertynotifier.hxx new file mode 100644 index 000000000000..b5598e5fb0da --- /dev/null +++ b/svx/inc/svx/shapepropertynotifier.hxx @@ -0,0 +1,147 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +************************************************************************/ +
+#ifndef SVX_PROPERTYCHANGENOTIFIER_HXX +#define SVX_PROPERTYCHANGENOTIFIER_HXX + +#include "svx/svxdllapi.h" +#include "svx/shapeproperty.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/beans/PropertyChangeEvent.hpp> +#include <com/sun/star/beans/XPropertyChangeListener.hpp> +/** === end UNO includes === **/ + +#include <boost/noncopyable.hpp> +#include <boost/shared_ptr.hpp> +#include <memory> + +namespace cppu +{ + class OWeakObject; +} + +//........................................................................ +namespace svx +{ +//........................................................................ + + //==================================================================== + //= IPropertyValueProvider + //==================================================================== + /** a provider for a property value + */ + class SVX_DLLPUBLIC IPropertyValueProvider + { + public: + /** returns the name of the property which this provider is responsible for + */ + virtual ::rtl::OUString getPropertyName() const = 0; + + /** returns the current value of the property which the provider is responsible for + */ + virtual void getCurrentValue( ::com::sun::star::uno::Any& _out_rValue ) const = 0; + + virtual ~IPropertyValueProvider(); + }; + typedef ::boost::shared_ptr< IPropertyValueProvider > PPropertyValueProvider; + + //==================================================================== + //= PropertyValueProvider + //==================================================================== + /** default implementation of a IPropertyValueProvider + + This default implementation queries the object which it is constructed with for the XPropertySet interface, + and calls the getPropertyValue method. + */ + class SVX_DLLPUBLIC PropertyValueProvider :public IPropertyValueProvider + ,public ::boost::noncopyable + { + public: + PropertyValueProvider( ::cppu::OWeakObject& _rContext, const sal_Char* _pAsciiPropertyName ) + :m_rContext( _rContext ) + ,m_sPropertyName( ::rtl::OUString::createFromAscii( _pAsciiPropertyName ) ) + { + } + + virtual ::rtl::OUString getPropertyName() const; + virtual void getCurrentValue( ::com::sun::star::uno::Any& _out_rValue ) const; + + protected: + ::cppu::OWeakObject& getContext() const { return m_rContext; } + private: + ::cppu::OWeakObject& m_rContext; + const ::rtl::OUString m_sPropertyName; + }; + + //==================================================================== + //= PropertyChangeNotifier + //==================================================================== + struct PropertyChangeNotifier_Data; + + /** helper class for notifying XPropertyChangeListeners + + The class is intended to be held as member of the class which does the property change broadcasting. + */ + class SVX_DLLPUBLIC PropertyChangeNotifier : public ::boost::noncopyable + { + public: + /** constructs a notifier instance + + @param _rOwner + the owner instance of the notifier. Will be used as css.lang.EventObject.Source when + notifying events. + */ + PropertyChangeNotifier( ::cppu::OWeakObject& _rOwner, ::osl::Mutex& _rMutex ); + ~PropertyChangeNotifier(); + + // listener maintanance + void addPropertyChangeListener( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxListener ); + void removePropertyChangeListener( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxListener ); + + /** registers a IPropertyValueProvider + */ + void registerProvider( const ShapeProperty _eProperty, const PPropertyValueProvider _pProvider ); + + /** notifies changes in the given property to all registered listeners + + If no property value provider for the given property ID is registered, this is worth an assertion in a + non-product build, and otherwise ignored. + */ + void notifyPropertyChange( const ShapeProperty _eProperty ) const; + + /** is called to dispose the instance + */ + void disposing(); + + private: + ::std::auto_ptr< PropertyChangeNotifier_Data > m_pData; + }; + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // SVX_PROPERTYCHANGENOTIFIER_HXX diff --git a/svx/inc/svx/shdditem.hxx b/svx/inc/svx/shdditem.hxx new file mode 100644 index 000000000000..f37f58ba048c --- /dev/null +++ b/svx/inc/svx/shdditem.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: shdditem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SHDDITEM_HXX +#define _SVX_SHDDITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxShadowedItem ------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt, ob und wie schattiert ist. +*/ + +class SVX_DLLPUBLIC SvxShadowedItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxShadowedItem( const BOOL bShadowed /*= FALSE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxShadowedItem& operator=(const SvxShadowedItem& rShadow) { + SetValue(rShadow.GetValue()); + return *this; + } + +}; + +#endif + diff --git a/svx/inc/svx/simptabl.hxx b/svx/inc/svx/simptabl.hxx new file mode 100644 index 000000000000..84f6b6bc2321 --- /dev/null +++ b/svx/inc/svx/simptabl.hxx @@ -0,0 +1,183 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: simptabl.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_SIMPTABL_HXX +#define _SVX_SIMPTABL_HXX + +#ifndef _MOREBTN_HXX //autogen +#include <vcl/morebtn.hxx> +#endif + +#ifndef _COMBOBOX_HXX //autogen +#include <vcl/combobox.hxx> +#endif + +#ifndef _GROUP_HXX //autogen +#include <vcl/group.hxx> +#endif +#include <svtools/headbar.hxx> +#include <svtools/svtabbx.hxx> +#include <vcl/lstbox.hxx> +#include "svx/svxdllapi.h" + +class SvxSimpleTable; +class SvxSimpTblContainer : public Control +{ +private: + SvxSimpleTable* m_pTable; + +protected: + virtual long PreNotify( NotifyEvent& rNEvt ); + +public: + SvxSimpTblContainer( Window* pParent, WinBits nWinStyle = 0 ); + SvxSimpTblContainer( Window* pParent, const ResId& rResId ); + + inline void SetTable( SvxSimpleTable* _pTable ) { m_pTable = _pTable; } +}; + +class SVX_DLLPUBLIC SvxSimpleTable : public SvHeaderTabListBox +{ + using Window::SetPosSizePixel; +private: + + Link aHeaderBarClickLink; + Link aHeaderBarDblClickLink; + Link aCommandLink; + CommandEvent aCEvt; + SvxSimpTblContainer aPrivContainer; + HeaderBar aHeaderBar; + long nOldPos; + USHORT nHeaderItemId; + BOOL bResizeFlag; + BOOL bPaintFlag; + BOOL bSortDirection; + USHORT nSortCol; + Window* pMyParentWin; + + DECL_LINK( StartDragHdl, HeaderBar* ); + DECL_LINK( DragHdl, HeaderBar* ); + DECL_LINK( EndDragHdl, HeaderBar* ); + DECL_LINK( HeaderBarClick, HeaderBar* ); + DECL_LINK( HeaderBarDblClick, HeaderBar* ); + DECL_LINK( CompareHdl, SvSortData* ); + +protected: + + virtual void NotifyScrolled(); + + virtual void SetTabs(); + virtual void Paint( const Rectangle& rRect ); + virtual void UpdateViewSize(); + + virtual void HBarClick(); + virtual void HBarDblClick(); + virtual void HBarStartDrag(); + virtual void HBarDrag(); + virtual void HBarEndDrag(); + + virtual void Command( const CommandEvent& rCEvt ); + + virtual StringCompare ColCompare(SvLBoxEntry*,SvLBoxEntry*); + HeaderBar* GetTheHeaderBar(){return &aHeaderBar;} + +public: + + SvxSimpleTable( Window* pParent,WinBits nBits =WB_BORDER ); + SvxSimpleTable( Window* pParent,const ResId& ); + ~SvxSimpleTable(); + + void InsertHeaderEntry(const XubString& rText, + USHORT nCol=HEADERBAR_APPEND, + HeaderBarItemBits nBits = HIB_STDSTYLE); + + void SetTabs( long* pTabs, MapUnit = MAP_APPFONT ); + + void ClearAll(); + void ClearHeader(); + + // to be removed all calls of the related methods are redirected to *Table() methods + using Window::Show; + using Window::Hide; + using Window::Enable; + using Window::Disable; + using Window::ToTop; + + void Show(); + void Hide(); + void Enable(); + void Disable(); + void ToTop(); + + // remove until this line + + void ShowTable(); + void HideTable(); + BOOL IsVisible() const; + + void EnableTable(); + void DisableTable(); + BOOL IsEnabled() const; + + void TableToTop(); + void SetPosPixel( const Point& rNewPos ); + Point GetPosPixel() const ; + virtual void SetPosSizePixel( const Point& rNewPos, Size& rNewSize ); + void SetPosSize( const Point& rNewPos, const Size& rNewSize ); + void SetSizePixel(const Size& rNewSize ); + void SetOutputSizePixel(const Size& rNewSize ); + + Size GetSizePixel() const; + Size GetOutputSizePixel() const; + + USHORT GetSelectedCol(); + void SortByCol(USHORT,BOOL bDir=TRUE); + BOOL GetSortDirection(){ return bSortDirection;} + USHORT GetSortedCol(){ return nSortCol;} + SvLBoxItem* GetEntryAtPos( SvLBoxEntry* pEntry, USHORT nPos ) const; + + CommandEvent GetCommandEvent()const; + inline sal_Bool IsFocusOnCellEnabled() const { return IsCellFocusEnabled(); } + + void SetCommandHdl( const Link& rLink ) { aCommandLink = rLink; } + const Link& GetCommandHdl() const { return aCommandLink; } + + void SetHeaderBarClickHdl( const Link& rLink ) { aHeaderBarClickLink = rLink; } + const Link& GetHeaderBarClickHdl() const { return aHeaderBarClickLink; } + + void SetHeaderBarDblClickHdl( const Link& rLink ) { aHeaderBarDblClickLink = rLink; } + const Link& GetHeaderBarDblClickHdl() const { return aHeaderBarDblClickLink; } + + void SetHeaderBarHelpId(ULONG nHelpId) {aHeaderBar.SetHelpId(nHelpId);} +}; + + +#endif // _SVX_SIMPTABL_HXX + diff --git a/svx/inc/svx/sizeitem.hxx b/svx/inc/svx/sizeitem.hxx new file mode 100644 index 000000000000..d99ed038a600 --- /dev/null +++ b/svx/inc/svx/sizeitem.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sizeitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SIZEITEM_HXX +#define _SVX_SIZEITEM_HXX + +// include --------------------------------------------------------------- + +#include <tools/gen.hxx> +#include <svl/poolitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxSizeItem ----------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt eine zweidimensionale Groesse (Size). +*/ + +class SVX_DLLPUBLIC SvxSizeItem : public SfxPoolItem +{ + + Size aSize; + +public: + TYPEINFO(); + + SvxSizeItem( const USHORT nId ); + SvxSizeItem( const USHORT nId, const Size& rSize); + + inline SvxSizeItem& operator=( const SvxSizeItem &rCpy ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual int ScaleMetrics( long nMult, long nDiv ); + virtual int HasMetrics() const; + + const Size& GetSize() const { return aSize; } + void SetSize(const Size& rSize) { aSize = rSize; } +}; + +inline SvxSizeItem& SvxSizeItem::operator=( const SvxSizeItem &rCpy ) +{ + aSize = rCpy.aSize; + return *this; +} + +#endif + diff --git a/svx/inc/svx/sphere3d.hxx b/svx/inc/svx/sphere3d.hxx new file mode 100644 index 000000000000..9c11b6537354 --- /dev/null +++ b/svx/inc/svx/sphere3d.hxx @@ -0,0 +1,94 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sphere3d.hxx,v $ + * $Revision: 1.4.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_SPHERE3D_HXX +#define _E3D_SPHERE3D_HXX + +#include <svx/obj3d.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Kugelobjekt mit Durchmesser r3DSize; Anzahl der Flaechen wird durch +|* die horizontale und vertikale Segmentanzahl vorgegeben +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dSphereObj : public E3dCompoundObject +{ +private: + // #110094# DrawContact section + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + basegfx::B3DPoint aCenter; + basegfx::B3DVector aSize; + +protected: + void SetDefaultAttributes(E3dDefaultAttributes& rDefault); + +public: + TYPEINFO(); + E3dSphereObj(E3dDefaultAttributes& rDefault, const basegfx::B3DPoint& rCenter, const basegfx::B3DVector& r3DSize); + E3dSphereObj(); + + // FG: Dieser Konstruktor wird nur von MakeObject aus der 3d-Objectfactory beim + // Laden von Dokumenten mit Kugeln aufgerufen. Dieser Konstruktor ruft kein + // CreateSphere auf, er erzeugt also keine Kugel. + E3dSphereObj(int dummy); + + // HorizontalSegments: + sal_uInt32 GetHorizontalSegments() const + { return ((const Svx3DHorizontalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); } + + // VerticalSegments: + sal_uInt32 GetVerticalSegments() const + { return ((const Svx3DVerticalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); } + + virtual UINT16 GetObjIdentifier() const; + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + virtual void operator=(const SdrObject&); + + void ReSegment(sal_uInt32 nHorzSegments, sal_uInt32 nVertSegments); + const basegfx::B3DPoint& Center() const { return aCenter; } + const basegfx::B3DVector& Size() const { return aSize; } + + // Lokale Parameter setzen mit Geometrieneuerzeugung + void SetCenter(const basegfx::B3DPoint& rNew); + void SetSize(const basegfx::B3DVector& rNew); + + // TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert". + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; +}; + +#endif // _E3D_SPHERE3D_HXX diff --git a/svx/inc/svx/splitcelldlg.hxx b/svx/inc/svx/splitcelldlg.hxx new file mode 100644 index 000000000000..3bdc00e58ad2 --- /dev/null +++ b/svx/inc/svx/splitcelldlg.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: splitcelldlg.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SPLITCELLDLG_HXX +#define _SVX_SPLITCELLDLG_HXX + +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> + +#include <svx/stddlg.hxx> + +class SvxSplitTableDlg : public SvxStandardDialog +{ + FixedText maCountLbl; + NumericField maCountEdit; + FixedLine maCountFL; + ImageRadioButton maHorzBox; + ImageRadioButton maVertBox; + CheckBox maPropCB; + FixedLine maDirFL; + OKButton maOKBtn; + CancelButton maCancelBtn; + HelpButton maHelpBtn; + +protected: + virtual void Apply(); + +public: + SvxSplitTableDlg(Window *pParent ); + DECL_LINK( ClickHdl, Button * ); + + bool IsHorizontal() const; + bool IsProportional() const; + long GetCount() const; +}; + +#endif diff --git a/svx/inc/svx/spltitem.hxx b/svx/inc/svx/spltitem.hxx new file mode 100644 index 000000000000..7cf18a02ca93 --- /dev/null +++ b/svx/inc/svx/spltitem.hxx @@ -0,0 +1,87 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: spltitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SPLTITEM_HXX +#define _SVX_SPLTITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxFmtSplitItem ------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt eine logische Variable "Absatz trennen ja oder nein". +*/ + +class SVX_DLLPUBLIC SvxFmtSplitItem : public SfxBoolItem +{ +public: + TYPEINFO(); + ~SvxFmtSplitItem(); + + inline SvxFmtSplitItem( const BOOL bSplit /*= TRUE*/, + const USHORT nWh ); + inline SvxFmtSplitItem& operator=( const SvxFmtSplitItem& rSplit ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream&, USHORT ) const; + virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +inline SvxFmtSplitItem::SvxFmtSplitItem( const BOOL bSplit, const USHORT nWh ) : + SfxBoolItem( nWh, bSplit ) +{} + +inline SvxFmtSplitItem& SvxFmtSplitItem::operator=( + const SvxFmtSplitItem& rSplit ) +{ + SetValue( rSplit.GetValue() ); + return *this; +} + +#endif + diff --git a/svx/inc/svx/splwrap.hxx b/svx/inc/svx/splwrap.hxx new file mode 100644 index 000000000000..e9b71d12320f --- /dev/null +++ b/svx/inc/svx/splwrap.hxx @@ -0,0 +1,162 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: splwrap.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SPLWRAP_HXX +#define _SVX_SPLWRAP_HXX + +// include --------------------------------------------------------------- + +#include <svx/svxenum.hxx> +#include <tools/string.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include "svx/svxdllapi.h" + +// forward --------------------------------------------------------------- + +namespace com { namespace sun { namespace star { namespace linguistic2 { + class XDictionary; + class XSpellChecker1; + class XHyphenator; +}}}} + +class Window; + +// misc functions --------------------------------------------------------------- + +void SVX_DLLPUBLIC SvxPrepareAutoCorrect( String &rOldText, String &rNewText ); + +/*-------------------------------------------------------------------- + Beschreibung: Der SpellWrapper + --------------------------------------------------------------------*/ + +class SVX_DLLPUBLIC SvxSpellWrapper { +private: + friend class SvxSpellCheckDialog; + friend class SvxHyphenWordDialog; + + Window* pWin; + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface > xLast; // result of last spelling/hyphenation attempt + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > xSpell; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > xHyph; + sal_uInt16 nOldLang; // Sprache merken, nur bei Aenderung SetLanguage rufen + sal_Bool bOtherCntnt : 1; // gesetzt => Sonderbereiche zunaechst pruefen + sal_Bool bDialog : 1; // Ist pWin der Svx...Dialog? + sal_Bool bHyphen : 1; // Trennen statt Spellen + sal_Bool bAuto : 1; // Autokorrektur vorhanden? + sal_Bool bReverse : 1; // Rueckwaerts Spellen + sal_Bool bStartDone : 1; // Vorderen Teil bereits korrigiert + sal_Bool bEndDone : 1; // Hinteren Teil bereits korrigiert + sal_Bool bStartChk : 1; // Vorderen Teil pruefen + sal_Bool bRevAllowed : 1; // Niemals rueckwaerts spellen + sal_Bool bAllRight : 1; // falsche Woerter in geignetes Woerterbuch + // aufnehmen und nicht den Dialog starten. + + SVX_DLLPRIVATE sal_Bool SpellNext(); // naechsten Bereich anwaehlen + SVX_DLLPRIVATE sal_Bool FindSpellError(); // Suche nach Fehlern ( ueber Bereiche hinweg ) + +public: + SvxSpellWrapper( Window* pWn, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > &xSpellChecker, + const sal_Bool bStart = sal_False, const sal_Bool bIsAllRight = sal_False, + const sal_Bool bOther = sal_False, const sal_Bool bRevAllow = sal_True ); + SvxSpellWrapper( Window* pWn, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > &xHyphenator, + const sal_Bool bStart = sal_False, const sal_Bool bOther = sal_False ); + + virtual ~SvxSpellWrapper(); + + static sal_Int16 CheckSpellLang( + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > xSpell, + sal_Int16 nLang ); + static sal_Int16 CheckHyphLang( + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > xHyph, + sal_Int16 nLang ); + + static void ShowLanguageErrors(); + + void SpellDocument(); // Rechtschreibpruefung durchfuehren + inline sal_Bool IsStartDone(){ return bStartDone; } + inline sal_Bool IsEndDone(){ return bEndDone; } + inline sal_Bool IsReverse(){ return bReverse; } + inline sal_Bool IsDialog(){ return bDialog; } // SvxSpellCheckDialog OnScreen + inline sal_Bool IsHyphen(){ return bHyphen; } // Trennen statt Spellen + inline void SetHyphen( const sal_Bool bNew = sal_True ){ bHyphen = bNew; } + inline ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > + GetXSpellChecker() { return xSpell; } + inline ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > + GetXHyphenator() { return xHyph; } + inline sal_Bool IsAllRight() { return bAllRight; } + inline Window* GetWin() { return pWin; } + // kann evtl entfallen in ONE_LINGU: + inline void SetOldLang( const sal_uInt16 nNew ){ nOldLang = nNew; } + // kann evtl entfallen in ONE_LINGU: + inline void ChangeLanguage( const sal_uInt16 nNew ) // rufe ggf. SetLanguage + { if ( nNew != nOldLang ) { SetLanguage( nNew ); nOldLang = nNew; } } + inline void EnableAutoCorrect() { bAuto = sal_True; } + +protected: + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface > + GetLast() { return xLast; } + void SetLast(const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface > &xNewLast) + { xLast = xNewLast; } + virtual sal_Bool SpellMore(); // weitere Dokumente pruefen? + virtual sal_Bool HasOtherCnt(); // gibt es ueberhaupt Sonderbereiche + virtual void SpellStart( SvxSpellArea eSpell ); // Bereich vorbereiten + virtual sal_Bool SpellContinue(); // Bereich pruefen + // Ergebnis mit GetLast verfuegbar + virtual void ReplaceAll( const String &rNewText, sal_Int16 nLanguage ); // Wort aus Replace-Liste ersetzen + virtual void StartThesaurus( const String &rWord, sal_uInt16 nLang ); // Thesaurus starten + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > + GetAllRightDic() const; + virtual void SpellEnd(); // Bereich abschliessen + virtual void ScrollArea(); // ScrollArea einstellen + // Wort ersetzen + virtual void ChangeWord( const String& rNewWord, const sal_uInt16 nLang ); + virtual String GetThesWord(); + // Wort via Thesaurus ersetzen + virtual void ChangeThesWord( const String& rNewWord ); + virtual void SetLanguage( const sal_uInt16 nLang ); // Sprache aendern + virtual void AutoCorrect( const String& rAktStr, const String& rNewStr ); + virtual void InsertHyphen( const sal_uInt16 nPos ); // Hyphen einfuegen + +}; + +#endif diff --git a/svx/inc/svx/stddlg.hxx b/svx/inc/svx/stddlg.hxx new file mode 100644 index 000000000000..9a4d2dc77a3a --- /dev/null +++ b/svx/inc/svx/stddlg.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: stddlg.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_STDDLG_HXX +#define _SVX_STDDLG_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/basedlgs.hxx> +#include "svx/svxdllapi.h" + +// class SvxStandardDialog ----------------------------------------------- + +class SVX_DLLPUBLIC SvxStandardDialog: public SfxModalDialog +{ +public: + SvxStandardDialog( Window* pParent, const ResId& rResId ); + ~SvxStandardDialog(); + + short Execute(); + +protected: + virtual void Apply() = 0; // pure virtual!!! +}; + + +#endif + diff --git a/svx/inc/svx/strarray.hxx b/svx/inc/svx/strarray.hxx new file mode 100644 index 000000000000..894115677e93 --- /dev/null +++ b/svx/inc/svx/strarray.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: strarray.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_STRARRAY_HXX +#define _SVX_STRARRAY_HXX + +// include --------------------------------------------------------------- + +#ifndef _RESARY_HXX //autogen +#include <tools/resary.hxx> +#endif +#include "svx/svxdllapi.h" + +// class SvxStringArray ------------------------------------------------- + +class SVX_DLLPUBLIC SvxStringArray : public ResStringArray +{ +public: + SvxStringArray( sal_uInt32 nResId ); + SvxStringArray( const ResId& rResId ); + ~SvxStringArray(); + + const String& GetStringByPos( sal_uInt32 nPos ) const; + const String& GetStringByType( long nType ) const; + long GetValueByStr( const String& rStr ) const; +}; + + +#endif + diff --git a/svx/inc/svx/subtoolboxcontrol.hxx b/svx/inc/svx/subtoolboxcontrol.hxx new file mode 100644 index 000000000000..538daabf6fe9 --- /dev/null +++ b/svx/inc/svx/subtoolboxcontrol.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: subtoolboxcontrol.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SUBTOOLBOXCONTROL_HXX +#define _SVX_SUBTOOLBOXCONTROL_HXX + +#include "svx/svxdllapi.h" +#include <sfx2/tbxctrl.hxx> + +//---------------------------------------------------------------------------- +// +//---------------------------------------------------------------------------- + +class SVX_DLLPUBLIC SvxSubToolBoxControl : public SfxToolBoxControl +{ + +public: + SFX_DECL_TOOLBOX_CONTROL(); + + SvxSubToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxSubToolBoxControl(); + + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +// +//---------------------------------------------------------------------------- + +#endif + + diff --git a/svx/inc/svx/svdattr.hxx b/svx/inc/svx/svdattr.hxx new file mode 100644 index 000000000000..6149916f0d6c --- /dev/null +++ b/svx/inc/svx/svdattr.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdattr.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDATTR_HXX +#define _SVDATTR_HXX + +#ifndef _SOLAR_HRC +#include <svl/solar.hrc> +#endif +#include <tools/solar.h> +#include <svx/sdangitm.hxx> +#include <svx/sderitm.hxx> +#include <svx/sdmetitm.hxx> +#include <svx/sdooitm.hxx> +#include <svx/sdprcitm.hxx> +#include <svx/sdshcitm.hxx> +#include <svx/sdshitm.hxx> +#include <svx/sdshtitm.hxx> +#include <svx/sdsxyitm.hxx> +#include <svx/sdtaaitm.hxx> +#ifndef _SDTACITM_HXX +#include <svx/sdtacitm.hxx> +#endif +#ifndef _SDTACITM_HXX +#include <svx/sdtaditm.hxx> +#endif +#include <svx/sdtagitm.hxx> +#include <svx/sdtaiitm.hxx> +#include <svx/sdtaitm.hxx> +#ifndef _SDTAKITM_HXX +#include <svx/sdtakitm.hxx> +#endif +#include <svx/sdtayitm.hxx> +#ifndef SDTCFITM_HXX +#include <svx/sdtcfitm.hxx> +#endif +#ifndef _SDTDITM_HXX +#include <svx/sdtditm.hxx> +#endif +#include <svx/sdtfsitm.hxx> +#include <svx/sdtmfitm.hxx> +#include <svx/sdynitm.hxx> +#include <svx/sdgluitm.hxx> +#include <svx/sdginitm.hxx> +#include <svx/sdgtritm.hxx> +#include <svx/sdgcoitm.hxx> +#include <svx/sdggaitm.hxx> +#include <svx/sdasitm.hxx> +#include <svx/sdgmoitm.hxx> +#include <svx/sdasaitm.hxx> +#endif + diff --git a/svx/inc/svx/svdattrx.hxx b/svx/inc/svx/svdattrx.hxx new file mode 100644 index 000000000000..08fd8c68d2d7 --- /dev/null +++ b/svx/inc/svx/svdattrx.hxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdattrx.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDATTRX_HXX +#define _SVDATTRX_HXX + +#include <svx/sxmlhitm.hxx> +#include <svx/sxallitm.hxx> +#include <svx/sxcaitm.hxx> +#include <svx/sxcecitm.hxx> + +#ifndef _SXCGIITM_HXX +#include <svx/sxcgitm.hxx> +#endif +#include <svx/sxciaitm.hxx> +#include <svx/sxcikitm.hxx> +#include <svx/sxcllitm.hxx> +#include <svx/sxctitm.hxx> +#include <svx/sxekitm.hxx> +#include <svx/sxelditm.hxx> +#include <svx/sxenditm.hxx> + +#ifndef _SXFIITM_HXX +#include <svx/sxfiitm.hxx> +#endif + +#ifndef _SXLAYITM_HXX +#include <svx/sxlayitm.hxx> +#endif +#include <svx/sxlogitm.hxx> +#include <svx/sxmbritm.hxx> +#include <svx/sxmfsitm.hxx> +#include <svx/sxmkitm.hxx> +#include <svx/sxmoitm.hxx> +#include <svx/sxmovitm.hxx> + +#ifndef _SXMSIITM_HXX +#include <svx/sxmsitm.hxx> +#endif +#include <svx/sxmspitm.hxx> +#include <svx/sxmsuitm.hxx> +#include <svx/sxmtaitm.hxx> +#include <svx/sxmtfitm.hxx> +#include <svx/sxmtpitm.hxx> +#include <svx/sxmtritm.hxx> +#include <svx/sxmuitm.hxx> +#include <svx/sxoneitm.hxx> +#include <svx/sxonitm.hxx> +#include <svx/sxopitm.hxx> +#include <svx/sxraitm.hxx> +#include <svx/sxreaitm.hxx> +#include <svx/sxreoitm.hxx> +#include <svx/sxroaitm.hxx> +#include <svx/sxrooitm.hxx> +#include <svx/sxsaitm.hxx> +#include <svx/sxsalitm.hxx> +#include <svx/sxsiitm.hxx> +#include <svx/sxsoitm.hxx> +#include <svx/sxtraitm.hxx> + +#endif //_SVDATTRX_HXX diff --git a/svx/inc/svx/svdcrtv.hxx b/svx/inc/svx/svdcrtv.hxx new file mode 100644 index 000000000000..7637034b71a4 --- /dev/null +++ b/svx/inc/svx/svdcrtv.hxx @@ -0,0 +1,212 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdcrtv.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDCRTV_HXX +#define _SVDCRTV_HXX + +#include <svx/svddrgv.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class XLineAttrSetItem; +class XFillAttrSetItem; +class SdrEdgeObj; +class SdrObjConnection; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@ @@@@@ @@@@@ @@@@ @@@@@@ @@@@@ @@ @@ @@ @@@@@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@ @@@@@ @@@@ @@@@@@ @@ @@@@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@@@ @@ @@ @@@@@ @@ @@ @@ @@@@@ @ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +class ImplConnectMarkerOverlay; +class ImpSdrCreateViewExtraData; + +class SVX_DLLPUBLIC SdrCreateView: public SdrDragView +{ + friend class SdrPageView; + +protected: + SdrObject* pAktCreate; // Aktuell in Erzeugung befindliches Objekt + SdrPageView* pCreatePV; // Hier wurde die Erzeugung gestartet + ImplConnectMarkerOverlay* mpCoMaOverlay; + + // for migrating stuff from XOR, use ImpSdrCreateViewExtraData ATM to not need to + // compile the apps all the time + ImpSdrCreateViewExtraData* mpCreateViewExtraData; + + Pointer aAktCreatePointer; + + INT32 nAutoCloseDistPix; + INT32 nFreeHandMinDistPix; + UINT32 nAktInvent; // Aktuell eingestelltes + UINT16 nAktIdent; // Obj fuer Neuerzeugung + + unsigned bAutoTextEdit : 1; // Textedit nach dem erzeugen eines Textrahmens starten + unsigned b1stPointAsCenter : 1; + unsigned bUseIncompatiblePathCreateInterface : 1; + unsigned bAutoClosePolys : 1; + + void ImpClearConnectMarker(); + +private: + SVX_DLLPRIVATE void ImpClearVars(); + SVX_DLLPRIVATE void ImpMakeCreateAttr(); + SVX_DLLPRIVATE void ImpDelCreateAttr(); + +protected: + sal_Bool ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut, + sal_Int16 nMinMov, SdrPageView* pPV, const Rectangle& rLogRect, SdrObject* pPreparedFactoryObject); + + void ShowCreateObj(/*OutputDevice* pOut, BOOL bFull*/); + void HideCreateObj(/*OutputDevice* pOut, BOOL bFull*/); + BOOL CheckEdgeMode(); + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrCreateView(SdrModel* pModel1, OutputDevice* pOut = 0L); + virtual ~SdrCreateView(); + +public: + virtual BOOL IsAction() const; + virtual void MovAction(const Point& rPnt); + virtual void EndAction(); + virtual void BckAction(); + virtual void BrkAction(); + virtual void TakeActionRect(Rectangle& rRect) const; + + virtual BOOL MouseMove(const MouseEvent& rMEvt, Window* pWin); + + void SetActiveLayer(const String& rName) { aAktLayer=rName; } + const String& GetActiveLayer() const { return aAktLayer; } + void SetMeasureLayer(const String& rName) { aMeasureLayer=rName; } + const String& GetMeasureLayer() const { return aMeasureLayer; } + + // Ist der MeasureLayer nicht gesetzt (Leerstring), so + // wird der ActiveLayer auch fuer Bemassung verwendet. + void SetEditMode(SdrViewEditMode eMode) { SdrDragView::SetEditMode(eMode); CheckEdgeMode(); } + void SetEditMode(BOOL bOn=TRUE) { SdrDragView::SetEditMode(bOn); CheckEdgeMode(); } + void SetCreateMode(BOOL bOn=TRUE) { SdrDragView::SetCreateMode(bOn); CheckEdgeMode(); } + void SetGluePointEditMode(BOOL bOn=TRUE) { SdrDragView::SetGluePointEditMode(bOn); CheckEdgeMode(); } + + // Feststellen, ob Textwerkzeug aktiviert + BOOL IsTextTool() const; + + // Feststellen, ob Objektverbinderwerkzeug aktiviert + BOOL IsEdgeTool() const; + + // Feststellen, ob Bemassungswerkzeug aktiviert + BOOL IsMeasureTool() const; + + void SetCurrentObj(UINT16 nIdent, UINT32 nInvent=SdrInventor); + void TakeCurrentObj(UINT16& nIdent, UINT32& nInvent) const { nInvent=nAktInvent; nIdent=nAktIdent; } + UINT32 GetCurrentObjInventor() const { return nAktInvent; } + UINT16 GetCurrentObjIdentifier() const { return nAktIdent; } + + // Starten des normalen Create + BOOL BegCreateObj(const Point& rPnt, OutputDevice* pOut=NULL, short nMinMov=-3, SdrPageView* pPV=NULL); + sal_Bool BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov, SdrObject* pPreparedFactoryObject); + void MovCreateObj(const Point& rPnt); + BOOL EndCreateObj(SdrCreateCmd eCmd); + void BckCreateObj(); // z.B. wieder 1 Polygonpunkt zurueck. + void BrkCreateObj(); + BOOL IsCreateObj() const { return pAktCreate!=NULL; } + SdrObject* GetCreateObj() const { return pAktCreate; } + + // BegCreateCaptionObj() erzeugt ein SdrCaptionObj (Legendenobjekt). + // rObjSiz ist die anfaengliche Groesse des Legenden-Textrahmens. + // gedraggd wird lediglich die Laenge des Zipfel. + BOOL BegCreateCaptionObj(const Point& rPnt, const Size& rObjSiz, OutputDevice* pOut=NULL, short nMinMov=-3, SdrPageView* pPV=NULL); + + // Wenn TextEditAfterCreate auf TRUE steht (das ist der Default), + // dann wird nach dem erzeugen eines Textrahmenobjekts (OBJ_TEXT, + // OBJ_TEXTEXT, OBJ_OUTLINERTEXT, OBJ_TITLETEXT, OBJ_CAPTION) + // automatisch ein TextEdit (SdrObjEditView::SdrBeginTextEdit) gestartet. + BOOL IsTextEditAfterCreate() const { return bAutoTextEdit; } + void SetTextEditAfterCreate(BOOL bOn) { bAutoTextEdit = bOn; } + + // Erzeugen eines Kreises/Rechtecks/Textrahmens wobei der 1. Punkt + // nicht die linke obere Ecke, sondern das Zentrum des Objekts vorgibt. + // Persistentes Flag. Default=FALSE. + BOOL IsCreate1stPointAsCenter() const { return b1stPointAsCenter; } + void SetCreate1stPointAsCenter(BOOL bOn) { b1stPointAsCenter = bOn; } + + // Fuer Polylines (OBJ_PLIN) und Freihandlinien (OBJ_FREELINE). Ist dieses + // Flag TRUE, werden diese beiden Objekttypen implizit geschlossen und in + // Polygon (OBJ_POLY) bzw. Freihandflaeche (OBJ_FREEFILL) gewandelt falls + // zum Ende des Create die Distanz zwischen Startpunkt und Endpunkt des + // Objekts <=n Pixel ist, wobei SetAutoCloseDistPix vorgegeben wird. + // Default=TRUE. + BOOL IsAutoClosePolys() const { return bAutoClosePolys; } + void SetAutoClosePolys(BOOL bOn) { bAutoClosePolys=bOn; } + + // Default=5 Pixel. + USHORT GetAutoCloseDistPix() const { return USHORT(nAutoCloseDistPix); } + void SetAutoCloseDistPix(USHORT nVal) { nAutoCloseDistPix=nVal; } + + // Vorgabe des minimalen Pixelabstands zwischen 2 Bezierpunkten bei der + // Erzeugung einer Freihandlinie. + // Default=10 Pixel. + USHORT GetFreeHandMinDistPix() const { return USHORT(nFreeHandMinDistPix); } + void SetFreeHandMinDistPix(USHORT nVal) { nFreeHandMinDistPix=nVal; } + + // Wer das (zur restlichen Create-Funktionalitaet von SvDraw) inkompatible + // Create-Interface am PathObj beibehalten moechte muss das nachfolgende + // Flag setzen. Dieses wirkt sich aus bei den Objekttypen: + // OBJ_POLY, OBJ_PLIN, OBJ_PATHLINE, OBJ_PATHFILL + // Dieses Flag hat nur voruebergehenden Character. Die betroffenen + // Applikationen sollten alsbald umgestellt werden. + // Default=FALSE; + BOOL IsUseIncompatiblePathCreateInterface() const { return bUseIncompatiblePathCreateInterface; } + void SetUseIncompatiblePathCreateInterface(BOOL bOn) { bUseIncompatiblePathCreateInterface = bOn; } + void SetConnectMarker(const SdrObjConnection& rCon, const SdrPageView& rPV); + void HideConnectMarker(); + + // Attribute des ggf. gerade in der Erzeugung befindlichen Objekts + /* new interface src537 */ + BOOL GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr=FALSE) const; + + BOOL SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll); + SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(BOOL& rOk) const; + BOOL SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr); +}; + +#endif //_SVDCRTV_HXX + diff --git a/svx/inc/svx/svddef.hxx b/svx/inc/svx/svddef.hxx new file mode 100644 index 000000000000..b0c3d66a6344 --- /dev/null +++ b/svx/inc/svx/svddef.hxx @@ -0,0 +1,315 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svddef.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDDEF_HXX +#define _SVDDEF_HXX + +#include <svx/xdef.hxx> + +/*************************************************************************/ +// SdrItemPool V2, 09-11-1995: +// 7 neue Items fuer XLineAttrSetItem +// 7 neue Items fuer XFillAttrSetItem +// 8 neue Items fuer SdrShadowSetItem +// 5 neue Items fuer SdrCaptionSetItem +// 25 neue Items fuer SdrMiscSetItem +// 6 neue Items fuer SdrNotPersist +// SdrItemPool V3, 29-02-1996 +// 17 neue Items fuer XFillAttrSetItem (Bitmapfuellungen) (von KA) +// SdrItemPool V4, 10-08-1996 +// 45 neue Items fuer Edge und Measure (Verbinder und Bemassungsobjekt) (von Joe) +// SdrItemPool V4+, 18-10-1996 +// 8 neue Items fuer CircItems +// 18 neue Items fuer NotPersist+Umbau dort +// SdrItemPool V4++, 13-11-1996 +// 2 neue Items fuer NotPersist+(MoveX/Y) +// SdrItemPool V4+++, 07-06-1999 +// 15 neue Items fuer NotPersist (Reserve) +// 15 neue Items fuer GrafItems +// +// WhichMapping: +// V1 Range = 1000..1065 (66) +// V2 Range = 1000..1123 (124) (58 neue Whiches) +// V3 Range = 1000..1140 (141) (17 neue Whiches) +// V4 Range = 1000..1185 (186) (45 neue Whiches) +// Map V2: 10 6 20 4 11 6 9 +// V1: 1000..1009, 1010..1015, 1016..1035, 1036..1039, 1040..1050, 1051..1056 1057..1065 +// V2: 1000..1009, 1017..1022, 1030..1049, 1050..1053, 1062..1072, 1078..1083, 1109..1117, und hinten noch 6 neue dran +// |<------------ XOut ------------>| |<----------- SvDraw -----------> +// Map V3: +// V2: 1000..1029, 1030..1123 +// V3: 1000..1029, 1047..1140 +// Map V4: +// V3: 1000..1126, 1127..1140 +// V4: 1000..1126, 1172..1185 + +#define SDRATTR_START XATTR_START /* 1000 */ + /* Pool V4*/ /* Pool V3*/ /* Pool V2*/ +#define SDRATTR_SHADOW_FIRST (XATTR_END + 1) /* 1067 */ /* 1067 */ /* 1050 */ /* Pool V1: 1036 */ +#define SDRATTR_SHADOW (SDRATTR_SHADOW_FIRST+ 0) /* 1067 */ /* 1067 */ /* 1050 */ +#define SDRATTR_SHADOWCOLOR (SDRATTR_SHADOW_FIRST+ 1) /* 1068 */ /* 1068 */ /* 1051 */ +#define SDRATTR_SHADOWXDIST (SDRATTR_SHADOW_FIRST+ 2) /* 1069 */ /* 1069 */ /* 1052 */ +#define SDRATTR_SHADOWYDIST (SDRATTR_SHADOW_FIRST+ 3) /* 1070 */ /* 1070 */ /* 1053 */ +#define SDRATTR_SHADOWTRANSPARENCE (SDRATTR_SHADOW_FIRST+ 4) /* 1071 */ /* 1071 */ /* 1054 */ /* Pool V2 */ +#define SDRATTR_SHADOW3D (SDRATTR_SHADOW_FIRST+ 5) /* 1072 */ /* 1072 */ /* 1055 */ /* Pool V2 */ +#define SDRATTR_SHADOWPERSP (SDRATTR_SHADOW_FIRST+ 6) /* 1073 */ /* 1073 */ /* 1056 */ /* Pool V2 */ +#define SDRATTR_SHADOW_LAST (SDRATTR_SHADOWPERSP) /* 1078 */ /* 1078 */ /* 1061 */ /* Pool V1: 1039 */ + +#define SDRATTR_CAPTION_FIRST (SDRATTR_SHADOW_LAST + 1) /* 1080 */ /* 1080 */ /* 1063 */ /* Pool V1: 1041 */ +#define SDRATTR_CAPTIONTYPE (SDRATTR_CAPTION_FIRST+ 0) /* 1080 */ /* 1080 */ /* 1063 */ +#define SDRATTR_CAPTIONFIXEDANGLE (SDRATTR_CAPTION_FIRST+ 1) /* 1081 */ /* 1081 */ /* 1064 */ +#define SDRATTR_CAPTIONANGLE (SDRATTR_CAPTION_FIRST+ 2) /* 1082 */ /* 1082 */ /* 1065 */ +#define SDRATTR_CAPTIONGAP (SDRATTR_CAPTION_FIRST+ 3) /* 1083 */ /* 1083 */ /* 1066 */ +#define SDRATTR_CAPTIONESCDIR (SDRATTR_CAPTION_FIRST+ 4) /* 1084 */ /* 1084 */ /* 1067 */ +#define SDRATTR_CAPTIONESCISREL (SDRATTR_CAPTION_FIRST+ 5) /* 1085 */ /* 1085 */ /* 1068 */ +#define SDRATTR_CAPTIONESCREL (SDRATTR_CAPTION_FIRST+ 6) /* 1086 */ /* 1086 */ /* 1069 */ +#define SDRATTR_CAPTIONESCABS (SDRATTR_CAPTION_FIRST+ 7) /* 1087 */ /* 1087 */ /* 1070 */ +#define SDRATTR_CAPTIONLINELEN (SDRATTR_CAPTION_FIRST+ 8) /* 1088 */ /* 1088 */ /* 1071 */ +#define SDRATTR_CAPTIONFITLINELEN (SDRATTR_CAPTION_FIRST+ 9) /* 1089 */ /* 1089 */ /* 1072 */ +#define SDRATTR_CAPTION_LAST (SDRATTR_CAPTIONFITLINELEN) /* 1094 */ /* 1094 */ /* 1077 */ /* Pool V1: 1050 */ + +#define SDRATTR_MISC_FIRST (SDRATTR_CAPTION_LAST + 1) /* 1097 */ /* 1097 */ /* 1080 */ /* Pool V1: 1053 */ +#define SDRATTR_ECKENRADIUS (SDRATTR_MISC_FIRST + 0) /* 1097 */ /* 1097 */ /* 1080 long, def=0 */ +#define SDRATTR_TEXT_MINFRAMEHEIGHT (SDRATTR_MISC_FIRST + 1) /* 1098 */ /* 1098 */ /* 1081 long, def=0 */ +#define SDRATTR_TEXT_AUTOGROWHEIGHT (SDRATTR_MISC_FIRST + 2) /* 1099 */ /* 1099 */ /* 1082 BOOL, def=TRUE */ +#define SDRATTR_TEXT_FITTOSIZE (SDRATTR_MISC_FIRST + 3) /* 1100 */ /* 1100 */ /* 1083 enum, def=SDRTEXTFIT_NONE */ +#define SDRATTR_TEXT_LEFTDIST (SDRATTR_MISC_FIRST + 4) /* 1101 */ /* 1101 */ /* 1084 long, def=0 */ /* Pool V2 */ +#define SDRATTR_TEXT_RIGHTDIST (SDRATTR_MISC_FIRST + 5) /* 1102 */ /* 1102 */ /* 1085 long, def=0 */ /* Pool V2 */ +#define SDRATTR_TEXT_UPPERDIST (SDRATTR_MISC_FIRST + 6) /* 1103 */ /* 1103 */ /* 1086 long, def=0 */ /* Pool V2 */ +#define SDRATTR_TEXT_LOWERDIST (SDRATTR_MISC_FIRST + 7) /* 1104 */ /* 1104 */ /* 1087 long, def=0 */ /* Pool V2 */ +#define SDRATTR_TEXT_VERTADJUST (SDRATTR_MISC_FIRST + 8) /* 1105 */ /* 1105 */ /* 1088 enum, def=SDRTEXTVERTADJUST_TOP */ /* Pool V2 */ +#define SDRATTR_TEXT_MAXFRAMEHEIGHT (SDRATTR_MISC_FIRST + 9) /* 1106 */ /* 1106 */ /* 1089 long, def=0 - Pool V2 */ +#define SDRATTR_TEXT_MINFRAMEWIDTH (SDRATTR_MISC_FIRST +10) /* 1107 */ /* 1107 */ /* 1090 long, def=0 - Pool V2 */ +#define SDRATTR_TEXT_MAXFRAMEWIDTH (SDRATTR_MISC_FIRST +11) /* 1108 */ /* 1108 */ /* 1091 long, def=0 - Pool V2 */ +#define SDRATTR_TEXT_AUTOGROWWIDTH (SDRATTR_MISC_FIRST +12) /* 1109 */ /* 1109 */ /* 1092 BOOL, def=FALSE - Pool V2 */ +#define SDRATTR_TEXT_HORZADJUST (SDRATTR_MISC_FIRST +13) /* 1110 */ /* 1110 */ /* 1093 enum, def=SDRTEXTHORZADJUST_LEFT */ /* Pool V2+ (04-12-1995) */ +#define SDRATTR_TEXT_ANIKIND (SDRATTR_MISC_FIRST +14) /* 1111 */ /* 1111 */ /* 1094 enum, def=SDRTEXTANI_NONE - Pool V2/V4 */ +#define SDRATTR_TEXT_ANIDIRECTION (SDRATTR_MISC_FIRST +15) /* 1112 */ /* 1112 */ /* 1095 enum, def=SDRTEXTANI_LEFT - Pool V2/V4 */ +#define SDRATTR_TEXT_ANISTARTINSIDE (SDRATTR_MISC_FIRST +16) /* 1113 */ /* 1113 */ /* 1096 BOOL, def=FALSE - Pool V2/V4 */ +#define SDRATTR_TEXT_ANISTOPINSIDE (SDRATTR_MISC_FIRST +17) /* 1114 */ /* 1114 */ /* 1097 BOOL, def=FALSE - Pool V2/V4 */ +#define SDRATTR_TEXT_ANICOUNT (SDRATTR_MISC_FIRST +18) /* 1115 */ /* 1115 */ /* 1098 USHORT, def=0 - Pool V2/V4 */ +#define SDRATTR_TEXT_ANIDELAY (SDRATTR_MISC_FIRST +19) /* 1116 */ /* 1116 */ /* 1099 USHORT, def=0 - Pool V2/V4 */ +#define SDRATTR_TEXT_ANIAMOUNT (SDRATTR_MISC_FIRST +20) /* 1117 */ /* 1117 */ /* 1100 USHORT, def=0 - Pool V2/V4 */ +#define SDRATTR_TEXT_CONTOURFRAME (SDRATTR_MISC_FIRST +21) /* 1118 */ /* 1118 */ /* 1101 */ /* Pool V2 */ +#define SDRATTR_CUSTOMSHAPE_ADJUSTMENT (SDRATTR_MISC_FIRST +22) /* 1119 */ /* 1119 */ /* 1102 */ /* Pool V2 */ +#define SDRATTR_XMLATTRIBUTES (SDRATTR_MISC_FIRST +23) /* 1120 */ /* 1120 */ /* 1103 */ /* Pool V2 */ +#define SDRATTR_TEXT_USEFIXEDCELLHEIGHT (SDRATTR_MISC_FIRST +24) /* 1121 */ /* 1121 */ /* 1104 */ /* Pool V2 */ +#define SDRATTR_TEXT_WORDWRAP (SDRATTR_MISC_FIRST +25) /* 1122 */ /* 1122 */ /* 1105 */ /* Pool V2 */ +#define SDRATTR_TEXT_AUTOGROWSIZE (SDRATTR_MISC_FIRST +26) /* 1123 */ /* 1123 */ /* 1106 */ /* Pool V2 */ +#define SDRATTR_MISC_LAST (SDRATTR_TEXT_AUTOGROWSIZE) /* 1125 */ /* 1125 */ /* 1108 */ /* Pool V1: 1056 */ + +#define SDRATTR_EDGE_FIRST (SDRATTR_MISC_LAST + 1) /* 1127 */ /* Pool V4 */ +#define SDRATTR_EDGEKIND (SDRATTR_EDGE_FIRST + 0) /* 1127 */ /* Pool V4 */ +#define SDRATTR_EDGENODE1HORZDIST (SDRATTR_EDGE_FIRST + 1) /* 1128 */ /* Pool V4 */ +#define SDRATTR_EDGENODE1VERTDIST (SDRATTR_EDGE_FIRST + 2) /* 1129 */ /* Pool V4 */ +#define SDRATTR_EDGENODE2HORZDIST (SDRATTR_EDGE_FIRST + 3) /* 1130 */ /* Pool V4 */ +#define SDRATTR_EDGENODE2VERTDIST (SDRATTR_EDGE_FIRST + 4) /* 1131 */ /* Pool V4 */ +#define SDRATTR_EDGENODE1GLUEDIST (SDRATTR_EDGE_FIRST + 5) /* 1132 */ /* Pool V4 */ +#define SDRATTR_EDGENODE2GLUEDIST (SDRATTR_EDGE_FIRST + 6) /* 1133 */ /* Pool V4 */ +#define SDRATTR_EDGELINEDELTAANZ (SDRATTR_EDGE_FIRST + 7) /* 1134 */ /* Pool V4 */ +#define SDRATTR_EDGELINE1DELTA (SDRATTR_EDGE_FIRST + 8) /* 1135 */ /* Pool V4 */ +#define SDRATTR_EDGELINE2DELTA (SDRATTR_EDGE_FIRST + 9) /* 1136 */ /* Pool V4 */ +#define SDRATTR_EDGELINE3DELTA (SDRATTR_EDGE_FIRST +10) /* 1137 */ /* Pool V4 */ +#define SDRATTR_EDGE_LAST (SDRATTR_EDGELINE3DELTA) /* 1145 */ /* Pool V4 */ + +#define SDRATTR_MEASURE_FIRST (SDRATTR_EDGE_LAST + 1) /* 1147 */ /* Pool V4 */ +#define SDRATTR_MEASUREKIND (SDRATTR_MEASURE_FIRST+ 0) /* 1147 */ /* Pool V4 */ +#define SDRATTR_MEASURETEXTHPOS (SDRATTR_MEASURE_FIRST+ 1) /* 1148 */ /* Pool V4 */ +#define SDRATTR_MEASURETEXTVPOS (SDRATTR_MEASURE_FIRST+ 2) /* 1149 */ /* Pool V4 */ +#define SDRATTR_MEASURELINEDIST (SDRATTR_MEASURE_FIRST+ 3) /* 1150 */ /* Pool V4 */ +#define SDRATTR_MEASUREHELPLINEOVERHANG (SDRATTR_MEASURE_FIRST+ 4) /* 1151 */ /* Pool V4 */ +#define SDRATTR_MEASUREHELPLINEDIST (SDRATTR_MEASURE_FIRST+ 5) /* 1152 */ /* Pool V4 */ +#define SDRATTR_MEASUREHELPLINE1LEN (SDRATTR_MEASURE_FIRST+ 6) /* 1153 */ /* Pool V4 */ +#define SDRATTR_MEASUREHELPLINE2LEN (SDRATTR_MEASURE_FIRST+ 7) /* 1154 */ /* Pool V4 */ +#define SDRATTR_MEASUREBELOWREFEDGE (SDRATTR_MEASURE_FIRST+ 8) /* 1155 */ /* Pool V4 */ +#define SDRATTR_MEASURETEXTROTA90 (SDRATTR_MEASURE_FIRST+ 9) /* 1156 */ /* Pool V4 */ +#define SDRATTR_MEASURETEXTUPSIDEDOWN (SDRATTR_MEASURE_FIRST+10) /* 1157 */ /* Pool V4 */ +#define SDRATTR_MEASUREOVERHANG (SDRATTR_MEASURE_FIRST+11) /* 1158 */ /* Pool V4 */ +#define SDRATTR_MEASUREUNIT (SDRATTR_MEASURE_FIRST+12) /* 1159 */ /* Pool V4 */ +#define SDRATTR_MEASURESCALE (SDRATTR_MEASURE_FIRST+13) /* 1160 */ /* Pool V4 */ +#define SDRATTR_MEASURESHOWUNIT (SDRATTR_MEASURE_FIRST+14) /* 1161 */ /* Pool V4 */ +#define SDRATTR_MEASUREFORMATSTRING (SDRATTR_MEASURE_FIRST+15) /* 1162 */ /* Pool V4 */ +#define SDRATTR_MEASURETEXTAUTOANGLE (SDRATTR_MEASURE_FIRST+16) /* 1163 */ /* Pool V4, Nachtrag 25-9-1996 */ +#define SDRATTR_MEASURETEXTAUTOANGLEVIEW (SDRATTR_MEASURE_FIRST+17) /* 1164 */ /* Pool V4, Nachtrag 25-9-1996 */ +#define SDRATTR_MEASURETEXTISFIXEDANGLE (SDRATTR_MEASURE_FIRST+18) /* 1165 */ /* Pool V4, Nachtrag 25-9-1996 */ +#define SDRATTR_MEASURETEXTFIXEDANGLE (SDRATTR_MEASURE_FIRST+19) /* 1166 */ /* Pool V4, Nachtrag 25-9-1996 */ +#define SDRATTR_MEASUREDECIMALPLACES (SDRATTR_MEASURE_FIRST+20) /* 1167 */ /* Pool V4 */ +#define SDRATTR_MEASURE_LAST (SDRATTR_MEASUREDECIMALPLACES) /* 1170 */ /* Pool V4 */ + +#define SDRATTR_CIRC_FIRST (SDRATTR_MEASURE_LAST+ 1) /* 1172 */ /* Pool V4+ */ +#define SDRATTR_CIRCKIND (SDRATTR_CIRC_FIRST+ 0) /* 1172 */ /* Pool V4+ */ +#define SDRATTR_CIRCSTARTANGLE (SDRATTR_CIRC_FIRST+ 1) /* 1173 */ /* Pool V4+ */ +#define SDRATTR_CIRCENDANGLE (SDRATTR_CIRC_FIRST+ 2) /* 1174 */ /* Pool V4+ */ +#define SDRATTR_CIRC_LAST (SDRATTR_CIRCENDANGLE) /* 1178 */ /* Pool V4+ */ + +// Nur fuer Interfaceing, not implemented yet. /* V4+ */ +#define SDRATTR_NOTPERSIST_FIRST (SDRATTR_CIRC_LAST + 1) /* 1180 */ /* 1172 */ /* 1127 */ /* 1110 */ /* Pool V1: 1058 */ +#define SDRATTR_OBJMOVEPROTECT (SDRATTR_NOTPERSIST_FIRST+ 0) /* 1180 BOOL, def=FALSE */ +#define SDRATTR_OBJSIZEPROTECT (SDRATTR_NOTPERSIST_FIRST+ 1) /* 1181 BOOL, def=FALSE */ +#define SDRATTR_OBJPRINTABLE (SDRATTR_NOTPERSIST_FIRST+ 2) /* 1182 BOOL, def=TRUE */ +#define SDRATTR_LAYERID (SDRATTR_NOTPERSIST_FIRST+ 3) /* 1183 USHORT, def=0 */ +#define SDRATTR_LAYERNAME (SDRATTR_NOTPERSIST_FIRST+ 4) /* 1184 String, def="" */ +#define SDRATTR_OBJECTNAME (SDRATTR_NOTPERSIST_FIRST+ 5) /* 1185 String, def="" */ +#define SDRATTR_ALLPOSITIONX (SDRATTR_NOTPERSIST_FIRST+ 6) /* 1186 long, def=0 */ +#define SDRATTR_ALLPOSITIONY (SDRATTR_NOTPERSIST_FIRST+ 7) /* 1187 long, def=0 */ +#define SDRATTR_ALLSIZEWIDTH (SDRATTR_NOTPERSIST_FIRST+ 8) /* 1188 long, def=0 */ +#define SDRATTR_ALLSIZEHEIGHT (SDRATTR_NOTPERSIST_FIRST+ 9) /* 1189 long, def=0 */ +#define SDRATTR_ONEPOSITIONX (SDRATTR_NOTPERSIST_FIRST+10) /* 1190 long, def=0 */ +#define SDRATTR_ONEPOSITIONY (SDRATTR_NOTPERSIST_FIRST+11) /* 1191 long, def=0 */ +#define SDRATTR_ONESIZEWIDTH (SDRATTR_NOTPERSIST_FIRST+12) /* 1192 long, def=0 */ +#define SDRATTR_ONESIZEHEIGHT (SDRATTR_NOTPERSIST_FIRST+13) /* 1193 long, def=0 */ +#define SDRATTR_LOGICSIZEWIDTH (SDRATTR_NOTPERSIST_FIRST+14) /* 1194 long, def=0 */ +#define SDRATTR_LOGICSIZEHEIGHT (SDRATTR_NOTPERSIST_FIRST+15) /* 1195 long, def=0 */ +#define SDRATTR_ROTATEANGLE (SDRATTR_NOTPERSIST_FIRST+16) /* 1196 long, def=0 */ +#define SDRATTR_SHEARANGLE (SDRATTR_NOTPERSIST_FIRST+17) /* 1197 long, def=0 */ +#define SDRATTR_MOVEX (SDRATTR_NOTPERSIST_FIRST+18) /* 1198 long, def=0 */ +#define SDRATTR_MOVEY (SDRATTR_NOTPERSIST_FIRST+19) /* 1199 long, def=0 */ +#define SDRATTR_RESIZEXONE (SDRATTR_NOTPERSIST_FIRST+20) /* 1200 long, def=0 */ +#define SDRATTR_RESIZEYONE (SDRATTR_NOTPERSIST_FIRST+21) /* 1201 long, def=0 */ +#define SDRATTR_ROTATEONE (SDRATTR_NOTPERSIST_FIRST+22) /* 1202 long, def=0 */ +#define SDRATTR_HORZSHEARONE (SDRATTR_NOTPERSIST_FIRST+23) /* 1203 long, def=0 */ +#define SDRATTR_VERTSHEARONE (SDRATTR_NOTPERSIST_FIRST+24) /* 1204 long, def=0 */ +#define SDRATTR_RESIZEXALL (SDRATTR_NOTPERSIST_FIRST+25) /* 1205 long, def=0 */ +#define SDRATTR_RESIZEYALL (SDRATTR_NOTPERSIST_FIRST+26) /* 1206 long, def=0 */ +#define SDRATTR_ROTATEALL (SDRATTR_NOTPERSIST_FIRST+27) /* 1207 long, def=0 */ +#define SDRATTR_HORZSHEARALL (SDRATTR_NOTPERSIST_FIRST+28) /* 1208 long, def=0 */ +#define SDRATTR_VERTSHEARALL (SDRATTR_NOTPERSIST_FIRST+29) /* 1209 long, def=0 */ +#define SDRATTR_TRANSFORMREF1X (SDRATTR_NOTPERSIST_FIRST+30) /* 1210 long, def=0 */ +#define SDRATTR_TRANSFORMREF1Y (SDRATTR_NOTPERSIST_FIRST+31) /* 1211 long, def=0 */ +#define SDRATTR_TRANSFORMREF2X (SDRATTR_NOTPERSIST_FIRST+32) /* 1212 long, def=0 */ +#define SDRATTR_TRANSFORMREF2Y (SDRATTR_NOTPERSIST_FIRST+33) /* 1213 long, def=0 */ +#define SDRATTR_TEXTDIRECTION (SDRATTR_NOTPERSIST_FIRST+34) /* 1214 V4+++ long, def=0 */ +#define SDRATTR_NOTPERSIST_LAST (SDRATTR_TEXTDIRECTION) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */ +// kein SetItem hierfuer + +#define SDRATTR_GRAF_FIRST (SDRATTR_NOTPERSIST_LAST+1) /* 1229 V4+++*/ +#define SDRATTR_GRAFRED (SDRATTR_GRAF_FIRST+0) /* 1229 V4+++*/ +#define SDRATTR_GRAFGREEN (SDRATTR_GRAF_FIRST+1) /* 1230 V4+++*/ +#define SDRATTR_GRAFBLUE (SDRATTR_GRAF_FIRST+2) /* 1231 V4+++*/ +#define SDRATTR_GRAFLUMINANCE (SDRATTR_GRAF_FIRST+3) /* 1232 V4+++*/ +#define SDRATTR_GRAFCONTRAST (SDRATTR_GRAF_FIRST+4) /* 1233 V4+++*/ +#define SDRATTR_GRAFGAMMA (SDRATTR_GRAF_FIRST+5) /* 1234 V4+++*/ +#define SDRATTR_GRAFTRANSPARENCE (SDRATTR_GRAF_FIRST+6) /* 1235 V4+++*/ +#define SDRATTR_GRAFINVERT (SDRATTR_GRAF_FIRST+7) /* 1236 V4+++*/ +#define SDRATTR_GRAFMODE (SDRATTR_GRAF_FIRST+8) /* 1237 V4+++*/ +#define SDRATTR_GRAFCROP (SDRATTR_GRAF_FIRST+9) /* 1238 V4+++*/ +#define SDRATTR_GRAF_LAST (SDRATTR_GRAFCROP) /* 1242 V4+++*/ + +#define SDRATTR_3D_FIRST (SDRATTR_GRAF_LAST + 1) /* 1244 V4+++*/ + +#define SDRATTR_3DOBJ_FIRST (SDRATTR_3D_FIRST) /* 1244 V4+++*/ +#define SDRATTR_3DOBJ_PERCENT_DIAGONAL (SDRATTR_3DOBJ_FIRST + 0) /* 1244 V4+++*/ +#define SDRATTR_3DOBJ_BACKSCALE (SDRATTR_3DOBJ_FIRST + 1) /* 1245 V4+++*/ +#define SDRATTR_3DOBJ_DEPTH (SDRATTR_3DOBJ_FIRST + 2) /* 1246 V4+++*/ +#define SDRATTR_3DOBJ_HORZ_SEGS (SDRATTR_3DOBJ_FIRST + 3) /* 1247 V4+++*/ +#define SDRATTR_3DOBJ_VERT_SEGS (SDRATTR_3DOBJ_FIRST + 4) /* 1248 V4+++*/ +#define SDRATTR_3DOBJ_END_ANGLE (SDRATTR_3DOBJ_FIRST + 5) /* 1249 V4+++*/ +#define SDRATTR_3DOBJ_DOUBLE_SIDED (SDRATTR_3DOBJ_FIRST + 6) /* 1250 V4+++*/ +#define SDRATTR_3DOBJ_NORMALS_KIND (SDRATTR_3DOBJ_FIRST + 7) /* 1251 V4+++*/ +#define SDRATTR_3DOBJ_NORMALS_INVERT (SDRATTR_3DOBJ_FIRST + 8) /* 1252 V4+++*/ +#define SDRATTR_3DOBJ_TEXTURE_PROJ_X (SDRATTR_3DOBJ_FIRST + 9) /* 1253 V4+++*/ +#define SDRATTR_3DOBJ_TEXTURE_PROJ_Y (SDRATTR_3DOBJ_FIRST + 10) /* 1254 V4+++*/ +#define SDRATTR_3DOBJ_SHADOW_3D (SDRATTR_3DOBJ_FIRST + 11) /* 1255 V4+++*/ +#define SDRATTR_3DOBJ_MAT_COLOR (SDRATTR_3DOBJ_FIRST + 12) /* 1256 V4+++*/ +#define SDRATTR_3DOBJ_MAT_EMISSION (SDRATTR_3DOBJ_FIRST + 13) /* 1257 V4+++*/ +#define SDRATTR_3DOBJ_MAT_SPECULAR (SDRATTR_3DOBJ_FIRST + 14) /* 1258 V4+++*/ +#define SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY (SDRATTR_3DOBJ_FIRST + 15) /* 1259 V4+++*/ +#define SDRATTR_3DOBJ_TEXTURE_KIND (SDRATTR_3DOBJ_FIRST + 16) /* 1260 V4+++*/ +#define SDRATTR_3DOBJ_TEXTURE_MODE (SDRATTR_3DOBJ_FIRST + 17) /* 1261 V4+++*/ +#define SDRATTR_3DOBJ_TEXTURE_FILTER (SDRATTR_3DOBJ_FIRST + 18) /* 1262 V4+++*/ + +// #107245# New items for 3d objects use former range SDRATTR_3DOBJ_RESERVED_01 +// up to SDRATTR_3DOBJ_RESERVED_05 +#define SDRATTR_3DOBJ_SMOOTH_NORMALS (SDRATTR_3DOBJ_FIRST + 19) /* 1263 V4+++*/ +#define SDRATTR_3DOBJ_SMOOTH_LIDS (SDRATTR_3DOBJ_FIRST + 20) /* 1264 V4+++*/ +#define SDRATTR_3DOBJ_CHARACTER_MODE (SDRATTR_3DOBJ_FIRST + 21) /* 1265 V4+++*/ +#define SDRATTR_3DOBJ_CLOSE_FRONT (SDRATTR_3DOBJ_FIRST + 22) /* 1266 V4+++*/ +#define SDRATTR_3DOBJ_CLOSE_BACK (SDRATTR_3DOBJ_FIRST + 23) /* 1267 V4+++*/ + +// #i28528# +// Added extra Item (Bool) for chart2 to be able to show reduced line geometry +#define SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY (SDRATTR_3DOBJ_FIRST + 24) /* 1268 V4+++*/ + +#define SDRATTR_3DOBJ_LAST (SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY) /* 1282 V4+++*/ + +#define SDRATTR_3DSCENE_FIRST (SDRATTR_3DOBJ_LAST + 1) /* 1283 V4+++*/ +#define SDRATTR_3DSCENE_PERSPECTIVE (SDRATTR_3DSCENE_FIRST + 0) /* 1283 V4+++*/ +#define SDRATTR_3DSCENE_DISTANCE (SDRATTR_3DSCENE_FIRST + 1) /* 1284 V4+++*/ +#define SDRATTR_3DSCENE_FOCAL_LENGTH (SDRATTR_3DSCENE_FIRST + 2) /* 1285 V4+++*/ +#define SDRATTR_3DSCENE_TWO_SIDED_LIGHTING (SDRATTR_3DSCENE_FIRST + 3) /* 1286 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTCOLOR_1 (SDRATTR_3DSCENE_FIRST + 4) /* 1287 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTCOLOR_2 (SDRATTR_3DSCENE_FIRST + 5) /* 1288 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTCOLOR_3 (SDRATTR_3DSCENE_FIRST + 6) /* 1289 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTCOLOR_4 (SDRATTR_3DSCENE_FIRST + 7) /* 1290 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTCOLOR_5 (SDRATTR_3DSCENE_FIRST + 8) /* 1291 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTCOLOR_6 (SDRATTR_3DSCENE_FIRST + 9) /* 1292 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTCOLOR_7 (SDRATTR_3DSCENE_FIRST + 10) /* 1293 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTCOLOR_8 (SDRATTR_3DSCENE_FIRST + 11) /* 1294 V4+++*/ +#define SDRATTR_3DSCENE_AMBIENTCOLOR (SDRATTR_3DSCENE_FIRST + 12) /* 1295 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTON_1 (SDRATTR_3DSCENE_FIRST + 13) /* 1296 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTON_2 (SDRATTR_3DSCENE_FIRST + 14) /* 1297 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTON_3 (SDRATTR_3DSCENE_FIRST + 15) /* 1298 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTON_4 (SDRATTR_3DSCENE_FIRST + 16) /* 1299 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTON_5 (SDRATTR_3DSCENE_FIRST + 17) /* 1300 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTON_6 (SDRATTR_3DSCENE_FIRST + 18) /* 1301 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTON_7 (SDRATTR_3DSCENE_FIRST + 19) /* 1302 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTON_8 (SDRATTR_3DSCENE_FIRST + 20) /* 1303 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTDIRECTION_1 (SDRATTR_3DSCENE_FIRST + 21) /* 1304 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTDIRECTION_2 (SDRATTR_3DSCENE_FIRST + 22) /* 1305 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTDIRECTION_3 (SDRATTR_3DSCENE_FIRST + 23) /* 1306 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTDIRECTION_4 (SDRATTR_3DSCENE_FIRST + 24) /* 1307 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTDIRECTION_5 (SDRATTR_3DSCENE_FIRST + 25) /* 1308 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTDIRECTION_6 (SDRATTR_3DSCENE_FIRST + 26) /* 1309 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTDIRECTION_7 (SDRATTR_3DSCENE_FIRST + 27) /* 1310 V4+++*/ +#define SDRATTR_3DSCENE_LIGHTDIRECTION_8 (SDRATTR_3DSCENE_FIRST + 28) /* 1311 V4+++*/ +#define SDRATTR_3DSCENE_SHADOW_SLANT (SDRATTR_3DSCENE_FIRST + 29) /* 1312 V4+++*/ +#define SDRATTR_3DSCENE_SHADE_MODE (SDRATTR_3DSCENE_FIRST + 30) /* 1313 V4+++*/ +#define SDRATTR_3DSCENE_LAST (SDRATTR_3DSCENE_SHADE_MODE) /* 1333 V4+++*/ +#define SDRATTR_3D_LAST (SDRATTR_3DSCENE_LAST) /* 1333 V4+++*/ + +#define SDRATTR_CUSTOMSHAPE_FIRST (SDRATTR_3D_LAST + 1) /* 1334 V4+++*/ +#define SDRATTR_CUSTOMSHAPE_ENGINE (SDRATTR_CUSTOMSHAPE_FIRST + 0) /* 1334 V4+++*/ +#define SDRATTR_CUSTOMSHAPE_DATA (SDRATTR_CUSTOMSHAPE_FIRST + 1) /* 1335 V4+++*/ +#define SDRATTR_CUSTOMSHAPE_GEOMETRY (SDRATTR_CUSTOMSHAPE_FIRST + 2) /* 1336 V4+++*/ +#define SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL (SDRATTR_CUSTOMSHAPE_FIRST + 3) /* 1337 V4+++*/ +#define SDRATTR_CUSTOMSHAPE_LAST (SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL) /* 1357 V4+++*/ + +#define SDRATTR_TABLE_FIRST (SDRATTR_CUSTOMSHAPE_LAST+1) +#define SDRATTR_TABLE_BORDER (SDRATTR_TABLE_FIRST+0) +#define SDRATTR_TABLE_BORDER_INNER (SDRATTR_TABLE_FIRST+1) +#define SDRATTR_TABLE_BORDER_TLBR (SDRATTR_TABLE_FIRST+2) +#define SDRATTR_TABLE_BORDER_BLTR (SDRATTR_TABLE_FIRST+3) + +#define SDRATTR_TABLE_LAST (SDRATTR_TABLE_BORDER_BLTR) + +#define SDRATTR_END SDRATTR_TABLE_LAST /* 1357 */ /* 1333 V4+++*/ /* 1243 V4+++*/ /*1213*/ /*1085*/ /*1040*/ /*Pool V2: 1123,V1: 1065 */ + +#endif // _SVDDEF_HXX + diff --git a/svx/inc/svx/svddrag.hxx b/svx/inc/svx/svddrag.hxx new file mode 100644 index 000000000000..8fc6b2527192 --- /dev/null +++ b/svx/inc/svx/svddrag.hxx @@ -0,0 +1,195 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svddrag.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDDRAG_HXX +#define _SVDDRAG_HXX + + +#include <tools/contnr.hxx> +#include <tools/gen.hxx> +#include <tools/fract.hxx> +#include "svx/svxdllapi.h" + +// Statushalter fuer objektspeziefisches Draggen. Damit das Model +// Statusfrei bleibt werden die Statusdaten an der View gehalten +// und dem Objekt zu gegebener Zeit als Parameter uebergeben. +// Ausserdem auch Statushalter fuer den Vorgang der Interaktiven +// Objekterzeugung. pHdl ist in diesem Fall NULL. +class SdrHdl; +class SdrView; +class SdrPageView; +class SdrDragMethod; + +struct SVX_DLLPUBLIC SdrDragStatUserData +{ +}; + +class SVX_DLLPUBLIC SdrDragStat { +protected: + SdrHdl* pHdl; // Der Handle an dem der User zottelt + SdrView* pView; + SdrPageView* pPageView; + Container aPnts; // Alle bisherigen Punkte: [0]=Start, [Count()-2]=Prev + Point aRef1; // Referenzpunkt: Resize-Fixpunkt, (Drehachse, + Point aRef2; // Spiegelachse, ...) + Point aPos0; // Position beim letzten Event + Point aRealPos0; // Position beim letzten Event + Point aRealNow; // Aktuelle Dragposition ohne Snap, Ortho und Limit + Point aRealLast; // RealPos des letzten Punkts (fuer MinMoved) + Rectangle aActionRect; + + // Reserve fuer kompatible Erweiterungen, die sonst inkompatibel wuerden. + Point aReservePoint1; + Point aReservePoint2; + Point aReservePoint3; + Point aReservePoint4; + Rectangle aReserveRect1; + Rectangle aReserveRect2; + FASTBOOL bEndDragChangesAttributes; + FASTBOOL bEndDragChangesGeoAndAttributes; + FASTBOOL bMouseIsUp; + FASTBOOL aReserveBool3; + FASTBOOL aReserveBool4; + long aReserveLong1; + long aReserveLong2; + long aReserveLong3; + long aReserveLong4; + void* aReservePtr1; + void* aReservePtr2; + void* aReservePtr3; + void* aReservePtr4; + + FASTBOOL bShown; // Xor sichrbar? + USHORT nMinMov; // Soviel muss erstmal minimal bewegt werden + FASTBOOL bMinMoved; // MinMove durchbrochen? + + FASTBOOL bHorFixed; // nur Vertikal draggen + FASTBOOL bVerFixed; // nur Horizontal draggen + FASTBOOL bWantNoSnap; // TRUE=Fuer die Entscheidung ob fuer pObj->MovCreate() NoSnapPos verwendet + // werden soll. Entsprechend wird auch NoSnapPos in den Buffer geschrieben. + FASTBOOL bOrtho4; + FASTBOOL bOrtho8; + + SdrDragMethod* pDragMethod; + +protected: + void Clear(FASTBOOL bLeaveOne); + Point& Pnt(ULONG nNum) { return *((Point*)aPnts.GetObject(nNum)); } +//public: + SdrDragStatUserData* pUser; // Userdata +public: + SdrDragStat(): aPnts(1024,16,16) { pUser=NULL; Reset(); } + ~SdrDragStat() { Clear(FALSE); } + void Reset(); + SdrView* GetView() const { return pView; } + void SetView(SdrView* pV) { pView=pV; } + SdrPageView* GetPageView() const { return pPageView; } + void SetPageView(SdrPageView* pPV) { pPageView=pPV; } + const Point& GetPoint(ULONG nNum) const { return *((Point*)aPnts.GetObject(nNum)); } + ULONG GetPointAnz() const { return aPnts.Count(); } + const Point& GetStart() const { return GetPoint(0); } + Point& Start() { return Pnt(0); } + const Point& GetPrev() const { return GetPoint(GetPointAnz()-(GetPointAnz()>=2 ? 2:1)); } + Point& Prev() { return Pnt(GetPointAnz()-(GetPointAnz()>=2 ? 2:1)); } + const Point& GetPos0() const { return aPos0; } + Point& Pos0() { return aPos0; } + const Point& GetNow() const { return GetPoint(GetPointAnz()-1); } + Point& Now() { return Pnt(GetPointAnz()-1); } + const Point& GetRealNow() const { return aRealNow; } + Point& RealNow() { return aRealNow; } + const Point& GetRef1() const { return aRef1; } + Point& Ref1() { return aRef1; } + const Point& GetRef2() const { return aRef2; } + Point& Ref2() { return aRef2; } + const SdrHdl* GetHdl() const { return pHdl; } + void SetHdl(SdrHdl* pH) { pHdl=pH; } + SdrDragStatUserData* GetUser() const { return pUser; } + void SetUser(SdrDragStatUserData* pU) { pUser=pU; } + FASTBOOL IsShown() const { return bShown; } + void SetShown(FASTBOOL bOn) { bShown=bOn; } + + FASTBOOL IsMinMoved() const { return bMinMoved; } + void SetMinMoved() { bMinMoved=TRUE; } + void ResetMinMoved() { bMinMoved=FALSE; } + void SetMinMove(USHORT nDist) { nMinMov=nDist; if (nMinMov<1) nMinMov=1; } + USHORT GetMinMove() const { return nMinMov; } + + FASTBOOL IsHorFixed() const { return bHorFixed; } + void SetHorFixed(FASTBOOL bOn) { bHorFixed=bOn; } + FASTBOOL IsVerFixed() const { return bVerFixed; } + void SetVerFixed(FASTBOOL bOn) { bVerFixed=bOn; } + + // Hier kann das Obj sagen: "Ich will keinen Koordinatenfang!" + // z.B. fuer den Winkel des Kreisbogen... + FASTBOOL IsNoSnap() const { return bWantNoSnap; } + void SetNoSnap(FASTBOOL bOn=TRUE) { bWantNoSnap=bOn; } + + // Und hier kann das Obj sagen welches Ortho (wenn ueberhaupt eins) + // sinnvoll auf ihm angewendet werden kann. + // Ortho4 bedeutet Ortho in 4 Richtungen (fuer Rect und Cirt) + FASTBOOL IsOrtho4Possible() const { return bOrtho4; } + void SetOrtho4Possible(FASTBOOL bOn=TRUE) { bOrtho4=bOn; } + // Ortho8 bedeutet Ortho in 8 Richtungen (fuer Linien) + FASTBOOL IsOrtho8Possible() const { return bOrtho8; } + void SetOrtho8Possible(FASTBOOL bOn=TRUE) { bOrtho8=bOn; } + + // Wird vom gedraggten Objekt gesetzt + FASTBOOL IsEndDragChangesAttributes() const { return bEndDragChangesAttributes; } + void SetEndDragChangesAttributes(FASTBOOL bOn) { bEndDragChangesAttributes=bOn; } + FASTBOOL IsEndDragChangesGeoAndAttributes() const { return bEndDragChangesGeoAndAttributes; } + void SetEndDragChangesGeoAndAttributes(FASTBOOL bOn) { bEndDragChangesGeoAndAttributes=bOn; } + + // Wird von der View gesetzt und kann vom Obj ausgewertet werden + FASTBOOL IsMouseDown() const { return !bMouseIsUp; } + void SetMouseDown(FASTBOOL bDown) { bMouseIsUp=!bDown; } + + Point KorregPos(const Point& rNow, const Point& rPrev) const; + void Reset(const Point& rPnt); + void NextMove(const Point& rPnt); + void NextPoint(FASTBOOL bSaveReal=FALSE); + void PrevPoint(); + FASTBOOL CheckMinMoved(const Point& rPnt); + long GetDX() const { return GetNow().X()-GetPrev().X(); } + long GetDY() const { return GetNow().Y()-GetPrev().Y(); } + Fraction GetXFact() const; + Fraction GetYFact() const; + + SdrDragMethod* GetDragMethod() const { return pDragMethod; } + void SetDragMethod(SdrDragMethod* pMth) { pDragMethod=pMth; } + + const Rectangle& GetActionRect() const { return aActionRect; } + void SetActionRect(const Rectangle& rR) { aActionRect=rR; } + + // Unter Beruecksichtigung von 1stPointAsCenter + void TakeCreateRect(Rectangle& rRect) const; +}; + +#endif //_SVDDRAG_HXX + diff --git a/svx/inc/svx/svddrgmt.hxx b/svx/inc/svx/svddrgmt.hxx new file mode 100644 index 000000000000..91112a7dd287 --- /dev/null +++ b/svx/inc/svx/svddrgmt.hxx @@ -0,0 +1,327 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svddrgmt.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDDRGMT_HXX +#define _SVDDRGMT_HXX + +#include <svx/svddrgv.hxx> +#include "svx/svxdllapi.h" +#include <svx/sdr/contact/objectcontact.hxx> + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@@ @@@@@ @@@@ @@@@ @@ @@ @@@@@ @@@@@@ @@ @@ @@@@ @@@@@ @@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@@@@ @@@@@@ @@ @@@ @@@@@@@ @@@@ @@ @@@@@@ @@ @@ @@ @@ @@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@@@@ @@ @@ @@ @@ @@@@@ @@ @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SdrDragView; +class SdrDragStat; + +////////////////////////////////////////////////////////////////////////////// + +class SdrDragEntry +{ +private: + // bitfield + unsigned mbAddToTransparent : 1; + +protected: + // access for derived classes + void setAddToTransparent(bool bNew) { mbAddToTransparent = bNew; } + +public: + SdrDragEntry(); + virtual ~SdrDragEntry(); + + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) = 0; + + // data read access + bool getAddToTransparent() const { return mbAddToTransparent; } +}; + +////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrDragEntryPolyPolygon : public SdrDragEntry +{ +private: + basegfx::B2DPolyPolygon maOriginalPolyPolygon; + +public: + SdrDragEntryPolyPolygon(const basegfx::B2DPolyPolygon& rOriginalPolyPolygon); + virtual ~SdrDragEntryPolyPolygon(); + + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod); +}; + +////////////////////////////////////////////////////////////////////////////// + +class SdrDragEntrySdrObject : public SdrDragEntry +{ +private: + const SdrObject& maOriginal; + SdrObject* mpClone; + sdr::contact::ObjectContact& mrObjectContact; + bool mbModify; + +public: + SdrDragEntrySdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify); + virtual ~SdrDragEntrySdrObject(); + + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod); +}; + +////////////////////////////////////////////////////////////////////////////// + +class SdrDragEntryPrimitive2DSequence : public SdrDragEntry +{ +private: + drawinglayer::primitive2d::Primitive2DSequence maPrimitive2DSequence; + +public: + SdrDragEntryPrimitive2DSequence( + const drawinglayer::primitive2d::Primitive2DSequence& rSequence, + bool bAddToTransparent); + virtual ~SdrDragEntryPrimitive2DSequence(); + + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod); +}; + +////////////////////////////////////////////////////////////////////////////// + +class SdrDragEntryPointGlueDrag : public SdrDragEntry +{ +private: + std::vector< basegfx::B2DPoint > maPositions; + bool mbIsPointDrag; + +public: + SdrDragEntryPointGlueDrag(const std::vector< basegfx::B2DPoint >& rPositions, bool bIsPointDrag); + virtual ~SdrDragEntryPointGlueDrag(); + + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod); +}; + +////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrDragMethod +{ +private: + std::vector< SdrDragEntry* > maSdrDragEntries; + sdr::overlay::OverlayObjectList maOverlayObjectList; + SdrDragView& mrSdrDragView; + + // bitfield + unsigned mbMoveOnly : 1; + unsigned mbSolidDraggingActive : 1; + +protected: + // access for derivated classes to maSdrDragEntries + void clearSdrDragEntries() { for(sal_uInt32 a(0); a < maSdrDragEntries.size(); a++) { delete maSdrDragEntries[a]; } maSdrDragEntries.clear(); } + void addSdrDragEntry(SdrDragEntry* pNew) { if(pNew) { maSdrDragEntries.push_back(pNew); }} + virtual void createSdrDragEntries(); + virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify); + + // access for derivated classes to maOverlayObjectList + void clearOverlayObjectList() { maOverlayObjectList.clear(); } + void addToOverlayObjectList(sdr::overlay::OverlayObject& rNew) { maOverlayObjectList.append(rNew); } + basegfx::B2DRange getB2DRangeFromOverlayObjectList() const { return maOverlayObjectList.getBaseRange(); } + + // access for derivated classes to mrSdrDragView + SdrDragView& getSdrDragView() { return mrSdrDragView; } + const SdrDragView& getSdrDragView() const { return mrSdrDragView; } + + // access for derivated classes for bools + void setMoveOnly(bool bNew) { mbMoveOnly = bNew; } + void setSolidDraggingActive(bool bNew) { mbSolidDraggingActive = bNew; } + + // internal helpers for creation of standard drag entries + void createSdrDragEntries_SolidDrag(); + void createSdrDragEntries_PolygonDrag(); + void createSdrDragEntries_PointDrag(); + void createSdrDragEntries_GlueDrag(); + + // old call forwarders to the SdrDragView + void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, String& rStr, sal_uInt16 nVal=0) const; + SdrHdl* GetDragHdl() const { return getSdrDragView().pDragHdl; } + SdrHdlKind GetDragHdlKind() const { return getSdrDragView().eDragHdl; } + SdrDragStat& DragStat() { return getSdrDragView().aDragStat; } + const SdrDragStat& DragStat() const { return getSdrDragView().aDragStat; } + Point& Ref1() const { return mrSdrDragView.aRef1; } + Point& Ref2() const { return mrSdrDragView.aRef2; } + const SdrHdlList& GetHdlList() const { return getSdrDragView().aHdl; } + void AddUndo(SdrUndoAction* pUndo) { getSdrDragView().AddUndo(pUndo); } + bool IsDragLimit() { return getSdrDragView().bDragLimit; } + const Rectangle& GetDragLimitRect() { return getSdrDragView().aDragLimit; } + const SdrMarkList& GetMarkedObjectList() { return getSdrDragView().GetMarkedObjectList(); } + Point GetSnapPos(const Point& rPt) const { return getSdrDragView().GetSnapPos(rPt,getSdrDragView().pMarkedPV); } + sal_uInt16 SnapPos(Point& rPt) const { return getSdrDragView().SnapPos(rPt,getSdrDragView().pMarkedPV); } + inline const Rectangle& GetMarkedRect() const; + SdrPageView* GetDragPV() const; + SdrObject* GetDragObj() const; + OutputDevice* GetDragWin() const { return getSdrDragView().pDragWin; } + bool IsDraggingPoints() const { return getSdrDragView().IsDraggingPoints(); } + bool IsDraggingGluePoints() const { return getSdrDragView().IsDraggingGluePoints(); } + + bool DoAddConnectorOverlays(); + drawinglayer::primitive2d::Primitive2DSequence AddConnectorOverlays(); + +public: + TYPEINFO(); + + void resetSdrDragEntries(); + basegfx::B2DRange getCurrentRange() const; + + // #i58950# also moved constructor implementation to cxx + SdrDragMethod(SdrDragView& rNewView); + + // #i58950# virtual destructor was missing + virtual ~SdrDragMethod(); + + void Show(); + void Hide(); + virtual void TakeSdrDragComment(String& rStr) const=0; + virtual bool BeginSdrDrag()=0; + virtual void MoveSdrDrag(const Point& rPnt)=0; + virtual bool EndSdrDrag(bool bCopy)=0; + virtual void CancelSdrDrag(); + virtual Pointer GetSdrDragPointer() const=0; + + virtual void CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlayManager); + void destroyOverlayGeometry(); + + virtual basegfx::B2DHomMatrix getCurrentTransformation(); + virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget); + virtual void applyCurrentTransformationToPolyPolygon(basegfx::B2DPolyPolygon& rTarget); + + // data read access + bool getMoveOnly() const { return mbMoveOnly; } + bool getSolidDraggingActive() const { return mbSolidDraggingActive; } +}; + +inline const Rectangle& SdrDragMethod::GetMarkedRect() const +{ + return getSdrDragView().eDragHdl==HDL_POLY ? getSdrDragView().GetMarkedPointsRect() : + getSdrDragView().eDragHdl==HDL_GLUE ? getSdrDragView().GetMarkedGluePointsRect() : + getSdrDragView().GetMarkedObjRect(); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// SdrDragMove + +class SVX_DLLPUBLIC SdrDragMove : public SdrDragMethod +{ +private: + long nBestXSnap; + long nBestYSnap; + bool bXSnapped; + bool bYSnapped; + + void ImpCheckSnap(const Point& rPt); + +protected: + virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify); + +public: + TYPEINFO(); + SdrDragMove(SdrDragView& rNewView); + + virtual void TakeSdrDragComment(String& rStr) const; + virtual bool BeginSdrDrag(); + virtual void MoveSdrDrag(const Point& rPnt); + virtual bool EndSdrDrag(bool bCopy); + virtual Pointer GetSdrDragPointer() const; + + virtual basegfx::B2DHomMatrix getCurrentTransformation(); + virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// SdrDragResize + +class SVX_DLLPUBLIC SdrDragResize : public SdrDragMethod +{ +protected: + Fraction aXFact; + Fraction aYFact; + +public: + TYPEINFO(); + SdrDragResize(SdrDragView& rNewView); + + virtual void TakeSdrDragComment(String& rStr) const; + virtual bool BeginSdrDrag(); + virtual void MoveSdrDrag(const Point& rPnt); + virtual bool EndSdrDrag(bool bCopy); + virtual Pointer GetSdrDragPointer() const; + + virtual basegfx::B2DHomMatrix getCurrentTransformation(); + virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// SdrDragObjOwn + +class SVX_DLLPUBLIC SdrDragObjOwn : public SdrDragMethod +{ +private: + // SdrDragObjOwn always works on a clone since it has no transformation + // mechanism to modify wireframe visualisations, but uses the + // SdrObject::applySpecialDrag() method to change a clone of the + // SdrObject + SdrObject* mpClone; + +protected: + virtual void createSdrDragEntries(); + +public: + TYPEINFO(); + SdrDragObjOwn(SdrDragView& rNewView); + virtual ~SdrDragObjOwn(); + + virtual void TakeSdrDragComment(String& rStr) const; + virtual bool BeginSdrDrag(); + virtual void MoveSdrDrag(const Point& rPnt); + virtual bool EndSdrDrag(bool bCopy); + virtual Pointer GetSdrDragPointer() const; +}; + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +#endif //_SVDDRGMT_HXX + +// eof diff --git a/svx/inc/svx/svddrgv.hxx b/svx/inc/svx/svddrgv.hxx new file mode 100644 index 000000000000..3e03f437909a --- /dev/null +++ b/svx/inc/svx/svddrgv.hxx @@ -0,0 +1,324 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svddrgv.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDDRGV_HXX +#define _SVDDRGV_HXX + +#include "svx/svxdllapi.h" +#include <svx/svdxcgv.hxx> + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SdrUndoGeoObj; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@@ @@@@@ @@@@ @@@@ @@ @@ @@ @@@@@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@ @@ @@@@@ @@@@@@ @@ @@@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@@@@ @@ @@ @@ @@ @@@@@ @ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class ImpSdrDragViewExtraData; + +class SVX_DLLPUBLIC SdrDragView: public SdrExchangeView +{ + friend class SdrPageView; + friend class SdrDragMethod; + +protected: + SdrHdl* pDragHdl; + SdrDragMethod* mpCurrentSdrDragMethod; + SdrUndoGeoObj* pInsPointUndo; + Rectangle aDragLimit; + XubString aInsPointUndoStr; + SdrMarkList aFollowingEdges; // Wenn Knoten gedraggd werden, sollen alle Kanten als Xor folgen + SdrHdlKind eDragHdl; + + ULONG nDragXorPolyLimit; + ULONG nDragXorPointLimit; + USHORT nRubberEdgeDraggingLimit; + USHORT nDetailedEdgeDraggingLimit; + + unsigned bFramDrag : 1; // z.Zt. FrameDrag + unsigned bDragSpecial : 1; // z.Zt. Special Obj-Dragging + unsigned bMarkedHitMovesAlways : 1; // Persistent + unsigned bDragLimit : 1; // Limit auf SnapRect statt BoundRect + unsigned bDragHdl : 1; // TRUE: RefPt wird verschoben + unsigned bDragStripes : 1; // Persistent + unsigned bMirrRefDragObj : 1; // Persistent - Waehrend des Draggens der Spiegelachse die gespiegelten Objekte als Xor zeigen + unsigned mbSolidDragging : 1; // allow solid create/drag of objects + unsigned bMouseHideWhileDraggingPoints : 1; + unsigned bResizeAtCenter : 1; + unsigned bCrookAtCenter : 1; + unsigned bDragWithCopy : 1; + unsigned bInsGluePoint : 1; + unsigned bInsObjPointMode : 1; + unsigned bInsGluePointMode : 1; + unsigned bNoDragXorPolys : 1; + unsigned bAutoVertexCon : 1; // Automatische Konnektorgenerierung an den Scheitelpunkten + unsigned bAutoCornerCon : 1; // Automatische Konnektorgenerierung an den Eckpunkten + unsigned bRubberEdgeDragging : 1; + unsigned bDetailedEdgeDragging : 1; + +private: + SVX_DLLPRIVATE void ImpClearVars(); + SVX_DLLPRIVATE void ImpMakeDragAttr(); + SVX_DLLPRIVATE void ImpDelDragAttr(); + +protected: + virtual void SetMarkHandles(); + void ShowDragObj(); + void HideDragObj(); + sal_Bool ImpBegInsObjPoint(sal_Bool bIdxZwang, sal_uInt32 nIdx, const Point& rPnt, sal_Bool bNewObj, OutputDevice* pOut); + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrDragView(SdrModel* pModel1, OutputDevice* pOut = 0L); + virtual ~SdrDragView(); + +public: + virtual BOOL IsAction() const; + virtual void MovAction(const Point& rPnt); + virtual void EndAction(); + virtual void BckAction(); + virtual void BrkAction(); + virtual void TakeActionRect(Rectangle& rRect) const; + + // Spezialimplementation fuer den Writer: + // TakeDragObjAnchorPos() liefert die Position an der ein Objekt + // beim Draggen einer Einfachselektion ungefaehr landet wenn es + // "losgelassen" wird (EndDrag). + // In der Regel ist das die linke obere Ecke des zu erwartenden neuen + // SnapRects. Ausnahme: CaptionObj. Dort ist es die Position des + // "Schwanzendes". + // Bei Returncode FALSE konnte ich die Position nicht bestimmen + // (z.B. Punktverschiebung, Mehrfachselektion, Schieben der + // Spiegelschse, ...) + BOOL TakeDragObjAnchorPos(Point& rPos, BOOL bTopRight = FALSE ) const; + + // Wird pForcedMeth uebergeben, so wird pHdl, ... nicht ausgewerten, sondern diese + // Drag-Methode verwendet. Die Instanz geht dabei ins Eigentum der View ueber und + // wird zum Ende des Draggings destruiert. + virtual BOOL BegDragObj(const Point& rPnt, OutputDevice* pOut=NULL, SdrHdl* pHdl=NULL, short nMinMov=-3, SdrDragMethod* pForcedMeth=NULL); + void MovDragObj(const Point& rPnt); + BOOL EndDragObj(BOOL bCopy=FALSE); + void BrkDragObj(); + BOOL IsDragObj() const { return mpCurrentSdrDragMethod && !bInsPolyPoint && !bInsGluePoint; } + SdrHdl* GetDragHdl() const { return pDragHdl; } + SdrDragMethod* GetDragMethod() const { return mpCurrentSdrDragMethod; } + BOOL IsDraggingPoints() const { return eDragHdl==HDL_POLY; } + BOOL IsDraggingGluePoints() const { return eDragHdl==HDL_GLUE; } + + // Wer das beim BegDrag oder mittendrin schon festlegen will. + // (Wird bei jedem BegDrag auf FALSE zurueckgesetzt, also nach + // BegDrag setzen.) + void SetDragWithCopy(BOOL bOn) { bDragWithCopy = bOn; } + BOOL IsDragWithCopy() const { return bDragWithCopy; } + + void SetInsertGluePoint(BOOL bOn) { bInsGluePoint = bOn; } + BOOL IsInsertGluePoint() const { return bInsGluePoint; } + + // Interaktives einfuegen eines neuen Punktes. nIdx=0 => vor dem ersten Punkt. + BOOL IsInsObjPointPossible() const; + BOOL IsInsPointPossible() const { return IsInsObjPointPossible(); } + sal_Bool BegInsObjPoint(const Point& rPnt, sal_Bool bNewObj) { return ImpBegInsObjPoint(sal_False, 0L, rPnt, bNewObj, 0L); } + void MovInsObjPoint(const Point& rPnt) { MovDragObj(rPnt); } + BOOL EndInsObjPoint(SdrCreateCmd eCmd); + void BrkInsObjPoint() { BrkDragObj(); } + BOOL IsInsObjPoint() const { return mpCurrentSdrDragMethod && bInsPolyPoint; } + + // Fuer die App zum Verwalten des Status. GetPreferedPointer() wird + // spaeter vielleicht einen passenden Pointer dafuer liefern + void SetInsObjPointMode(BOOL bOn) { bInsObjPointMode = bOn; } + BOOL IsInsObjPointMode() const { return bInsObjPointMode; } + + BOOL IsInsGluePointPossible() const; + BOOL BegInsGluePoint(const Point& rPnt); + void MovInsGluePoint(const Point& rPnt) { MovDragObj(rPnt); } + BOOL EndInsGluePoint() { return EndDragObj(); } + void BrkInsGluePoint() { BrkDragObj(); } + BOOL IsInsGluePoint() const { return mpCurrentSdrDragMethod && bInsGluePoint; } + + // Fuer die App zum Verwalten des Status. GetPreferedPointer() wird + // spaeter vielleicht einen passenden Pointer dafuer liefern + void SetInsGluePointMode(BOOL bOn) { bInsGluePointMode = bOn; } + BOOL IsInsGluePointMode() const { return bInsGluePointMode; } + + // Begrenzungslinien ueber's gesamte Win waehrend des Draggens + // Persistent. Default=FALSE. + void SetDragStripes(BOOL bOn); + BOOL IsDragStripes() const { return bDragStripes; } + + // Handles waehrend des Draggens verstecken + //HMHvoid SetDragHdlHide(BOOL bOn); + //HMHBOOL IsDragHdlHide() const { return bNoDragHdl; } + + // Beim Draggen von Polygonpunkten und Klebepunkten + // die Maus verstecken. Default=FALSE + void SetMouseHideWhileDraggingPoints(BOOL bOn) { bMouseHideWhileDraggingPoints = bOn; } + BOOL IsMouseHideWhileDraggingPoints() const { return bMouseHideWhileDraggingPoints; } + + // Beim Draggen werden i.d.R. die Konturen der markierten Objekte + // als Xor-Polygone dargestellt. Wird dieses Flag hier gesetzt, + // wird (z.B. bei Mehrfachselektion) nur ein Xor-Frame gezeichnet. + // Bei objektspeziefischem Dragging (Polygonpunkte,Eckenradius,... + // hat diese Einstellung keine Auswirkung. + // Auch waerend des Draggens umschaltbar. + // Default=Off + void SetNoDragXorPolys(BOOL bOn); + BOOL IsNoDragXorPolys() const { return bNoDragXorPolys; } + + // Uebersteigt die Anzahl der markierten Objekte den hier eingestellten + // Wert, wird implizit (temporaer) auf NoDragPolys geschaltet. + // PolyPolygone etc werden entsprechend als mehrere Objekte gewertet. + // Default=100 + void SetDragXorPolyLimit(ULONG nObjAnz) { nDragXorPolyLimit=nObjAnz; } + ULONG GetDragXorPolyLimit() const { return nDragXorPolyLimit; } + + // Wie DragXorPolyLimit, jedoch bezogen auf die Gesamtpunktanzahl + // aller Polygone. Default=500. + // Auf NoDragPolys wird (temporaer) geschaltet, wenn eins der Limits + // ueberstiegen wird. + void SetDragXorPointLimit(ULONG nPntAnz) { nDragXorPointLimit=nPntAnz; } + ULONG GetDragXorPointLimit() const { return nDragXorPointLimit; } + + void SetSolidDragging(bool bOn); + bool IsSolidDragging() const; + + // Dragging/Creating von Verbindern: + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // Verbinder an Objektscheitelpunkte ankleben + // Default=TRUE=Ja + void SetAutoVertexConnectors(BOOL bOn) { bAutoVertexCon = bOn; } + BOOL IsAutoVertexConnectors() const { return bAutoVertexCon; } + + // Verbinder an Objektecken ankleben + // Default=FALSE=Nein + void SetAutoCornerConnectors(BOOL bOn) { bAutoCornerCon = bOn; } + BOOL IsAutoCornerConnectors() const { return bAutoCornerCon; } + + // Dragging von verbundenen Objekten (Nodes): + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // DetailedEdgeDraggingLimit: Wie RubberEdgeDraggingLimit, jedoch bezieht + // sich dieses Limit auf die detalierte Darstellung, d.h. nicht nur + // Gummibaender sondern komplette Neuberechnunen sind beim Draggen sichtbar. + // Diese detalierte Darstellung ist eh nur beim MoveDrag moeglich. + // Defaultwert ist 10 + void SetDetailedEdgeDragging(BOOL bOn); // Default an + BOOL IsDetailedEdgeDragging() const { return bDetailedEdgeDragging; } + + void SetDetailedEdgeDraggingLimit(USHORT nEdgeObjAnz); + USHORT GetDetailedEdgeDraggingLimit() const { return nDetailedEdgeDraggingLimit; } + + // EdgeDraggingLimit: Sind mehr als nEdgeObjAnz Kanten betroffen, werden + // diese beim interaktiven Draggen nicht mit angezeigt. + // Gemeint sind hier die "Gummibaender", die weniger Rechenzeit benoetigen + // als die kompletten Neuberechnungen beim DetailedEdgeDragging. + // Defaultwert ist 100 + void SetRubberEdgeDragging(BOOL bOn); // Default an + BOOL IsRubberEdgeDragging() const { return bRubberEdgeDragging; } + + void SetRubberEdgeDraggingLimit(USHORT nEdgeObjAnz); + USHORT GetRubberEdgeDraggingLimit() const { return nRubberEdgeDraggingLimit; } + + // Verbinderhandling also zu deutsch wie folgt (bei Defaulteinstellungen): + // - Sind bis max 10 Verbinder betroffen werden diese bei jedem + // MouseMove neu berechnet + // - Sind zwischen 11 und 100 Verbinder betroffen werden die + // Verbindungen beim Draggen als gerade Linien dargestellt. + // - Bei mehr als 100 betroffenen Verbindern wird beim Draggen nichts + // mehr gezeichnet was auf Verbinder hinweist. + + // Ist ein spezieller Dragmode eingeschaltet, wie Rotate, Mirror oder Crook, + // dann leitet ein Hit auf das markierte Objekt genau dieses Dragging ein. + // Setzt man MarkedHitMovesAlways auf TRUE, so leitet ein Hit auf das + // markierte Objekt immer ein Moven ein, unabhaengig vom gesetzten DragMode. + // Dieses Flag ist persistent und sollte von der App fuer den Anwender + // konfigurierbar sein! + void SetMarkedHitMovesAlways(BOOL bOn) { bMarkedHitMovesAlways = bOn; } + BOOL IsMarkedHitMovesAlways() const { return bMarkedHitMovesAlways; } + + // Beim Draggen der Spiegelachse das Spiegelbild der markierten Objekte + // als Xor darstellen? Persistent. Noch nicht implementiert. Default TRUE. + void SetMirrRefDragObj(BOOL bOn) { bMirrRefDragObj = bOn; } + BOOL IsMirrRefDragObj() const { return bMirrRefDragObj; } + + BOOL IsOrthoDesired() const; + + // Beim Resize die Mitte als Referenz + // Default=FALSE. + BOOL IsResizeAtCenter() const { return bResizeAtCenter; } + void SetResizeAtCenter(BOOL bOn) { bResizeAtCenter = bOn; } + + // Symmetrisches Crook + // Default=FALSE. + BOOL IsCrookAtCenter() const { return bCrookAtCenter; } + void SetCrookAtCenter(BOOL bOn) { bCrookAtCenter = bOn; } + + // Begrenzung des Arbeitsbereichs. Die Begrenzung bezieht sich auf die + // View, nicht auf die einzelnen PageViews. Von der View wird diese + // Begrenzung nur bei Interaktionen wie Dragging und Create ausgewertet. + // Bei von der App algorithmisch oder UI-gesteuerte Aktionen (SetGeoAttr, + // MoveMarkedObj, ...) muss die App dieses Limit selbst beruecksichtigen. + // Ferner ist dieses Limit als Grob-Limit zu sehen. U.U. koennen Objekte + // (z.B. beim Drehen) nicht exakt bis an dieses Limit herangedraggt werden, + // koennen Objekte durch Rundungsfehler doch etwas ueberstehen, ... . + // Default=EmptyRect=keine Begrenzung. + // erst z.T. impl. + // (besser in die DragView?) + void SetWorkArea(const Rectangle& rRect) { aMaxWorkArea=rRect; } + const Rectangle& GetWorkArea() const { return aMaxWorkArea; } + + + // Das DragLimit ist bezogen auf die Page des Objekts. + // (Oder auf die View??? Muss ich mal^^^^recherchieren. Joe.) + // FALSE=Kein Limit. + // Das Rueckgabe-Rect muss absolute Koordinaten enthalten. Der Maximale + // Dragbereich wird von der View dann so gewaehlt, dass das SnapRect des + // Objekts bis Maximal auf die Kante des LimitRects gemoved bzw. gesized + // wird. Bei Objekten wie Bezierkurven, gedrehten Rechtecken ist zu beachten + // das durch anschliessende Neuberechnung des SnapRects (bei Resize) + // Rundungsfehler auftreten koennen, wodurch das LimitRect minnimal + // ueberschritten werden koennte... + // Implementiert fuer Move und Resize. + virtual BOOL TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const; +}; + +#endif //_SVDDRGV_HXX + diff --git a/svx/inc/svx/svdedtv.hxx b/svx/inc/svx/svdedtv.hxx new file mode 100644 index 000000000000..1db0df84bf75 --- /dev/null +++ b/svx/inc/svx/svdedtv.hxx @@ -0,0 +1,476 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdedtv.hxx,v $ + * $Revision: 1.3.148.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDEDTV_HXX +#define _SVDEDTV_HXX + +#include <svx/svdmrkv.hxx> +#include <svx/xpoly.hxx> +#include <svx/svdmodel.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SfxUndoAction; +class SdrUndoAction; +class SdrUndoGroup; +class SfxStyleSheet; +class SdrLayer; +class SvdProgressInfo; + +//************************************************************ +// Defines +//************************************************************ + +enum SdrHorAlign { + SDRHALIGN_NONE, + SDRHALIGN_LEFT, + SDRHALIGN_RIGHT, + SDRHALIGN_CENTER +}; + +enum SdrVertAlign { + SDRVALIGN_NONE, + SDRVALIGN_TOP, + SDRVALIGN_BOTTOM, + SDRVALIGN_CENTER +}; + +enum SdrMergeMode { + SDR_MERGE_MERGE, + SDR_MERGE_SUBSTRACT, + SDR_MERGE_INTERSECT +}; + +// Optionen fuer InsertObject() +#define SDRINSERT_DONTMARK 0x0001 /* Obj wird nicht markiert (aktuelle Markierung bleibt bestehen) */ +#define SDRINSERT_ADDMARK 0x0002 /* Das Obj wird zu einer ggf. bereits bestehenden Selektion hinzumarkiert */ +#define SDRINSERT_SETDEFATTR 0x0004 /* Die aktuellen Attribute (+StyleSheet) werden dem Obj zugewiesen */ +#define SDRINSERT_SETDEFLAYER 0x0008 /* Der aktuelle Layer wird dem Obj zugewiesen */ +#define SDRINSERT_NOBROADCAST 0x0010 /* Einfuegen mit NbcInsertObject() fuer SolidDragging */ + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@ +// @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrEditView: public SdrMarkView +{ + friend class SdrPageView; + friend class SdrDragDistort; + friend class SdrDragCrook; + +protected: + + // Die Transformationsnachfragen, etc. etwas cachen + unsigned bPossibilitiesDirty : 1; + unsigned bReadOnly : 1; + unsigned bGroupPossible : 1; + unsigned bUnGroupPossible : 1; + unsigned bGrpEnterPossible : 1; + unsigned bDeletePossible : 1; + unsigned bToTopPossible : 1; + unsigned bToBtmPossible : 1; + unsigned bReverseOrderPossible : 1; + unsigned bImportMtfPossible : 1; + unsigned bCombinePossible : 1; + unsigned bDismantlePossible : 1; + unsigned bCombineNoPolyPolyPossible : 1; + unsigned bDismantleMakeLinesPossible : 1; + unsigned bOrthoDesiredOnMarked : 1; + unsigned bMoreThanOneNotMovable : 1; // Es ist mehr als ein Objekt nicht verschiebbar + unsigned bOneOrMoreMovable : 1; // Wenigstens 1 Obj verschiebbar + unsigned bMoreThanOneNoMovRot : 1; // Es ist mehr als ein Objekt nicht verschieb- und drehbar (Crook) + unsigned bContortionPossible : 1; // Alles Polygone (ggf. gruppiert) + unsigned bAllPolys : 1; // Alles Polygone (nicht gruppiert) + unsigned bOneOrMorePolys : 1; // Mindestens 1 Polygon (nicht gruppiert) + unsigned bMoveAllowed : 1; + unsigned bResizeFreeAllowed : 1; + unsigned bResizePropAllowed : 1; + unsigned bRotateFreeAllowed : 1; + unsigned bRotate90Allowed : 1; + unsigned bMirrorFreeAllowed : 1; + unsigned bMirror45Allowed : 1; + unsigned bMirror90Allowed : 1; + unsigned bShearAllowed : 1; + unsigned bEdgeRadiusAllowed : 1; + unsigned bTransparenceAllowed : 1; + unsigned bGradientAllowed : 1; + unsigned bCanConvToPath : 1; + unsigned bCanConvToPoly : 1; + unsigned bCanConvToContour : 1; + unsigned bCanConvToPathLineToArea : 1; + unsigned bCanConvToPolyLineToArea : 1; + unsigned bMoveProtect : 1; + unsigned bResizeProtect : 1; + // Z-Order von virtuellen Objekten zusammenhalten (Writer) + unsigned bBundleVirtObj : 1; + +private: + SVX_DLLPRIVATE void ImpClearVars(); + SVX_DLLPRIVATE void ImpResetPossibilityFlags(); + +protected: + void ImpBroadcastEdgesOfMarkedNodes(); + + // Konvertierung der markierten Objekte in Poly bzw. Bezier. + void ImpConvertTo(BOOL bPath, BOOL bLineToArea); + + // Konvertiert ein Obj, wirft bei Erfolg das alte as seiner Liste und + // fuegt das neue an dessen Position ein. Inkl Undo. Es wird weder ein + // MarkEntry noch ein ModelChgBroadcast generiert. + SdrObject* ImpConvertOneObj(SdrObject* pObj, BOOL bPath, BOOL bLineToArea); + + // Setzen der beiden Flags bToTopPossible und bToBtmPossible. + // bToTopPossibleDirty und bToBtmPossibleDirty werden dabei gleichzeitig + // zurueckgesetzt. + void ImpCheckToTopBtmPossible(); + + // fuer den Writer werden virtuelle Objekte buendig zusammengehalten (Z-Order) + void ImpBundleVirtObjOfMarkList(); + + // fuer CombineMarkedObjects und DismantleMarkedObjects + void ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest) const; + + // fuer CombineMarkedObjects + sal_Bool ImpCanConvertForCombine1(const SdrObject* pObj) const; + sal_Bool ImpCanConvertForCombine(const SdrObject* pObj) const; + basegfx::B2DPolyPolygon ImpGetPolyPolygon1(const SdrObject* pObj, sal_Bool bCombine) const; + basegfx::B2DPolyPolygon ImpGetPolyPolygon(const SdrObject* pObj, sal_Bool bCombine) const; + basegfx::B2DPolygon ImpCombineToSinglePolygon(const basegfx::B2DPolyPolygon& rPolyPolygon) const; + + // fuer DismantleMarkedObjects + sal_Bool ImpCanDismantle(const basegfx::B2DPolyPolygon& rPpolyPpolygon, sal_Bool bMakeLines) const; + sal_Bool ImpCanDismantle(const SdrObject* pObj, sal_Bool bMakeLines) const; + void ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, ULONG& rPos, SdrPageView* pPV, BOOL bMakeLines); + void ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRad, SdrCrookMode eMode, + BOOL bVertical, BOOL bNoContortion, BOOL bRotate, const Rectangle& rMarkRect); + void ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPolygon& rDistortedRect, BOOL bNoContortion); + BOOL ImpDelLayerCheck(SdrObjList* pOL, SdrLayerID nDelID) const; + void ImpDelLayerDelObjs(SdrObjList* pOL, SdrLayerID nDelID); + + // Entfernt alle Obj der MarkList aus ihren ObjLists inkl Undo. + // Die Eintraege in rMark bleiben erhalten. + void DeleteMarkedList(const SdrMarkList& rMark); // DeleteMarked -> DeleteMarkedList + + // Die Transformationsnachfragen etwas cachen + //void ImpCheckMarkTransform() const; veraltet + // Checken, was man so mit den markierten Objekten alles machen kann + virtual void CheckPossibilities(); + void ForcePossibilities() const { if (bPossibilitiesDirty || bSomeObjChgdFlag) ((SdrEditView*)this)->CheckPossibilities(); } + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrEditView(SdrModel* pModel1, OutputDevice* pOut = 0L); + virtual ~SdrEditView(); + +public: + // Jeder Aufruf einer undofaehigen Methode an der View generiert eine + // UndoAction. Moechte man mehrere + // Methodenaufrufe zu einer UndoAction zusammenfassen, so kann man diese + // mit BegUndo() / EndUndo() klammern (beliebig tief). Als Kommentar der + // UndoAction wird der des ersten BegUndo(String) aller Klammerungen + // verwendet. NotifyNewUndoAction() wird in diesem Fall erst beim letzten + // EndUndo() gerufen. NotifyNewUndoAction() wird nicht gerufen bei einer + // leeren Klammerung. +#ifndef WIN + void BegUndo() { pMod->BegUndo(); } // Undo-Klammerung auf + void BegUndo(const String& rComment) { pMod->BegUndo(rComment); } // Undo-Klammerung auf + void BegUndo(const String& rComment, const String& rObjDescr, SdrRepeatFunc eFunc=SDRREPFUNC_OBJ_NONE) { pMod->BegUndo(rComment,rObjDescr,eFunc); } // Undo-Klammerung auf + void BegUndo(SdrUndoGroup* pUndoGrp) { pMod->BegUndo(pUndoGrp); } // Undo-Klammerung auf + void EndUndo(); // Undo-Klammerung zu (inkl BroadcastEdges) + void AddUndo(SdrUndoAction* pUndo) { pMod->AddUndo(pUndo); } // Action hinzufuegen + // nur nach dem 1. BegUndo oder vor dem letzten EndUndo: + void SetUndoComment(const String& rComment) { pMod->SetUndoComment(rComment); } + void SetUndoComment(const String& rComment, const String& rObjDescr) { pMod->SetUndoComment(rComment,rObjDescr); } +#else // ifndef WIN + void BegUndo(); + void BegUndo(const String& rComment); + void BegUndo(const String& rComment, const String& rObjDescr, SdrRepeatFunc eFunc=SDRREPFUNC_OBJ_NONE); + void BegUndo(SdrUndoGroup* pUndoGrp); + void EndUndo(); // Undo-Klammerung zu (inkl BroadcastEdges) + void AddUndo(SdrUndoAction* pUndo); + // nur nach dem 1. BegUndo oder vor dem letzten EndUndo: + void SetUndoComment(const String& rComment); + void SetUndoComment(const String& rComment, const String& rObjDescr); +#endif + bool IsUndoEnabled() const; + + std::vector< SdrUndoAction* > CreateConnectorUndo( SdrObject& rO ); + void AddUndoActions( std::vector< SdrUndoAction* >& ); + + // Layerverwaltung. Mit Undo. + SdrLayer* InsertNewLayer(const String& rName, USHORT nPos=0xFFFF); + // Loeschen eines Layer inkl. aller darauf befindlichen Objekte + void DeleteLayer(const String& rName); + // Verschieben eines Layer (Layerreihenfolge aendern) + void MoveLayer(const String& rName, USHORT nNewPos); + + // Markierte Objekte die ausserhalb ihrer Page liegen + // werden ggf. einer anderen Page zugewiesen + // z.Zt. noch ohne Undo!!! + void ForceMarkedObjToAnotherPage(); + void ForceMarkedToAnotherPage() { ForceMarkedObjToAnotherPage(); } + + BOOL IsReadOnly() const { ForcePossibilities(); return bReadOnly; } + + // Loeschen aller markierten Objekte + void DeleteMarkedObj(); + BOOL IsDeleteMarkedObjPossible() const { ForcePossibilities(); return bDeletePossible; } + + // Logisch- umschliessendes Rect aller markierten Objekte setzen. + // Das das wirklich geschieht ist nicht garantiert, denn eine + // waagerechte Linie hat z.B. immer eine Hoehe von 0. + void SetMarkedObjRect(const Rectangle& rRect, BOOL bCopy=FALSE); + void MoveMarkedObj(const Size& rSiz, bool bCopy=false); + void ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false); + long GetMarkedObjRotate() const; + void RotateMarkedObj(const Point& rRef, long nWink, bool bCopy=false); + void MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool bCopy=false); + void MirrorMarkedObjHorizontal(BOOL bCopy=FALSE); + void MirrorMarkedObjVertical(BOOL bCopy=FALSE); + long GetMarkedObjShear() const; + void ShearMarkedObj(const Point& rRef, long nWink, bool bVShear=false, bool bCopy=false); + void CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookMode eMode, bool bVertical=false, bool bNoContortion=false, bool bCopy=false); + void DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion=false, bool bCopy=false); + + // Markierte Objekte kopieren und anstelle der alten markieren + void CopyMarkedObj(); + void SetAllMarkedRect(const Rectangle& rRect, BOOL bCopy=FALSE) { SetMarkedObjRect(rRect,bCopy); } + void MoveAllMarked(const Size& rSiz, BOOL bCopy=FALSE) { MoveMarkedObj (rSiz,bCopy); } + void ResizeAllMarked(const Point& rRef, const Fraction& xFact, const Fraction& yFact, BOOL bCopy=FALSE) { ResizeMarkedObj (rRef,xFact,yFact,bCopy); } + long GetAllMarkedRotate() const { return GetMarkedObjRotate(); } + void RotateAllMarked(const Point& rRef, long nWink, BOOL bCopy=FALSE) { RotateMarkedObj(rRef,nWink,bCopy); } + void MirrorAllMarked(const Point& rRef1, const Point& rRef2, BOOL bCopy=FALSE) { MirrorMarkedObj(rRef1,rRef2,bCopy); } + void MirrorAllMarkedHorizontal(BOOL bCopy=FALSE) { MirrorMarkedObjHorizontal(bCopy); } + void MirrorAllMarkedVertical(BOOL bCopy=FALSE) { MirrorMarkedObjVertical(bCopy); } + long GetAllMarkedShear() const { return GetMarkedObjShear(); } + void ShearAllMarked(const Point& rRef, long nWink, BOOL bVShear=FALSE, BOOL bCopy=FALSE) { ShearMarkedObj(rRef,nWink,bVShear,bCopy); } + void CrookAllMarked(const Point& rRef, const Point& rRad, SdrCrookMode eMode, BOOL bVertical=FALSE, BOOL bNoContortion=FALSE, BOOL bCopy=FALSE) { CrookMarkedObj(rRef,rRad,eMode,bVertical,bNoContortion,bCopy); } + void CopyMarked() { CopyMarkedObj(); } + BOOL IsMoveAllowed() const { ForcePossibilities(); return bMoveAllowed && !bMoveProtect; } + BOOL IsResizeAllowed(BOOL bProp=FALSE) const; + BOOL IsRotateAllowed(BOOL b90Deg=FALSE) const; + BOOL IsMirrorAllowed(BOOL b45Deg=FALSE, BOOL b90Deg=FALSE) const; + BOOL IsTransparenceAllowed() const; + BOOL IsGradientAllowed() const; + BOOL IsShearAllowed() const; + BOOL IsEdgeRadiusAllowed() const; + BOOL IsCrookAllowed(BOOL bNoContortion=FALSE) const; + BOOL IsDistortAllowed(BOOL bNoContortion=FALSE) const; + + // Vereinigen mehrerer Objekte zu einem PolyPolygon: + // - Rechtecke/Kreise/Text... werden implizit gewandelt. + // - Polylines werden automatisch geschlossen. + // - Die Attribute und der Layer werden vom Ersten der markierten Objekte + // uebernommen (also vom untersten der Z-Order). + // - Gruppenobjekte werden miteinbezogen, wenn alle! Memberobjekte der + // Gruppe wandelbar sind. Beinhaltet eine Gruppe also beispielsweise + // eine Bitmap oder ein OLE-Objekt, wird die gesamte Gruppe nicht + // beruecksichtigt. + // bNoPolyPoly=TRUE: Alles wird zu einem einzigen Polygon zusammengefasst + void CombineMarkedObjects(sal_Bool bNoPolyPoly = sal_True); + + // for combining multiple polygons, with direct support of the modes + // SID_POLY_MERGE, SID_POLY_SUBSTRACT, SID_POLY_INTERSECT + void MergeMarkedObjects(SdrMergeMode eMode); + + // for distribution dialog function + void DistributeMarkedObjects(); + + // Markierte Polypolygonobjekte in Polygone zerlegen + // Gruppenobjekte werden durchsucht und zerlegt, wenn es sich bei allen + // Memberobjekten um PathObjs handelt. + // bMakeLines=TRUE: alle Polygone werden in einzelne Linien bzw. + // Beziersegmente zerlegt + void DismantleMarkedObjects(BOOL bMakeLines=FALSE); + BOOL IsCombinePossible(BOOL bNoPolyPoly=FALSE) const; + BOOL IsDismantlePossible(BOOL bMakeLines=FALSE) const; + + // Ein neues bereits fertig konstruiertes Obj einfuegen. Das Obj gehoert + // anschliessend dem Model. Nach dem Einfuegen wird das neue Objekt + // markiert (wenn dies nicht via nOptions unterbunden wird). + // U.U. wird das Obj jedoch nicht eingefuegt, sondern deleted, naemlich + // wenn der Ziel-Layer gesperrt oder nicht sichtbar ist. In diesem Fall + // returniert die Methode mit FALSE. + // Die Methode generiert u.a. auch eine Undo-Action. + BOOL InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions=0); + + // Ein Zeichenobjekt durch ein neues ersetzen. *pNewObj gehoert + // anschliessend mir, *pOldObj wandert ins Undo. + // Sollte in jedem Fall mit einer Undo-Klammerung versehen werden, z.B.: + // aStr+=" ersetzen"; + // BegUndo(aStr); + // ReplaceObject(...); + // ... + // EndUndo(); + void ReplaceObjectAtView(SdrObject* pOldObj, SdrPageView& rPV, SdrObject* pNewObj, BOOL bMark=TRUE); + + void SetNotPersistAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll); + void MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL bOnlyHardAttr) const; + void MergeAttrFromMarked(SfxItemSet& rAttr, BOOL bOnlyHardAttr) const; + SfxItemSet GetAttrFromMarked(BOOL bOnlyHardAttr) const; + void SetAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll); + + // Geometrische Attribute (Position, Groesse, Drehwinkel) + // Bei der Position wird ein evtl. gesetzter PageOrigin beruecksichtigt. + SfxItemSet GetGeoAttrFromMarked() const; + void SetGeoAttrToMarked(const SfxItemSet& rAttr); + + // Returnt NULL wenn: + // - Nix markiert, + // - kein StyleSheet an den markierten Objekten gesetzt + // - Bei Mehrfachselektion die markierten Objekte auf unterschiedliche + // StyleSheets verweisen. + SfxStyleSheet* GetStyleSheetFromMarked() const; + + // z.Zt. noch ohne Undo :( + void SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr); + + /* new interface src537 */ + BOOL GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr) const; + + BOOL SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll); + SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(BOOL& rOk) const; + BOOL SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr); + + // Alle markierten Objekte zu einer Gruppe zusammenfassen. + // Anschliessend wird die neue Gruppe markiert. Bei einer + // seitenuebergreifenden Markierung wird eine Gruppe je Seite erzeugt. + // Alle erzeugten Gruppen sind anschliessend markiert. + // Ueber pUserGrp kann ein eigenes Gruppenobjekt vorgegeben werden. Dieses + // wird jedoch nicht direkt verwendet, sondern via Clone kopiert. + // Wird NULL uebergeben, macht sich die Methode SdrObjGroup-Instanzen. + void GroupMarked(const SdrObject* pUserGrp=NULL); + + // Alle markierten Objektgruppen werden aufgeloesst (1 Level). + // Anschliessend sind statt der Gruppenobjekte alle ehemaligen + // Memberobjekte der aufgeloesten Gruppen markiert. Waren zum auch Objekte + // markiert, die keine Gruppenobjekte sind, so bleiben diese weiterhin + // zusaetzlich markiert. + void UnGroupMarked(); + + BOOL IsGroupPossible() const { ForcePossibilities(); return bGroupPossible; } + BOOL IsUnGroupPossible() const { ForcePossibilities(); return bUnGroupPossible; } + BOOL IsGroupEnterPossible() const { ForcePossibilities(); return bGrpEnterPossible; } + + // Markierte Objekte in Polygone/Bezierkurven verwandeln. Die BOOL- + // Funktionen returnen TRUE, wenn wenigstens eins der markierten + // Objekte gewandelt werden kann. Memberobjekte von Gruppenobjekten + // werden ebenfalls gewandelt. Naehere Beschreibung siehe SdrObj.HXX. + BOOL IsConvertToPathObjPossible(BOOL bLineToArea) const { ForcePossibilities(); return BOOL(bLineToArea ? bCanConvToPathLineToArea : bCanConvToPath); } + BOOL IsConvertToPolyObjPossible(BOOL bLineToArea) const { ForcePossibilities(); return BOOL(bLineToArea ? bCanConvToPolyLineToArea : bCanConvToPoly); } + BOOL IsConvertToContourPossible() const { ForcePossibilities(); return bCanConvToContour; } + void ConvertMarkedToPathObj(BOOL bLineToArea); + void ConvertMarkedToPolyObj(BOOL bLineToArea); + + // Alle markierten Objekte untereinander ausrichten. Normalerweise werden + // das SnapRect der Obj verwendet. Ist bBoundRects=TRUE, werden stattdessen + // die BoundRects ausgerichtet. + void AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, BOOL bBoundRects=FALSE); + BOOL IsAlignPossible() const; + + // Markierte Objekte etwas nach "oben" holen + void MovMarkedToTop(); + + // Markierte Objekte etwas nach "unten" holen + void MovMarkedToBtm(); + + // Markierte Objekte ganz nach "oben" stellen + void PutMarkedToTop(); + + // Markierte Objekte ganz nach "unten" stellen + void PutMarkedToBtm(); + + // Markierte direkt vor das uebergebene Objekt stellen + // NULL -> wie PutMarkedToTop(); + void PutMarkedInFrontOfObj(const SdrObject* pRefObj); + + // Markierte direkt hinter das uebergebene Objekt stellen + // NULL -> wie PutMarkedToBtm(); + void PutMarkedBehindObj(const SdrObject* pRefObj); + + // Z-Order der markierten Objekte vertauschen + void ReverseOrderOfMarked(); + + // Feststellen, ob nach vorn/hinten stellen moeglich ist + // GetMaxToTop/BtmObj() wird von diesen Methoden nur begrenzt + // beruecksichtigt, d.h. es kann vorkommen dass IsToTopPossible() + // TRUE liefert, MovMarkedToTop() jedoch nichts aendert (z.B. bei + // Mehrfachselektion), weil eine von der abgeleiteten View ueber + // GetMaxToTopObj() auferlegte Restriktion dies verhindert. + BOOL IsToTopPossible() const { ForcePossibilities(); return bToTopPossible; } + BOOL IsToBtmPossible() const { ForcePossibilities(); return bToBtmPossible; } + BOOL IsReverseOrderPossible() const { ForcePossibilities(); return bReverseOrderPossible; } + + // Ueber diese Methoden stellt die View fest, wie weit ein Objekt + // nach vorn bzw. nach hinten gestellt werden darf (Z-Order). Das + // zurueckgegebene Objekt wird dann nicht "ueberholt". Bei Rueckgabe + // von NULL (Defaultverhalten) bestehen keine Restriktionen. + virtual SdrObject* GetMaxToTopObj(SdrObject* pObj) const; + virtual SdrObject* GetMaxToBtmObj(SdrObject* pObj) const; + + // Folgende Methode wird gerufen, wenn z.B. durch ToTop, ToBtm, ... die + // Reihenfolgen der Objekte geaendert wurde. Der Aufruf erfolgt dann nach + // jedem SdrObjList::SetObjectOrdNum(nOldPos,nNewPos); + virtual void ObjOrderChanged(SdrObject* pObj, ULONG nOldPos, ULONG nNewPos); + + // Falls ein oder mehrere Objekte des Types SdrGrafObj oder SdrOle2Obj + // markiert sind und diese in der Lage sind ein StarView-Metafile zu + // liefern, konvertiert diese Methode das Metafile in Drawingobjekte. + // Die SdrGrafObjs/SdrOle2Objs werden dann durch die neue Objekte ersetzt. + void DoImportMarkedMtf(SvdProgressInfo *pProgrInfo=NULL); + BOOL IsImportMtfPossible() const { ForcePossibilities(); return bImportMtfPossible; } + + // Wird der Modus VirtualObjectBundling eingeschaltet, werden beim + // ToTop/ToBtm virtuelle Objekte die dasselbe Objekt referenzieren + // in ihrer Z-Order buendig zusammengehalten (Writer). + // Defaulteinstellung ist FALSE=ausgeschaltet. + void SetVirtualObjectBundling(BOOL bOn) { bBundleVirtObj=bOn; } + BOOL IsVirtualObjectBundling() const { return bBundleVirtObj; } + + // von der SdrMarkView ueberladen fuer den internen gebrauch + virtual void MarkListHasChanged(); + virtual void ModelHasChanged(); +}; + +#endif //_SVDEDTV_HXX + diff --git a/svx/inc/svx/svdedxv.hxx b/svx/inc/svx/svdedxv.hxx new file mode 100644 index 000000000000..293e50896044 --- /dev/null +++ b/svx/inc/svx/svdedxv.hxx @@ -0,0 +1,309 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdedxv.hxx,v $ + * $Revision: 1.4.76.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDEDXV_HXX +#define _SVDEDXV_HXX + +#include <rtl/ref.hxx> +#include "svx/svxdllapi.h" +#include <svx/svdglev.hxx> + +#include <svx/selectioncontroller.hxx> + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +#include <boost/shared_ptr.hpp> + +class SdrOutliner; +class OutlinerView; +class EditStatus; +class EditFieldInfo; +class ImpSdrEditPara; +struct PasteOrDropInfos; + +namespace com { namespace sun { namespace star { namespace uno { + class Any; +} } } } + +namespace sdr { + class SelectionController; +} + +//************************************************************ +// Defines +//************************************************************ + +enum SdrEndTextEditKind {SDRENDTEXTEDIT_UNCHANGED, // Textobjekt unveraendert + SDRENDTEXTEDIT_CHANGED, // Textobjekt wurde geaendert + SDRENDTEXTEDIT_DELETED, // Textobjekt implizit geloescht + SDRENDTEXTEDIT_SHOULDBEDELETED}; // Fuer Writer: Textobjekt sollte geloescht werden + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@ @@ @@@@@ @@ @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@ +// +// - Allgemeines Edit fuer objektspeziefische Eigenschaften +// - Textedit fuer alle vom SdrTextObj abgeleiteten Zeichenobjekte +// - Macromodus +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrObjEditView: public SdrGlueEditView +{ + friend class SdrPageView; + friend class ImpSdrEditPara; + +protected: + // TextEdit + SdrObjectWeakRef mxTextEditObj; // Aktuell im TextEdit befindliches Obj + SdrPageView* pTextEditPV; + SdrOutliner* pTextEditOutliner; // Na eben der Outliner fuers TextEdit + OutlinerView* pTextEditOutlinerView; // die aktuelle View des Outliners + Window* pTextEditWin; // passendes Win zu pTextEditOutlinerView + Cursor* pTextEditCursorMerker; // Zum Restaurieren des Cursors am jeweiligen Win + ImpSdrEditPara* pEditPara; // Da hau' ich erstmal alles rein um kompatibel zu bleiben... + SdrObject* pMacroObj; + SdrPageView* pMacroPV; + Window* pMacroWin; + + Rectangle aTextEditArea; + Rectangle aMinTextEditArea; + Link aOldCalcFieldValueLink; // Zum rufen des alten Handlers + Point aMacroDownPos; + + USHORT nMacroTol; + + unsigned bTextEditDontDelete : 1; // Outliner und View bei SdrEndTextEdit nicht deleten (f. Rechtschreibpruefung) + unsigned bTextEditOnlyOneView : 1; // Nur eine OutlinerView (f. Rechtschreibpruefung) + unsigned bTextEditNewObj : 1; // Aktuell editiertes Objekt wurde gerade neu erzeugt + unsigned bQuickTextEditMode : 1; // persistent(->CrtV). Default=TRUE + unsigned bMacroMode : 1; // persistent(->CrtV). Default=TRUE + unsigned bMacroDown : 1; + + rtl::Reference< sdr::SelectionController > mxSelectionController; + rtl::Reference< sdr::SelectionController > mxLastSelectionController; + +private: + SVX_DLLPRIVATE void ImpClearVars(); + +protected: + OutlinerView* ImpFindOutlinerView(Window* pWin) const; + + // Eine neue OutlinerView auf dem Heap anlegen und alle erforderlichen Parameter setzen. + // pTextEditObj, pTextEditPV und pTextEditOutliner muessen initiallisiert sein. + OutlinerView* ImpMakeOutlinerView(Window* pWin, BOOL bNoPaint, OutlinerView* pGivenView) const; + void ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect) const; + void ImpInvalidateOutlinerView(OutlinerView& rOutlView) const; + + // Feststellen, ob der gesamte Text markiert ist. Liefert auch TRUE wenn + // kein Text vorhanden ist. + BOOL ImpIsTextEditAllSelected() const; + void ImpMakeTextCursorAreaVisible(); + + // Handler fuer AutoGrowing Text bei aktivem Outliner + DECL_LINK(ImpOutlinerStatusEventHdl,EditStatus*); + DECL_LINK(ImpOutlinerCalcFieldValueHdl,EditFieldInfo*); + + void ImpMacroUp(const Point& rUpPos); + void ImpMacroDown(const Point& rDownPos); + + DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* ); + DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* ); + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrObjEditView(SdrModel* pModel1, OutputDevice* pOut = 0L); + virtual ~SdrObjEditView(); + +public: + // Actionhandling fuer Macromodus + virtual BOOL IsAction() const; + virtual void MovAction(const Point& rPnt); + virtual void EndAction(); + virtual void BrkAction(); + virtual void BckAction(); + virtual void TakeActionRect(Rectangle& rRect) const; + + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + virtual void ModelHasChanged(); + + //************************************************************************ + // TextEdit ueber einen Outliner + //************************************************************************ + // QuickTextEditMode bedeutet, dass Objekte mit Text sofort beim Anklicken + // editiert werden sollen. Default=TRUE. Persistent. + void SetQuickTextEditMode(BOOL bOn) { bQuickTextEditMode=bOn; } + BOOL IsQuickTextEditMode() const { return bQuickTextEditMode; } + + // Starten des TextEditMode. Ist pWin==NULL, wird das erste an der View + // angemeldete Win verwendet. + // Der Cursor des Fensters an dem Editiert wird wird bei + // SdrBeginTextEdit() gemerkt und bei SdrEndTextEdit() wieder restauriert. + // Die App muss sicherstellen, das die zum Zeitpunkt des BegEdit am + // Windows angemeldete Cursorinstanz beim SdrEndTextEdit noch gueltig ist. + // Ueber den Parameter pEditOutliner kann die Applikation einen eigenen + // Outliner vorgeben, der zum Editieren verwendet wird. Dieser gehoert + // nach Aufruf von SdrBeginTextEdit der SdrObjEditView und wird von dieser + // spaeter via delete zerstoert (falls bDontDeleteOutliner=FALSE). Die + // SdrObjEditView setzt dann das Modusflag (EditEngine/Outliner) an + // dieser Instanz und ausserdem auch den StatusEventHdl. + // Ebenso kann eine spezifische OutlinerView vorgegeben werden. + + virtual sal_Bool SdrBeginTextEdit(SdrObject* pObj, SdrPageView* pPV = 0L, ::Window* pWin = 0L, sal_Bool bIsNewObj = sal_False, + SdrOutliner* pGivenOutliner = 0L, OutlinerView* pGivenOutlinerView = 0L, + sal_Bool bDontDeleteOutliner = sal_False, sal_Bool bOnlyOneView = sal_False, sal_Bool bGrabFocus = sal_True); + // bDontDeleteReally ist ein Spezialparameter fuer den Writer. + // Ist dieses Flag gesetzt, dann wird ein evtl. leeres Textobjekt + // nicht geloescht. Stattdessen gibt es dann einen Returncode + // SDRENDTEXTEDIT_SHOULDBEDELETED (anstelle von SDRENDTEXTEDIT_BEDELETED) + // der besagt, dass das Objekt geloescht werden sollte. + virtual SdrEndTextEditKind SdrEndTextEdit(sal_Bool bDontDeleteReally = sal_False); + virtual bool IsTextEdit() const; + + // TRUE=Es wird ein Textrahmen (OBJ_TEXT,OBJ_OUTLINETEXT,...) editiert + // ansonsten handelt es sich um ein beschriftetes Zeichenobjekt, an dem + // der Text ja bekanntlich hor. und vert. zentriert wird. + BOOL IsTextEditFrame() const; + + // Diese Methode liefert TRUE, wenn der Punkt rHit innerhalb der + // des Objektbereichs oder der OutlinerView liegt. + BOOL IsTextEditHit(const Point& rHit, short nTol) const; + + // Diese Methode liefert TRUE, wenn der Punkt rHit innerhalb des + // Handle-dicken Rahmens liegt, der die OutlinerView bei TextFrames + // umschliesst. + BOOL IsTextEditFrameHit(const Point& rHit) const; + + // Bei aktiver Selektion, also zwischen MouseButtonDown und + // MouseButtonUp liefert diese Methode immer TRUE. + BOOL IsTextEditInSelectionMode() const; + + // Folgende Methode addiert einen passenden Offset zum MouseEvent + // um diesen an den Outliner weiterzureichen. + void AddTextEditOfs(MouseEvent& rMEvt) const; + + // Wer das z.Zt. im TextEdit befindliche Objekt braucht: + SdrObject* GetTextEditObject() const { return mxTextEditObj.get(); } + + // info about TextEditPageView. Default is 0L. + virtual SdrPageView* GetTextEditPageView() const; + + // Das aktuelle Win des Outliners + Window* GetTextEditWin() const { return pTextEditWin; } + void SetTextEditWin(Window* pWin); + + // An den hier abgeholten Outliner kann man schliesslich + // Events versenden, Attribute setzen, Cut/Copy/Paste rufen, + // Undo/Redo rufen, etc. + const SdrOutliner* GetTextEditOutliner() const { return pTextEditOutliner; } + SdrOutliner* GetTextEditOutliner() { return pTextEditOutliner; } + const OutlinerView* GetTextEditOutlinerView() const { return pTextEditOutlinerView; } + OutlinerView* GetTextEditOutlinerView() { return pTextEditOutlinerView; } + + virtual BOOL KeyInput(const KeyEvent& rKEvt, Window* pWin); + virtual BOOL MouseButtonDown(const MouseEvent& rMEvt, Window* pWin); + virtual BOOL MouseButtonUp(const MouseEvent& rMEvt, Window* pWin); + virtual BOOL MouseMove(const MouseEvent& rMEvt, Window* pWin); + virtual BOOL Command(const CommandEvent& rCEvt, Window* pWin); + BOOL Cut(ULONG nFormat=SDR_ANYFORMAT); + BOOL Yank(ULONG nFormat=SDR_ANYFORMAT); + BOOL Paste(Window* pWin=NULL, ULONG nFormat=SDR_ANYFORMAT); + + // #97766# make virtual to change implementation e.g. for SdOutlineView + virtual sal_uInt16 GetScriptType() const; + + /* new interface src537 */ + BOOL GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr=FALSE) const; + + BOOL SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll); + SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(BOOL& rOk) const; + BOOL SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr); + + // Intern: Beim Splitteraufziehen neue OutlinerView... + virtual void AddWindowToPaintView(OutputDevice* pNewWin); + virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin); + + //************************************************************************ + // Object-MacroModus (z.B. Rect als Button oder sowas): + //************************************************************************ + // Persistent. Default TRUE. SvDraw wertet das Flag u.a. bei + // SdrView::GetPreferedPointer() aus. Hat nur Wirkung, wenn das Dokument + // Draw-Objekte mit Macrofunktionalitaet hat (SdrObject::HasMacro()==TRUE). + void SetMacroMode(BOOL bOn) { bMacroMode=bOn; } + BOOL IsMacroMode() const { return bMacroMode; } + BOOL BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, Window* pWin); + BOOL BegMacroObj(const Point& rPnt, SdrObject* pObj, SdrPageView* pPV, Window* pWin) { return BegMacroObj(rPnt,-2,pObj,pPV,pWin); } + void MovMacroObj(const Point& rPnt); + void BrkMacroObj(); + BOOL EndMacroObj(); + BOOL IsMacroObj() const { return pMacroObj!=NULL; } + BOOL IsMacroObjDown() const { return bMacroDown; } + + /** fills the given any with a XTextCursor for the current text selection. + Leaves the any untouched if there currently is no text selected */ + void getTextSelection( ::com::sun::star::uno::Any& rSelection ); + + virtual void MarkListHasChanged(); + + rtl::Reference< sdr::SelectionController > getSelectionController() const { return mxSelectionController; } + + /** returns true if the shape identified by its inventor and identifier supports format paint brush operation */ + virtual bool SupportsFormatPaintbrush( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const; + + /** returns a format paint brush set from the current selection */ + virtual bool TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& rFormatSet ); + + /** applies a format paint brush set from the current selection. + if bNoCharacterFormats is true, no character attributes are changed. + if bNoParagraphFormats is true, no paragraph attributes are changed. + */ + virtual void ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats ); + + /** helper function for selections with multiple SdrText for one SdrTextObj (f.e. tables ) */ + void ApplyFormatPaintBrushToText( SfxItemSet& rFormatSet, SdrTextObj& rTextObj, SdrText* pText, bool bNoCharacterFormats, bool bNoParagraphFormats ); + +protected: + virtual void OnBeginPasteOrDrop( PasteOrDropInfos* pInfos ); + virtual void OnEndPasteOrDrop( PasteOrDropInfos* pInfos ); + +}; + +#endif //_SVDEDXV_HXX + diff --git a/svx/inc/svx/svdetc.hxx b/svx/inc/svx/svdetc.hxx new file mode 100644 index 000000000000..c0327d83457d --- /dev/null +++ b/svx/inc/svx/svdetc.hxx @@ -0,0 +1,359 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdetc.hxx,v $ + * $Revision: 1.4.152.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDETC_HXX +#define _SVDETC_HXX + +#include <tools/string.hxx> +#include <tools/contnr.hxx> + +#ifndef _OUTDEV_HXX //autogen +#include <vcl/outdev.hxx> +#endif +#include <tools/shl.hxx> +#include <svx/outliner.hxx> +#include "svx/svxdllapi.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// ExchangeFormat-Id der DrawingEngine holen. Daten koennen dann per +// static BOOL CopyData(pData,nLen,nFormat); +// bereitgestellt werden, wobei pData/nLen einen SvMemoryStream beschreiben in +// dem ein SdrModel gestreamt wird an dem fuer die Zeitdauer des Streamens das +// Flag SdrModel::SetStreamingSdrModel(TRUE) gesetzt wird. +// ULONG SdrGetExchangeFormat(); -- JP 18.01.99 - dafuer gibt es ein define + +class SdrOutliner; +class SdrModel; +class SvtSysLocale; +class CharClass; +class LocaleDataWrapper; + +namespace com { namespace sun { namespace star { namespace lang { + struct Locale; +}}}} + +// Einen Outliner mit den engineglobalen +// Defaulteinstellungen auf dem Heap erzeugen. +// Ist pMod<>NULL, dann wird der MapMode des uebergebenen +// Models verwendet. Die resultierende Default-Fonthoehe bleibt +// jedoch dieselbe (die logische Fonthoehe wird umgerechnet). +SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner( USHORT nOutlinerMode, SdrModel* pMod ); + +// Globale Defaulteinstellungen fuer die DrawingEngine. +// Diese Einstellungen sollte man direkt beim Applikationsstart +// vornehmen, noch bevor andere Methoden der Engine gerufen werden. +class SVX_DLLPUBLIC SdrEngineDefaults +{ +friend class SdrAttrObj; + String aFontName; + FontFamily eFontFamily; + Color aFontColor; + ULONG nFontHeight; + MapUnit eMapUnit; + Fraction aMapFraction; + +private: + static SdrEngineDefaults& GetDefaults(); + +public: + SdrEngineDefaults(); + // Default Fontname ist "Times New Roman" + static void SetFontName(const String& rFontName) { GetDefaults().aFontName=rFontName; } + static String GetFontName() { return GetDefaults().aFontName; } + // Default FontFamily ist FAMILY_ROMAN + static void SetFontFamily(FontFamily eFam) { GetDefaults().eFontFamily=eFam; } + static FontFamily GetFontFamily() { return GetDefaults().eFontFamily; } + // Default FontColor ist COL_BLACK + static void SetFontColor(const Color& rColor) { GetDefaults().aFontColor=rColor; } + static Color GetFontColor() { return GetDefaults().aFontColor; } + // Default FontHeight ist 847. Die Fonthoehe wird in logischen Einheiten + // (MapUnit/MapFraction (siehe unten)) angegeben. Die Defaulteinstellung + // 847/100mm entspricht also ca. 24 Point. Verwendet man stattdessen + // beispielsweise Twips (SetMapUnit(MAP_TWIP)) (20 Twip = 1 Point) muss + // man als Fonthoehe 480 angeben um 24 Point als default zu erhalten. + static void SetFontHeight(ULONG nHeight) { GetDefaults().nFontHeight=nHeight; } + static ULONG GetFontHeight() { return GetDefaults().nFontHeight; } + // Der MapMode wird fuer den globalen Outliner benoetigt. + // Gleichzeitig bekommt auch jedes neu instanziierte SdrModel + // diesen MapMode default zugewiesen. + // Default MapUnit ist MAP_100TH_MM + static void SetMapUnit(MapUnit eMap) { GetDefaults().eMapUnit=eMap; } + static MapUnit GetMapUnit() { return GetDefaults().eMapUnit; } + // Default MapFraction ist 1/1. + static void SetMapFraction(const Fraction& rMap) { GetDefaults().aMapFraction=rMap; } + static Fraction GetMapFraction() { return GetDefaults().aMapFraction; } + // Der Aufruf der folgenden Methode veranlasst die Engine + // ihre sprachabhaengigen Resourcen neu zu initiallisieren. + // Bereits bestehende Undotexte, etc. bleiben jedoch in der + // sprache erhalten, in der sie erzeugt wurden. + static void LanguageHasChanged(); + + + // Einen Outliner mit den engineglobalen + // Defaulteinstellungen auf dem Heap erzeugen. + // Ist pMod<>NULL, dann wird der MapMode des uebergebenen + // Models verwendet. Die resultierende Default-Fonthoehe bleibt + // jedoch dieselbe (die logische Fonthoehe wird umgerechnet). + friend SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner( USHORT nOutlinerMode, SdrModel* pMod ); +}; + +class SfxItemSet; +// Liefert eine Ersatzdarstellung fuer einen XFillStyle +// Bei XFILL_NONE gibt's FALSE und rCol bleibt unveraendert. +SVX_DLLPUBLIC FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol); + +// Ein Container fuer USHORTs (im Prinzip ein dynamisches Array) +class UShortCont { + Container aArr; +public: + UShortCont(USHORT nBlock, USHORT nInit, USHORT nResize): aArr(nBlock,nInit,nResize) {} + void Clear() { aArr.Clear(); } + void Insert(USHORT nElem, ULONG nPos=CONTAINER_APPEND) { aArr.Insert((void*)ULONG(nElem),nPos); } + void Remove(ULONG nPos) { aArr.Remove(nPos); } + void Replace(USHORT nElem, ULONG nPos) { aArr.Replace((void*)ULONG(nElem),nPos); } + USHORT GetObject(ULONG nPos) const { return USHORT(ULONG(aArr.GetObject(nPos))); } + ULONG GetPos(USHORT nElem) const { return aArr.GetPos((void*)(ULONG)nElem); } + ULONG GetCount() const { return aArr.Count(); } + void Sort(); +}; + +class ContainerSorter { +protected: + Container& rCont; +private: +//#if 0 // _SOLAR__PRIVATE + void ImpSubSort(long nL, long nR) const; +//#endif // __PRIVATE +public: + ContainerSorter(Container& rNewCont): rCont(rNewCont) {} + void DoSort(ULONG a=0, ULONG b=0xFFFFFFFF) const; +#ifdef This_Is_Just_For_A_Comment + Compare() muss returnieren: + -1 falls *pElem1<*pElem2 + 0 falls *pElem1=*pElem2 + +1 falls *pElem1>*pElem2 +#endif + virtual int Compare(const void* pElem1, const void* pElem2) const=0; +private: // damit keiner vergessen wird +virtual + void + Is1stLessThan2nd(const void* pElem1, const void* pElem2) const; +// virtual FASTBOOL Is1stLessThan2nd(const void* pElem1, const void* pElem2) const=NULL; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//#if 0 // _SOLAR__PRIVATE +#define SDRHDC_SAVEPEN 1 /* Save Linecolor */ +#define SDRHDC_SAVEBRUSH 2 /* Save Fillcolorn */ +#define SDRHDC_SAVEFONT 4 /* Save Font */ +#define SDRHDC_SAVEPENANDBRUSH 3 /* Save Line- and FillColor */ +#define SDRHDC_SAVEPENANDBRUSHANDFONT 7 /* Save Font, Line- and fillcolor */ +#define SDRHDC_SAVECLIPPING 8 /* Save Clipping */ +#define SDRHDC_SAVEALL 15 /* Save Clipping, Font, fill- and linecolor */ + +class ImpClipMerk; +class ImpColorMerk; +class ImpSdrHdcMerk +{ + ImpColorMerk* pFarbMerk; + ImpClipMerk* pClipMerk; + Color* pLineColorMerk; + USHORT nMode; +public: + ImpSdrHdcMerk(const OutputDevice& rOut, USHORT nNewMode=SDRHDC_SAVEALL, FASTBOOL bAutoMerk=TRUE); + ~ImpSdrHdcMerk(); + void Save(const OutputDevice& rOut); + FASTBOOL IsSaved() const { return pFarbMerk!=NULL || pClipMerk!=NULL || pLineColorMerk!=NULL; } + void Restore(OutputDevice& rOut, USHORT nMask=SDRHDC_SAVEALL) const; +}; +//#endif // __PRIVATE + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// Ein ItemSet auf Outliner- bzw. EditEngine-Items durchsuchen +// Liefert TRUE, wenn der Set solchen Items enthaelt. +BOOL SearchOutlinerItems(const SfxItemSet& rSet, BOOL bInklDefaults, BOOL* pbOnlyEE=NULL); + +// zurueck erhaelt man einen neuen WhichTable den +// man dann irgendwann mit delete platthauen muss. +USHORT* RemoveWhichRange(const USHORT* pOldWhichTable, USHORT nRangeBeg, USHORT nRangeEnd); + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class Link; + +// Hilfsklasse zur kommunikation zwischen dem Dialog +// zum aufbrechen von Metafiles (sd/source/ui/dlg/brkdlg.cxx), +// SdrEditView::DoImportMarkedMtf() und +// ImpSdrGDIMetaFileImport::DoImport() +class SVX_DLLPUBLIC SvdProgressInfo +{ +private: + ULONG nSumActionCount; // Summe aller Actions + ULONG nSumCurAction; // Summe aller bearbeiteten Actions + + ULONG nActionCount; // Anzahl der Actions im akt. Obj. + ULONG nCurAction; // Anzahl bearbeiteter Act. im akt. Obj. + + ULONG nInsertCount; // Anzahl einzufuegender Act. im akt. Obj. + ULONG nCurInsert; // Anzahl bereits eingefuegter Actions + + ULONG nObjCount; // Anzahl der selektierten Objekte + ULONG nCurObj; // Aktuelles Objekt + + Link *pLink; + +public: + SvdProgressInfo( Link *_pLink ); + + void Init( ULONG _nSumActionCount, ULONG _nObjCount ); + + BOOL SetNextObject(); + + void SetActionCount( ULONG _nActionCount ); + void SetInsertCount( ULONG _nInsertCount ); + + BOOL ReportActions( ULONG nAnzActions ); + BOOL ReportInserts( ULONG nAnzInserts ); + + ULONG GetSumActionCount() const { return nSumActionCount; }; + ULONG GetSumCurAction() const { return nSumCurAction; }; + ULONG GetObjCount() const { return nObjCount; }; + ULONG GetCurObj() const { return nCurObj; }; + + ULONG GetActionCount() const { return nActionCount; }; + ULONG GetCurAction() const { return nCurAction; }; + + ULONG GetInsertCount() const { return nInsertCount; }; + ULONG GetCurInsert() const { return nCurInsert; }; + + void ReportError(); + BOOL ReportRescales( ULONG nAnzRescales ); +}; + + + +class SdrLinkList +{ + Container aList; +protected: + unsigned FindEntry(const Link& rLink) const; +public: + SdrLinkList(): aList(1024,4,4) {} + ~SdrLinkList() { Clear(); } + SVX_DLLPUBLIC void Clear(); + unsigned GetLinkCount() const { return (unsigned)aList.Count(); } + Link& GetLink(unsigned nNum) { return *((Link*)(aList.GetObject(nNum))); } + const Link& GetLink(unsigned nNum) const { return *((Link*)(aList.GetObject(nNum))); } + void InsertLink(const Link& rLink, unsigned nPos=0xFFFF); + void RemoveLink(const Link& rLink); + FASTBOOL HasLink(const Link& rLink) const { return FindEntry(rLink)!=0xFFFF; } +}; + +// Fuer die Factory in SvdObj.CXX +SdrLinkList& ImpGetUserMakeObjHdl(); +SdrLinkList& ImpGetUserMakeObjUserDataHdl(); + +class SdrOle2Obj; +class AutoTimer; + +class OLEObjCache : public Container +{ + ULONG nSize; + AutoTimer* pTimer; + + void UnloadOnDemand(); + BOOL UnloadObj( SdrOle2Obj* pObj ); + DECL_LINK( UnloadCheckHdl, AutoTimer* ); + +public: + OLEObjCache(); + SVX_DLLPUBLIC ~OLEObjCache(); + + void SetSize(ULONG nNewSize); + void InsertObj(SdrOle2Obj* pObj); + void RemoveObj(SdrOle2Obj* pObj); +}; + + +class SVX_DLLPUBLIC SdrGlobalData +{ + const SvtSysLocale* pSysLocale; // follows always locale settings + const CharClass* pCharClass; // follows always SysLocale + const LocaleDataWrapper* pLocaleData; // follows always SysLocale +public: + SdrLinkList aUserMakeObjHdl; + SdrLinkList aUserMakeObjUserDataHdl; + SdrOutliner* pOutliner; + SdrEngineDefaults* pDefaults; + ResMgr* pResMgr; + ULONG nExchangeFormat; + OLEObjCache aOLEObjCache; + + + const SvtSysLocale* GetSysLocale(); // follows always locale settings + const CharClass* GetCharClass(); // follows always SysLocale + const LocaleDataWrapper* GetLocaleData(); // follows always SysLocale +public: + SdrGlobalData(); + ~SdrGlobalData(); + + OLEObjCache& GetOLEObjCache() { return aOLEObjCache; } +}; + +inline SdrGlobalData& GetSdrGlobalData() +{ + void** ppAppData=GetAppData(SHL_SVD); + if (*ppAppData==NULL) { + *ppAppData=new SdrGlobalData; + } + return *((SdrGlobalData*)*ppAppData); +} + +namespace sdr +{ + +SVX_DLLPUBLIC String GetResourceString(sal_uInt16 nResID); + +} + +///////////////////////////////////////////////////////////////////// +// #i101872# isolated GetTextEditBackgroundColor for tooling +class SdrObjEditView; + +SVX_DLLPUBLIC Color GetTextEditBackgroundColor(const SdrObjEditView& rView); + +///////////////////////////////////////////////////////////////////// + +#endif //_SVDETC_HXX diff --git a/svx/inc/svx/svdfield.hxx b/svx/inc/svx/svdfield.hxx new file mode 100644 index 000000000000..7dc65651247c --- /dev/null +++ b/svx/inc/svx/svdfield.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdfield.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDFIELD_HXX +#define _SVDFIELD_HXX + +#include <svx/eeitem.hxx> + +#ifndef _FLDITEM_HXX +#ifndef ITEMID_FIELD +#ifndef _EDITDATA_HXX +#include <svx/editdata.hxx> /* das include wird wg. EE_FEATURE_FIELD benoetigt */ +#endif +#define ITEMID_FIELD EE_FEATURE_FIELD /* wird fuer #include <svx/flditem.hxx> benoetigt */ +#endif +#include <svx/flditem.hxx> +#endif +#include "svx/svxdllapi.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Do not remove this, it is still used in src536a! +void SVX_DLLPUBLIC SdrRegisterFieldClasses(); +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#define SDR_MEASUREFIELD 50 + +class SdrMeasureObj; + +enum SdrMeasureFieldKind {SDRMEASUREFIELD_VALUE,SDRMEASUREFIELD_UNIT,SDRMEASUREFIELD_ROTA90BLANCS}; + +class SVX_DLLPUBLIC SdrMeasureField: public SvxFieldData { + SdrMeasureFieldKind eMeasureFieldKind; +public: + SV_DECL_PERSIST1(SdrMeasureField,SvxFieldData,SDR_MEASUREFIELD) + SdrMeasureField(): eMeasureFieldKind(SDRMEASUREFIELD_VALUE) {} + SdrMeasureField(SdrMeasureFieldKind eNewKind): eMeasureFieldKind(eNewKind) {} + virtual ~SdrMeasureField(); + virtual SvxFieldData* Clone() const; + virtual int operator==(const SvxFieldData&) const; + SdrMeasureFieldKind GetMeasureFieldKind() const { return eMeasureFieldKind; } + void SetMeasureFieldKind(SdrMeasureFieldKind eNewKind) { eMeasureFieldKind=eNewKind; } + void TakeRepresentation(const SdrMeasureObj& rObj, XubString& rStr) const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDFIELD_HXX + diff --git a/svx/inc/svx/svdglev.hxx b/svx/inc/svx/svdglev.hxx new file mode 100644 index 000000000000..69283fb6479a --- /dev/null +++ b/svx/inc/svx/svdglev.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdglev.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDGLEV_HXX +#define _SVDGLEV_HXX + +#include "svx/svxdllapi.h" +#include <svx/svdpoev.hxx> + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SdrGluePoint; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@ @@ @@ @@ @@@@@ @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@ @@@ @@ @@ @@ @@@@ @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@ +// +// Editieren von Klebepunkten an den Objekten (Klebepunkte fuer Verbinder) +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrGlueEditView: public SdrPolyEditView +{ + void ImpClearVars(); + + // Markierte Klebepunkte kopieren und anstelle der alten markieren + void ImpCopyMarkedGluePoints(); + typedef void (*PGlueDoFunc)(SdrGluePoint&, const SdrObject* pObj, const void*, const void*, const void*, const void*, const void*); + typedef void (*PGlueTrFunc)(Point&, const void*, const void*, const void*, const void*, const void*); + void ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, BOOL bConst, const void* p1=NULL, const void* p2=NULL, const void* p3=NULL, const void* p4=NULL, const void* p5=NULL); + void ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const void* p1=NULL, const void* p2=NULL, const void* p3=NULL, const void* p4=NULL, const void* p5=NULL); + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrGlueEditView(SdrModel* pModel1, OutputDevice* pOut = 0L); + virtual ~SdrGlueEditView(); + +public: + // Durch den Parameter nThisEsc uebergibt man die Richtung, die man + // checken bzw. setzen/loeschen will. + // Moegliche Werte fuer nThisEsc sind z.Zt. + // SDRESC_LEFT, SDRESC_RIGHT, SDRESC_TOP und SDRESC_BOTTOM + TRISTATE IsMarkedGluePointsEscDir(USHORT nThisEsc) const; + void SetMarkedGluePointsEscDir(USHORT nThisEsc, BOOL bOn); + BOOL IsSetMarkedGluePointsEscDirPossible() const { return !IsReadOnly() && HasMarkedGluePoints(); } + + // Checken/setzen, ob die Klebepunktpositionen relativ zur + // Objektgroesse sind (Percent=TRUE) oder nicht (Percent=FALSE) + TRISTATE IsMarkedGluePointsPercent() const; + void SetMarkedGluePointsPercent(BOOL bOn); + BOOL IsSetMarkedGluePointsPercentPossible() const { return !IsReadOnly() && HasMarkedGluePoints(); } + + // bVert=FALSE: Horizontales Alignment checken/setzen + // SDRHORZALIGN_CENTER + // SDRHORZALIGN_LEFT + // SDRHORZALIGN_RIGHT + // SDRHORZALIGN_DONTCARE (nur bei Get()) + // bVert=TRUE: Vertikales Alignment checken/setzen + // SDRVERTALIGN_CENTER + // SDRVERTALIGN_TOP + // SDRVERTALIGN_BOTTOM + // SDRVERTALIGN_DONTCARE (nur bei Get()) + USHORT GetMarkedGluePointsAlign(BOOL bVert) const; + void SetMarkedGluePointsAlign(BOOL bVert, USHORT nAlign); + BOOL IsSetMarkedGluePointsAlignPossible() const { return !IsReadOnly() && HasMarkedGluePoints(); } + + // Alle merkierten Klebepunkte entfernen + void DeleteMarkedGluePoints(); + BOOL IsDeleteMarkedGluePointsPossible() const; + + void MoveMarkedGluePoints (const Size& rSiz, bool bCopy=false); + void ResizeMarkedGluePoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false); + void RotateMarkedGluePoints(const Point& rRef, long nWink, bool bCopy=false); + void MirrorMarkedGluePoints(const Point& rRef1, const Point& rRef2, BOOL bCopy=FALSE); + void MirrorMarkedGluePointsHorizontal(BOOL bCopy=FALSE); + void MirrorMarkedGluePointsVertical(BOOL bCopy=FALSE); + void ShearMarkedGluePoints(const Point& rRef, long nWink, BOOL bVShear=FALSE, BOOL bCopy=FALSE); + void CrookMarkedGluePoints(const Point& rRef, const Point& rRad, SdrCrookMode eMode, BOOL bVertical=FALSE, BOOL bNoContortion=FALSE, BOOL bCopy=FALSE); + void DistortMarkedGluePoints(const Rectangle& rRef, const XPolygon& rDistortedRect, BOOL bNoContortion=FALSE, BOOL bCopy=FALSE); + + void AlignMarkedGluePoints(SdrHorAlign eHor, SdrVertAlign eVert); +}; + +#endif //_SVDGLEV_HXX + diff --git a/svx/inc/svx/svdglue.hxx b/svx/inc/svx/svdglue.hxx new file mode 100644 index 000000000000..c7c3af816fac --- /dev/null +++ b/svx/inc/svx/svdglue.hxx @@ -0,0 +1,154 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdglue.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDGLUE_HXX +#define _SVDGLUE_HXX + +class Window; +class OutputDevice; +class SvStream; +class SdrObject; + +#include <tools/contnr.hxx> +#include <tools/gen.hxx> +#include "svx/svxdllapi.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#define SDRESC_SMART 0x0000 +#define SDRESC_LEFT 0x0001 +#define SDRESC_RIGHT 0x0002 +#define SDRESC_TOP 0x0004 +#define SDRESC_BOTTOM 0x0008 +#define SDRESC_LO 0x0010 /* ni */ +#define SDRESC_LU 0x0020 /* ni */ +#define SDRESC_RO 0x0040 /* ni */ +#define SDRESC_RU 0x0080 /* ni */ +#define SDRESC_HORZ (SDRESC_LEFT|SDRESC_RIGHT) +#define SDRESC_VERT (SDRESC_TOP|SDRESC_BOTTOM) +#define SDRESC_ALL 0x00FF + +#define SDRHORZALIGN_CENTER 0x0000 +#define SDRHORZALIGN_LEFT 0x0001 +#define SDRHORZALIGN_RIGHT 0x0002 +#define SDRHORZALIGN_DONTCARE 0x0010 +#define SDRVERTALIGN_CENTER 0x0000 +#define SDRVERTALIGN_TOP 0x0100 +#define SDRVERTALIGN_BOTTOM 0x0200 +#define SDRVERTALIGN_DONTCARE 0x1000 + +class SVX_DLLPUBLIC SdrGluePoint { + // Bezugspunkt ist SdrObject::GetSnapRect().Center() + // bNoPercent=FALSE: Position ist -5000..5000 (1/100)% bzw. 0..10000 (je nach Align) + // bNoPercent=TRUE : Position ist in log Einh, rel zum Bezugspunkt + Point aPos; + USHORT nEscDir; + USHORT nId; + USHORT nAlign; + FASTBOOL bNoPercent:1; + FASTBOOL bReallyAbsolute:1; // Temporaer zu setzen fuer Transformationen am Bezugsobjekt + FASTBOOL bUserDefined:1; // #i38892# +public: + SdrGluePoint(): nEscDir(SDRESC_SMART),nId(0),nAlign(0) { bNoPercent=FALSE; bReallyAbsolute=FALSE; bUserDefined=TRUE; } + SdrGluePoint(const Point& rNewPos, FASTBOOL bNewPercent=TRUE, USHORT nNewAlign=0): aPos(rNewPos),nEscDir(SDRESC_SMART),nId(0),nAlign(nNewAlign) { bNoPercent=!bNewPercent; bReallyAbsolute=FALSE; bUserDefined=TRUE; } + bool operator==(const SdrGluePoint& rCmpGP) const { return aPos==rCmpGP.aPos && nEscDir==rCmpGP.nEscDir && nId==rCmpGP.nId && nAlign==rCmpGP.nAlign && bNoPercent==rCmpGP.bNoPercent && bReallyAbsolute==rCmpGP.bReallyAbsolute && bUserDefined==rCmpGP.bUserDefined; } + bool operator!=(const SdrGluePoint& rCmpGP) const { return !operator==(rCmpGP); } + const Point& GetPos() const { return aPos; } + void SetPos(const Point& rNewPos) { aPos=rNewPos; } + USHORT GetEscDir() const { return nEscDir; } + void SetEscDir(USHORT nNewEsc) { nEscDir=nNewEsc; } + USHORT GetId() const { return nId; } + void SetId(USHORT nNewId) { nId=nNewId; } + bool IsPercent() const { return !bNoPercent; } + void SetPercent(FASTBOOL bOn) { bNoPercent=!bOn; } + // Temporaer zu setzen fuer Transformationen am Bezugsobjekt + FASTBOOL IsReallyAbsolute() const { return bReallyAbsolute; } + void SetReallyAbsolute(FASTBOOL bOn, const SdrObject& rObj); + + // #i38892# + FASTBOOL IsUserDefined() const { return bUserDefined; } + void SetUserDefined(FASTBOOL bNew) { bUserDefined = bNew; } + + USHORT GetAlign() const { return nAlign; } + void SetAlign(USHORT nAlg) { nAlign=nAlg; } + USHORT GetHorzAlign() const { return nAlign&0x00FF; } + void SetHorzAlign(USHORT nAlg) { nAlign=(nAlign&0xFF00)|(nAlg&0x00FF); } + USHORT GetVertAlign() const { return nAlign&0xFF00; } + void SetVertAlign(USHORT nAlg) { nAlign=(nAlign&0x00FF)|(nAlg&0xFF00); } + void Draw(OutputDevice& rOut, const SdrObject* pObj) const; + FASTBOOL IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const; + void Invalidate(Window& rWin, const SdrObject* pObj) const; + Point GetAbsolutePos(const SdrObject& rObj) const; + void SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj); + long GetAlignAngle() const; + void SetAlignAngle(long nWink); + long EscDirToAngle(USHORT nEsc) const; + USHORT EscAngleToDir(long nWink) const; + void Rotate(const Point& rRef, long nWink, double sn, double cs, const SdrObject* pObj); + void Mirror(const Point& rRef1, const Point& rRef2, const SdrObject* pObj); + void Mirror(const Point& rRef1, const Point& rRef2, long nWink, const SdrObject* pObj); + void Shear (const Point& rRef, long nWink, double tn, FASTBOOL bVShear, const SdrObject* pObj); +}; + +#define SDRGLUEPOINT_NOTFOUND 0xFFFF + +class SVX_DLLPUBLIC SdrGluePointList { + Container aList; +protected: + SdrGluePoint* GetObject(USHORT i) const { return (SdrGluePoint*)(aList.GetObject(i)); } +public: + SdrGluePointList(): aList(1024,4,4) {} + SdrGluePointList(const SdrGluePointList& rSrcList): aList(1024,4,4) { *this=rSrcList; } + ~SdrGluePointList() { Clear(); } + void Clear(); + void operator=(const SdrGluePointList& rSrcList); + USHORT GetCount() const { return USHORT(aList.Count()); } + // Beim Insert wird dem Objekt (also dem GluePoint) automatisch eine Id zugewiesen. + // ReturnCode ist der Index des neuen GluePoints in der Liste + USHORT Insert(const SdrGluePoint& rGP); + void Delete(USHORT nPos) { delete (SdrGluePoint*)aList.Remove(nPos); } + SdrGluePoint& operator[](USHORT nPos) { return *GetObject(nPos); } + const SdrGluePoint& operator[](USHORT nPos) const { return *GetObject(nPos); } + USHORT FindGluePoint(USHORT nId) const; + USHORT HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj, FASTBOOL bBack=FALSE, FASTBOOL bNext=FALSE, USHORT nId0=0) const; + void Invalidate(Window& rWin, const SdrObject* pObj) const; + // Temporaer zu setzen fuer Transformationen am Bezugsobjekt + void SetReallyAbsolute(FASTBOOL bOn, const SdrObject& rObj); + void Rotate(const Point& rRef, long nWink, double sn, double cs, const SdrObject* pObj); + void Mirror(const Point& rRef1, const Point& rRef2, const SdrObject* pObj); + void Mirror(const Point& rRef1, const Point& rRef2, long nWink, const SdrObject* pObj); + void Shear (const Point& rRef, long nWink, double tn, FASTBOOL bVShear, const SdrObject* pObj); +}; + + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDGLUE_HXX + diff --git a/svx/inc/svx/svdhdl.hxx b/svx/inc/svx/svdhdl.hxx new file mode 100644 index 000000000000..8d7d4552ea6c --- /dev/null +++ b/svx/inc/svx/svdhdl.hxx @@ -0,0 +1,523 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdhdl.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDHDL_HXX +#define _SVDHDL_HXX + +#include <tools/gen.hxx> + +#ifndef _POINTR_HXX //autogen +#include <vcl/pointr.hxx> +#endif +#include <tools/contnr.hxx> + +#ifndef _SOLAR_HRC +#include <svl/solar.hrc> +#endif + +#include <svx/xpoly.hxx> +#include <svx/svdoedge.hxx> +#include <svx/sdr/overlay/overlayobjectlist.hxx> +#include "svx/svxdllapi.h" + +#include <svx/xpoly.hxx> +#include <svx/svdoedge.hxx> + +class VirtualDevice; +class OutputDevice; +class Region; +class Window; +class SdrHdlList; +class SdrMarkView; +class SdrObject; +class SdrPageView; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// Jedes Objekt muss in der Lage seine Handles zu erzeugen. Diese werden dann +// bei einer Selektion abgeholt, bei der View angemeldet und sichtbar gemacht. +// Wird ein Handle von der Maus beruehrt (IsHit()), so wird von der View der +// entsprechende Mauszeiger vom Handle abgeholt und der App auf Anfrage zum +// reinschalten uebergeben. +// Handles wie z.B. der Rotationsmittelpunkt oder die Spiegelachse werden von +// der View generiert, wenn vom Controller der entsprechende Transformations- +// Modus selektiert wird. +// HDL_MOVE...HDL_LWRGT muessen im enum immer zusammen stehen bleiben! + +enum SdrHdlKind +{ + HDL_MOVE, // Handle zum Verschieben des Objekts + HDL_UPLFT, // Oben links + HDL_UPPER, // Oben + HDL_UPRGT, // Oben rechts + HDL_LEFT, // Links + HDL_RIGHT, // Rechts + HDL_LWLFT, // Unten links + HDL_LOWER, // Unten + HDL_LWRGT, // Unten rechts + HDL_POLY, // Punktselektion an Polygon oder Bezierkurve + HDL_BWGT, // Gewicht an einer Bezierkurve + HDL_CIRC, // Winkel an Kreissegmenten, Eckenradius am Rect + HDL_REF1, // Referenzpunkt 1, z.B. Rotationsmitte + HDL_REF2, // Referenzpunkt 2, z.B. Endpunkt der Spiegelachse + HDL_MIRX, // Die Spiegelachse selbst + HDL_GLUE, // GluePoint + HDL_ANCHOR, // anchor symbol (SD, SW) + HDL_TRNS, // interactive transparence + HDL_GRAD, // interactive gradient + HDL_COLR, // interactive color + HDL_USER, + HDL_ANCHOR_TR, // #101688# Anchor handle with (0,0) at top right for SW + + // for SJ and the CustomShapeHandles: + HDL_CUSTOMSHAPE1, + + HDL_SMARTTAG +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +enum BitmapColorIndex +{ + LightGreen, + Cyan, + LightCyan, + Red, + LightRed, + Yellow +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +enum BitmapMarkerKind +{ + Rect_7x7, + Rect_9x9, + Rect_11x11, + Rect_13x13, + Circ_7x7, + Circ_9x9, + Circ_11x11, + Elli_7x9, + Elli_9x11, + Elli_9x7, + Elli_11x9, + RectPlus_7x7, + RectPlus_9x9, + RectPlus_11x11, + Crosshair, + Glue, + Anchor, + + // #98388# add AnchorPressed to be able to aninate anchor control, too. + AnchorPressed, + + // #101688# AnchorTR for SW + AnchorTR, + AnchorPressedTR, + + // for SJ and the CustomShapeHandles: + Customshape1 +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrHdl +{ + friend class SdrMarkView; // fuer den Zugriff auf nObjHdlNum + friend class SdrHdlList; + + // #101928# + BitmapEx ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, sal_Bool bFine, sal_Bool bIsHighContrast); + +protected: + SdrObject* pObj; // Gehoert das Handle zu einem Objekt? + SdrPageView* pPV; // Gehoert das Handle zu einem Objekt in einer bestimmten PageView? + SdrHdlList* pHdlList; // Zum Feststelen der Handlegroesse + + // OVERLAYMANAGER + ::sdr::overlay::OverlayObjectList maOverlayGroup; + + Point aPos; + + SdrHdlKind eKind; + + long nDrehWink; // Handles bzw. Mauszeiger drehen + sal_uInt32 nObjHdlNum; // wird von der MarkView benoetigt + sal_uInt32 nPolyNum; // Polygonpunktes + sal_uInt32 nPPntNum; // Punktnummer des Polygons + sal_uInt32 nSourceHdlNum; // ist noch vollstaendig zu implementieren + + unsigned bSelect : 1; // Ein selektierter Polygonpunkt? + unsigned b1PixMore : 1; // True=Handle wird 1 Pixel groesser dargestellt + unsigned bPlusHdl : 1; // u.a. fuer Hld-Paint Optimierung bei MarkPoint/UnmarkPoint, ... + + bool mbMoveOutside; // forces this handle to be moved outside of the selection rectangle + + // create marker for this kind + virtual void CreateB2dIAObject(); + + // cleanup marker if one exists + void GetRidOfIAObject(); + +protected: + ::sdr::overlay::OverlayObject* CreateOverlayObject( + const basegfx::B2DPoint& rPos, + BitmapColorIndex eColIndex, BitmapMarkerKind eKindOfMarker, Point aMoveOutsideOffset = Point()); + BitmapMarkerKind GetNextBigger(BitmapMarkerKind eKnd) const; + +public: + SdrHdl(); + SdrHdl(const Point& rPnt, SdrHdlKind eNewKind=HDL_MOVE); + virtual ~SdrHdl(); + + const ::sdr::overlay::OverlayObjectList& getOverlayObjectList() const { return maOverlayGroup; } + + void SetHdlList(SdrHdlList* pList); + SdrHdlKind GetKind() const { return eKind; } + void Touch(); + + const Point& GetPos() const { return aPos; } + void SetPos(const Point& rPnt); + + SdrPageView* GetPageView() const { return pPV; } + void SetPageView(SdrPageView* pNewPV) { pPV=pNewPV; } + + SdrObject* GetObj() const { return pObj; } + void SetObj(SdrObject* pNewObj); + + BOOL IsSelected() const { return bSelect; } + void SetSelected(BOOL bJa=TRUE); + + void Set1PixMore(BOOL bJa=TRUE); + void SetDrehWink(long n); + + BOOL IsCornerHdl() const { return eKind==HDL_UPLFT || eKind==HDL_UPRGT || eKind==HDL_LWLFT || eKind==HDL_LWRGT; } + BOOL IsVertexHdl() const { return eKind==HDL_UPPER || eKind==HDL_LOWER || eKind==HDL_LEFT || eKind==HDL_RIGHT; } + + void SetObjHdlNum(sal_uInt32 nNum) { nObjHdlNum=nNum; } + sal_uInt32 GetObjHdlNum() const { return nObjHdlNum; } + + void SetPolyNum(sal_uInt32 nNum) { nPolyNum=nNum; } + sal_uInt32 GetPolyNum() const { return nPolyNum; } + + void SetPointNum(sal_uInt32 nNum) { nPPntNum=nNum; } + sal_uInt32 GetPointNum() const { return nPPntNum; } + + void SetPlusHdl(BOOL bOn) { bPlusHdl=bOn; } + BOOL IsPlusHdl() const { return bPlusHdl; } + + void SetSourceHdlNum(sal_uInt32 nNum) { nSourceHdlNum=nNum; } + sal_uInt32 GetSourceHdlNum() const { return nSourceHdlNum; } + + virtual Pointer GetPointer() const; + bool IsHdlHit(const Point& rPnt) const; + + // #97016# II + virtual BOOL IsFocusHdl() const; + + void SetMoveOutside( bool bMoveOutside ); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#define SDR_HANDLE_COLOR_SIZE_NORMAL Size(13, 13) +#define SDR_HANDLE_COLOR_SIZE_SELECTED Size(17, 17) + +class SVX_DLLPUBLIC SdrHdlColor : public SdrHdl +{ +private: + // size of colr markers + Size aMarkerSize; + + // color + Color aMarkerColor; + + // callback link when value changed + Link aColorChangeHdl; + + // use luminance values only + unsigned bUseLuminance : 1; + + // create marker for this kind + SVX_DLLPRIVATE virtual void CreateB2dIAObject(); + + // help functions + SVX_DLLPRIVATE Bitmap CreateColorDropper(Color aCol); + SVX_DLLPRIVATE Color GetLuminance(const Color& rCol); + SVX_DLLPRIVATE void CallColorChangeLink(); + +public: + SdrHdlColor(const Point& rRef, Color aCol = Color(COL_BLACK), const Size& rSize = Size(11, 11), BOOL bLum = FALSE); + virtual ~SdrHdlColor(); + + BOOL IsUseLuminance() const { return bUseLuminance; } + + Color GetColor() const { return aMarkerColor; } + void SetColor(Color aNew, BOOL bCallLink = FALSE); + + const Size& GetSize() const { return aMarkerSize; } + void SetSize(const Size& rNew); + + void SetColorChangeHdl(const Link& rLink) { aColorChangeHdl = rLink; } + const Link& GetColorChangeHdl() const { return aColorChangeHdl; } +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SdrHdlGradient : public SdrHdl +{ +private: + // pointer to used color handles + SdrHdlColor* pColHdl1; + SdrHdlColor* pColHdl2; + + // 2nd position + Point a2ndPos; + + // is this a gradient or a transparence + unsigned bGradient : 1; + + // select which handle to move + unsigned bMoveSingleHandle : 1; + unsigned bMoveFirstHandle : 1; + + // create marker for this kind + virtual void CreateB2dIAObject(); + +public: + SdrHdlGradient(const Point& rRef1, const Point& rRef2, BOOL bGrad = TRUE); + virtual ~SdrHdlGradient(); + + BOOL IsGradient() const { return bGradient; } + + // set the associated color handles + void SetColorHandles(SdrHdlColor* pL1, SdrHdlColor* pL2) { pColHdl1 = pL1; pColHdl2 = pL2; } + SdrHdlColor* GetColorHdl1() const { return pColHdl1; } + SdrHdlColor* GetColorHdl2() const { return pColHdl2; } + + const Point& Get2ndPos() const { return a2ndPos; } + void Set2ndPos(const Point& rPnt); + + // the link called by the color handles + DECL_LINK(ColorChangeHdl, SdrHdl*); + + // transformation call, create gradient from this handle + void FromIAOToItem(SdrObject* pObj, BOOL bSetItemOnObject, BOOL bUndo); + + // selection flags for interaction + BOOL IsMoveSingleHandle() const { return bMoveSingleHandle; } + void SetMoveSingleHandle(BOOL bNew) { bMoveSingleHandle = bNew; } + BOOL IsMoveFirstHandle() const { return bMoveFirstHandle; } + void SetMoveFirstHandle(BOOL bNew) { bMoveFirstHandle = bNew; } +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// Spiegelachse +class SdrHdlLine: public SdrHdl +{ + // create marker for this kind + virtual void CreateB2dIAObject(); + +protected: + SdrHdl* pHdl1; + SdrHdl* pHdl2; + +public: + SdrHdlLine(SdrHdl& rHdl1, SdrHdl& rHdl2, SdrHdlKind eNewKind=HDL_MIRX) { eKind=eNewKind; pHdl1=&rHdl1; pHdl2=&rHdl2; } + virtual ~SdrHdlLine(); + + virtual Pointer GetPointer() const; +}; + +// Ein SdrHdlBezWgt hat Kenntnis von seinem "BasisHandle". Seine Draw-Methode +// zeichnet zusaetzlich eine Linie von seiner Position zur Position dieses +// BasisHandles. +class SdrHdlBezWgt: public SdrHdl +{ + // create marker for this kind + virtual void CreateB2dIAObject(); + +protected: + const SdrHdl* pHdl1; + +public: + // das ist kein Copy-Ctor!!! + SdrHdlBezWgt(const SdrHdl* pRefHdl1, SdrHdlKind eNewKind=HDL_BWGT) { eKind=eNewKind; pHdl1=pRefHdl1; } + virtual ~SdrHdlBezWgt(); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class E3dVolumeMarker : public SdrHdl +{ + basegfx::B2DPolyPolygon aWireframePoly; + + // create marker for this kind + virtual void CreateB2dIAObject(); + +public: + E3dVolumeMarker(const basegfx::B2DPolyPolygon& rWireframePoly); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class ImpEdgeHdl: public SdrHdl +{ + SdrEdgeLineCode eLineCode; + + // create marker for this kind + virtual void CreateB2dIAObject(); + +public: + ImpEdgeHdl(const Point& rPnt, SdrHdlKind eNewKind): SdrHdl(rPnt,eNewKind),eLineCode(MIDDLELINE) {} + virtual ~ImpEdgeHdl(); + + void SetLineCode(SdrEdgeLineCode eCode); + SdrEdgeLineCode GetLineCode() const { return eLineCode; } + BOOL IsHorzDrag() const; + virtual Pointer GetPointer() const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class ImpMeasureHdl: public SdrHdl +{ + // create marker for this kind + virtual void CreateB2dIAObject(); + +public: + ImpMeasureHdl(const Point& rPnt, SdrHdlKind eNewKind): SdrHdl(rPnt,eNewKind) {} + virtual ~ImpMeasureHdl(); + + virtual Pointer GetPointer() const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class ImpTextframeHdl: public SdrHdl +{ + const Rectangle maRect; + + // create marker for this kind + virtual void CreateB2dIAObject(); + +public: + explicit ImpTextframeHdl(const Rectangle& rRect); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// #97016# II +class ImplHdlListData; + +class SVX_DLLPUBLIC SdrHdlList +{ +protected: + ULONG mnFocusIndex; + SdrMarkView* pView; + Container aList; + USHORT nHdlSize; + + unsigned bRotateShear : 1; + unsigned bDistortShear : 1; + unsigned bMoveOutside : 1; // Handles nach aussen ruecken (fuer TextEdit) + unsigned bFineHandles : 1; + +private: + SVX_DLLPRIVATE SdrHdlList(const SdrHdlList&): aList(1024,64,64) {} + SVX_DLLPRIVATE void operator=(const SdrHdlList&) {} + SVX_DLLPRIVATE BOOL operator==(const SdrHdlList&) const { return FALSE; } + SVX_DLLPRIVATE BOOL operator!=(const SdrHdlList&) const { return FALSE; } + +public: + SdrHdlList(SdrMarkView* pV); + ~SdrHdlList(); + void Clear(); + + // #97016# II + void TravelFocusHdl(sal_Bool bForward); + SdrHdl* GetFocusHdl() const; + void SetFocusHdl(SdrHdl* pNew); + void ResetFocusHdl(); + + // Access to View + SdrMarkView* GetView() const; + + // Sortierung: 1.Level Erst Refpunkt-Handles, dann normale Handles, dann Glue, dann User, dann Plushandles + // 2.Level PageView (Pointer) + // 3.Level Position (x+y) + void Sort(); + ULONG GetHdlCount() const { return aList.Count(); } + SdrHdl* GetHdl(ULONG nNum) const { return (SdrHdl*)(aList.GetObject(nNum)); } + ULONG GetHdlNum(const SdrHdl* pHdl) const; + void SetHdlSize(USHORT nSiz); + USHORT GetHdlSize() const { return nHdlSize; } + void SetMoveOutside(BOOL bOn); + BOOL IsMoveOutside() const { return bMoveOutside; } + void SetRotateShear(BOOL bOn); + BOOL IsRotateShear() const { return bRotateShear; } + void SetDistortShear(BOOL bOn); + BOOL IsDistortShear() const { return bDistortShear; } + void SetFineHdl(BOOL bOn); + BOOL IsFineHdl() const { return bFineHandles; } + + // AddHdl uebernimmt das Handle in sein Eigentum. Es muss + // also auf dem Heap stehen, da Clear() ein delete macht. + void AddHdl(SdrHdl* pHdl, BOOL bAtBegin=FALSE); + SdrHdl* RemoveHdl(ULONG nNum); + + // Zuletzt eingefuegte Handles werden am ehesten getroffen + // (wenn Handles uebereinander liegen). + SdrHdl* IsHdlListHit(const Point& rPnt, BOOL bBack=FALSE, BOOL bNext=FALSE, SdrHdl* pHdl0=NULL) const; + SdrHdl* GetHdl(SdrHdlKind eKind1) const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrCropHdl : public SdrHdl +{ +public: + SdrCropHdl(const Point& rPnt, SdrHdlKind eNewKind); + +protected: + // create marker for this kind + virtual void CreateB2dIAObject(); + + BitmapEx GetBitmapForHandle( const BitmapEx& rBitmap, int nSize ); + + static BitmapEx GetHandlesBitmap( bool bIsFineHdl, bool bIsHighContrast ); +}; + +#endif //_SVDHDL_HXX + diff --git a/svx/inc/svx/svdhlpln.hxx b/svx/inc/svx/svdhlpln.hxx new file mode 100644 index 000000000000..925fb0f6b8af --- /dev/null +++ b/svx/inc/svx/svdhlpln.hxx @@ -0,0 +1,110 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdhlpln.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDHLPLN_HXX +#define _SVDHLPLN_HXX + +#include <sal/types.h> +#include <tools/color.hxx> +#include <tools/gen.hxx> + +#ifndef _POINTR_HXX //autogen +#include <vcl/pointr.hxx> +#endif +#include <tools/contnr.hxx> +#include "svx/svxdllapi.h" + +class OutputDevice; +//////////////////////////////////////////////////////////////////////////////////////////////////// + +enum SdrHelpLineKind {SDRHELPLINE_POINT,SDRHELPLINE_VERTICAL,SDRHELPLINE_HORIZONTAL}; +#define SDRHELPLINE_MIN SDRHELPLINE_POINT +#define SDRHELPLINE_MAX SDRHELPLINE_HORIZONTAL + +#define SDRHELPLINE_POINT_PIXELSIZE 15 /* Tatsaechliche Groesse= PIXELSIZE*2+1 */ + +class SdrHelpLine { + Point aPos; // je nach Wert von eKind ist X oder Y evtl. belanglos + SdrHelpLineKind eKind; + + // #i27493# + // Helper method to draw a hor or ver two-colored dashed line + void ImpDrawDashedTwoColorLine(OutputDevice& rOut, sal_Int32 nStart, sal_Int32 nEnd, sal_Int32 nFixPos, + sal_Int32 nStepWidth, Color aColA, Color aColB, sal_Bool bHorizontal) const; + +public: + SdrHelpLine(SdrHelpLineKind eNewKind=SDRHELPLINE_POINT): eKind(eNewKind) {} + SdrHelpLine(SdrHelpLineKind eNewKind, const Point& rNewPos): aPos(rNewPos), eKind(eNewKind) {} + bool operator==(const SdrHelpLine& rCmp) const { return aPos==rCmp.aPos && eKind==rCmp.eKind; } + bool operator!=(const SdrHelpLine& rCmp) const { return !operator==(rCmp); } + + void SetKind(SdrHelpLineKind eNewKind) { eKind=eNewKind; } + SdrHelpLineKind GetKind() const { return eKind; } + void SetPos(const Point& rPnt) { aPos=rPnt; } + const Point& GetPos() const { return aPos; } + + Pointer GetPointer() const; + FASTBOOL IsHit(const Point& rPnt, USHORT nTolLog, const OutputDevice& rOut) const; + // OutputDevice wird benoetigt, da Fangpunkte eine feste Pixelgroesse haben + Rectangle GetBoundRect(const OutputDevice& rOut) const; + + /* returns true if this and the given help line would be rendered at the same pixel position + of the given OutputDevice. This can be used to avoid drawing multiple help lines with xor + on same position which could render them invisible */ + bool IsVisibleEqual( const SdrHelpLine& rHelpLine, const OutputDevice& rOut ) const; +}; + +#define SDRHELPLINE_NOTFOUND 0xFFFF + +class SVX_DLLPUBLIC SdrHelpLineList { + Container aList; +protected: + SdrHelpLine* GetObject(USHORT i) const { return (SdrHelpLine*)(aList.GetObject(i)); } +public: + SdrHelpLineList(): aList(1024,4,4) {} + SdrHelpLineList(const SdrHelpLineList& rSrcList): aList(1024,4,4) { *this=rSrcList; } + ~SdrHelpLineList() { Clear(); } + void Clear(); + void operator=(const SdrHelpLineList& rSrcList); + bool operator==(const SdrHelpLineList& rCmp) const; + bool operator!=(const SdrHelpLineList& rCmp) const { return !operator==(rCmp); } + USHORT GetCount() const { return USHORT(aList.Count()); } + void Insert(const SdrHelpLine& rHL, USHORT nPos=0xFFFF) { aList.Insert(new SdrHelpLine(rHL),nPos); } + void Delete(USHORT nPos) { delete (SdrHelpLine*)aList.Remove(nPos); } // #i24900# + void Move(USHORT nPos, USHORT nNewPos) { aList.Insert(aList.Remove(nPos),nNewPos); } + SdrHelpLine& operator[](USHORT nPos) { return *GetObject(nPos); } + const SdrHelpLine& operator[](USHORT nPos) const { return *GetObject(nPos); } + USHORT HitTest(const Point& rPnt, USHORT nTolLog, const OutputDevice& rOut) const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDHLPLN_HXX + diff --git a/svx/inc/svx/svdlayer.hxx b/svx/inc/svx/svdlayer.hxx new file mode 100644 index 000000000000..82899e232c8e --- /dev/null +++ b/svx/inc/svx/svdlayer.hxx @@ -0,0 +1,163 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdlayer.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDLAYER_HXX +#define _SVDLAYER_HXX + +#include <tools/string.hxx> +#include <tools/stream.hxx> +#include <svx/svdsob.hxx> +#include <svx/svdtypes.hxx> // fuer typedef SdrLayerID +#include "svx/svxdllapi.h" + +class SdrModel; + +class SVX_DLLPUBLIC SdrLayer +{ +friend class SdrLayerAdmin; +protected: + String aName; + String maTitle; + String maDescription; + SdrModel* pModel; // zum Broadcasten + UINT16 nType; // 0=Userdefined,1=Standardlayer + SdrLayerID nID; +protected: + SdrLayer(SdrLayerID nNewID, const String& rNewName) { nID=nNewID; aName=rNewName; nType=0; pModel=NULL; } + void SetID(SdrLayerID nNewID) { nID=nNewID; } +public: + SdrLayer(): pModel(NULL),nType(0),nID(0) {} + bool operator==(const SdrLayer& rCmpLayer) const; + bool operator!=(const SdrLayer& rCmpLayer) const { return !operator==(rCmpLayer); } + + void SetName(const String& rNewName); + const String& GetName() const { return aName; } + + void SetTitle(const String& rTitle) { maTitle = rTitle; } + const String& GetTitle() const { return maTitle; } + + void SetDescription(const String& rDesc) { maDescription = rDesc; } + const String& GetDescription() const { return maDescription; } + + SdrLayerID GetID() const { return nID; } + void SetModel(SdrModel* pNewModel) { pModel=pNewModel; } + SdrModel* GetModel() const { return pModel; } + // Einem SdrLayer kann man sagen dass er ein (der) Standardlayer sein soll. + // Es wird dann laenderspeziefisch der passende Name gesetzt. SetName() + // setzt das Flag "StandardLayer" ggf. zurueck auf "Userdefined". + void SetStandardLayer(FASTBOOL bStd=TRUE); + FASTBOOL IsStandardLayer() const { return nType==1; } +}; + +// Beim Aendern von Layerdaten muss man derzeit +// noch selbst das Modify-Flag am Model setzen. +#define SDRLAYER_MAXCOUNT 255 +class SVX_DLLPUBLIC SdrLayerAdmin { +friend class SdrView; +friend class SdrModel; +friend class SdrPage; + +protected: + Container aLayer; + Container aLSets; + SdrLayerAdmin* pParent; // Der Admin der Seite kennt den Admin des Docs + SdrModel* pModel; // zum Broadcasten + String aControlLayerName; +protected: + // Eine noch nicht verwendete LayerID raussuchen. Sind bereits alle + // verbraucht, so gibt's 'ne 0. Wer sicher gehen will, muss vorher + // GetLayerCount()<SDRLAYER_MAXCOUNT abfragen, denn sonst sind alle + // vergeben. + SdrLayerID GetUniqueLayerID() const; + void Broadcast() const; +public: + SdrLayerAdmin(SdrLayerAdmin* pNewParent=NULL); + SdrLayerAdmin(const SdrLayerAdmin& rSrcLayerAdmin); + ~SdrLayerAdmin(); + const SdrLayerAdmin& operator=(const SdrLayerAdmin& rSrcLayerAdmin); + bool operator==(const SdrLayerAdmin& rCmpLayerAdmin) const; + bool operator!=(const SdrLayerAdmin& rCmpLayerAdmin) const { return !operator==(rCmpLayerAdmin); } + SdrLayerAdmin* GetParent() const { return pParent; } + void SetParent(SdrLayerAdmin* pNewParent) { pParent=pNewParent; } + void SetModel(SdrModel* pNewModel); + SdrModel* GetModel() const { return pModel; } + void InsertLayer(SdrLayer* pLayer, USHORT nPos=0xFFFF) { aLayer.Insert(pLayer,nPos); pLayer->SetModel(pModel); Broadcast(); } + SdrLayer* RemoveLayer(USHORT nPos); + // Alle Layer loeschen + void ClearLayer(); + // Neuer Layer wird angelegt und eingefuegt + SdrLayer* NewLayer(const String& rName, USHORT nPos=0xFFFF); + void DeleteLayer(SdrLayer* pLayer) { aLayer.Remove(pLayer); delete pLayer; Broadcast(); } + void MoveLayer(SdrLayer* pLayer, USHORT nNewPos=0xFFFF); + SdrLayer* MoveLayer(USHORT nPos, USHORT nNewPos); + // Neuer Layer, Name wird aus der Resource geholt + SdrLayer* NewStandardLayer(USHORT nPos=0xFFFF); + + // Iterieren ueber alle Layer + USHORT GetLayerCount() const { return USHORT(aLayer.Count()); } + SdrLayer* GetLayer(USHORT i) { return (SdrLayer*)(aLayer.GetObject(i)); } + const SdrLayer* GetLayer(USHORT i) const { return (SdrLayer*)(aLayer.GetObject(i)); } + + USHORT GetLayerPos(SdrLayer* pLayer) const; + + SdrLayer* GetLayer(const String& rName, FASTBOOL bInherited) { return (SdrLayer*)(((const SdrLayerAdmin*)this)->GetLayer(rName,bInherited)); } + const SdrLayer* GetLayer(const String& rName, FASTBOOL bInherited) const; + SdrLayerID GetLayerID(const String& rName, FASTBOOL bInherited) const; + SdrLayer* GetLayerPerID(USHORT nID) { return (SdrLayer*)(((const SdrLayerAdmin*)this)->GetLayerPerID(nID)); } + const SdrLayer* GetLayerPerID(USHORT nID) const; + + void SetControlLayerName(const String& rNewName) { aControlLayerName=rNewName; } + const String& GetControlLayerName() const { return aControlLayerName; } +}; + +/* +Anmerkung zu den Layer - Gemischt symbolisch/ID-basierendes Interface + Einen neuen Layer macht man sich mit: + pLayerAdmin->NewLayer("Der neue Layer"); + Der Layer wird dann automatisch an das Ende der Liste angehaengt. + Entsprechdes gilt fuer Layersets gleichermassen. + Das Interface am SdrLayerSet basiert auf LayerID's. Die App muss sich + dafuer am SdrLayerAdmin eine ID abholen: + SdrLayerID nLayerID=pLayerAdmin->GetLayerID("Der neue Layer"); + Wird der Layer nicht gefunden, so liefert die Methode SDRLAYER_NOTFOUND + zurueck. Die Methoden mit ID-Interface fangen diesen Wert jedoch i.d.R + sinnvoll ab. + Hat man nicht nur den Namen, sondern gar einen SdrLayer*, so kann man + sich die ID natuerlich wesentlich schneller direkt vom Layer abholen. +bInherited: + TRUE: Wird der Layer/LayerSet nicht gefunden, so wird im Parent-LayerAdmin + nachgesehen, ob es dort einen entsprechende Definition gibt. + FALSE: Es wird nur dieser LayerAdmin durchsucht. + Jeder LayerAdmin einer Seite hat einen Parent-LayerAdmin, nmlich den des + Model. Das Model selbst hat keinen Parent. +*/ + +#endif //_SVDLAYER_HXX + diff --git a/svx/inc/svx/svdmark.hxx b/svx/inc/svx/svdmark.hxx new file mode 100644 index 000000000000..111fd45d3bda --- /dev/null +++ b/svx/inc/svx/svdmark.hxx @@ -0,0 +1,415 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdmark.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDMARK_HXX +#define _SVDMARK_HXX + +#include <tools/contnr.hxx> +#include <tools/string.hxx> +#include <tools/list.hxx> +#include "svx/svxdllapi.h" +#include <svx/sdrobjectuser.hxx> + +#include <set> + +class Rectangle; +class SdrPage; +class SdrObjList; +class SdrObject; +class SdrPageView; + +// Ein Container fuer USHORTs (im Prinzip ein dynamisches Array) +class SVX_DLLPUBLIC SdrUShortCont +{ + Container maArray; + sal_Bool mbSorted; + +private: + void CheckSort(ULONG nPos); + +public: + SdrUShortCont(sal_uInt16 nBlock, sal_uInt16 nInit, sal_uInt16 nResize) + : maArray(nBlock, nInit, nResize), + mbSorted(sal_True) + {} + + SdrUShortCont(const SdrUShortCont& rCont) + : maArray(rCont.maArray), + mbSorted(rCont.mbSorted) + {} + + /** helper to migrate to stl containers */ + std::set< sal_uInt16 > getContainer(); + + SdrUShortCont& operator=(const SdrUShortCont& rCont) + { + maArray = rCont.maArray; + mbSorted = rCont.mbSorted; + return *this; + } + + sal_Bool operator==(const SdrUShortCont& rCont) const + { + return maArray == rCont.maArray; + } + + sal_Bool operator!=(const SdrUShortCont& rCont) const + { + return maArray != rCont.maArray; + } + + void Clear() + { + maArray.Clear(); + mbSorted = sal_True; + } + + void Sort() const; + + void ForceSort() const + { + if(!mbSorted) + { + Sort(); + } + } + + void Insert(sal_uInt16 nElem, ULONG nPos = CONTAINER_APPEND) + { + maArray.Insert((void*)ULONG(nElem),nPos); + + if(mbSorted) + { + CheckSort(nPos); + } + } + + void Remove(ULONG nPos) + { + maArray.Remove(nPos); + } + + void Replace(sal_uInt16 nElem, ULONG nPos) + { + maArray.Replace((void*)ULONG(nElem), nPos); + + if(mbSorted) + { + CheckSort(nPos); + } + } + + sal_uInt16 GetObject(ULONG nPos) const + { + return sal_uInt16(sal_uIntPtr(maArray.GetObject(nPos))); + } + + ULONG GetPos(sal_uInt16 nElem) const + { + return maArray.GetPos((void*)(ULONG)nElem); + } + + ULONG GetCount() const + { + return maArray.Count(); + } + + sal_Bool Exist(sal_uInt16 nElem) const + { + return (CONTAINER_ENTRY_NOTFOUND != maArray.GetPos((void*)(ULONG)nElem)); + } +}; + +// Alles was eine View ueber ein markiertes Objekt wissen muss +class SVX_DLLPUBLIC SdrMark : public sdr::ObjectUser +{ +protected: + SdrObject* mpSelectedSdrObject; // the seleceted object + SdrPageView* mpPageView; + SdrUShortCont* mpPoints; // Markierte Punkte + SdrUShortCont* mpLines; // Markierte Linienabschnitte + SdrUShortCont* mpGluePoints; // Markierte Klebepunkte (deren Id's) + sal_Bool mbCon1; // fuer Connectoren + sal_Bool mbCon2; // fuer Connectoren + sal_uInt16 mnUser; // z.B. fuer CopyObjects, mitkopieren von Edges + +public: + SdrMark(SdrObject* pNewObj = 0L, SdrPageView* pNewPageView = 0L); + SdrMark(const SdrMark& rMark); + virtual ~SdrMark(); + + // derived from ObjectUser + virtual void ObjectInDestruction(const SdrObject& rObject); + + SdrMark& operator=(const SdrMark& rMark); + sal_Bool operator==(const SdrMark& rMark) const; + sal_Bool operator!=(const SdrMark& rMark) const + { + return !(operator==(rMark)); + } + + void SetMarkedSdrObj(SdrObject* pNewObj); + SdrObject* GetMarkedSdrObj() const; + + SdrPage* GetPage() const; + SdrObjList* GetObjList() const; + SdrPageView* GetPageView() const + { + return mpPageView; + } + + void SetPageView(SdrPageView* pNewPageView) + { + mpPageView = pNewPageView; + } + + void SetCon1(sal_Bool bOn) + { + mbCon1 = bOn; + } + + sal_Bool IsCon1() const + { + return mbCon1; + } + + void SetCon2(sal_Bool bOn) + { + mbCon2 = bOn; + } + + sal_Bool IsCon2() const + { + return mbCon2; + } + + void SetUser(sal_uInt16 nVal) + { + mnUser = nVal; + } + + sal_uInt16 GetUser() const + { + return mnUser; + } + + const SdrUShortCont* GetMarkedPoints() const + { + return mpPoints; + } + + const SdrUShortCont* GetMarkedLines() const + { + return mpLines; + } + + const SdrUShortCont* GetMarkedGluePoints() const + { + return mpGluePoints; + } + + SdrUShortCont* GetMarkedPoints() + { + return mpPoints; + } + + SdrUShortCont* GetMarkedLines() + { + return mpLines; + } + + SdrUShortCont* GetMarkedGluePoints() + { + return mpGluePoints; + } + + SdrUShortCont* ForceMarkedPoints() + { + if(!mpPoints) + mpPoints = new SdrUShortCont(1024, 32, 32); + + return mpPoints; + } + + SdrUShortCont* ForceMarkedLines() + { + if(!mpLines) + mpLines = new SdrUShortCont(1024, 32, 32); + + return mpLines; + } + + SdrUShortCont* ForceMarkedGluePoints() + { + if(!mpGluePoints) + mpGluePoints = new SdrUShortCont(1024, 32, 32); + + return mpGluePoints; + } +}; + +class SVX_DLLPUBLIC SdrMarkList +{ +protected: + Container maList; + + String maMarkName; + String maPointName; + String maGluePointName; + + sal_Bool mbPointNameOk; + sal_Bool mbGluePointNameOk; + sal_Bool mbNameOk; + sal_Bool mbSorted; + +private: + SVX_DLLPRIVATE sal_Bool operator==(const SdrMarkList& rCmpMarkList) const; + SVX_DLLPRIVATE void ImpForceSort(); + +private: + SVX_DLLPRIVATE const XubString& GetPointMarkDescription(sal_Bool bGlue) const; + +public: + SdrMarkList() + : maList(1024, 64, 64), + mbPointNameOk(sal_False), + mbGluePointNameOk(sal_False), + mbNameOk(sal_False), + mbSorted(sal_True) + { + } + + SdrMarkList(const SdrMarkList& rLst) + : maList(1024, 64, 64) + { + *this = rLst; + } + + ~SdrMarkList() + { + Clear(); + } + + void Clear(); + void ForceSort() const; + void SetUnsorted() + { + mbSorted = sal_False; + } + + ULONG GetMarkCount() const + { + return maList.Count(); + } + + SdrMark* GetMark(ULONG nNum) const + { + return (SdrMark*)(maList.GetObject(nNum)); + } + + ULONG FindObject(const SdrObject* pObj) const; + void InsertEntry(const SdrMark& rMark, sal_Bool bChkSort = sal_True); + void DeleteMark(ULONG nNum); + void ReplaceMark(const SdrMark& rNewMark, ULONG nNum); + void Merge(const SdrMarkList& rSrcList, sal_Bool bReverse = sal_False); + sal_Bool DeletePageView(const SdrPageView& rPV); + sal_Bool InsertPageView(const SdrPageView& rPV); + + void SetNameDirty() + { + mbNameOk = sal_False; + mbPointNameOk = sal_False; + mbGluePointNameOk = sal_False; + } + + // Eine verbale Beschreibung der markierten Objekte z.B.: + // "27 Linien", "12 Objekte", "Polygon" oder auch "Kein Objekt" + const String& GetMarkDescription() const; + const String& GetPointMarkDescription() const + { + return GetPointMarkDescription(sal_False); + } + + const String& GetGluePointMarkDescription() const + { + return GetPointMarkDescription(sal_True); + } + + // pPage=0L: Die Markierungen aller! Seiten beruecksichtigen + sal_Bool TakeBoundRect(SdrPageView* pPageView, Rectangle& rRect) const; + sal_Bool TakeSnapRect(SdrPageView* pPageView, Rectangle& rRect) const; + + // Es werden saemtliche Entries kopiert! + void operator=(const SdrMarkList& rLst); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// migrate selections + +namespace sdr +{ + class SVX_DLLPUBLIC ViewSelection + { + SdrMarkList maMarkedObjectList; + SdrMarkList maEdgesOfMarkedNodes; + SdrMarkList maMarkedEdgesOfMarkedNodes; + List maAllMarkedObjects; + + // bitfield + unsigned mbEdgesOfMarkedNodesDirty : 1; + + SVX_DLLPRIVATE void ImpForceEdgesOfMarkedNodes(); + SVX_DLLPRIVATE void ImplCollectCompleteSelection(SdrObject* pObj); + + public: + ViewSelection(); + + void SetEdgesOfMarkedNodesDirty(); + + const SdrMarkList& GetMarkedObjectList() const + { + return maMarkedObjectList; + } + + const SdrMarkList& GetEdgesOfMarkedNodes() const; + const SdrMarkList& GetMarkedEdgesOfMarkedNodes() const; + const List& GetAllMarkedObjects() const; + + SdrMarkList& GetMarkedObjectListWriteAccess() + { + return maMarkedObjectList; + } + }; +} // end of namespace sdr + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDMARK_HXX +// eof diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx new file mode 100644 index 000000000000..a9abeac76fc2 --- /dev/null +++ b/svx/inc/svx/svdmodel.hxx @@ -0,0 +1,770 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdmodel.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDMODEL_HXX +#define _SVDMODEL_HXX + +#include <com/sun/star/uno/Sequence.hxx> +#include <cppuhelper/weakref.hxx> +#include <sot/storage.hxx> +#include <tools/link.hxx> +#include <tools/contnr.hxx> +#include <tools/weakbase.hxx> +#ifndef _MAPMOD_HXX //autogen +#include <vcl/mapmod.hxx> +#endif +#include <svl/brdcst.hxx> +#include <tools/string.hxx> +#include <tools/datetime.hxx> +#include <svl/hint.hxx> + +#include <svl/style.hxx> +#include <svx/pageitem.hxx> +#include <vcl/field.hxx> + +#include <boost/shared_ptr.hpp> + +class OutputDevice; +#include <svx/svdtypes.hxx> // fuer enum RepeatFuncts +#include <vcl/field.hxx> +#include "svx/svxdllapi.h" + +#include <vos/ref.hxx> + +#if defined(UNX) || defined(WIN) || defined(WNT) +#define DEGREE_CHAR ((sal_Unicode)176) /* 0xB0 = Ansi */ +#endif + +#if defined(DOS) || defined(OS2) +#define DEGREE_CHAR ((sal_Unicode)248) /* 0xF8 = IBM PC (Erw. ASCII) */ +#endif + +#ifndef DEGREE_CHAR +#error unbekannte Plattrorm +#endif + +class SdrOutliner; +class SdrLayerAdmin; +class SdrObjList; +class SdrObject; +class SdrPage; +class SdrPageView; +class SdrTextObj; +class SdrUndoAction; +class SdrUndoGroup; +class AutoTimer; +class SfxItemPool; +class SfxItemSet; +class SfxRepeatTarget; +class SfxStyleSheet; +class SfxUndoAction; +class SfxUndoManager; +class SvxLinkManager; +class XBitmapList; +class XBitmapTable; +class XColorTable; +class XDashList; +class XDashTable; +class XGradientList; +class XGradientTable; +class XHatchList; +class XHatchTable; +class XLineEndList; +class XLineEndTable; +class SvxForbiddenCharactersTable; +class SvNumberFormatter; +class SotStorage; +class SdrOutlinerCache; +class SotStorageRef; +class SdrUndoFactory; +namespace comphelper{ + class IEmbeddedHelper; +} +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#define SDR_SWAPGRAPHICSMODE_NONE 0x00000000 +#define SDR_SWAPGRAPHICSMODE_TEMP 0x00000001 +#define SDR_SWAPGRAPHICSMODE_DOC 0x00000002 +#define SDR_SWAPGRAPHICSMODE_PURGE 0x00000100 +#define SDR_SWAPGRAPHICSMODE_DEFAULT (SDR_SWAPGRAPHICSMODE_TEMP|SDR_SWAPGRAPHICSMODE_DOC|SDR_SWAPGRAPHICSMODE_PURGE) + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +enum SdrHintKind +{ + HINT_UNKNOWN, // Unbekannt + HINT_LAYERCHG, // Layerdefinition geaendert + HINT_LAYERORDERCHG, // Layerreihenfolge geaendert (Insert/Remove/ChangePos) + HINT_PAGEORDERCHG, // Reihenfolge der Seiten (Zeichenseiten oder Masterpages) geaendert (Insert/Remove/ChangePos) + HINT_OBJCHG, // Objekt geaendert + HINT_OBJINSERTED, // Neues Zeichenobjekt eingefuegt + HINT_OBJREMOVED, // Zeichenobjekt aus Liste entfernt + HINT_MODELCLEARED, // gesamtes Model geloescht (keine Pages mehr da). not impl. + HINT_REFDEVICECHG, // RefDevice geaendert + HINT_DEFAULTTABCHG, // Default Tabulatorweite geaendert + HINT_DEFFONTHGTCHG, // Default FontHeight geaendert + HINT_MODELSAVED, // Dokument wurde gesichert + HINT_SWITCHTOPAGE, // #94278# UNDO/REDO at an object evtl. on another page + HINT_BEGEDIT, // Is called after the object has entered text edit mode + HINT_ENDEDIT // Is called after the object has left text edit mode +}; + +class SVX_DLLPUBLIC SdrHint: public SfxHint +{ +public: + Rectangle maRectangle; + const SdrPage* mpPage; + const SdrObject* mpObj; + const SdrObjList* mpObjList; + SdrHintKind meHint; + +public: + TYPEINFO(); + + SdrHint(); + SdrHint(SdrHintKind eNewHint); + SdrHint(const SdrObject& rNewObj); + SdrHint(const SdrObject& rNewObj, const Rectangle& rRect); + + void SetPage(const SdrPage* pNewPage); + void SetObjList(const SdrObjList* pNewOL); + void SetObject(const SdrObject* pNewObj); + void SetKind(SdrHintKind eNewKind); + void SetRect(const Rectangle& rNewRect); + + const SdrPage* GetPage() const; + const SdrObjList* GetObjList() const; + const SdrObject* GetObject() const; + SdrHintKind GetKind() const; + const Rectangle& GetRect() const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// Flag um nach dem Laden des Pools Aufzuraeumen (d.h. die RefCounts +// neu zu bestimmen und unbenutztes wegzuwerfen). FALSE == aktiv +#define LOADREFCOUNTS (FALSE) + +struct SdrDocumentStreamInfo +{ + FASTBOOL mbDeleteAfterUse; + String maUserData; + com::sun::star::uno::Reference < com::sun::star::embed::XStorage > mxStorageRef; + BOOL mbDummy1 : 1; +}; + +struct SdrModelImpl; + +class SVX_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase< SdrModel > +{ +protected: + DateTime aReadDate; // Datum des Einstreamens + Container maMaPag; // StammSeiten (Masterpages) + Container maPages; + Link aUndoLink; // Link fuer einen NotifyUndo-Handler + Link aIOProgressLink; + String aTablePath; + Size aMaxObjSize; // z.B. fuer Autogrowing Text + Fraction aObjUnit; // Beschreibung der Koordinateneinheiten fuer ClipBoard, Drag&Drop, ... + MapUnit eObjUnit; // see above + FieldUnit eUIUnit; // Masseinheit, Masstab (z.B. 1/1000) fuer die UI (Statuszeile) wird von ImpSetUIUnit() gesetzt + Fraction aUIScale; // see above + String aUIUnitStr; // see above + Fraction aUIUnitFact; // see above + int nUIUnitKomma; // see above + FASTBOOL bUIOnlyKomma; // see above + + SdrLayerAdmin* pLayerAdmin; + SfxItemPool* pItemPool; + FASTBOOL bMyPool; // zum Aufraeumen von pMyPool ab 303a + comphelper::IEmbeddedHelper* + m_pEmbeddedHelper; // helper for embedded objects to get rid of the SfxObjectShell + SdrOutliner* pDrawOutliner; // ein Outliner zur Textausgabe + SdrOutliner* pHitTestOutliner;// ein Outliner fuer den HitTest + ULONG nDefTextHgt; // Default Texthoehe in logischen Einheiten + OutputDevice* pRefOutDev; // ReferenzDevice fuer die EditEngine + ULONG nProgressAkt; // fuer den + ULONG nProgressMax; // ProgressBar- + ULONG nProgressOfs; // -Handler + rtl::Reference< SfxStyleSheetBasePool > mxStyleSheetPool; + SfxStyleSheet* pDefaultStyleSheet; + SvxLinkManager* pLinkManager; // LinkManager + Container* pUndoStack; + Container* pRedoStack; + SdrUndoGroup* pAktUndoGroup; // Fuer mehrstufige + USHORT nUndoLevel; // Undo-Klammerung + bool mbUndoEnabled; // If false no undo is recorded or we are during the execution of an undo action + USHORT nProgressPercent; // fuer den ProgressBar-Handler + USHORT nLoadVersion; // Versionsnummer der geladenen Datei + FASTBOOL bExtColorTable; // Keinen eigenen ColorTable + sal_Bool mbChanged; + FASTBOOL bInfoChanged; + FASTBOOL bPagNumsDirty; + FASTBOOL bMPgNumsDirty; + FASTBOOL bPageNotValid; // TRUE=Doc ist nur ObjektTraeger. Page ist nicht gueltig. + FASTBOOL bSavePortable; // Metafiles portabel speichern + FASTBOOL bNoBitmapCaching; // Bitmaps fuer Screenoutput cachen + FASTBOOL bReadOnly; + FASTBOOL bTransparentTextFrames; + FASTBOOL bSaveCompressed; + FASTBOOL bSwapGraphics; + FASTBOOL bPasteResize; // Objekte werden gerade resized wegen Paste mit anderem MapMode + FASTBOOL bSaveOLEPreview; // save preview metafile of OLE objects + UINT16 nStreamCompressMode; // Komprimiert schreiben? + UINT16 nStreamNumberFormat; + UINT16 nDefaultTabulator; + UINT32 nMaxUndoCount; + FASTBOOL bSaveNative; + BOOL bStarDrawPreviewMode; + + +////////////////////////////////////////////////////////////////////////////// +// sdr::Comment interface +private: + // the next unique comment ID, used for counting added comments. Initialized + // to 0. UI shows one more due to the fact that 0 is a no-no for users. + sal_uInt32 mnUniqueCommentID; + +public: + // create a new, unique comment ID + sal_uInt32 GetNextUniqueCommentID(); + + // get the author name + ::rtl::OUString GetDocumentAuthorName() const; + + // for export + sal_uInt32 GetUniqueCommentID() const { return mnUniqueCommentID; } + + // for import + void SetUniqueCommentID(sal_uInt32 nNewID) { if(nNewID != mnUniqueCommentID) { mnUniqueCommentID = nNewID; } } + /** cl: added this for OJ to complete his reporting engine, does not work + correctly so only enable it for his model */ + bool IsAllowShapePropertyChangeListener() const; + void SetAllowShapePropertyChangeListener( bool bAllow ); + + UINT16 nStarDrawPreviewMasterPageNum; + // Reserven fuer kompatible Erweiterungen +//-/ SfxItemPool* pUndoItemPool; + SotStorage* pModelStorage; + SvxForbiddenCharactersTable* mpForbiddenCharactersTable; + ULONG nSwapGraphicsMode; + + SdrOutlinerCache* mpOutlinerCache; + SdrModelImpl* mpImpl; + UINT16 mnCharCompressType; + UINT16 nReserveUInt5; + UINT16 nReserveUInt6; + UINT16 nReserveUInt7; + FASTBOOL mbModelLocked; + FASTBOOL mbKernAsianPunctuation; + FASTBOOL mbAddExtLeading; + FASTBOOL mbInDestruction; + + // Zeiger auf Paletten, Listen und Tabellen + XColorTable* pColorTable; + XDashList* pDashList; + XLineEndList* pLineEndList; + XHatchList* pHatchList; + XGradientList* pGradientList; + XBitmapList* pBitmapList; + + // New src638: NumberFormatter for drawing layer and + // method for getting it. It is constructed on demand + // and destroyed when destroying the SdrModel. + SvNumberFormatter* mpNumberFormatter; +public: + const SvNumberFormatter& GetNumberFormatter() const; +protected: + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel(); + +private: + // Nicht implementiert: + SVX_DLLPRIVATE SdrModel(const SdrModel& rSrcModel); + SVX_DLLPRIVATE void operator=(const SdrModel& rSrcModel); + SVX_DLLPRIVATE FASTBOOL operator==(const SdrModel& rCmpModel) const; +//#if 0 // _SOLAR__PRIVATE + SVX_DLLPRIVATE void ImpPostUndoAction(SdrUndoAction* pUndo); + SVX_DLLPRIVATE void ImpSetUIUnit(); + SVX_DLLPRIVATE void ImpSetOutlinerDefaults( SdrOutliner* pOutliner, BOOL bInit = FALSE ); + SVX_DLLPRIVATE void ImpReformatAllTextObjects(); + SVX_DLLPRIVATE void ImpReformatAllEdgeObjects(); // #103122# + SVX_DLLPRIVATE void ImpCreateTables(); + SVX_DLLPRIVATE void ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, + bool bLoadRefCounts = true); + +//#endif // __PRIVATE + + // this is a weak reference to a possible living api wrapper for this model + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxUnoModel; + +public: +//#if 0 // _SOLAR__PRIVATE + FASTBOOL IsPasteResize() const { return bPasteResize; } + void SetPasteResize(FASTBOOL bOn) { bPasteResize=bOn; } +//#endif // __PRIVATE + TYPEINFO(); + // Steckt man hier seinen eigenen Pool rein, so wird die Klasse auch + // Aktionen an ihm vornehmen (Put(),Remove()). Bei Zerstoerung von + // SdrModel wird dieser Pool ver delete geloescht! + // Gibt man den Konstruktor stattdessen eine NULL mit, so macht sich + // die Klasse einen eigenen Pool (SdrItemPool), den sie dann auch im + // Destruktor zerstoert. + // Bei Verwendung eines eigenen Pools ist darauf zu achten, dass dieser + // von SdrItemPool abgeleitet ist, falls man von SdrAttrObj abgeleitete + // Zeichenobjekte verwenden moechte. Setzt man degegen nur vom abstrakten + // Basisobjekt SdrObject abgeleitete Objekte ein, so ist man frei in der + // Wahl des Pools. + SdrModel(SfxItemPool* pPool=NULL, ::comphelper::IEmbeddedHelper* pPers=NULL, sal_Bool bLoadRefCounts = LOADREFCOUNTS); + SdrModel(const String& rPath, SfxItemPool* pPool=NULL, ::comphelper::IEmbeddedHelper* pPers=NULL, sal_Bool bLoadRefCounts = LOADREFCOUNTS); + SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FASTBOOL bUseExtColorTable, sal_Bool bLoadRefCounts = LOADREFCOUNTS); + SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FASTBOOL bUseExtColorTable, sal_Bool bLoadRefCounts = LOADREFCOUNTS); + virtual ~SdrModel(); + void ClearModel(sal_Bool bCalledFromDestructor); + + // Hier kann man erfragen, ob das Model gerade eingrstreamt wird + FASTBOOL IsLoading() const { return sal_False /*BFS01 bLoading */; } + // Muss z.B. ueberladen werden, um das Swappen/LoadOnDemand von Grafiken + // zu ermoeglichen. Wird rbDeleteAfterUse auf TRUE gesetzt, so wird + // die SvStream-Instanz vom Aufrufer nach Gebrauch destruiert. + // Wenn diese Methode NULL liefert, wird zum Swappen eine temporaere + // Datei angelegt. + // Geliefert werden muss der Stream, aus dem das Model geladen wurde + // bzw. in den es zuletzt gespeichert wurde. + virtual SvStream* GetDocumentStream( SdrDocumentStreamInfo& rStreamInfo ) const; + // Die Vorlagenattribute der Zeichenobjekte in harte Attribute verwandeln. + void BurnInStyleSheetAttributes(); + // Wer sich von SdrPage ableitet muss sich auch von SdrModel ableiten + // und diese beiden VM AllocPage() und AllocModel() ueberladen... + virtual SdrPage* AllocPage(FASTBOOL bMasterPage); + virtual SdrModel* AllocModel() const; + + // Aenderungen an den Layern setzen das Modified-Flag und broadcasten am Model! + const SdrLayerAdmin& GetLayerAdmin() const { return *pLayerAdmin; } + SdrLayerAdmin& GetLayerAdmin() { return *pLayerAdmin; } + + const SfxItemPool& GetItemPool() const { return *pItemPool; } + SfxItemPool& GetItemPool() { return *pItemPool; } + + SdrOutliner& GetDrawOutliner(const SdrTextObj* pObj=NULL) const; + + /** returns a new created and non shared outliner. + The outliner will not get updated when the SdrModel is changed. + */ + boost::shared_ptr< SdrOutliner > CreateDrawOutliner(const SdrTextObj* pObj=NULL); + + SdrOutliner& GetHitTestOutliner() const { return *pHitTestOutliner; } + const SdrTextObj* GetFormattingTextObj() const; + // Die TextDefaults (Font,Hoehe,Farbe) in ein Set putten + void SetTextDefaults() const; + static void SetTextDefaults( SfxItemPool* pItemPool, ULONG nDefTextHgt ); + + // ReferenzDevice fuer die EditEngine + void SetRefDevice(OutputDevice* pDev); + OutputDevice* GetRefDevice() const { return pRefOutDev; } + // Wenn ein neuer MapMode am RefDevice gesetzt wird o.ae. + void RefDeviceChanged(); // noch nicht implementiert + // Default-Schrifthoehe in logischen Einheiten + void SetDefaultFontHeight(ULONG nVal); + ULONG GetDefaultFontHeight() const { return nDefTextHgt; } + // Default-Tabulatorweite fuer die EditEngine + void SetDefaultTabulator(USHORT nVal); + USHORT GetDefaultTabulator() const { return nDefaultTabulator; } + + // Der DefaultStyleSheet wird jedem Zeichenobjekt verbraten das in diesem + // Model eingefuegt wird und kein StyleSheet gesetzt hat. + SfxStyleSheet* GetDefaultStyleSheet() const { return pDefaultStyleSheet; } + void SetDefaultStyleSheet(SfxStyleSheet* pDefSS) { pDefaultStyleSheet = pDefSS; } + + SvxLinkManager* GetLinkManager() { return pLinkManager; } + void SetLinkManager(SvxLinkManager* pLinkMgr) { pLinkManager = pLinkMgr; } + + ::comphelper::IEmbeddedHelper* GetPersist() const { return m_pEmbeddedHelper; } + void ClearPersist() { m_pEmbeddedHelper = 0; } + void SetPersist( ::comphelper::IEmbeddedHelper *p ) { m_pEmbeddedHelper = p; } + + // Masseinheit fuer die Zeichenkoordinaten. + // Default ist 1 logische Einheit = 1/100mm (Unit=MAP_100TH_MM, Fract=(1,1)). + // Beispiele: + // MAP_POINT, Fraction(72,1) : 1 log Einh = 72 Point = 1 Inch + // MAP_POINT, Fraction(1,20) : 1 log Einh = 1/20 Point = 1 Twip + // MAP_TWIP, Fraction(1,1) : 1 log Einh = 1 Twip + // MAP_100TH_MM, Fraction(1,10) : 1 log Einh = 1/1000mm + // MAP_MM, Fraction(1000,1) : 1 log Einh = 1000mm = 1m + // MAP_CM, Fraction(100,1) : 1 log Einh = 100cm = 1m + // MAP_CM, Fraction(100,1) : 1 log Einh = 100cm = 1m + // MAP_CM, Fraction(100000,1): 1 log Einh = 100000cm = 1km + // (PS: Lichtjahre sind somit also nicht darstellbar). + // Die Skalierungseinheit wird benoetigt, damit die Engine das Clipboard + // mit den richtigen Groessen beliefern kann. + MapUnit GetScaleUnit() const { return eObjUnit; } + void SetScaleUnit(MapUnit eMap); + const Fraction& GetScaleFraction() const { return aObjUnit; } + void SetScaleFraction(const Fraction& rFrac); + // Beides gleichzeitig setzen ist etwas performanter + void SetScaleUnit(MapUnit eMap, const Fraction& rFrac); + + // Maximale Groesse z.B. fuer Autogrowing-Texte + const Size& GetMaxObjSize() const { return aMaxObjSize; } + void SetMaxObjSize(const Size& rSiz) { aMaxObjSize=rSiz; } + + // Damit die View! in der Statuszeile vernuenftige Zahlen anzeigen kann: + // Default ist mm. + void SetUIUnit(FieldUnit eUnit); + FieldUnit GetUIUnit() const { return eUIUnit; } + // Der Masstab der Zeichnung. Default 1/1. + void SetUIScale(const Fraction& rScale); + const Fraction& GetUIScale() const { return aUIScale; } + // Beides gleichzeitig setzen ist etwas performanter + void SetUIUnit(FieldUnit eUnit, const Fraction& rScale); + + const Fraction& GetUIUnitFact() const { return aUIUnitFact; } + const String& GetUIUnitStr() const { return aUIUnitStr; } + int GetUIUnitKomma() const { return nUIUnitKomma; } + FASTBOOL IsUIOnlyKomma() const { return bUIOnlyKomma; } + + static void TakeUnitStr(FieldUnit eUnit, String& rStr); + void TakeMetricStr(long nVal, String& rStr, FASTBOOL bNoUnitChars=FALSE, sal_Int32 nNumDigits = -1) const; + void TakeWinkStr(long nWink, String& rStr, FASTBOOL bNoDegChar=FALSE) const; + void TakePercentStr(const Fraction& rVal, String& rStr, FASTBOOL bNoPercentChar=FALSE) const; + + // RecalcPageNums wird idR. nur von der Page gerufen. + FASTBOOL IsPagNumsDirty() const { return bPagNumsDirty; }; + FASTBOOL IsMPgNumsDirty() const { return bMPgNumsDirty; }; + void RecalcPageNums(FASTBOOL bMaster); + // Nach dem Insert gehoert die Page dem SdrModel. + virtual void InsertPage(SdrPage* pPage, USHORT nPos=0xFFFF); + virtual void DeletePage(USHORT nPgNum); + // Remove bedeutet Eigentumsuebereignung an den Aufrufer (Gegenteil von Insert) + virtual SdrPage* RemovePage(USHORT nPgNum); + virtual void MovePage(USHORT nPgNum, USHORT nNewPos); + const SdrPage* GetPage(sal_uInt16 nPgNum) const; + SdrPage* GetPage(sal_uInt16 nPgNum); + sal_uInt16 GetPageCount() const; + // #109538# + virtual void PageListChanged(); + + // Masterpages + virtual void InsertMasterPage(SdrPage* pPage, USHORT nPos=0xFFFF); + virtual void DeleteMasterPage(USHORT nPgNum); + // Remove bedeutet Eigentumsuebereignung an den Aufrufer (Gegenteil von Insert) + virtual SdrPage* RemoveMasterPage(USHORT nPgNum); + virtual void MoveMasterPage(USHORT nPgNum, USHORT nNewPos); + const SdrPage* GetMasterPage(sal_uInt16 nPgNum) const; + SdrPage* GetMasterPage(sal_uInt16 nPgNum); + sal_uInt16 GetMasterPageCount() const; + // #109538# + virtual void MasterPageListChanged(); + + // Modified-Flag. Wird automatisch gesetzt, wenn an den Pages oder + // Zeichenobjekten was geaendert wird. Zuruecksetzen muss man es + // jedoch selbst (z.B. bei Save() ...). + sal_Bool IsChanged() const { return mbChanged; } + virtual void SetChanged(sal_Bool bFlg = sal_True); + + // PageNotValid bedeutet, dass das Model lediglich Objekte traegt die zwar + // auf einer Page verankert sind, die Page aber nicht gueltig ist. Diese + // Kennzeichnung wird fuers Clipboard/Drag&Drop benoetigt. + FASTBOOL IsPageNotValid() const { return bPageNotValid; } + void SetPageNotValid(FASTBOOL bJa=TRUE) { bPageNotValid=bJa; } + + // Schaltet man dieses Flag auf TRUE, so werden Grafikobjekte + // portabel gespeichert. Es findet dann beim Speichern ggf. + // eine implizite Wandlung von Metafiles statt. + // Default=FALSE. Flag ist nicht persistent. + FASTBOOL IsSavePortable() const { return bSavePortable; } + void SetSavePortable(FASTBOOL bJa=TRUE) { bSavePortable=bJa; } + + // Schaltet man dieses Flag auf TRUE, so werden + // Pixelobjekte (stark) komprimiert gespeichert. + // Default=FALSE. Flag ist nicht persistent. + FASTBOOL IsSaveCompressed() const { return bSaveCompressed; } + void SetSaveCompressed(FASTBOOL bJa=TRUE) { bSaveCompressed=bJa; } + + // Schaltet man dieses Flag auf TRUE, so werden + // Grafikobjekte mit gesetztem Native-Link + // native gespeichert. + // Default=FALSE. Flag ist nicht persistent. + FASTBOOL IsSaveNative() const { return bSaveNative; } + void SetSaveNative(FASTBOOL bJa=TRUE) { bSaveNative=bJa; } + + // Schaltet man dieses Flag auf TRUE, so werden die Grafiken + // von Grafikobjekten: + // - beim Laden eines Dokuments nicht sofort mitgeladen, + // sondern erst wenn sie gebraucht (z.B. angezeigt) werden. + // - ggf. wieder aus dem Speicher geworfen, falls Sie gerade + // nicht benoetigt werden. + // Damit das funktioniert, muss die virtuelle Methode + // GetDocumentStream() ueberladen werden. + // Default=FALSE. Flag ist nicht persistent. + FASTBOOL IsSwapGraphics() const { return bSwapGraphics; } + void SetSwapGraphics(FASTBOOL bJa=TRUE); + void SetSwapGraphicsMode(ULONG nMode) { nSwapGraphicsMode = nMode; } + ULONG GetSwapGraphicsMode() const { return nSwapGraphicsMode; } + + FASTBOOL IsSaveOLEPreview() const { return bSaveOLEPreview; } + void SetSaveOLEPreview( FASTBOOL bSet) { bSaveOLEPreview = bSet; } + + // Damit die Bildschirmausgabe von Bitmaps (insbesondere bei gedrehten) + // etwas schneller wird, werden sie gecachet. Diesen Cache kann man mit + // diesem Flag ein-/ausschalten. Beim naechsten Paint wird an den Objekten + // dann ggf. ein Image gemerkt bzw. freigegeben. Wandert ein Bitmapobjekt + // in's Undo, so wird der Cache fuer dieses Objekt sofort ausgeschaltet + // (Speicher sparen). + // Default=Cache eingeschaltet. Flag ist nicht persistent. + FASTBOOL IsBitmapCaching() const { return !bNoBitmapCaching; } + void SetBitmapCaching(FASTBOOL bJa=TRUE) { bNoBitmapCaching=!bJa; } + + // Defaultmaessig (FALSE) kann man Textrahmen ohne Fuellung durch + // Mausklick selektieren. Nach Aktivierung dieses Flags trifft man sie + // nur noch in dem Bereich, wo sich auch tatsaechlich Text befindet. + FASTBOOL IsPickThroughTransparentTextFrames() const { return bTransparentTextFrames; } + void SetPickThroughTransparentTextFrames(FASTBOOL bOn) { bTransparentTextFrames=bOn; } + + // Darf denn das Model ueberhaupt veraendert werden? + // Wird nur von den Possibility-Methoden der View ausgewerdet. + // Direkte Manipulationen am Model, ... berueksichtigen dieses Flag nicht. + // Sollte ueberladen werden und entsprechend des ReadOnly-Status des Files + // TRUE oder FALSE liefern (Methode wird oeffters gerufen, also ein Flag + // verwenden!). + virtual FASTBOOL IsReadOnly() const; + virtual void SetReadOnly(FASTBOOL bYes); + + // Vermischen zweier SdrModel. Zu beachten sei, dass rSourceModel nicht + // const ist. Die Pages werden beim einfuegen nicht kopiert, sondern gemoved. + // rSourceModel ist anschliessend u.U. weitgehend leer. + // nFirstPageNum,nLastPageNum: Die aus rSourceModel zu uebernehmenden Seiten + // nDestPos..................: Einfuegeposition + // bMergeMasterPages.........: TRUE =benoetigte MasterPages werden aus + // rSourceModel ebenfalls uebernommen + // FALSE=Die MasterPageDescriptoren der Seiten + // aus rSourceModel werden auf die + // vorhandenen MasterPages gemappt. + // bUndo.....................: Fuer das Merging wird eine UndoAction generiert. + // Undo ist nur fuer das ZielModel, nicht fuer + // rSourceModel. + // bTreadSourceAsConst.......: TRUE=Das SourceModel wird nicht veraendert,. + // d.h die Seiten werden kopiert. + virtual void Merge(SdrModel& rSourceModel, + USHORT nFirstPageNum=0, USHORT nLastPageNum=0xFFFF, + USHORT nDestPos=0xFFFF, + FASTBOOL bMergeMasterPages=FALSE, FASTBOOL bAllMasterPages=FALSE, + FASTBOOL bUndo=TRUE, FASTBOOL bTreadSourceAsConst=FALSE); + + // Ist wie Merge(SourceModel=DestModel,nFirst,nLast,nDest,FALSE,FALSE,bUndo,!bMoveNoCopy); + void CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum, + USHORT nDestPos, + FASTBOOL bUndo=TRUE, FASTBOOL bMoveNoCopy=FALSE); + + // Mit BegUndo() / EndUndo() ist es moeglich beliebig viele UndoActions + // beliebig tief zu klammern. Als Kommentar der + // UndoAction wird der des ersten BegUndo(String) aller Klammerungen + // verwendet. Der NotifyUndoActionHdl wird in diesem Fall erst beim letzten + // EndUndo() gerufen. Bei einer leeren Klammerung wird keine UndoAction + // generiert. + // Alle direkten Aktionen am SdrModel erzeugen keine UndoActions, die + // Aktionen an der SdrView dagegen generieren solche. + void BegUndo(); // Undo-Klammerung auf + void BegUndo(const String& rComment); // Undo-Klammerung auf + void BegUndo(const String& rComment, const String& rObjDescr, SdrRepeatFunc eFunc=SDRREPFUNC_OBJ_NONE); // Undo-Klammerung auf + void BegUndo(SdrUndoGroup* pUndoGrp); // Undo-Klammerung auf + void EndUndo(); // Undo-Klammerung zu + void AddUndo(SdrUndoAction* pUndo); + USHORT GetUndoBracketLevel() const { return nUndoLevel; } + const SdrUndoGroup* GetAktUndoGroup() const { return pAktUndoGroup; } + // nur nach dem 1. BegUndo oder vor dem letzten EndUndo: + void SetUndoComment(const String& rComment); + void SetUndoComment(const String& rComment, const String& rObjDescr); + + // Das Undo-Managment findet nur statt, wenn kein NotifyUndoAction-Handler + // gesetzt ist. + // Default ist 16. Minimaler MaxUndoActionCount ist 1! + void SetMaxUndoActionCount(ULONG nAnz); + ULONG GetMaxUndoActionCount() const { return nMaxUndoCount; } + void ClearUndoBuffer(); + // UndoAction(0) ist die aktuelle (also die zuletzt eingegangene) + ULONG GetUndoActionCount() const { return pUndoStack!=NULL ? pUndoStack->Count() : 0; } + const SfxUndoAction* GetUndoAction(ULONG nNum) const { return (SfxUndoAction*)(pUndoStack!=NULL ? pUndoStack->GetObject(nNum) : NULL); } + // RedoAction(0) ist die aktuelle (also die des letzten Undo) + ULONG GetRedoActionCount() const { return pRedoStack!=NULL ? pRedoStack->Count() : 0; } + const SfxUndoAction* GetRedoAction(ULONG nNum) const { return (SfxUndoAction*)(pRedoStack!=NULL ? pRedoStack->GetObject(nNum) : NULL); } + + FASTBOOL Undo(); + FASTBOOL Redo(); + FASTBOOL Repeat(SfxRepeatTarget&); + + // Hier kann die Applikation einen Handler setzen, der die auflaufenden + // UndoActions einsammelt. Der Handler hat folgendes Aussehen: + // void __EXPORT NotifyUndoActionHdl(SfxUndoAction* pUndoAction); + // Beim Aufruf des Handlers findet eine Eigentumsuebereignung statt; die + // UndoAction gehoert somit dem Handler, nicht mehr dem SdrModel. + void SetNotifyUndoActionHdl(const Link& rLink) { aUndoLink=rLink; } + const Link& GetNotifyUndoActionHdl() const { return aUndoLink; } + + /** application can set it's own undo manager, BegUndo, EndUndo and AddUndoAction + calls are routet to this interface if given */ + void SetSdrUndoManager( SfxUndoManager* pUndoManager ); + + /** applications can set their own undo factory to overide creation of + undo actions. The SdrModel will become owner of the given SdrUndoFactory + and delete it upon its destruction. */ + void SetSdrUndoFactory( SdrUndoFactory* pUndoFactory ); + + /** returns the models undo factory. This must be used to create + undo actions for this model. */ + SdrUndoFactory& GetSdrUndoFactory() const; + + // Hier kann man einen Handler setzen der beim Streamen mehrfach gerufen + // wird und ungefaehre Auskunft ueber den Fortschreitungszustand der + // Funktion gibt. Der Handler muss folgendes Aussehen haben: + // void __EXPORT class::IOProgressHdl(const USHORT& nPercent); + // Der erste Aufruf des Handlers erfolgt grundsaetzlich mit 0, der letzte + // mit 100. Dazwischen erfolgen maximal 99 Aufrufe mit Werten 1...99. + // Man kann also durchaus bei 0 den Progressbar Initiallisieren und bei + // 100 wieder schliessen. Zu beachten sei, dass der Handler auch gerufen + // wird, wenn die App Draw-Daten im officeweiten Draw-Exchange-Format + // bereitstellt, denn dies geschieht durch streamen in einen MemoryStream. + void SetIOProgressHdl(const Link& rLink) { aIOProgressLink=rLink; } + const Link& GetIOProgressHdl() const { return aIOProgressLink; } + + // Zugriffsmethoden fuer Paletten, Listen und Tabellen + void SetColorTable(XColorTable* pTable) { pColorTable=pTable; } + XColorTable* GetColorTable() const { return pColorTable; } + void SetDashList(XDashList* pList) { pDashList=pList; } + XDashList* GetDashList() const { return pDashList; } + void SetLineEndList(XLineEndList* pList) { pLineEndList=pList; } + XLineEndList* GetLineEndList() const { return pLineEndList; } + void SetHatchList(XHatchList* pList) { pHatchList=pList; } + XHatchList* GetHatchList() const { return pHatchList; } + void SetGradientList(XGradientList* pList) { pGradientList=pList; } + XGradientList* GetGradientList() const { return pGradientList; } + void SetBitmapList(XBitmapList* pList) { pBitmapList=pList; } + XBitmapList* GetBitmapList() const { return pBitmapList; } + + // Der StyleSheetPool wird der DrawingEngine nur bekanntgemacht. + // Zu loeschen hat ihn schliesslich der, der ihn auch konstruiert hat. + SfxStyleSheetBasePool* GetStyleSheetPool() const { return mxStyleSheetPool.get(); } + void SetStyleSheetPool(SfxStyleSheetBasePool* pPool) { mxStyleSheetPool=pPool; } + + // Diese Methode fuert einen Konsistenzcheck auf die Struktur des Models + // durch. Geprueft wird insbesondere die Verkettung von Verschachtelten + // Gruppenobjekten, aber auch Stati wie bInserted sowie Model* und Page* + // der Objects, SubLists und Pages. Bei korrekter Struktur liefert die + // Methode TRUE, andernfalls FALSE. + // Dieser Check steht nur zur Verfuegung, wenn die Engine mit DBG_UTIL + // uebersetzt wurde. Andernfalls liefert die Methode immer TRUE. (ni) + FASTBOOL CheckConsistence() const; + + void SetStarDrawPreviewMode(BOOL bPreview); + BOOL IsStarDrawPreviewMode() { return bStarDrawPreviewMode; } + + SotStorage* GetModelStorage() const { return pModelStorage; } + void SetModelStorage( SotStorage* pStor ) { pModelStorage = pStor; } + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoModel(); + void setUnoModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xModel ); + + // these functions are used by the api to disable repaints during a + // set of api calls. + BOOL isLocked() const { return (BOOL)mbModelLocked; } + void setLock( BOOL bLock ); + + void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ); + vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const; + + void SetCharCompressType( UINT16 nType ); + UINT16 GetCharCompressType() const { return mnCharCompressType; } + + void SetKernAsianPunctuation( sal_Bool bEnabled ); + sal_Bool IsKernAsianPunctuation() const { return (sal_Bool)mbKernAsianPunctuation; } + + void SetAddExtLeading( sal_Bool bEnabled ); + sal_Bool IsAddExtLeading() const { return (sal_Bool)mbAddExtLeading; } + + void ReformatAllTextObjects(); + + FASTBOOL HasTransparentObjects( BOOL bCheckForAlphaChannel = FALSE ) const; + + SdrOutliner* createOutliner( USHORT nOutlinerMode ); + void disposeOutliner( SdrOutliner* pOutliner ); + + sal_Bool IsWriter() const { return !bMyPool; } + + /** returns the numbering type that is used to format page fields in drawing shapes */ + virtual SvxNumType GetPageNumType() const; + + /** copies the items from the source set to the destination set. Both sets must have + same ranges but can have different pools. If pNewModel is optional. If it is null, + this model is used. */ + + void MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSet, SdrModel* pNewModel ); + + bool IsInDestruction() const; + + static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId(); + + /** enables (true) or disables (false) recording of undo actions + If undo actions are added while undo is disabled, they are deleted. + Disabling undo does not clear the current undo buffer! */ + void EnableUndo( bool bEnable ); + + /** returns true if undo is currently enabled + This returns false if undo was disabled using EnableUndo( false ) and + also during the runtime of the Undo() and Redo() methods. */ + bool IsUndoEnabled() const; + +}; + +typedef tools::WeakReference< SdrModel > SdrModelWeakRef; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDMODEL_HXX + +/* ///////////////////////////////////////////////////////////////////////////////////////////////// + +-----------+ + | SdrModel | + +--+------+-+ + | +-----------+ + +----+-----+ | + | ... | | + +----+---+ +----+---+ +-----+--------+ + |SdrPage | |SdrPage | |SdrLayerAdmin | + +---+----+ +-+--+--++ +---+-------+--+ + | | | | | +-------------------+ + +----+----+ +-----+-----+ +-------+-------+ + | ... | | ... | | ... | ++---+---+ +---+---+ +----+----+ +----+----+ +-----+------+ +------+-----+ +|SdrObj | |SdrObj | |SdrLayer | |SdrLayer | |SdrLayerSet | |SdrLayerSet | ++-------+ +-------+ +---------+ +---------+ +------------+ +------------+ +Die Klasse SdrModel ist der Kopf des Datenmodells der StarView Drawing-Engine. + +///////////////////////////////////////////////////////////////////////////////////////////////// */ + diff --git a/svx/inc/svx/svdmrkv.hxx b/svx/inc/svx/svdmrkv.hxx new file mode 100644 index 000000000000..88d0b941273d --- /dev/null +++ b/svx/inc/svx/svdmrkv.hxx @@ -0,0 +1,541 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdmrkv.hxx,v $ + * $Revision: 1.6.76.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDMRKV_HXX +#define _SVDMRKV_HXX + +#include <svx/svdmark.hxx> +#include <svx/svdhdl.hxx> +#include <svx/svdsnpv.hxx> +#include <svx/svdtypes.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Defines +//************************************************************ + +// folgendes ist noch nicht bzw. erst zum Teil implementiert: +#define SDRSEARCH_DEEP 0x0001 /* rekursiv in Gruppenobjekte hinein */ +#define SDRSEARCH_ALSOONMASTER 0x0002 /* MasterPages werden auch durchsucht */ +#define SDRSEARCH_WHOLEPAGE 0x0004 /* Nicht nur die ObjList der PageView */ +#define SDRSEARCH_TESTMARKABLE 0x0008 /* nur markierbare Objekte/Punkte/Handles/... */ +#define SDRSEARCH_TESTMACRO 0x0010 /* Nur Objekte mit Macro */ +#define SDRSEARCH_TESTTEXTEDIT 0x0020 /* Nur TextEdit-faehige Objekte */ +#define SDRSEARCH_WITHTEXT 0x0040 /* Nur Objekte mit Text */ +#define SDRSEARCH_TESTTEXTAREA 0x0080 /* Den Textbereich von Objekten mit Text (TextEditHit) */ +#define SDRSEARCH_BACKWARD 0x0100 /* Rueckwaertssuche */ +#define SDRSEARCH_NEXT 0x0200 /* Suche startet hinter dem uebergebenen Objekt/Punkt/... */ +#define SDRSEARCH_MARKED 0x0400 /* Nur markierte Objekte/Punkte/... */ +#define SDRSEARCH_PASS2BOUND 0x0800 /* Wenn nix gefunden, dann neuer 2. Versuch mit BoundRectHit */ +#define SDRSEARCH_PASS3NEAREST 0x1000 /* Wenn nix gefunden, dann neuer 3. Versuch mit NearestBoundRectHit */ + +#define SDRSEARCH_PICKMARKABLE (SDRSEARCH_TESTMARKABLE) +#define SDRSEARCH_PICKTEXTEDIT (SDRSEARCH_DEEP|SDRSEARCH_TESTMARKABLE|SDRSEARCH_TESTTEXTEDIT) +#define SDRSEARCH_PICKMACRO (SDRSEARCH_DEEP|SDRSEARCH_ALSOONMASTER|SDRSEARCH_WHOLEPAGE|SDRSEARCH_TESTMACRO) + +// SDRSEARCHPASS_... ist Rueckgabeparameterwert bei PickObj(). +#define SDRSEARCHPASS_DIRECT 0x0000 /* Objekt durch direkten Hit getroffen */ +#define SDRSEARCHPASS_INACTIVELIST 0x0001 /* Obj auf der Page, nicht jedoch in der AktGroup (bei WHOLEPAGE) */ +#define SDRSEARCHPASS_MASTERPAGE 0x0002 /* Objekt auf der MasterPage gefunden */ +#define SDRSEARCHPASS_BOUND 0x0010 /* Objekt erst beim Bound-Check gefunden */ +#define SDRSEARCHPASS_NEAREST 0x0020 /* Objekt erst beim Nearest-Check gefunden */ + +enum SdrHitKind {SDRHIT_NONE, // Nicht getroffen, Schnaps gesoffen + SDRHIT_OBJECT, // Treffer versenkt + SDRHIT_BOUNDRECT, // Treffer am BoundRect + SDRHIT_BOUNDTL, // Treffer am BoundRect TopLeft + SDRHIT_BOUNDTC, // Treffer am BoundRect TopCenter + SDRHIT_BOUNDTR, // Treffer am BoundRect TopRight + SDRHIT_BOUNDCL, // Treffer am BoundRect CenterLeft + SDRHIT_BOUNDCR, // Treffer am BoundRect CenterRight + SDRHIT_BOUNDBL, // Treffer am BoundRect BottomLeft + SDRHIT_BOUNDBC, // Treffer am BoundRect BottomCenter + SDRHIT_BOUNDBR,/*,*/ // Treffer am BoundRect BottomRight + /*SDRHIT_REFPOINT*/ // Referenzpunkt (Rotationsachse,Spiegelachse) getroffen + // ab hier neu am 01-07-1996: + SDRHIT_HANDLE, // Markierungshandle + SDRHIT_HELPLINE, // Hilfslinie + SDRHIT_GLUEPOINT, // Klebepunkt + SDRHIT_TEXTEDIT, // Offene OutlinerView getroffen + SDRHIT_TEXTEDITOBJ, // Objekt fuer SdrBeginTextEdit (Textbereich) + SDRHIT_URLFIELD, // Feld im TextObj getroffen (wird gerade nicht editiert) + SDRHIT_MACRO, // Objekt fuer BegMacroObj + SDRHIT_MARKEDOBJECT, // Markiertes Objekt (z.B. zum Draggen) + SDRHIT_UNMARKEDOBJECT, // nichtmarkiertes Objekt (z.B. zum markieren) + SDRHIT_CELL}; // hit on a cell inside a table shape (outside of the cells text area) + +enum SdrViewEditMode {SDREDITMODE_EDIT, // Auch bekannt aus Pfeil- oder Zeigermodus + SDREDITMODE_CREATE, // Objekterzeugungswerkzeug + SDREDITMODE_GLUEPOINTEDIT}; // Klebepunkteditiermodus + +#define IMPSDR_MARKOBJDESCRIPTION 0x0000 +#define IMPSDR_POINTSDESCRIPTION 0x0001 +#define IMPSDR_GLUEPOINTSDESCRIPTION 0x0002 + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@ @@ @@@@ @@@@@ @@ @@ @@ @@ @@ @@@@@ @@ @@ +// @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@@@@@@ @@@@@@ @@@@@ @@@@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +class ImplMarkingOverlay; + +class SVX_DLLPUBLIC SdrMarkView : public SdrSnapView +{ + friend class SdrPageView; + + // #114409#-3 Migrate selections + ImplMarkingOverlay* mpMarkObjOverlay; + ImplMarkingOverlay* mpMarkPointsOverlay; + ImplMarkingOverlay* mpMarkGluePointsOverlay; + +protected: + SdrObject* pMarkedObj; // Wenn nur ein Objekt markiert ist. + SdrPageView* pMarkedPV; // Wenn alle markierten Objekt auf derselben PageView liegen. + + Point aRef1; // Persistent - Drehmittelpunkt/Spiegelachse + Point aRef2; // Persistent + Point aLastCrookCenter; // Persistent + SdrHdlList aHdl; + sdr::ViewSelection* mpSdrViewSelection; + + Rectangle aMarkedObjRect; + Rectangle aMarkedPointsRect; + Rectangle aMarkedGluePointsRect; + + USHORT nFrameHandlesLimit; + ULONG mnInsPointNum; // Nummer des InsPoint + ULONG nMarkableObjCount; + + SdrDragMode eDragMode; // Persistent + SdrViewEditMode eEditMode; // Persistent + SdrViewEditMode eEditMode0; // Persistent + + //HMHunsigned bHdlShown : 1; + unsigned bRefHdlShownOnly : 1; // Spiegelachse waerend Dragging (ni) + unsigned bDesignMode : 1; // DesignMode fuer SdrUnoObj + unsigned bForceFrameHandles : 1; // Persistent - FrameDrag auch bei Einzelobjekten + unsigned bPlusHdlAlways : 1; // Persistent + unsigned bMarkHdlWhenTextEdit : 1; // Persistent, default=FALSE + unsigned bInsPolyPoint : 1; // z.Zt InsPolyPointDragging + unsigned bMarkedObjRectDirty : 1; + unsigned bMrkPntDirty : 1; + unsigned bMarkedPointsRectsDirty : 1; + unsigned bMarkableObjCountDirty : 1; + + // flag to completely disable handles at the view + unsigned mbMarkHandlesHidden : 1; + +private: + SVX_DLLPRIVATE void ImpClearVars(); + SVX_DLLPRIVATE void ImpSetPointsRects() const; + void UndirtyMrkPnt() const; + +protected: + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + virtual void ModelHasChanged(); // Wird von der PaintView gerufen + virtual void SetMarkHandles(); // aHdl (Liste der Handles) fuellen + virtual void SetMarkRects(); // Rects an den PageViews + virtual void CheckMarked(); // MarkList nach Del und Lock Layer durchsuchen... + virtual void AddDragModeHdl(SdrDragMode eMode); + + // add custom handles (used by other apps, e.g. AnchorPos) + virtual void AddCustomHdl(); + + void ForceRefToMarked(); + void ForceUndirtyMrkPnt() const { if (bMrkPntDirty) UndirtyMrkPnt(); } + + //HMHvoid ImpShowMarkHdl(bool bNoRefHdl); + virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const; + virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObjList* pOL, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const; + BOOL ImpIsFrameHandles() const; + void ImpTakeDescriptionStr(USHORT nStrCacheID, String& rStr, USHORT nVal=0, USHORT nOpt=0) const; + + // Macht aus einer Winkelangabe in 1/100deg einen String inkl. Grad-Zeichen + BOOL ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, BOOL bUnmark); + virtual BOOL MarkPoints(const Rectangle* pRect, BOOL bUnmark); + BOOL MarkGluePoints(const Rectangle* pRect, BOOL bUnmark); + + void SetMoveOutside(BOOL bOn); + BOOL IsMoveOutside() const; + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrMarkView(SdrModel* pModel1, OutputDevice* pOut = 0L); + virtual ~SdrMarkView(); + +public: + virtual BOOL IsAction() const; + virtual void MovAction(const Point& rPnt); + virtual void EndAction(); + virtual void BckAction(); + virtual void BrkAction(); + virtual void TakeActionRect(Rectangle& rRect) const; + + virtual void ClearPageView(); + virtual void HideSdrPage(); + virtual BOOL IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const; + + // Liefert TRUE wenn Objekte, Punkte oder Klebepunkte durch Rahmenaufziehen + // selektiert werden (solange wie der Rahmen aufgezogen wird). + sal_Bool IsMarking() const { return IsMarkObj() || IsMarkPoints() || IsMarkGluePoints(); } + + // Objekte durch Aufziehen eines Selektionsrahmens markieren + sal_Bool BegMarkObj(const Point& rPnt, sal_Bool bUnmark = sal_False); + void MovMarkObj(const Point& rPnt); + sal_Bool EndMarkObj(); + void BrkMarkObj(); + sal_Bool IsMarkObj() const { return (0L != mpMarkObjOverlay); } + + // DragModes: SDRDRAG_CREATE,SDRDRAG_MOVE,SDRDRAG_RESIZE,SDRDRAG_ROTATE,SDRDRAG_MIRROR,SDRDRAG_SHEAR,SDRDRAG_CROOK + // Move==Resize + // Das Interface wird hier evtl noch geaendert wg. Ortho-Drag + void SetDragMode(SdrDragMode eMode); + SdrDragMode GetDragMode() const { return eDragMode; } + BOOL ChkDragMode(SdrDragMode eMode) const; + void SetFrameHandles(BOOL bOn); + BOOL IsFrameHandles() const { return bForceFrameHandles; } + + // Limit, ab wann implizit auf FrameHandles umgeschaltet wird. default=50. + void SetFrameHandlesLimit(USHORT nAnz) { nFrameHandlesLimit=nAnz; } + USHORT GetFrameHandlesLimit() const { return nFrameHandlesLimit; } + + void SetEditMode(SdrViewEditMode eMode); + SdrViewEditMode GetEditMode() const { return eEditMode; } + + void SetEditMode(BOOL bOn=TRUE) { SetEditMode(bOn?SDREDITMODE_EDIT:SDREDITMODE_CREATE); } + BOOL IsEditMode() const { return eEditMode==SDREDITMODE_EDIT; } + void SetCreateMode(BOOL bOn=TRUE) { SetEditMode(bOn?SDREDITMODE_CREATE:SDREDITMODE_EDIT); } + BOOL IsCreateMode() const { return eEditMode==SDREDITMODE_CREATE; } + void SetGluePointEditMode(BOOL bOn=TRUE) { SetEditMode(bOn?SDREDITMODE_GLUEPOINTEDIT:eEditMode0); } + BOOL IsGluePointEditMode() const { return eEditMode==SDREDITMODE_GLUEPOINTEDIT;; } + + void SetDesignMode(BOOL bOn=TRUE); + BOOL IsDesignMode() const { return bDesignMode; } + + void SetFrameDragSingles(BOOL bOn=TRUE) { SetFrameHandles(bOn); } + BOOL IsFrameDragSingles() const { return IsFrameHandles(); } + + // Feststellen, ob und wo ein Objekt bzw. ob ein Referenzpunkt + // (Rotationsmittelpunkt,Spiegelachse) getroffen wird (SW special). + SdrHitKind PickSomething(const Point& rPnt, short nTol=-2) const; + BOOL HasMarkableObj() const; + ULONG GetMarkableObjCount() const; + //HMHvoid ShowMarkHdl(bool bNoRefHdl = false); + //HMHvoid HideMarkHdl(bool bNoRefHdl = false); + //HMHBOOL IsMarkHdlShown() const { return bHdlShown; } + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// migrate selections + +protected: + // all available changing methods + SdrMarkList& GetMarkedObjectListWriteAccess() { return mpSdrViewSelection->GetMarkedObjectListWriteAccess(); } + void SetEdgesOfMarkedNodesDirty() { mpSdrViewSelection->SetEdgesOfMarkedNodesDirty(); } + +public: + // all available const methods for read access to selection + const SdrMarkList& GetMarkedObjectList() const { return mpSdrViewSelection->GetMarkedObjectList(); } + ULONG TryToFindMarkedObject(const SdrObject* pObj) const { return GetMarkedObjectList().FindObject(pObj); } + SdrPageView* GetSdrPageViewOfMarkedByIndex(ULONG nNum) const { return GetMarkedObjectList().GetMark(nNum)->GetPageView(); } + SdrMark* GetSdrMarkByIndex(ULONG nNum) const { return GetMarkedObjectList().GetMark(nNum); } + SdrObject* GetMarkedObjectByIndex(ULONG nNum) const { return (GetMarkedObjectList().GetMark(nNum))->GetMarkedSdrObj(); } + ULONG GetMarkedObjectCount() const { return GetMarkedObjectList().GetMarkCount(); } + void SortMarkedObjects() const { GetMarkedObjectList().ForceSort(); } + sal_Bool AreObjectsMarked() const { return (0L != GetMarkedObjectList().GetMarkCount()); } + String GetDescriptionOfMarkedObjects() const { return GetMarkedObjectList().GetMarkDescription(); } + String GetDescriptionOfMarkedPoints() const { return GetMarkedObjectList().GetPointMarkDescription(); } + String GetDescriptionOfMarkedGluePoints() const { return GetMarkedObjectList().GetGluePointMarkDescription(); } + sal_Bool GetBoundRectFromMarkedObjects(SdrPageView* pPageView, Rectangle& rRect) const { return GetMarkedObjectList().TakeBoundRect(pPageView, rRect); } + sal_Bool GetSnapRectFromMarkedObjects(SdrPageView* pPageView, Rectangle& rRect) const { return GetMarkedObjectList().TakeSnapRect(pPageView, rRect); } + + // Eine Liste aller an markierten Knoten gebundenen Kanten holen, + // die selbst jedoch nicht markiert sind. + const SdrMarkList& GetEdgesOfMarkedNodes() const { return mpSdrViewSelection->GetEdgesOfMarkedNodes(); } + const SdrMarkList& GetMarkedEdgesOfMarkedNodes() const { return mpSdrViewSelection->GetMarkedEdgesOfMarkedNodes(); } + const List& GetTransitiveHullOfMarkedObjects() const { return mpSdrViewSelection->GetAllMarkedObjects(); } + +//////////////////////////////////////////////////////////////////////////////////////////////////// + + // mechanism to complete disable handles at the view. Handles will be hidden and deleted + // when set, no new ones created, no interaction allowed. Handles will be recreated and shown + // when reset. Default is false. + void hideMarkHandles(); + void showMarkHandles(); + bool areMarkHandlesHidden() const { return mbMarkHandlesHidden; } + + BOOL IsMarkedHit(const Point& rPnt, short nTol=-2) const { return IsMarkedObjHit(rPnt,nTol); } + BOOL IsMarkedObjHit(const Point& rPnt, short nTol=-2) const; + + // Pick: Unterstuetzte Optionen fuer nOptions sind SEARCH_NEXT, SEARCH_BACKWARD (ni) + SdrHdl* PickHandle(const Point& rPnt, ULONG nOptions=0, SdrHdl* pHdl0=NULL) const; + + // Pick: Unterstuetzte Optionen fuer nOptions sind: + // SDRSEARCH_DEEP SDRSEARCH_ALSOONMASTER SDRSEARCH_TESTMARKABLE SDRSEARCH_TESTTEXTEDIT + // SDRSEARCH_WITHTEXT SDRSEARCH_TESTTEXTAREA SDRSEARCH_BACKWARD SDRSEARCH_MARKED + // SDRSEARCH_WHOLEPAGE + virtual BOOL PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions, SdrObject** ppRootObj, ULONG* pnMarkNum=NULL, USHORT* pnPassNum=NULL) const; + virtual BOOL PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions=0) const; + // BOOL PickObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions=0) const { return PickObj(rPnt,nHitTolLog,rpObj,rpPV,nOptions); } + BOOL MarkObj(const Point& rPnt, short nTol=-2, BOOL bToggle=FALSE, BOOL bDeep=FALSE); + + // Pick: Unterstuetzte Optionen fuer nOptions sind SDRSEARCH_PASS2BOUND und SDRSEARCH_PASS3NEAREST + BOOL PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG* pnMarkNum=NULL, ULONG nOptions=0) const; + + // Sucht sich das Oberste der markierten Objekte (O1) und sucht von dort + // aus in Richtung nach Unten dann das erste nichtmarkierte Objekt (O2). + // Bei Erfolg wird die Markierung von O1 entfernt, an O2 gesetzt und TRUE + // returniert. Mit dem Parameter bPrev=TRUE geht die Suche genau in die + // andere Richtung. + BOOL MarkNextObj(BOOL bPrev=FALSE); + + // Sucht sich das Oberste der markierten Objekte (O1) das von rPnt/nTol + // getroffen wird und sucht von dort aus in Richtung nach Unten dann das + // erste nichtmarkierte Objekt (O2). Bei Erfolg wird die Markierung von + // O1 entfernt, an O2 gesetzt und TRUE returniert. + // Mit dem Parameter bPrev=TRUE geht die Suche genau in die andere Richtung. + BOOL MarkNextObj(const Point& rPnt, short nTol=-2, BOOL bPrev=FALSE); + + // Alle Objekte innerhalb eines rechteckigen Bereichs markieren + // Markiert werden nur Objekte, die vollstaendig eingeschlossen sind. + BOOL MarkObj(const Rectangle& rRect, BOOL bUnmark=FALSE); + void MarkObj(SdrObject* pObj, SdrPageView* pPV, BOOL bUnmark=FALSE, BOOL bImpNoSetMarkHdl=FALSE); + void MarkAllObj(SdrPageView* pPV=NULL); // pPage=NULL => alle angezeigten Seiten + void UnmarkAllObj(SdrPageView* pPV=NULL); // pPage=NULL => alle angezeigten Seiten + + // Diese Funktion kostet etwas Zeit, da die MarkList durchsucht werden muss. + BOOL IsObjMarked(SdrObject* pObj) const; + // void MarkAll(SdrPageView* pPV=NULL) { MarkAllObj(pPV); } -> replace with inline + void UnMarkAll(SdrPageView* pPV=NULL) { UnmarkAllObj(pPV); } + + // Groesse der Markierungs-Handles abfragen/setzen. Angabe in Pixel. + // Der Wert ist als Kantenlaenge zu betrachten. Gerade Werte werden + // auf Ungerade aufgerundet: 3->3, 4->5, 5->5, 6->7, 7->7, ... + // Defaultwert ist 7, Mindestwert 3 Pixel. + USHORT GetMarkHdlSizePixel() const; + void SetMarkHdlSizePixel(USHORT nSiz); + + // Die Groesse der Markierungs-Handles wird ueber die jeweilige Aufloesung + // und die Groesse des Bereichs der markierten Objekte so angepasst, dass + // sie sich bei einer Frame-Selektion moeglichst nicht ueberschneiden. + // Dazu muessen die Handles ggf. verkleinert dargestellt werden. Mit der + // MinMarkHdlSize kann man hierfuer eine Mindestgroesse angeben. + // Defaultwert ist 3, Mindestwert 3 Pixel. + BOOL IsSolidMarkHdl() const { return aHdl.IsFineHdl(); } + void SetSolidMarkHdl(BOOL bOn); + + virtual BOOL HasMarkablePoints() const; + virtual ULONG GetMarkablePointCount() const; + virtual BOOL HasMarkedPoints() const; + virtual ULONG GetMarkedPointCount() const; + + // Nicht alle Punkte lassen sich markieren: + virtual BOOL IsPointMarkable(const SdrHdl& rHdl) const; + virtual BOOL MarkPoint(SdrHdl& rHdl, BOOL bUnmark=FALSE); + + /** should only be used from outside svx for special ui elements */ + BOOL MarkPointHelper(SdrHdl* pHdl, SdrMark* pMark, BOOL bUnmark); + + // alle Punkte innerhalb dieses Rechtecks markieren (Viewkoordinaten) + BOOL MarkPoints(const Rectangle& rRect, BOOL bUnmark=FALSE) { return MarkPoints(&rRect,bUnmark); } + BOOL UnmarkPoint(SdrHdl& rHdl) { return MarkPoint(rHdl,TRUE); } + BOOL UnMarkPoint(SdrHdl& rHdl) { return MarkPoint(rHdl,TRUE); } + BOOL IsPointMarked(const SdrHdl& rHdl) const { ForceUndirtyMrkPnt(); return &rHdl!=NULL && rHdl.IsSelected(); } + BOOL MarkAllPoints() { return MarkPoints(NULL,FALSE); } + BOOL UnmarkAllPoints() { return MarkPoints(NULL,TRUE); } + BOOL UnMarkAllPoints() { return MarkPoints(NULL,TRUE); } + + // Sucht sich den ersten markierten Punkt (P1) und sucht von dort + // aus in den ersten nichtmarkierte Punkt (P2). + // Bei Erfolg wird die Markierung von P1 entfernt, an P2 gesetzt und TRUE + // returniert. Mit dem Parameter bPrev=TRUE geht die Suche genau in die + // andere Richtung. + BOOL MarkNextPoint(BOOL bPrev=FALSE); + + // Sucht sich den ersten markierten Punkt (P1) das von rPnt + // getroffen wird und sucht von dort aus den + // ersten nichtmarkierten Punkt (P2). Bei Erfolg wird die Markierung von + // P1 entfernt, an P2 gesetzt und TRUE returniert. + // Mit dem Parameter bPrev=TRUE geht die Suche genau in die andere Richtung. + BOOL MarkNextPoint(const Point& rPnt, BOOL bPrev=FALSE); + + // Die Nummer des passenden Handles raussuchen. Nicht gefunden + // liefert CONTAINER_ENTRY_NOTFOUND. + ULONG GetHdlNum(SdrHdl* pHdl) const { return aHdl.GetHdlNum(pHdl); } + SdrHdl* GetHdl(ULONG nHdlNum) const { return aHdl.GetHdl(nHdlNum); } + const SdrHdlList& GetHdlList() const { return aHdl; } + + // Selektionsrahmen fuer Punktmarkierung aufziehen. + // Wird nur gestartet, wenn HasMarkablePoints() TRUE liefert. + // BOOL BegMarkPoints(const Point& rPnt, OutputDevice* pOut); + sal_Bool BegMarkPoints(const Point& rPnt, sal_Bool bUnmark = sal_False); + void MovMarkPoints(const Point& rPnt); + sal_Bool EndMarkPoints(); + void BrkMarkPoints(); + sal_Bool IsMarkPoints() const { return (0L != mpMarkPointsOverlay); } + + // Zusatzhandles dauerhaft sichtbar schalten + void SetPlusHandlesAlwaysVisible(BOOL bOn); + BOOL IsPlusHandlesAlwaysVisible() const { return bPlusHdlAlways; } + + // Handles sichrbar waerend TextEdit (in doppelter Groesse)? + // Persistent, default=FALSE + void SetMarkHdlWhenTextEdit(BOOL bOn) { bMarkHdlWhenTextEdit=bOn; } + BOOL IsMarkHdlWhenTextEdit() const { return bMarkHdlWhenTextEdit; } + + BOOL HasMarkableGluePoints() const; + ULONG GetMarkableGluePointCount() const; + BOOL HasMarkedGluePoints() const; + ULONG GetMarkedGluePointCount() const; + + // Ein Klebepunkt wird eindeutig identifiziert durch das SdrObject + // (dem er zugehoert) sowie einem USHORT nId (da jedes SdrObject je + // mehrere Klebepunkte haben kann. Hier an der View kommt zudem noch + // eine SdrPageView, die stets korrekt gesetzt sein sollte. + // Alternativ kann ein Klebepunkt durch ein SdrHdl bezeichnet werden. + // Die SdrHdl-Instanz beinhaltet dann aller erforderlichen Informationen. + // Der Klebepunkt ist in diesem Fall dann zwangslaeufig markiert (nur auf + // markierten Klebepunkten sitzen Anfasser). + // Achtung: Bei jeder Aenderung des Klebepunktmarkierungsstatus wird die + // Handleliste erneut berechnet. Alle vorher gemerkten SdrHdl* sind + // damit ungueltig, ebenso die Punkt-Id's! + // Pick: Unterstuetzte Optionen fuer nOptions sind SEARCH_NEXT, SEARCH_BACKWARD + BOOL PickGluePoint(const Point& rPnt, SdrObject*& rpObj, USHORT& rnId, SdrPageView*& rpPV, ULONG nOptions=0) const; + BOOL MarkGluePoint(const SdrObject* pObj, USHORT nId, const SdrPageView* pPV, BOOL bUnmark=FALSE); + BOOL UnmarkGluePoint(const SdrObject* pObj, USHORT nId, const SdrPageView* pPV) { return MarkGluePoint(pObj,nId,pPV,TRUE); } + BOOL IsGluePointMarked(const SdrObject* pObj, USHORT nId) const; + BOOL UnmarkGluePoint(const SdrHdl& rHdl); + + // Hdl eines markierten GluePoints holen. Nicht markierte + // GluePoints haben keine Handles + SdrHdl* GetGluePointHdl(const SdrObject* pObj, USHORT nId) const; + BOOL IsGluePoint(const SdrHdl& rHdl) const { return &rHdl!=NULL && rHdl.GetKind()==HDL_GLUE; } + + // alle Punkte innerhalb dieses Rechtecks markieren (Viewkoordinaten) + BOOL MarkGluePoints(const Rectangle& rRect) { return MarkGluePoints(&rRect,FALSE); } + BOOL UnmarkGluePoints(const Rectangle& rRect) { return MarkGluePoints(&rRect,TRUE); } + BOOL MarkAllGluePoints() { return MarkGluePoints(NULL,FALSE); } + BOOL UnmarkAllGluePoints() { return MarkGluePoints(NULL,TRUE); } + + // Sucht sich den ersten markierten Klebepunkt (P1) und sucht von dort + // aus in den ersten nichtmarkierte Klebepunkt (P2). + // Bei Erfolg wird die Markierung von P1 entfernt, an P2 gesetzt und TRUE + // returniert. Mit dem Parameter bPrev=TRUE geht die Suche genau in die + // andere Richtung. + BOOL MarkNextGluePoint(BOOL bPrev=FALSE); + + // Sucht sich den ersten markierten Klebepunkt (P1) das von rPnt + // getroffen wird und sucht von dort aus den + // ersten nichtmarkierten Klebepunkt (P2). Bei Erfolg wird die Markierung + // von P1 entfernt, an P2 gesetzt und TRUE returniert. + // Mit dem Parameter bPrev=TRUE geht die Suche genau in die andere Richtung. + BOOL MarkNextGluePoint(const Point& rPnt, BOOL bPrev=FALSE); + + // Selektionsrahmen fuer Klebepunktmarkierung aufziehen. + // Wird nur gestartet, wenn HasMarkableGluePoints() TRUE liefert. + // Der GlueEditMode TRUE wird nicht abgefragt. + // BOOL BegMarkGluePoints(const Point& rPnt, OutputDevice* pOut); + sal_Bool BegMarkGluePoints(const Point& rPnt, sal_Bool bUnmark = sal_False); + void MovMarkGluePoints(const Point& rPnt); + sal_Bool EndMarkGluePoints(); + void BrkMarkGluePoints(); + sal_Bool IsMarkGluePoints() const { return (0L != mpMarkGluePointsOverlay); } + + // bRestraintPaint=FALSE bewirkt, dass die Handles nicht sofort wieder gemalt werden. + // AdjustMarkHdl wird eh' nur gerufen, wenn was geaendert wurde; was idR ein Invalidate + // zur Folge hat. Am Ende von des Redraw werden die Handles automatisch gezeichnet. + // Der Zweck ist, unnoetiges Flackern zu vermeiden. -> Funkt noch nich, deshalb TRUE! + void AdjustMarkHdl(); //HMHBOOL bRestraintPaint=TRUE); + + const Rectangle& GetMarkedObjRect() const; // SnapRects der Objekte, ohne Strichstaerke + Rectangle GetMarkedObjBoundRect() const; // inkl. Strichstaerke, ueberstehende Fetzen, ... + const Rectangle& GetMarkedPointsRect() const; // Umschliessendes Rechteck aller markierten Punkte + const Rectangle& GetMarkedGluePointsRect() const; // Umschliessendes Rechteck aller markierten Klebepunkte + const Rectangle& GetAllMarkedRect() const { return GetMarkedObjRect(); } + Rectangle GetAllMarkedBoundRect() const { return GetMarkedObjBoundRect(); } + const Rectangle& GetAllMarkedPointsRect() const { return GetMarkedPointsRect(); } + + // Wird immer dann gerufen, wenn sich die Liste der markierten Objekte + // moeglicherweise geaendert hat. Wer ueberlaed muss unbedingt auch die + // Methode der Basisklasse rufen! + virtual void MarkListHasChanged(); + + // Betreten (Editieren) einer evtl markierten Objektgruppe. Sind mehrere + // Objektgruppen markiert, so wird die Oberste genommen. Anschliessend + // liegen alle Memberobjekte der Gruppe im direkten Zugriff. Alle anderen + // Objekte koennen waerendessen nicht bearbeitet werden (bis zum naechsten + // LeaveGroup()). Bei einer seitenuebergreifenden Markierung wird jede Page + // separat abgearbeitet. Die Methode liefert TRUE, wenn wenigstens eine + // Gruppe betreten wurde. + BOOL EnterMarkedGroup(); + + // Den Mittelpunkt des letzten Crook-Dragging abholen. Den kann man + // bei einem anschliessenden Rotate sinnvoll als Drehmittelpunkt setzen. + const Point& GetLastCrookCenter() const { return aLastCrookCenter; } + + // Wird automatisch von der DragView beim beenden eines Crook-Drag gesetzt. + void SetLastCrookCenter(const Point& rPt) { aLastCrookCenter=rPt; } + + // Rotationsmittelpunkt bzw. Startpunkt der Spiegelachse + const Point& GetRef1() const { return aRef1; } + void SetRef1(const Point& rPt); + + // Endpunkt der Spiegelachse + const Point& GetRef2() const { return aRef1; } + void SetRef2(const Point& rPt); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// - Hit-Toleranzen: +// Die muessen natuerlich immer in logischen Koordinaten angegeben werden. Also +// immer brav den gewuenschten Pixelwert mit PixelToLogic in Logischen umrechnen. +// Angenommen ein Wert 100 (logisch) +// - Bei einer waagerechten Haarlinie (Objekt mit Hoehe 0) waere dann +/-100, +// also ein vertikaler Bereich von 200 logischen Einheiten sensitiv. +// - Bei Polygonen wird ein Rect mit der Groesse (200,200) generiert und ein +// Touch-Test zwischen Poly und diesem Rect durchgefuehrt. +// - Eine Sonderbehandlung erfahren Objekte, die bei SdrObject::HasEdit()==TRUE +// liefern (z.B. Textrahmen). Hierbei wird ein weiterer sensitiver Bereich mit +// einer Breite von 2*Tol (in diesem Beispiel also 200 Einheiten) um das Objekt +// herumgelegt. Waerend ein Hit direkt ins Objekt die Edit-Methode ruft, +// ermoeglicht ein Hit in den umliegenden sensitiven Bereich ein Dragging. +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDMRKV_HXX + diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx new file mode 100644 index 000000000000..f65afc0b4efe --- /dev/null +++ b/svx/inc/svx/svdoashp.hxx @@ -0,0 +1,267 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdoashp.hxx,v $ + * $Revision: 1.6.90.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOASHP_HXX +#define _SVDOASHP_HXX + +#include <svx/svdobj.hxx> +#include <svx/svdotext.hxx> +#include <svx/svdhdl.hxx> +#include <vector> +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/drawing/XCustomShapeEngine.hpp> +#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SdrObjList; +class SdrObjListIter; +class SfxItemSet; + +namespace sdr +{ + namespace properties + { + class CustomShapeProperties; + } // end of namespace properties +} // end of namespace sdr + +class SdrAShapeObjGeoData : public SdrTextObjGeoData +{ + public: + + sal_Bool bMirroredX; + sal_Bool bMirroredY; + double fObjectRotation; + + com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > + aAdjustmentSeq; +}; + +#define CUSTOMSHAPE_HANDLE_RESIZE_FIXED 1 +#define CUSTOMSHAPE_HANDLE_CREATE_FIXED 2 +#define CUSTOMSHAPE_HANDLE_RESIZE_ABSOLUTE_X 4 +#define CUSTOMSHAPE_HANDLE_RESIZE_ABSOLUTE_Y 8 +#define CUSTOMSHAPE_HANDLE_MOVE_SHAPE 16 +#define CUSTOMSHAPE_HANDLE_ORTHO4 32 + +struct SdrCustomShapeInteraction +{ + com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeHandle > xInteraction; + com::sun::star::awt::Point aPosition; + sal_Int32 nMode; +}; + +//************************************************************ +// SdrObjCustomShape +//************************************************************ + +class SVX_DLLPUBLIC SdrObjCustomShape : public SdrTextObj +{ + // fObjectRotation is containing the object rotation in degrees. + double fObjectRotation; + +private: + // BaseProperties section + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + // to allow sdr::properties::CustomShapeProperties access + friend class sdr::properties::CustomShapeProperties; + + com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mXRenderedCustomShape; + + // #i37011# render geometry shadow + SdrObject* mpLastShadowGeometry; + + static com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeEngine > GetCustomShapeEngine( const SdrObjCustomShape* pCustomShape ); + +// SVX_DLLPRIVATE com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeHandle > > +// SdrObjCustomShape::GetInteraction( const SdrObjCustomShape* pCustomShape ) const; +// #i47293# +// SVX_DLLPRIVATE std::vector< com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeHandle > > GetFixedInteractionHandle() const; + + SVX_DLLPRIVATE std::vector< SdrCustomShapeInteraction > GetInteractionHandles( const SdrObjCustomShape* pCustomShape ) const; + + SVX_DLLPRIVATE void DragCreateObject( SdrDragStat& rDrag ); + + SVX_DLLPRIVATE void DragResizeCustomShape( const Rectangle& rNewRect, SdrObjCustomShape* pObj ) const; + SVX_DLLPRIVATE void DragMoveCustomShapeHdl( const Point aDestination, const sal_uInt16 nCustomShapeHdlNum, SdrObjCustomShape* pObj ) const; + + // #i37011# centralize throw-away of render geometry + void InvalidateRenderGeometry(); + + // #i38892# + void ImpCheckCustomGluePointsAreAdded(); + + // returns the new text rect that corresponds to the current logic rect, the return value can be empty if nothing changed. + Rectangle ImpCalculateTextFrame( const FASTBOOL bHgt, const FASTBOOL bWdt ); + +public: + // #i37011# + const SdrObject* GetSdrObjectFromCustomShape() const; + const SdrObject* GetSdrObjectShadowFromCustomShape() const; + sal_Bool GetTextBounds( Rectangle& rTextBound ) const; + sal_Bool IsTextPath() const; + static basegfx::B2DPolyPolygon GetLineGeometry( const SdrObjCustomShape* pCustomShape, const sal_Bool bBezierAllowed ); + +protected: + + String aName; + +public: + + sal_Bool UseNoFillStyle() const; + + sal_Bool IsMirroredX() const; + sal_Bool IsMirroredY() const; + void SetMirroredX( const sal_Bool bMirroredX ); + void SetMirroredY( const sal_Bool bMirroredY ); + + double GetObjectRotation() const; + double GetExtraTextRotation() const; + + TYPEINFO(); + SdrObjCustomShape(); + virtual ~SdrObjCustomShape(); + + /* is merging default attributes from type-shype into the SdrCustomShapeGeometryItem. If pType + is NULL then the type is being taken from the "Type" property of the SdrCustomShapeGeometryItem. + MergeDefaultAttributes is called when creating CustomShapes via UI and after importing */ + void MergeDefaultAttributes( const rtl::OUString* pType = NULL ); + + /* the method is checking if the geometry data is unchanged/default, in this case the data might not be stored */ + enum DefaultType + { + DEFAULT_PATH, + DEFAULT_VIEWBOX, + DEFAULT_SEGMENTS, + DEFAULT_GLUEPOINTS, + DEFAULT_STRETCHX, + DEFAULT_STRETCHY, + DEFAULT_EQUATIONS, + DEFAULT_HANDLES, + DEFAULT_TEXTFRAMES + }; + sal_Bool IsDefaultGeometry( const DefaultType eDefaultType ) const; + + virtual UINT16 GetObjIdentifier() const; + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + + virtual void SetModel(SdrModel* pNewModel);
+ + virtual void RecalcSnapRect(); + + virtual const Rectangle& GetSnapRect() const; + virtual const Rectangle& GetCurrentBoundRect() const; + virtual const Rectangle& GetLogicRect() const; + + virtual void Move(const Size& rSiz); + virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + virtual void SetSnapRect(const Rectangle& rRect); + virtual void SetLogicRect(const Rectangle& rRect); + + virtual void NbcMove(const Size& rSiz); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + virtual void NbcMirror(const Point& rRef1, const Point& rRef2); + virtual void NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual void NbcSetLogicRect(const Rectangle& rRect); + + virtual SdrGluePoint GetVertexGluePoint(USHORT nNum) const; + + virtual void NbcSetStyleSheet( SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr ); + + // special drag methods + virtual bool hasSpecialDrag() const; + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + + virtual FASTBOOL BegCreate( SdrDragStat& rStat ); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); // #i37448# + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + + virtual FASTBOOL AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt=TRUE, FASTBOOL bWdt=TRUE) const; + virtual FASTBOOL NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt=TRUE, FASTBOOL bWdt=TRUE); + virtual FASTBOOL AdjustTextFrameWidthAndHeight(FASTBOOL bHgt=TRUE, FASTBOOL bWdt=TRUE); + virtual FASTBOOL IsAutoGrowHeight() const; + virtual FASTBOOL IsAutoGrowWidth() const; + virtual void SetVerticalWriting( sal_Bool bVertical ); + virtual sal_Bool BegTextEdit( SdrOutliner& rOutl ); + virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const; + virtual void EndTextEdit( SdrOutliner& rOutl ); + virtual void TakeTextAnchorRect( Rectangle& rAnchorRect ) const; + virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText=FALSE, + Rectangle* pAnchorRect=NULL, BOOL bLineWidth=TRUE ) const; + virtual void operator=(const SdrObject& rObj); + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + virtual basegfx::B2DPolyPolygon TakeCreatePoly( const SdrDragStat& rDrag) const; + + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + virtual basegfx::B2DPolyPolygon TakeContour() const; + + virtual void NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject); + + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + virtual void SetPage( SdrPage* pNewPage ); + + virtual SdrObjGeoData *NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData &rGeo) const; + virtual void RestGeoData(const SdrObjGeoData &rGeo); + + // need to take fObjectRotation instead of aGeo.nWink, replace it temporary + virtual sal_Bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const; + virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon); + + virtual const SdrGluePointList* GetGluePointList() const; + //virtual SdrGluePointList* GetGluePointList(); + virtual SdrGluePointList* ForceGluePointList(); + + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl( sal_uInt32 nHdlNum ) const; + + // #i33136# + static bool doConstructOrthogonal(const ::rtl::OUString& rName); + + using SdrTextObj::NbcSetOutlinerParaObject; +}; + +#endif //_SVDOASHP_HXX + diff --git a/svx/inc/svx/svdoattr.hxx b/svx/inc/svx/svdoattr.hxx new file mode 100644 index 000000000000..3bcce26ea45e --- /dev/null +++ b/svx/inc/svx/svdoattr.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdoattr.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOATTR_HXX +#define _SVDOATTR_HXX + +#include <svx/xfillit0.hxx> +#include <svx/xflasit.hxx> +#include <svx/xlineit0.hxx> +#include <svx/xlnasit.hxx> +#include <svx/svdobj.hxx> +#include <svx/svdattr.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SfxPoolItem; +class SfxSetItem; +class SdrOutliner; +class SfxItemSet; +class SfxItemPool; + +//************************************************************ +// SdrAttrObj +//************************************************************ + +class SVX_DLLPUBLIC SdrAttrObj : public SdrObject +{ + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + friend class SdrOutliner; + +protected: + Rectangle maSnapRect; + +protected: + // Strichstaerke ermitteln. Keine Linie -> 0. + sal_Int32 ImpGetLineWdt() const; + + // Zuhoeren, ob sich ein StyleSheet aendert + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + + SdrAttrObj(); + virtual ~SdrAttrObj(); + +public: + TYPEINFO(); + + // Feststellen, ob bFilledObj && Fuellung!=FillNone + BOOL HasFill() const; + + // Feststellen, ob Linie!=LineNone + BOOL HasLine() const; + + virtual const Rectangle& GetSnapRect() const; + + virtual void SetModel(SdrModel* pNewModel); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDOATTR_HXX + diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx new file mode 100644 index 000000000000..cc21e645e4d2 --- /dev/null +++ b/svx/inc/svx/svdobj.hxx @@ -0,0 +1,1181 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdobj.hxx,v $ + * $Revision: 1.9.16.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOBJ_HXX +#define _SVDOBJ_HXX + +#include <memory> +#include <cppuhelper/weakref.hxx> +#include <vcl/mapmod.hxx> +#include <tools/weakbase.hxx> +#include <svl/lstner.hxx> +#include <vcl/timer.hxx> +#include <svx/svdsob.hxx> +#include <svx/svdtypes.hxx> // fuer SdrLayerID +#include <svx/svdglue.hxx> // Klebepunkte +#include <svx/xdash.hxx> +#include <svx/xpoly.hxx> +#include <svx/xenum.hxx> +#include <vcl/bitmapex.hxx> +#include <svx/sdrobjectuser.hxx> +#include "svx/svxdllapi.h" +#include "svx/shapeproperty.hxx" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SfxBroadcaster; +class Pointer; +class AutoTimer; +class OutlinerParaObject; +class SdrOutliner; +class SdrDragStat; +class SdrHdl; +class SdrHdlList; +class SdrItemPool; +class SdrModel; +class SdrObjList; +class SdrObject; +class SdrPage; +class SdrPageView; +class SdrView; +class SfxItemSet; +class SfxSetItem; +class SfxStyleSheet; +class SfxUndoAction; +class XFillAttrSetItem; +class XLineAttrSetItem; +class SfxItemPool; +class PolyPolygon; +class SfxPoolItem; +class SdrVirtObj; +class SdrDragView; + +namespace sdr +{ + namespace properties + { + class BaseProperties; + } // end of namespace properties +} // end of namespace sdr + +// #110094# +namespace sdr +{ + namespace contact + { + class ViewContact; + } // end of namespace contact +} // end of namespace sdr + +namespace svx +{ + class PropertyChangeNotifier; +} + +//************************************************************ +// Defines +//************************************************************ + +enum SdrObjKind {OBJ_NONE = 0, // Abstraktes Objekt (SdrObject) + OBJ_GRUP = 1, // Objektgruppe + OBJ_LINE = 2, // Strecke + OBJ_RECT = 3, // Rechteck ww. mit runden Ecken + OBJ_CIRC = 4, // Kreis, Ellipse + OBJ_SECT = 5, // Kreissektor + OBJ_CARC = 6, // Kreisbogen + OBJ_CCUT = 7, // Kreisabschnitt + OBJ_POLY = 8, // Polygon, PolyPolygon + OBJ_PLIN = 9, // PolyLine + OBJ_PATHLINE =10, // Offene Bezierkurve + OBJ_PATHFILL =11, // Geschlossene Bezierkurve + OBJ_FREELINE =12, // Offene Freihandlinie + OBJ_FREEFILL =13, // Geschlossene Freihandlinie + OBJ_SPLNLINE =14, // Natuerlicher kubischer Spline (ni) + OBJ_SPLNFILL =15, // Periodischer kubischer Spline (ni) + OBJ_TEXT =16, // Textobjekt + OBJ_TEXTEXT =17, // Texterweiterungsrahmen (ni) + OBJ_wegFITTEXT, // FitToSize-Text (alle Zeilen gleich) + OBJ_wegFITALLTEXT, // FitToSize-Text (Zeilenweise) (ni) + OBJ_TITLETEXT =20, // Titeltext. Spezial-Textobjekt fuer StarDraw + OBJ_OUTLINETEXT=21, // OutlineText. Spezial-Textobjekt fuer StarDraw + OBJ_GRAF =22, // Fremdgrafik - (StarView Graphic) + OBJ_OLE2 =23, // OLE-Objekt + OBJ_EDGE =24, // Verbindungsobjekt fuer Konnektoren + OBJ_CAPTION =25, // Legendenobjekt + OBJ_PATHPOLY =26, // Polygon/PolyPolygon dargestellt durch SdrPathObj + OBJ_PATHPLIN =27, // Polyline dargestellt durch SdrPathObj + OBJ_PAGE =28, // Objekt, das eine SdrPage darstellt + OBJ_MEASURE =29, // Bemassungsobjekt + OBJ_DUMMY =30, // Dummyobjekt zum speichern von Luecken (zur anschliessenden Wiederherstellung der Surrogate) + OBJ_FRAME =31, // staendig aktives OLE (PlugIn-Frame oder sowas) + OBJ_UNO =32, // Universal Network Object im SvDraw-Obj eingepackt + OBJ_CUSTOMSHAPE=33, // CustomShape + OBJ_MEDIA =34, // Media shape + OBJ_TABLE =35, // Table + OBJ_MAXI}; + +enum SdrUserCallType {SDRUSERCALL_MOVEONLY, // Nur verschoben, Groesse unveraendert + SDRUSERCALL_RESIZE, // Groesse und evtl. auch Pos veraendert + SDRUSERCALL_CHGATTR, // Attribute veraendert. Moeglicherweise neue Groesse wg. Linienbreite + SDRUSERCALL_DELETE, // Obj gibt es gleich nicht mehr. Schon keine Attr mehr. + SDRUSERCALL_COPY, // Zuweisungsoperator gerufen. Kann alles geaendert sein + SDRUSERCALL_INSERTED, // In eine Objektliste (z.B. Page) eingefuegt + SDRUSERCALL_REMOVED, // Aus der Objektliste entfernt + SDRUSERCALL_CHILD_MOVEONLY, // Ein Child einer Gruppe hat sich veraendert + SDRUSERCALL_CHILD_RESIZE, // Ein Child einer Gruppe hat sich veraendert + SDRUSERCALL_CHILD_CHGATTR, // Ein Child einer Gruppe hat sich veraendert + SDRUSERCALL_CHILD_DELETE, // Ein Child einer Gruppe hat sich veraendert + SDRUSERCALL_CHILD_COPY, // Ein Child einer Gruppe hat sich veraendert + SDRUSERCALL_CHILD_INSERTED, // Ein Child einer Gruppe hat sich veraendert + SDRUSERCALL_CHILD_REMOVED}; // Ein Child einer Gruppe hat sich veraendert + +/* nur voruebergehend, weil sonst MUSS-Aenderung */ +// #define nLayerID nLayerId + +//************************************************************ +// Hilfsklasse SdrObjUserCall +//************************************************************ + +class SVX_DLLPUBLIC SdrObjUserCall +{ +public: + TYPEINFO(); + virtual ~SdrObjUserCall(); + virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect); +}; + +//************************************************************ +// Hilfsklasse SdrObjMacroHitRec +//************************************************************ + +class SdrObjMacroHitRec +{ +public: + Point aPos; + Point aDownPos; + OutputDevice* pOut; + const SetOfByte* pVisiLayer; + const SdrPageView* pPageView; + USHORT nTol; + FASTBOOL bDown; + +public: + SdrObjMacroHitRec() + : pOut(NULL), + pVisiLayer(NULL), + pPageView(NULL), + nTol(0), + bDown(FALSE) + {} +}; + +//************************************************************ +// Hilfsklasse SdrObjUserData +// +// Anwenderdaten an einem Zeichenobjekt, z.B. applikationsspezifische Daten. +// Jedes Zeichenobjekt kann beliebig viele dieser Records haben (SV-Liste). +// Wer hier Daten halten will, muss sich ableiten und auch an der Factory +// einen entsprechenden Link setzen. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrObjUserData +{ +protected: + UINT32 nInventor; + UINT16 nIdentifier; + UINT16 nVersion; + +private: + SVX_DLLPRIVATE void operator=(const SdrObjUserData& rData); // nicht implementiert + SVX_DLLPRIVATE sal_Bool operator==(const SdrObjUserData& rData) const; // nicht implementiert + SVX_DLLPRIVATE sal_Bool operator!=(const SdrObjUserData& rData) const; // nicht implementiert + +public: + TYPEINFO(); + + SdrObjUserData(UINT32 nInv, UINT16 nId, UINT16 nVer) + : nInventor(nInv), + nIdentifier(nId), + nVersion(nVer) + {} + SdrObjUserData(const SdrObjUserData& rData) + : nInventor(rData.nInventor), + nIdentifier(rData.nIdentifier), + nVersion(rData.nVersion) + {} + virtual ~SdrObjUserData(); + + virtual SdrObjUserData* Clone(SdrObject* pObj1) const = 0; // #i71039# NULL -> 0 + UINT32 GetInventor() const { return nInventor; } + UINT16 GetId() const { return nIdentifier; } + + virtual FASTBOOL HasMacro (const SdrObject* pObj) const; + virtual SdrObject* CheckMacroHit (const SdrObjMacroHitRec& rRec, const SdrObject* pObj) const; + virtual Pointer GetMacroPointer (const SdrObjMacroHitRec& rRec, const SdrObject* pObj) const; + virtual void PaintMacro (OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec, const SdrObject* pObj) const; + virtual FASTBOOL DoMacro (const SdrObjMacroHitRec& rRec, SdrObject* pObj); + virtual XubString GetMacroPopupComment(const SdrObjMacroHitRec& rRec, const SdrObject* pObj) const; +}; + +//************************************************************ +// Hilfsklasse SdrObjUserDataList +//************************************************************ + +class SdrObjUserDataList +{ + Container aList; + +public: + SdrObjUserDataList() + : aList(1024,4,4) + {} + ~SdrObjUserDataList() { Clear(); } + + void Clear(); + USHORT GetUserDataCount() const { return USHORT(aList.Count()); } + SdrObjUserData* GetUserData(USHORT nNum) const { return (SdrObjUserData*)aList.GetObject(nNum); } + void InsertUserData(SdrObjUserData* pData, USHORT nPos=0xFFFF) { aList.Insert(pData,nPos); } + SdrObjUserData* RemoveUserData(USHORT nNum) { return (SdrObjUserData*)aList.Remove(nNum);} + void DeleteUserData(USHORT nNum) { delete RemoveUserData(nNum); } +}; + +//************************************************************ +// Hilfsklasse SdrObjGeoData +// +// Alle geometrischen Daten eines beliebigen Objektes zur bergabe an's Undo/Redo +// +//************************************************************ + +class SVX_DLLPUBLIC SdrObjGeoData +{ +public: + Rectangle aBoundRect; + Point aAnchor; + SdrGluePointList* pGPL; + BOOL bMovProt; + BOOL bSizProt; + BOOL bNoPrint; + BOOL bClosedObj; + SdrLayerID mnLayerID; + +public: + SdrObjGeoData(); + virtual ~SdrObjGeoData(); +}; + +//************************************************************ +// Hilfsklasse SdrObjPlusData +// +// Bitsack fuer DrawObjekte +// +//************************************************************ + +class SdrObjPlusData +{ + friend class SdrObject; + +public: + SfxBroadcaster* pBroadcast; // Broadcaster, falls dieses Obj referenziert wird (bVirtObj=TRUE). Auch fuer Konnektoren etc. + SdrObjUserDataList* pUserDataList; // applikationsspeziefische Daten + SdrGluePointList* pGluePoints; // Klebepunkte zum Ankleben von Objektverbindern + AutoTimer* pAutoTimer; + + // #i68101# + // object name, title and description + String aObjName; + String aObjTitle; + String aObjDescription; + + // Name to be used by applications + XubString aHTMLName; + +public: + TYPEINFO(); + SdrObjPlusData(); + virtual ~SdrObjPlusData(); + virtual SdrObjPlusData* Clone(SdrObject* pObj1) const; +}; + +//************************************************************ +// Hilfsklasse SdrObjTransformInfoRec +// +// gibt Auskunft ueber verschiedene Eigenschaften eines ZObjects +// +//************************************************************ + +class SdrObjTransformInfoRec +{ +public: + unsigned bSelectAllowed : 1; // FALSE=Obj kann nicht selektiert werden + unsigned bMoveAllowed : 1; // FALSE=Obj kann nicht verschoben werden + unsigned bResizeFreeAllowed : 1; // FALSE=Obj kann nicht frei resized werden + unsigned bResizePropAllowed : 1; // FALSE=Obj kann nichtmal proportional resized werden + unsigned bRotateFreeAllowed : 1; // FALSE=Obj kann nicht frei gedreht werden + unsigned bRotate90Allowed : 1; // FALSE=Obj kann nichtmal im 90deg Raster gedreht werden + unsigned bMirrorFreeAllowed : 1; // FALSE=Obj kann nicht frei gespiegelt werden + unsigned bMirror45Allowed : 1; // FALSE=Obj kann nichtmal ueber Achse im 45deg Raster gespiegelt werden + unsigned bMirror90Allowed : 1; // FALSE=Obj kann ebenfalls nicht ueber Achse im 90deg Raster gespiegelt werden + unsigned bTransparenceAllowed : 1; // FALSE=Obj does not have an interactive transparence control + unsigned bGradientAllowed : 1; // FALSE=Obj dooes not have an interactive gradient control + unsigned bShearAllowed : 1; // FALSE=Obj kann nicht verzerrt werden + unsigned bEdgeRadiusAllowed : 1; + unsigned bNoOrthoDesired : 1; // TRUE bei Rect; ... FALSE bei BMP,MTF; + unsigned bNoContortion : 1; // FALSE=Kein verzerren (bei Crook) moeglich (nur TRUE bei PathObj und Gruppierten PathObjs) + unsigned bCanConvToPath : 1; // FALSE=Keine Konvertierung in PathObj moeglich + unsigned bCanConvToPoly : 1; // FALSE=Keine Konvertierung in PolyObj moeglich + unsigned bCanConvToContour : 1; // FALSE=no conversion down to whole contour possible + unsigned bCanConvToPathLineToArea : 1; // FALSE=Keine Konvertierung in PathObj moeglich mit Wandlung von LineToArea + unsigned bCanConvToPolyLineToArea : 1; // FALSE=Keine Konvertierung in PolyObj moeglich mit Wandlung von LineToArea + +public: + SdrObjTransformInfoRec() + : bSelectAllowed(TRUE), + bMoveAllowed(TRUE), + bResizeFreeAllowed(TRUE), + bResizePropAllowed(TRUE), + bRotateFreeAllowed(TRUE), + bRotate90Allowed(TRUE), + bMirrorFreeAllowed(TRUE), + bMirror45Allowed(TRUE), + bMirror90Allowed(TRUE), + bTransparenceAllowed(TRUE), + bGradientAllowed(TRUE), + bShearAllowed(TRUE), + bEdgeRadiusAllowed(TRUE), + bNoOrthoDesired(TRUE), + bNoContortion(TRUE), + bCanConvToPath(TRUE), + bCanConvToPoly(TRUE), + bCanConvToContour(FALSE), + bCanConvToPathLineToArea(TRUE), + bCanConvToPolyLineToArea(TRUE) + {} +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// To make things more safe, allow users of the object to register at it. The users need to be derived +// from SdrObjectUser to get a call. The users do not need to call RemoveObjectUser() at the object +// when they get called from PageInDestruction(). +class SdrObject; + +class SdrObjectUser +{ +public: + virtual void ObjectInDestruction(const SdrObject& rObject) = 0; +}; + +// typedef for GetParentContacts() +typedef ::std::vector< SdrObjectUser* > ObjectUserVector; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@@@@ @@ @@@@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@@@ @@@@@ @@@@ @@@@@ @@@@ @@ +// +// Abstraktes DrawObject +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SvxShape; +class SVX_DLLPUBLIC SdrObject: public SfxListener, public tools::WeakBase< SdrObject > +{ +private: + // ObjectUser section + sdr::ObjectUserVector maObjectUsers; + +public: + void AddObjectUser(sdr::ObjectUser& rNewUser); + void RemoveObjectUser(sdr::ObjectUser& rOldUser); + + // BaseProperties section +private: + sdr::properties::BaseProperties* mpProperties; + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); +public: + virtual sdr::properties::BaseProperties& GetProperties() const; + + /////////////////////////////////////////////////////////////////////////////// + // #110094# DrawContact section +private: + sdr::contact::ViewContact* mpViewContact; + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); +public: + sdr::contact::ViewContact& GetViewContact() const; + + // DrawContact support: Methods for handling Object changes + void ActionChanged() const; + +private: + friend class SdrObjListIter; + friend class SdrVirtObj; + friend class SdrRectObj; + +protected: + Rectangle aOutRect; // umschliessendes Rechteck fuer Paint (inkl. LineWdt, ...) + Point aAnchor; // Ankerposition (Writer) + SdrObjList* pObjList; // Liste, in dem das Obj eingefuegt ist. + SdrPage* pPage; + SdrModel* pModel; + SdrObjUserCall* pUserCall; + SdrObjPlusData* pPlusData; // Broadcaster, UserData, Konnektoren, ... (Das ist der Bitsack) + + sal_uInt32 nOrdNum; // Rangnummer des Obj in der Liste + + /** Position in the navigation order. SAL_MAX_UINT32 when not used. + */ + sal_uInt32 mnNavigationPosition; + SdrLayerID mnLayerID; + + // Objekt zeigt nur auf ein Anderes + unsigned bVirtObj : 1; + unsigned bSnapRectDirty : 1; + unsigned bNetLock : 1; // ni + unsigned bInserted : 1; // nur wenn TRUE gibt's RepaintBroadcast & SetModify + unsigned bGrouped : 1; // Member eines GroupObjektes? + + // Die folgende Flags werden gestreamt + unsigned bMovProt : 1; // Position geschuetzt + unsigned bSizProt : 1; // Groesse geschuetzt + unsigned bNoPrint : 1; // Nicht drucken + + // Wenn bEmptyPresObj TRUE ist, handelt es sich um ein + // Praesentationsobjekt, dem noch kein Inhalt zugewiesen + // wurde. Default ist das Flag auf FALSE. Die Verwaltung + // uebernimmt die Applikation. Im Zuweisungsoperator sowie + // beim Clone wird das Flag nicht mitkopiert! + // Das Flag ist persistent. + unsigned bEmptyPresObj : 1; // Leeres Praesentationsobjekt (Draw) + + // TRUE=Objekt ist als Objekt der MasterPage nicht sichtbar + unsigned bNotVisibleAsMaster : 1; + + // TRUE=Es handelt sich hierbei um ein geschlossenes Objekt, also nicht Linie oder Kreisbogen ... + unsigned bClosedObj : 1; + + unsigned bIsEdge : 1; + unsigned bIs3DObj : 1; + unsigned bMarkProt : 1; // Markieren verboten. Persistent + unsigned bIsUnoObj : 1; + unsigned bNotMasterCachable : 1; + + // #i25616# + unsigned mbLineIsOutsideGeometry : 1; + + // #i25616# + unsigned mbSupportTextIndentingOnLineWidthChange : 1; + + // on import of OLE object from MS documents the BLIP size might be retrieved, + // in this case the following member is initialized as nonempty rectangle + Rectangle maBLIPSizeRectangle; + + // global static ItemPool for not-yet-insetred items +private: + static SdrItemPool* mpGlobalItemPool; +public: + static SdrItemPool& GetGlobalDrawObjectItemPool(); +private: + SVX_DLLPRIVATE static void FreeGlobalDrawObjectItemPool(); + +protected: + void ImpDeleteUserData(); + SdrObjUserData* ImpGetMacroUserData() const; + Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const; + + // Fuer GetDragComment + void ImpTakeDescriptionStr(USHORT nStrCacheID, String& rStr, USHORT nVal=0) const; + + void ImpForcePlusData() { if (pPlusData==NULL) pPlusData=NewPlusData(); } + + String GetWinkStr(long nWink, FASTBOOL bNoDegChar=FALSE) const; + String GetMetrStr(long nVal, MapUnit eWantMap=MAP_MM, FASTBOOL bNoUnitChars=FALSE) const; + + // bNotMyself=TRUE bedeutet: Nur die ObjList auf Dirty setzen, nicht mich. + // Wird z.B. benoetigt fuer NbcMove, denn da movt man SnapRect und aOutRect + // i.d.R. gleich mit um die Neuberechnung zu sparen. +public: + virtual void SetRectsDirty(sal_Bool bNotMyself = sal_False); +protected: + + // ueberladen, wenn man sich von SdrObjPlusData abgeleitet hat: + virtual SdrObjPlusData* NewPlusData() const; + +protected: + // Diese 3 Methoden muss ein abgeleitetes Objekt ueberladen, wenn es eigene + // geometrische Daten besitzt, die fuer den Undo-Fall gesichert werden + // sollen. NewGeoData() erzeugt lediglich eine leere Instanz auf eine von + // SdrObjGeoData abgeleitete Klasse. + virtual SdrObjGeoData* NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + +protected: + virtual ~SdrObject(); + +public: + TYPEINFO(); + SdrObject(); + + /** fres the SdrObject pointed to by the argument + + In case the object has an SvxShape, which has the ownership of the object, it + is actually *not* deleted. + */ + static void Free( SdrObject*& _rpObject ); + + // This method is only for access from Property objects + virtual void SetBoundRectDirty(); + + virtual void SetObjList(SdrObjList* pNewObjList); + SdrObjList* GetObjList() const { return pObjList; } + + virtual void SetPage(SdrPage* pNewPage); + SdrPage* GetPage() const { return pPage; } + + virtual void SetModel(SdrModel* pNewModel); + SdrModel* GetModel() const { return pModel; } + SdrItemPool* GetObjectItemPool() const; + + void AddListener(SfxListener& rListener); + void RemoveListener(SfxListener& rListener); + const SfxBroadcaster* GetBroadcaster() const { return pPlusData!=NULL ? pPlusData->pBroadcast : NULL; } + + virtual void AddReference(SdrVirtObj& rVrtObj); + virtual void DelReference(SdrVirtObj& rVrtObj); + virtual UINT32 GetObjInventor() const; + virtual UINT16 GetObjIdentifier() const; + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + + // Layer interface + virtual SdrLayerID GetLayer() const; + virtual void NbcSetLayer(SdrLayerID nLayer); + virtual void SetLayer(SdrLayerID nLayer); + // renaming GetLayerSet -> getMergedHierarchyLayerSet to make clear what happens here. rSet needs to be empty. + virtual void getMergedHierarchyLayerSet(SetOfByte& rSet) const; + + // UserCall interface + void SetUserCall(SdrObjUserCall* pUser) { pUserCall=pUser; } + SdrObjUserCall* GetUserCall() const { return pUserCall; } + void SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect) const; + + // Ein solcher Referenzpunkt ist z.B. der Punkt eines Symbols, der + // der beim Einfuegen des Symbols auf das Raster gefangen werden soll + // oder der Fixpunkt eines Bildes innerhalb eines Animationsobjektes. + virtual FASTBOOL HasRefPoint() const; + virtual Point GetRefPoint() const; + virtual void SetRefPoint(const Point& rPnt); + + // #i68101# + // An object may have a user-set Name (Get/SetName()), e.g SdrGrafObj, SdrObjGroup + // or SdrOle2Obj. + // It may also have a Title and a Description for accessibility purposes. + void SetName(const String& rStr); + String GetName() const; + void SetTitle(const String& rStr); + String GetTitle() const; + void SetDescription(const String& rStr); + String GetDescription() const; + + // support for HTMLName + void SetHTMLName(const String& rStr); + String GetHTMLName() const; + + // Fuer Gruppenobjekte + sal_Bool IsGroupObject() const { return GetSubList()!=NULL; } + virtual SdrObjList* GetSubList() const; + SdrObject* GetUpGroup() const; + + // Ueber die Objekt-Ordnungsnummer kann man feststellen, ob ein Objekt vor + // oder hinter einem anderen liegt. Objekte mit kleinen Ordnungsnummern werden + // zuerst gezeichnet, Objekte mit grossen Ordnungsnummern zuletzt. + // Wird die Reihenfolge der Objekte in der Liste veraendert, so wird ein + // Dirty-Flag gesetzt (an der Page). Beim naechsten SdrObject::GetOrdNum() + // werden die Ordnungsnummer aller Objekte der Liste neu bestimmt. + UINT32 GetOrdNum() const; + + // Diese Methode sollte nur verwendet werden, wenn man ganz genau weiss, + // was man macht: + UINT32 GetOrdNumDirect() const { return nOrdNum; } + + // Das Setzen der Ordnungsnummer sollte nur vom Model bzw. von der Page + // geschehen. + void SetOrdNum(UINT32 nNum) { nOrdNum=nNum; } + + /** Return the position in the navigation order for the called object. + Note that this method may update the navigation position of the + called and of other SdrObjects. Therefore this method can not be + const. + @return + If no navigation position has been explicitly defined then the + result of GetOrdNum() is returned. + */ + sal_uInt32 GetNavigationPosition (void); + + /** Set the position in the navigation position to the given value. + This method is typically used only by the model after a change to + the navigation order. + This method does not change the navigation position of other + objects. + Use SdrObjList::SetObjectNavigationPosition() instead. + */ + void SetNavigationPosition (const sal_uInt32 nPosition); + + const AutoTimer* GetAutoTimer() const { return pPlusData!=NULL ? pPlusData->pAutoTimer : NULL; } + AutoTimer* GetAutoTimer() { return pPlusData!=NULL ? pPlusData->pAutoTimer : NULL; } + AutoTimer* ForceAutoTimer(); + + // #111111# + // To make clearer that this method may trigger RecalcBoundRect and thus may be + // expensive and somtimes problematic (inside a bigger object change You will get + // non-useful BoundRects sometimes) i rename that method from GetBoundRect() to + // GetCurrentBoundRect(). + virtual const Rectangle& GetCurrentBoundRect() const; + + // #111111# + // To have a possibility to get the last calculated BoundRect e.g for producing + // the first rectangle for repaints (old and new need to be used) without forcing + // a RecalcBoundRect (which may be problematical and expensive sometimes) i add here + // a new method for accessing the last BoundRect. + virtual const Rectangle& GetLastBoundRect() const; + + virtual void RecalcBoundRect(); + + void BroadcastObjectChange() const; + + // Modified-Flag am Model setzen + virtual void SetChanged(); + + // Tooling for painting a single object to a OutputDevice. This will be needed as long + // as not all painting is changed to use DrawContact objects. + sal_Bool SingleObjectPainter(OutputDevice& rOut) const; + BOOL LineGeometryUsageIsNecessary() const; + + // Clone() soll eine komplette Kopie des Objektes erzeugen. + virtual SdrObject* Clone() const; + virtual void operator=(const SdrObject& rObj); + + // TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert". + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + // Das Xor-Polygon wird von der View zu Draggen des Objektes benoetigt. + // Alle Polygone innerhalb des PolyPolygon werden als PolyLine interpretiert. + // Moechte man ein geschlossenes Polygon, so muss man es explizit schliessen. + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + + // Die Kontur fuer TextToContour + virtual basegfx::B2DPolyPolygon TakeContour() const; + + // Ueber GetHdlCount gibt ein Objekt die Anzahl seiner Handles preis. + // Im Normalfall werden dies 8 sein, bei einer Strecke 2. Bei Polygonobjekten + // (Polygon,Spline,Bezier) kann die Handleanzahl wesentlich groesser werden. + // Polygonobjekten wird ausserdem die Moeglichkeit eingeraeumt einen Punkt + // eines selektierten Objekts zu selektieren. Das Handle dieses Punktes wird + // dann durch einen Satz neuer Handles ausgetauscht (PlusHdl). Bei einem + // Polygon wird das wohl ein einfacher Selektionshandle sein, bei einer + // Bezierkurve dagegen koennen das schon bis zu 3 Handles werden (inkl Gewichte). + // GetHdl() und GetPlusHdl() muessen Handleinstanzen mit new erzeugen! + // Ein Objekt, das bei HasSpacialDrag() TRUE liefert muss diese Methoden + // zur Verfuegung stellen (inkl. FillHdlList). + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + virtual sal_uInt32 GetPlusHdlCount(const SdrHdl& rHdl) const; + virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, sal_uInt32 nPlNum) const; + virtual void AddToHdlList(SdrHdlList& rHdlList) const; + + // Die Standardtransformationen (Move,Resize,Rotate,Mirror,Shear) werden von der + // View uebernommen (TakeXorPoly(),...). + // Objektspeziefisches draggen wie z.B. Eckenradius bei Rechtecken, + // Stuetzstellen bei Splines, Gewichte bei Bezierkurven und Pointer von + // Labelobjekten muss vom Objekt selbst gehandled werden. Um das Model + // Statusfrei zu halten werden die Statusdaten an der View gehalten und dem + // Objekt dann uebergeben. EndDrag liefrt im Normalfall TRUE fuer Erfolg. + // FALSE kann zurueckgegeben werden, wenn das Dragging das Objekt nicht + // veraendert hat, wobei dir evtl. Tatsache das die Maus nicht bewegt wurde + // bereits von der View abgefangen wird. + virtual bool hasSpecialDrag() const; + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + virtual String getSpecialDragComment(const SdrDragStat& rDrag) const; + virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const; + + // FullDrag support. This is for standard interactions and for SdrObjOwn + // support. If supportsFullDrag() returns true, getFullDragClone has to + // return a cloned SdrObject (who's ownership it loses) at which modifications + // like Move(), Scale(), etc or applySpecialDrag() will be executed. That + // object will be visualized on overlay for full drag, but should not be + // part of the model, thus not changing anything since it's only a temporary + // helper object for interaction + virtual bool supportsFullDrag() const; + virtual SdrObject* getFullDragClone() const; + + // Jedes Objekt muss in der Lage sein sich selbst interaktiv zu erzeugen. + // Beim MausDown wird zunaechst ein neues Objekt erzeugt und dann seine + // BegCreate()-Methode gerufen. Bei jedem MausMode wird dann MovCreate + // gerufen. BrkCreate() bedeutet, dass der User die interaktive Objekt- + // erzeugung abgebrochen hat. EndCreate() wird gerufen beim MouseUp-Event. + // Liefert EndCreate() ein TRUE, so ist die Objekterzeugung abgeschlossen; + // das Objekt wird in die entsprechende Liste eingefuegt. Andernfalls + // (EndCreate()==FALSE) gehe ich davon aus, dass weitere Punkte zur + // Objekterzeugung notwendig sind (Polygon,...). Der Parameter eCmd + // enthaelt die Anzahl der Mausklicks (so die App diese durchreicht). + // BckCreate() -> Letztes EndCreate() rueckgaengig machen (z.B. letzten + // Polygonpunkt wieder loeschen). + // RetrunCode: TRUE=Weiter gehts, FALSE=Create dadurch abgebrochen. + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); // TRUE=Xor muss repainted werden + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + virtual FASTBOOL BckCreate(SdrDragStat& rStat); + virtual void BrkCreate(SdrDragStat& rStat); + + // damit holt man sich den Pointer, der das Createn dieses Objekts symbolisiert + virtual Pointer GetCreatePointer() const; + + // Polygon das waehrend des Erzeugens aufgezogen wird + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + + // Die Methoden Move, Resize, Rotate, Mirror, Shear, SetSnapRect und + // SetLogicRect rufen jeweils die entsprechenden Nbc-Methoden, versenden einen + // Repaint-Broadcast und setzen den Modified-Status am Model. Abgeleitete + // Objekte sollten i.d.R. nur die Nbc-Methoden ueberladen. + // Nbc bedeutet: 'NoBroadcast'. + virtual void NbcMove (const Size& rSiz); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + virtual void NbcMirror(const Point& rRef1, const Point& rRef2); + virtual void NbcShear (const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + + virtual void Move (const Size& rSiz); + virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void Rotate(const Point& rRef, long nWink, double sn, double cs); + virtual void Mirror(const Point& rRef1, const Point& rRef2); + virtual void Shear (const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + + // Die relative Position eines Zeichenobjektes ist die Entfernung der + // linken oberen Eche des logisch umschliessenden Rechtecks (SnapRect) + // zum Anker. + virtual void NbcSetRelativePos(const Point& rPnt); + virtual void SetRelativePos(const Point& rPnt); + virtual Point GetRelativePos() const; + void ImpSetAnchorPos(const Point& rPnt) { aAnchor=rPnt; } + virtual void NbcSetAnchorPos(const Point& rPnt); + virtual void SetAnchorPos(const Point& rPnt); + virtual const Point& GetAnchorPos() const; + + // Snap wird nicht auf dem BoundRect ausgefuehrt, sondern nach Moeglichkeit auf + // logischen Koordinaten (also ohne Beruecksichtigung von Strichstaerke, ... ). + // SetSnapRect() versucht das Objekt so hinzusizen, dass es in das uebergebene + // Rect passt (ohne Strichstaerke, ...) + virtual void RecalcSnapRect(); + virtual const Rectangle& GetSnapRect() const; + virtual void SetSnapRect(const Rectangle& rRect); + virtual void NbcSetSnapRect(const Rectangle& rRect); + + // Logic Rect: Beim Rect z.B. ohne Beruecksichtigung des Drehwinkels, Shear, ... + virtual const Rectangle& GetLogicRect() const; + virtual void SetLogicRect(const Rectangle& rRect); + virtual void NbcSetLogicRect(const Rectangle& rRect); + + // Drehwinkel und Shear + virtual long GetRotateAngle() const; + virtual long GetShearAngle(FASTBOOL bVertical=FALSE) const; + + // Zum Fangen von/auf ausgezeichneten Punkten eines Obj (Polygonpunkte, + // Kreismittelpunkt, ...) + virtual sal_uInt32 GetSnapPointCount() const; + virtual Point GetSnapPoint(sal_uInt32 i) const; + + // Fuer Objekte, bei denen jeder einzelne Punkt verschoben werden kann, + // z.B. Polygone, Polylines, Linien, ... . Bei diesen Objekten werden + // Punkte selektiert (ggf. Mehrfachselektion), geloescht, eingefuegt, + // als Mehrfachselektion verschoben und gedreht, ... + // Nur solche Objekte koennen PlusHandles haben (z.B. die Gewichte an den + // Bezierkurven. + virtual sal_Bool IsPolyObj() const; + virtual sal_uInt32 GetPointCount() const; + virtual Point GetPoint(sal_uInt32 i) const; + void SetPoint(const Point& rPnt, sal_uInt32 i); + virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i); + + // Alle geometrischen Daten holen fuer's Undo/Redo + virtual SdrObjGeoData* GetGeoData() const; + virtual void SetGeoData(const SdrObjGeoData& rGeo); + + // ItemSet access + const SfxItemSet& GetMergedItemSet() const; + void SetMergedItem(const SfxPoolItem& rItem); + void ClearMergedItem(const sal_uInt16 nWhich = 0); + void SetMergedItemSet(const SfxItemSet& rSet, sal_Bool bClearAllItems = sal_False); + const SfxPoolItem& GetMergedItem(const sal_uInt16 nWhich) const; + + // internal versions +protected: + const SfxItemSet& GetObjectItemSet() const; + void SetObjectItem(const SfxPoolItem& rItem); + void ClearObjectItem(const sal_uInt16 nWhich = 0); + void SetObjectItemSet(const SfxItemSet& rSet); + const SfxPoolItem& GetObjectItem(const sal_uInt16 nWhich) const; + +public: + // syntactical sugar for ItemSet accesses + void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, sal_Bool bClearAllItems = sal_False); + + // NotPersistAttr fuer Layer, ObjName, geometrische Transformationen, ... + void TakeNotPersistAttr(SfxItemSet& rAttr, FASTBOOL bMerge) const; + void ApplyNotPersistAttr(const SfxItemSet& rAttr); + void NbcApplyNotPersistAttr(const SfxItemSet& rAttr); + + // bDontRemoveHardAttr=FALSE: alle in der Vorlage gesetzten Attribute werden am + // Zeichenobjekt auf Default gesetzt; TRUE: alle harten Attribute bleiben erhalten. + void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + virtual void NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); + SfxStyleSheet* GetStyleSheet() const; + + // TextEdit + virtual FASTBOOL HasTextEdit() const; + + // Return==TRUE: TextEditMode gestartet + virtual sal_Bool BegTextEdit(SdrOutliner& rOutl); + virtual void EndTextEdit(SdrOutliner& rOutl); + + // Text wird im Format des Outliners gehalten + // SetOutlinerParaObject: Eigentumsuebereignung von *pTextObject! + virtual void SetOutlinerParaObject(OutlinerParaObject* pTextObject); + virtual void NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject); + virtual OutlinerParaObject* GetOutlinerParaObject() const; + virtual void NbcReformatText(); + virtual void ReformatText(); + + void BurnInStyleSheetAttributes(); + + // Macrofaehigkeit, z.B. ein Rechteck als PushButton. + virtual FASTBOOL HasMacro() const; + virtual SdrObject* CheckMacroHit (const SdrObjMacroHitRec& rRec) const; + virtual Pointer GetMacroPointer (const SdrObjMacroHitRec& rRec) const; + virtual void PaintMacro (OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const; + virtual FASTBOOL DoMacro (const SdrObjMacroHitRec& rRec); + virtual XubString GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const; + sal_Bool IsMacroHit(const SdrObjMacroHitRec& rRec) const { return CheckMacroHit(rRec)!=NULL; } + + // Konnektoren. (siehe auch Dokumentation in SvdoEdge.HXX, SdrEdgeObj + // sowie SvdGlue.HXX und SvdGlEV.HXX) + // Es gibt Knoten und Kanten. Eine Kante kann theoretisch auch Knoten + // sein, das ist jedoch in dieser Version noch nicht implementiert. + // Ein Knoten hat eine Anzahl von Klebepunkten, wo Kanten angeklebt + // werden koennen. + // Eine Kante kann + // - ohne Verbindungen sein + // - an einem Ende auf der Wiese stehen und am anderen Ende an + // genau einem Knoten gebunden sein + // - an beiden Enden mit jeweils genau einem Knoten verbunden sein. + // Die Kante ist Listener bei seinen bis zu 2 Knoten. + // Wird der Knoten verschoben oder Resized, folgen alle angebundenen + // Kanten. Ebenso bei SetGluePoint()... am Knoten. + // Beim Verschieben/Resizen der Kante wird dagegen die Verbindung + // geloesst. + // Objekt ist ein Knoten? + virtual FASTBOOL IsNode() const; + + // Automatische Klebepunkte: + // je 4 Scheitelpunkt- und Eckpositionen muss ein Knotenobjekt liefern + // i.d.R. 0=oben, 1=rechts, 2=unten, 3=links + virtual SdrGluePoint GetVertexGluePoint(USHORT nNum) const; + + // i.d.R. 0=linksoben, 1=rechtsoben, 2=rechtsunten, 3=linksunten + virtual SdrGluePoint GetCornerGluePoint(USHORT nNum) const; + + // Liste aller Klebepunkte. Kann NULL sein. + virtual const SdrGluePointList* GetGluePointList() const; + //virtual SdrGluePointList* GetGluePointList(); + + // Nach veraendern der GluePointList muss man am Obj SendRepaintBroadcast rufen! + virtual SdrGluePointList* ForceGluePointList(); + + // Temporaer zu setzen fuer Transformationen am Bezugsobjekt + void SetGlueReallyAbsolute(FASTBOOL bOn); + void NbcRotateGluePoints(const Point& rRef, long nWink, double sn, double cs); + void NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2); + void NbcShearGluePoints (const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + + // Objekt ist eine Kante? + virtual FASTBOOL IsEdge() const; + + // bTail1=TRUE: Linienanfang, sonst LinienEnde + // pObj=NULL: Disconnect + virtual void ConnectToNode(FASTBOOL bTail1, SdrObject* pObj); + virtual void DisconnectFromNode(FASTBOOL bTail1); + virtual SdrObject* GetConnectedNode(FASTBOOL bTail1) const; + + /** sets the writing mode of the object's context + + Objects which itself do not support different writing modes will ignore this call. + + Objects which support different writing modes, but have an own, explicit writing mode set, + will also ignore this call. + + Objects which support different writing modes, and whose own mode is set to css.text.WritingMode2.CONTEXT, + will use the given writing mode to calculate their "effective writing mode". + + The behaviour of this method is undefined if you pass css.text.WritingMode2.CONTEXT. + + @param _nContextWritingMode + the effective writing mode of the context of the object + */ + virtual void SetContextWritingMode( const sal_Int16 _nContextWritingMode ); + + // Wenn ein Objekt in der Lage ist, sich in ein Polygon oder in eine + // Bezierkurve (oder beides) zu verwandeln, dann sollten die folgenden + // Methoden ueberladen werden. + // Z.B. Ein RectObj mit Strichstaerke 10, SOLID_PEN in Polygon wandeln: + // Im Modus bLineToArea=FALSE soll ein PolyObj mit 4 Stuetzstellen, + // Strichstaerke 10 und SOLiD_PEN erzeugt werden. + // Im Modus bLineToArea=TRUE dagegen soll das generierte Obj immer ein + // LinienAttribut NULL_PEN haben, und die Linie (auch Linienmuster) selbst + // durch Polygonflaechen emuliert werden, die dadurch anschliessend vom + // Anwender manipuliert werden koennen. Das RectObj kann sich somit also + // nur korrekt konvertieren, wenn es als Flaechenattribut NULL_BRUSH + // besitzt. Es muesste in diesem Fall dann: + // - SOLID_BRUSH mit der Farbe des gesetzten Pen setzen + // - NULL_PEN setzen + // - PolyPolygon mit 2 Polygonen zu je 4 Stuetzstellen generieren. + // Der Returnwert ist jeweils ein SdrObject*, da als Rueckgabe zur Not + // auch Gruppenobjekte erlaubt sind (z.B. fuer SdrTextObj). + // Bei der Konvertierung von TextObj nach PathObj wird es wohl so sein, + // dass beide Modi (bLineToArea=TRUE/FALSE) identisch sind. + // Defaulted sind diese Methoden auf "Ich kann das nicht" (FALSE/NULL). + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + SdrObject* ConvertToPolyObj(BOOL bBezier, BOOL bLineToArea) const; + + // convert this path object to contour object; bForceLineDash converts even + // when there is no filled new polygon created from line-to-polygon conversion, + // specially used for XLINE_DASH and 3D conversion + SdrObject* ConvertToContourObj(SdrObject* pRet, BOOL bForceLineDash = FALSE) const; + SdrObject* ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDash = FALSE) const; + + // TRUE: Referenz auf ein Obj + sal_Bool IsVirtualObj() const { return bVirtObj; } + + // TRUE=Obj kann warsch. gefuellt werden; FALSE=Obj kann warsch. Linienenden haben. + // ungueltig, wenn es sich um ein GroupObj handelt. + sal_Bool IsClosedObj() const { return bClosedObj; } + + sal_Bool IsEdgeObj() const { return bIsEdge; } + sal_Bool Is3DObj() const { return bIs3DObj; } + sal_Bool IsUnoObj() const { return bIsUnoObj; } + sal_Bool IsMasterCachable() const { return !bNotMasterCachable; } + sal_Bool ShareLock() { sal_Bool r=!bNetLock; bNetLock=TRUE; return r; } + void ShareUnlock() { bNetLock=FALSE; } + sal_Bool IsShareLock() const { return bNetLock; } + void SetMarkProtect(sal_Bool bProt) { bMarkProt=bProt; } + sal_Bool IsMarkProtect() const { return bMarkProt; } + void SetInserted(sal_Bool bIns); + sal_Bool IsInserted() const { return bInserted; } + void SetGrouped(sal_Bool bGrp) { bGrouped=bGrp; } + sal_Bool IsGrouped() const { return bGrouped; } + void SetMoveProtect(sal_Bool bProt); + sal_Bool IsMoveProtect() const { return bMovProt; } + void SetResizeProtect(sal_Bool bProt); + sal_Bool IsResizeProtect() const { return bSizProt; } + void SetPrintable(sal_Bool bPrn); + sal_Bool IsPrintable() const { return !bNoPrint; } + void SetEmptyPresObj(sal_Bool bEpt) { bEmptyPresObj=bEpt; } + sal_Bool IsEmptyPresObj() const { return bEmptyPresObj; } + void SetNotVisibleAsMaster(sal_Bool bFlg) { bNotVisibleAsMaster=bFlg; } + sal_Bool IsNotVisibleAsMaster() const { return bNotVisibleAsMaster; } + + // #i25616# + sal_Bool LineIsOutsideGeometry() const { return mbLineIsOutsideGeometry; } + + // #i25616# + sal_Bool DoesSupportTextIndentingOnLineWidthChange() const { return mbSupportTextIndentingOnLineWidthChange; } + + // applikationsspeziefische Daten + USHORT GetUserDataCount() const; + SdrObjUserData* GetUserData(USHORT nNum) const; + + // Insert uebernimmt den auf dem Heap angelegten Record in den Besitz + // des Zeichenobjekts + void InsertUserData(SdrObjUserData* pData, USHORT nPos=0xFFFF); + + // Delete entfernt den Record aus der Liste und ruft + // ein delete (FreeMem+Dtor). + void DeleteUserData(USHORT nNum); + + // ItemPool fuer dieses Objekt wechseln + void MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel = 0L); + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // access to the UNO representation of the shape + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoShape(); + ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > getWeakUnoShape() const { return maWeakUnoShape; } + + static SdrObject* getSdrObjectFromXShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xInt ); + + // helper struct for granting access exclusive to SvxShape + struct GrantXShapeAccess + { + friend class SvxShape; + private: + GrantXShapeAccess() { } + }; + + // setting the UNO representation is allowed for the UNO representation itself only! + void setUnoShape( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape, + GrantXShapeAccess /*aGrant*/ + ) + { + impl_setUnoShape( _rxUnoShape ); + } + + /** retrieves the instance responsible for notifying changes in the properties of the shape associated with + the SdrObject + + @precond + There already exists an SvxShape instance associated with the SdrObject + @throws ::com::sun::star::uno::RuntimeException + if there does nt yet exists an SvxShape instance associated with the SdrObject. + */ + ::svx::PropertyChangeNotifier& + getShapePropertyChangeNotifier(); + + /** notifies a change in the given property, to all applicable listeners registered at the associated SvxShape + + This method is equivalent to calling getShapePropertyChangeNotifier().notifyPropertyChange( _eProperty ), + exception that it is allowed to be called when there does not yet exist an associated SvxShape - in which + case the method will silently return without doing anything. + */ + void notifyShapePropertyChange( const ::svx::ShapeProperty _eProperty ) const; + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // + // transformation interface for StarOfficeAPI. This implements support for + // homogen 3x3 matrices containing the transformation of the SdrObject. At the + // moment it contains a shearX, rotation and translation, but for setting all linear + // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported. + // + // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon + // with the base geometry and returns TRUE. Otherwise it returns FALSE. + virtual sal_Bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const; + + // sets the base geometry of the object using infos contained in the homogen 3x3 matrix. + // If it's an SdrPathObj it will use the provided geometry information. The Polygon has + // to use (0,0) as upper left and will be scaled to the given size in the matrix. + virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon); + + sal_Bool IsTransparent( BOOL bCheckForAlphaChannel = FALSE ) const; + + // #111111# + // Needed again and again i will now add a test for finding out if + // this object is the BackgroundObject of the page. + sal_Bool IsMasterPageBackgroundObject() const; + + // #116168# + // Give info if object is in destruction + sal_Bool IsInDestruction() const; + + // return if fill is != XFILL_NONE + bool HasFillStyle() const; + bool HasLineStyle() const; + + // on import of OLE object from MS documents the BLIP size might be retrieved, + // the following methods are used to control it; + // usually this data makes no sence after the import is finished, since the object + // might be resized + Rectangle GetBLIPSizeRectangle() const; + void SetBLIPSizeRectangle( const Rectangle& aRect ); + +protected: + void impl_setUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape ); + +private: + /** only for internal use! + */ + SvxShape* getSvxShape() const; + + /** do not use directly, always use getSvxShape() if you have to! */ + SvxShape* mpSvxShape; + ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > + maWeakUnoShape; +}; + +//************************************************************ +// SdrDummyObj +// +// Wer sich eigene Objekte schafft muss einen Link in der Klasse +// SdrObjFactory setzen. Der Handler hat folgendes aussehen: +// void Hdl(SdrObjFactory*) +// Er muss sich aus der uebergebenen Instanz die Werte nInventor und +// nIdentifier ansehen und entsprechend mit new eine Zeichenobjektinstanz +// erzeugen. Einen Zeiger auf diese Instanz hat er in der Membervariablen +// pNewObj zu hinterlassen. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrObjFactory +{ +public: + UINT32 nInventor; + UINT16 nIdentifier; + + // fuer MakeNewObj(): + SdrPage* pPage; + SdrModel* pModel; + SdrObject* pNewObj; + + // fuer MakeNewObjUserData(): + SdrObject* pObj; + SdrObjUserData* pNewData; + +private: + SVX_DLLPRIVATE SdrObjFactory(UINT32 nInvent, UINT16 nIdent, SdrPage* pNewPage, SdrModel* pNewModel); + SVX_DLLPRIVATE SdrObjFactory(UINT32 nInvent, UINT16 nIdent, SdrObject* pObj1); + +public: + static SdrObject* MakeNewObject(UINT32 nInvent, UINT16 nIdent, SdrPage* pPage, SdrModel* pModel=NULL); + static void InsertMakeObjectHdl(const Link& rLink); + static void RemoveMakeObjectHdl(const Link& rLink); + static SdrObjUserData* MakeNewObjUserData(UINT32 nInvent, UINT16 nIdent, SdrObject* pObj); + static void InsertMakeUserDataHdl(const Link& rLink); + static void RemoveMakeUserDataHdl(const Link& rLink); +}; + +typedef tools::WeakReference< SdrObject > SdrObjectWeakRef; + +#endif //_SVDOBJ_HXX + diff --git a/svx/inc/svx/svdocapt.hxx b/svx/inc/svx/svdocapt.hxx new file mode 100644 index 000000000000..37bfd5ed2f9b --- /dev/null +++ b/svx/inc/svx/svdocapt.hxx @@ -0,0 +1,177 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdocapt.hxx,v $ + * $Revision: 1.4.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDCAPT_HXX +#define _SVDCAPT_HXX + +#include <svx/svdorect.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class ImpCaptParams; + +namespace sdr { namespace properties { + class CaptionProperties; +}} + +#define SDRSETITEM_CAPTION_ATTR SDRSETITEM_ATTR_COUNT + +//************************************************************ +// Hilfsklasse SdrCaptObjGeoData +//************************************************************ + +// #109872# +class SdrCaptObjGeoData : public SdrTextObjGeoData +{ +public: + Polygon aTailPoly; +}; + +//************************************************************ +// SdrCaptionObj +//************************************************************ + +class SVX_DLLPUBLIC SdrCaptionObj : public SdrRectObj +{ + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); +private: + + // to allow sdr::properties::CaptionProperties access to ImpRecalcTail() + friend class sdr::properties::CaptionProperties; + + friend class SdrTextObj; // fuer ImpRecalcTail() bei AutoGrow + +protected: + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + Polygon aTailPoly; // das ganze Polygon des Schwanzes + sal_Bool mbSpecialTextBoxShadow; // for calc special shadow, default FALSE + sal_Bool mbFixedTail; // for calc note box fixed tail, default FALSE + Point maFixedTailPos; // for calc note box fixed tail position. + +private: + SVX_DLLPRIVATE void ImpGetCaptParams(ImpCaptParams& rPara) const; + SVX_DLLPRIVATE void ImpCalcTail1(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const; + SVX_DLLPRIVATE void ImpCalcTail2(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const; + SVX_DLLPRIVATE void ImpCalcTail3(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const; + SVX_DLLPRIVATE void ImpCalcTail4(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const; + SVX_DLLPRIVATE void ImpCalcTail (const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const; + SVX_DLLPRIVATE void ImpRecalcTail(); + +public: + TYPEINFO(); + SdrCaptionObj(); + SdrCaptionObj(const Rectangle& rRect); + SdrCaptionObj(const Rectangle& rRect, const Point& rTail); + virtual ~SdrCaptionObj(); + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + virtual void operator=(const SdrObject& rObj); + + // for calc: special shadow only for text box + void SetSpecialTextBoxShadow() { mbSpecialTextBoxShadow = TRUE; } + sal_Bool GetSpecialTextBoxShadow() const { return mbSpecialTextBoxShadow; } + + // for calc: fixed note tail position. + void SetFixedTail() { mbFixedTail = TRUE; } + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + virtual void SetModel(SdrModel* pNewModel); + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + + // special drag methods + virtual bool hasSpecialDrag() const; + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + virtual String getSpecialDragComment(const SdrDragStat& rDrag) const; + + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + virtual FASTBOOL BckCreate(SdrDragStat& rStat); + virtual void BrkCreate(SdrDragStat& rStat); + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + virtual Pointer GetCreatePointer() const; + + virtual void NbcMove(const Size& rSiz); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + + virtual void NbcSetRelativePos(const Point& rPnt); + virtual Point GetRelativePos() const; + virtual void NbcSetAnchorPos(const Point& rPnt); + virtual const Point& GetAnchorPos() const; + + virtual void RecalcSnapRect(); + virtual const Rectangle& GetSnapRect() const; + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual const Rectangle& GetLogicRect() const; + virtual void NbcSetLogicRect(const Rectangle& rRect); + + virtual sal_uInt32 GetSnapPointCount() const; + virtual Point GetSnapPoint(sal_uInt32 i) const; + +protected: + virtual SdrObjGeoData* NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + +public: + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + const Point& GetTailPos() const; + void SetTailPos(const Point& rPos); + void NbcSetTailPos(const Point& rPos); + + // #i32599# + // Add own implementation for TRSetBaseGeometry to handle TailPos over changes + virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon); + + inline const Point& GetFixedTailPos() const {return maFixedTailPos;} + + // geometry access + ::basegfx::B2DPolygon getTailPolygon() const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDOCAPT_HXX + diff --git a/svx/inc/svx/svdocirc.hxx b/svx/inc/svx/svdocirc.hxx new file mode 100644 index 000000000000..3f6a589d2cd7 --- /dev/null +++ b/svx/inc/svx/svdocirc.hxx @@ -0,0 +1,159 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdocirc.hxx,v $ + * $Revision: 1.5.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOCIRC_HXX +#define _SVDOCIRC_HXX + +#include <svx/svdorect.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +namespace sdr { namespace properties { + class CircleProperties; +}} + +//************************************************************ +// Hilfsklasse SdrCircObjGeoData +//************************************************************ + +// #109872# +class SdrCircObjGeoData : public SdrTextObjGeoData +{ +public: + long nStartWink; + long nEndWink; +}; + +//************************************************************ +// SdrCircObj +//************************************************************ + +class SVX_DLLPUBLIC SdrCircObj : public SdrRectObj +{ +private: + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // to allow sdr::properties::CircleProperties access to ImpSetAttrToCircInfo() + friend class sdr::properties::CircleProperties; + + // only for SdrCircleAttributes + SdrObjKind GetCircleKind() const { return meCircleKind; } + + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + +protected: + SdrObjKind meCircleKind; + long nStartWink; + long nEndWink; + + // bitfield + unsigned mbPolygonIsLine : 1; + +private: + SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrObjKind eKind, const Rectangle& rRect1, long nStart, long nEnd) const; + SVX_DLLPRIVATE void ImpSetCreateParams(SdrDragStat& rStat) const; + SVX_DLLPRIVATE void ImpSetAttrToCircInfo(); // Werte vom Pool kopieren + SVX_DLLPRIVATE void ImpSetCircInfoToAttr(); // Werte in den Pool kopieren + + // Liefert TRUE, wenn das Painten ein XPolygon erfordert. + SVX_DLLPRIVATE FASTBOOL PaintNeedsXPolyCirc() const; // PaintNeedsXPoly-> PaintNeedsXPolyCirc + SVX_DLLPRIVATE virtual void RecalcXPoly(); + +protected: + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + +public: + TYPEINFO(); + SdrCircObj(SdrObjKind eNewKind); // Circ, CArc, Sect oder CCut + SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect); + + // 0=0.00Deg=3h 9000=90.00Deg=12h 18000=180.00Deg=9h 27000=270.00Deg=6h + // Der Verlauf des Kreises von StartWink nach EndWink ist immer entgegen + // dem Uhrzeigersinn. + // Wenn nNewStartWink==nNewEndWink hat der Kreisbogen einen Verlaufswinkel + // von 0 Grad. Bei nNewStartWink+36000==nNewEndWink ist der Verlaufswinkel + // 360.00 Grad. + SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect, long nNewStartWink, long nNewEndWink); + virtual ~SdrCircObj(); + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const; + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + virtual void operator=(const SdrObject& rObj); + virtual void RecalcSnapRect(); + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + + virtual sal_uInt32 GetSnapPointCount() const; + virtual Point GetSnapPoint(sal_uInt32 i) const; + + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + + // special drag methods + virtual bool hasSpecialDrag() const; + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + virtual String getSpecialDragComment(const SdrDragStat& rDrag) const; + + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + virtual FASTBOOL BckCreate(SdrDragStat& rStat); + virtual void BrkCreate(SdrDragStat& rStat); + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + virtual Pointer GetCreatePointer() const; + virtual void NbcMove(const Size& aSiz); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcMirror(const Point& rRef1, const Point& rRef2); + virtual void NbcShear (const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + +protected: + virtual SdrObjGeoData* NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); +public: + long GetStartWink() const { return nStartWink; } + long GetEndWink() const { return nEndWink; } + +}; + +#endif //_SVDOCIRC_HXX + diff --git a/svx/inc/svx/svdoedge.hxx b/svx/inc/svx/svdoedge.hxx new file mode 100644 index 000000000000..227afd9ab027 --- /dev/null +++ b/svx/inc/svx/svdoedge.hxx @@ -0,0 +1,442 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdoedge.hxx,v $ + * $Revision: 1.5.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOEDGE_HXX +#define _SVDOEDGE_HXX + +#include <svx/svdotext.hxx> +#include <svx/svdglue.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SdrDragMethod; +class SdrPageView; + +namespace sdr { namespace properties { + class ConnectorProperties; +}} + +//************************************************************ +// Hilfsklasse SdrObjConnection +//************************************************************ + +class SdrObjConnection +{ + friend class SdrEdgeObj; + friend class ImpEdgeHdl; + friend class SdrCreateView; + +protected: + Point aObjOfs; // Wird beim Draggen eines Knotens gesetzt + SdrObject* pObj; // Referenziertes Objekt + long nXDist; // Hor. Objektabstand wenn bXDistOvr=TRUE + long nYDist; // Vert. Objektabstand wenn bYDistOvr=TRUE + USHORT nConId; // Konnektornummer + + // bitfield + unsigned bBestConn : 1; // TRUE= es wird der guenstigste Konnektor gesucht + unsigned bBestVertex : 1; // TRUE= es wird der guenstigste Scheitelpunkt zum konnekten gesucht + unsigned bXDistOvr : 1; // TRUE= Hor. Objektabstand wurde gedragt (Overwrite) + unsigned bYDistOvr : 1; // TRUE= Vert. Objektabstand wurde gedragt (Overwrite) + unsigned bAutoVertex : 1; // AutoConnector am Scheitelpunkt nCon + unsigned bAutoCorner : 1; // AutoConnector am Eckpunkt nCon + +public: + SdrObjConnection() { ResetVars(); } + SVX_DLLPUBLIC ~SdrObjConnection(); + + void ResetVars(); + FASTBOOL TakeGluePoint(SdrGluePoint& rGP, FASTBOOL bSetAbsolutePos) const; + + inline void SetBestConnection( BOOL rB ) { bBestConn = rB; }; + inline void SetBestVertex( BOOL rB ) { bBestVertex = rB; }; + inline void SetAutoVertex( BOOL rB ) { bAutoVertex = rB; }; + inline void SetConnectorId( USHORT nId ) { nConId = nId; }; + + inline BOOL IsBestConnection() const { return bBestConn; }; + inline BOOL IsBestVertex() const { return bBestVertex; }; + inline BOOL IsAutoVertex() const { return bAutoVertex; }; + inline sal_uInt16 GetConnectorId() const { return nConId; }; + inline SdrObject* GetObject() const { return pObj; } +}; + +//************************************************************ +// Hilfsklasse SdrEdgeInfoRec +//************************************************************ + +enum SdrEdgeLineCode {OBJ1LINE2,OBJ1LINE3,OBJ2LINE2,OBJ2LINE3,MIDDLELINE}; + +class SdrEdgeInfoRec +{ +public: + // Die 5 Distanzen werden beim draggen bzw. per SetAttr gesetzt und von + // ImpCalcEdgeTrack ausgewertet. Per Get/SetAttr/Get/SetStyleSh werden + // jedoch nur 0-3 longs transportiert. + Point aObj1Line2; + Point aObj1Line3; + Point aObj2Line2; + Point aObj2Line3; + Point aMiddleLine; + + // Nachfolgende Werte werden von ImpCalcEdgeTrack gesetzt + long nAngle1; // Austrittswinkel am Obj1 + long nAngle2; // Austrittswinkel am Obj2 + USHORT nObj1Lines; // 1..3 + USHORT nObj2Lines; // 1..3 + USHORT nMiddleLine; // 0xFFFF=keine, sonst Punktnummer des Linienbeginns + char cOrthoForm; // Form des Ortho-Verbindes, z.B. 'Z','U',I','L','S',... + +public: + SdrEdgeInfoRec() + : nAngle1(0), + nAngle2(0), + nObj1Lines(0), + nObj2Lines(0), + nMiddleLine(0xFFFF), + cOrthoForm(0) + {} + + Point& ImpGetLineVersatzPoint(SdrEdgeLineCode eLineCode); + const Point& ImpGetLineVersatzPoint(SdrEdgeLineCode eLineCode) const { return ((SdrEdgeInfoRec*)this)->ImpGetLineVersatzPoint(eLineCode); } + USHORT ImpGetPolyIdx(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const; + FASTBOOL ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const; + void ImpSetLineVersatz(SdrEdgeLineCode eLineCode, const XPolygon& rXP, long nVal); + long ImpGetLineVersatz(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const; +}; + +//************************************************************ +// Hilfsklasse SdrEdgeObjGeoData +//************************************************************ + +class SdrEdgeObjGeoData : public SdrTextObjGeoData +{ +public: + SdrObjConnection aCon1; // Verbindungszustand des Linienanfangs + SdrObjConnection aCon2; // Verbindungszustand des Linienendes + XPolygon* pEdgeTrack; + sal_Bool bEdgeTrackDirty;// TRUE=Verbindungsverlauf muss neu berechnet werden. + sal_Bool bEdgeTrackUserDefined; + SdrEdgeInfoRec aEdgeInfo; + +public: + SdrEdgeObjGeoData(); + virtual ~SdrEdgeObjGeoData(); +}; + +//************************************************************ +// Hilfsklasse SdrEdgeObj +//************************************************************ + +class SVX_DLLPUBLIC SdrEdgeObj : public SdrTextObj +{ +private: + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // to allow sdr::properties::ConnectorProperties access to ImpSetAttrToEdgeInfo() + friend class sdr::properties::ConnectorProperties; + + friend class SdrCreateView; + friend class ImpEdgeHdl; + + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + +protected: + SdrObjConnection aCon1; // Verbindungszustand des Linienanfangs + SdrObjConnection aCon2; // Verbindungszustand des Linienendes + + XPolygon* pEdgeTrack; + sal_uInt16 nNotifyingCount; // Verrieglung + SdrEdgeInfoRec aEdgeInfo; + + // bitfield + unsigned bEdgeTrackDirty : 1; // TRUE=Verbindungsverlauf muss neu berechnet werden. + unsigned bEdgeTrackUserDefined : 1; + + // #109007# + // Bool to allow supporession of default connects at object + // inside test (HitTest) and object center test (see ImpFindConnector()) + unsigned mbSuppressDefaultConnect : 1; + + // #110649# + // Flag value for avoiding death loops when calculating BoundRects + // from circularly connected connectors. A coloring algorythm is used + // here. When the GetCurrentBoundRect() calculation of a SdrEdgeObj + // is running, the flag is set, else it is always sal_False. + unsigned mbBoundRectCalculationRunning : 1; + +public: + // #109007# + // Interface to default connect suppression + void SetSuppressDefaultConnect(sal_Bool bNew) { mbSuppressDefaultConnect = bNew; } + sal_Bool GetSuppressDefaultConnect() const { return mbSuppressDefaultConnect; } + + // #110649# + sal_Bool IsBoundRectCalculationRunning() const { return mbBoundRectCalculationRunning; } + +protected: + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + + XPolygon ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const Rectangle& rRect, const Point& rCenter) const; + void ImpRecalcEdgeTrack(); // Neuberechnung des Verbindungsverlaufs + XPolygon ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& rCon1, SdrObjConnection& rCon2, SdrEdgeInfoRec* pInfo) const; + XPolygon ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rectangle& rBoundRect1, const Rectangle& rBewareRect1, + const Point& rPt2, long nAngle2, const Rectangle& rBoundRect2, const Rectangle& rBewareRect2, + ULONG* pnQuality, SdrEdgeInfoRec* pInfo) const; + static FASTBOOL ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut=NULL); + USHORT ImpCalcEscAngle(SdrObject* pObj, const Point& aPt2) const; + FASTBOOL ImpStripPolyPoints(XPolygon& rXP) const; // entfernen ueberfluessiger Punkte + void ImpSetTailPoint(FASTBOOL bTail1, const Point& rPt); + void ImpUndirtyEdgeTrack(); // eventuelle Neuberechnung des Verbindungsverlaufs + void ImpDirtyEdgeTrack(); // invalidate connector path, so it will be recalculated next time + void ImpSetAttrToEdgeInfo(); // Werte vom Pool nach aEdgeInfo kopieren + void ImpSetEdgeInfoToAttr(); // Werte vom aEdgeInfo in den Pool kopieren + +public: + TYPEINFO(); + + SdrEdgeObj(); + virtual ~SdrEdgeObj(); + + SdrObjConnection& GetConnection(FASTBOOL bTail1) { return *(bTail1 ? &aCon1 : &aCon2); } + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + virtual const Rectangle& GetCurrentBoundRect() const; + virtual const Rectangle& GetSnapRect() const; + virtual FASTBOOL IsNode() const; + virtual SdrGluePoint GetVertexGluePoint(USHORT nNum) const; + virtual SdrGluePoint GetCornerGluePoint(USHORT nNum) const; + virtual const SdrGluePointList* GetGluePointList() const; + virtual SdrGluePointList* ForceGluePointList(); + virtual FASTBOOL IsEdge() const; + + // bTail1=TRUE: Linienanfang, sonst LinienEnde + // pObj=NULL: Disconnect + void SetEdgeTrackDirty() { bEdgeTrackDirty=TRUE; } + void ConnectToNode(FASTBOOL bTail1, SdrObject* pObj); + void DisconnectFromNode(FASTBOOL bTail1); + SdrObject* GetConnectedNode(FASTBOOL bTail1) const; + const SdrObjConnection& GetConnection(FASTBOOL bTail1) const { return *(bTail1 ? &aCon1 : &aCon2); } + FASTBOOL CheckNodeConnection(FASTBOOL bTail1) const; + + virtual void RecalcSnapRect(); + virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const; + virtual void operator=(const SdrObject& rObj); + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + void SetEdgeTrackPath( const basegfx::B2DPolyPolygon& rPoly ); + basegfx::B2DPolyPolygon GetEdgeTrackPath() const; + + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + + // special drag methods + virtual bool hasSpecialDrag() const; + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + virtual String getSpecialDragComment(const SdrDragStat& rDrag) const; + + // FullDrag support + virtual SdrObject* getFullDragClone() const; + + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual void NbcMove(const Size& aSize); + virtual void NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact); + + // #102344# Added missing implementation + virtual void NbcSetAnchorPos(const Point& rPnt); + + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + virtual FASTBOOL BckCreate(SdrDragStat& rStat); + virtual void BrkCreate(SdrDragStat& rStat); + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + virtual Pointer GetCreatePointer() const; + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + virtual sal_uInt32 GetSnapPointCount() const; + virtual Point GetSnapPoint(sal_uInt32 i) const; + virtual sal_Bool IsPolyObj() const; + virtual sal_uInt32 GetPointCount() const; + virtual Point GetPoint(sal_uInt32 i) const; + virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i); + + virtual SdrObjGeoData* NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + + /** updates edges that are connected to the edges of this object + as if the connected objects send a repaint broadcast + #103122# + */ + void Reformat(); + + // helper methods for the StarOffice api + Point GetTailPoint( BOOL bTail ) const; + void SetTailPoint( BOOL bTail, const Point& rPt ); + void setGluePointIndex( sal_Bool bTail, sal_Int32 nId = -1 ); + sal_Int32 getGluePointIndex( sal_Bool bTail ); + + virtual sal_Bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const; + virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon); + + // for geometry access + ::basegfx::B2DPolygon getEdgeTrack() const; + + // helper method for SdrDragMethod::AddConnectorOverlays. Adds a overlay polygon for + // this connector to rResult. + basegfx::B2DPolygon ImplAddConnectorOverlay(SdrDragMethod& rDragMethod, bool bTail1, bool bTail2, bool bDetail) const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// Zur Bestimmung der Verlaufslinie werden folgende Item-Parameter des SdrItemPool verwendet: +// +// USHORT EdgeFlowAngle Default 9000 (=90.00 Deg), min 0, max 9000 +// Verlauffreiheitswinkel. +// Der Winkel, in dem die Verbindungslinie verlaufen darf. +// +// USHORT EdgeEscAngle Default 9000 (=90.00 Deg), min 0, max 9000 +// Objektaustrittswinkel. +// Der Winkel, in dem die Verbindungslinie aus dem Objekt austreten darf. +// +// BOOL EdgeEscAsRay Default FALSE +// TRUE= die Verbindungslinie tritt aus dem Obj Strahlenfoermig aus. +// Also Winkelvorgabe durch die Strecke ObjMitte/Konnektor. +// +// BOOL EdgeEscUseObjAngle Default FALSE +// Objektdrehwinkelberuecksichtigung. +// TRUE= Bei der Bestimmung des Objektaustrittswinkels wird der +// Drehwinkel des Objekts als Offset beruecksichtigt. +// +// ULONG EdgeFlowDefDist Default 0, min 0, max ? +// Das ist der Default-Mindestabstand der bei der Berechnung der +// Verbindungslinie zu den angedockten Objekten in logischen Einheiten. +// Dieser Abstand wird innerhalb des Objektes "ueberschrieben", sobald +// der User an den Linien draggd. Beim Andocken an ein neues Objekt wird +// dann jedoch wieder dieser Default verwendet. +// +// +// Allgemeines zu Konnektoren: +// +// Es gibt Knoten und Kantenobjekte. Zwei Knoten koennen durch eine Kante +// miteinander verbunden werden. Ist eine Kante nur an einem Ende an einen +// Knoten geklebt, ist das andere Ende auf einer absoluten Position im Doc +// fixiert. Ebenso ist es natuerlich auch moeglich, dass eine Kante an beiden +// Enden "frei", also nicht mit einem Knotenobjekt verbunden ist. +// +// Ein Kantenobjekt kann theoretisch auch gleichzeitig Knotenobjekt sein. In +// der ersten Version wird das jedoch noch nicht realisiert werden. +// +// Eine Verbindung zwischen Knoten und Kante kann hergestellt werden durch: +// - Interaktives erzeugen eines neuen Kantenobjekts an der SdrView wobei +// Anfangs- bzw. Endpunkt der Kante auf ein Konnektor (Klebestelle) eines +// bereits vorhandenen Knotenobjekts gelegt wird. +// - Interaktives draggen des Anfangs- bzw. Endpunkts eines bestehenden +// Kantenobjekts an der SdrView auf ein Konnektor (Klebestelle) eines +// bereits vorhandenen Knotenobjekts. +// - Undo/Redo +// Verschieben von Knotenobjekten stellt keine Verbindungen her. Ebenso auch +// nicht das direkte Verschieben von Kantenendpunkten am SdrModel... +// Verbindungen koennen auch hergestellt werden, wenn die Konnektoren an der +// View nicht sichtbar geschaltet sind. +// +// Eine vorhandene Verbindung zwischen Knoten und Kante bleibt erhalten bei: +// - Draggen (Move/Resize/Rotate/...) des Knotenobjekts +// - Verschieben einer Konnektorposition im Knotemobjekt +// - gleichzeitiges Draggen (Move/Resize/Rotate/...) von Knoten und Kante +// +// Eine Verbindung zwischen Knoten und Kante kann geloesst werden durch: +// - Loeschen eines der Objekte +// - Draggen des Kantenobjekts ohne gleichzeitiges Draggen des Knotens +// - Loeschen des Konnektors am Knotenobjekt +// - Undo/Redo/Repeat +// Beim Draggen muss die Aufforderung zum loesen der Verbindung von ausserhalb +// des Models befohlen werden (z.B. von der SdrView). SdrEdgeObj::Move() loesst +// die Verbindung nicht selbsttaetig. +// +// Jedes Knotenobjekt kann Konnektoren, sog. Klebestellen besitzen. Das sind die +// geometrischen Punkte, an denen das verbindende Kantenobjekt bei hergestellter +// Verbindung endet. Defaultmaessig hat jedes Objekt keine Konnektoren. Trotzdem +// kann man bei bestimmten View-Einstellungen eine Kante andocken, da dann z.B. +// an den 4 Scheitelpunkten des Knotenobjekts bei Bedarf automatisch Konnektoren +// generiert werden. Jedes Objekt liefert dafuer 2x4 sog. Default-Konnektorposi- +// tionen, 4 an den Scheitelpunkten und 4 an den Eckpositionen. Im Normalfall +// liegen diese an den 8 Handlepositionen; Ausnahmen bilden hier Ellipsen, +// Parallelogramme, ... . Darueberhinaus koennen auch an jedem Knotenobjekt +// anwenderspeziefische Konnektoren gesetzt werden. +// +// Dann gibt es noch die Moeglichkeit, ein Kante an einem Objekt mit dem +// Attribut "bUseBestConnector" anzudocken. Es wird dann aus dem Angebot der +// Konnektoren des Objekts oder/und der Scheitelpunkte, jeweils die fuer den +// Verlauf der Verbindungslinie guenstigste Konnektorposition verwendet. Der +// Anwender vergibt dieses Attribut, indem er den Knoten in seiner Mitte +// andockt (siehe z.B. Visio). +// 09-06-1996: bUseBestConnector verwendet nur Scheitelpunktklebepunkte. +// +// Und hier noch etwas Begriffsdefinition: +// Verbinder : Eben das Verbinderobjekt (Kantenobjekt) +// Knoten : Ein beliebiges Objekt, an dem ein Verbinder drangeklebt +// werden kann, z.B. ein Rechteck, ... +// Klebepunkt: Der Punkt, an dem der Verbinder an das Knotenobjekt +// geklebt wird. Hierbei gibt es: +// Scheitelpunktklebepunkte: Jedes Knotenobjekt hat diese +// Klebepunkte von Natur aus. Moeglicherweise gibt es +// im Draw bereits die Option "Automatisch ankleben an +// Objektscheitelpunkte" (default an) +// Eckpunktklebepunkte: Auch diese Klebepunkte sind den +// Objekten von mir bereits mitgegeben. Wie die oben +// erwaehnten gibt es fuer diese moeglicherweise +// bereits auch eine Option im Draw. (default aus) +// Scheitelpunktklebepunkte und Eckpunktklebepunkte sind +// im Gegensatz zu Visio nicht optisch sichtbar; sie +// sind eben einfach da (wenn Option eingeschaltet). +// Benutzerdefinierte Klebepunkte: Gibt es an jedem +// Knotenobjekt beliebig viele. Per Option koennen sie +// sichtbar geschaltet werden (beim editieren immer +// sichtbar). Zur Zeit sind die jedoch noch nicht ganz +// fertigimplementiert. +// Automatische Klebepunktwahl: Wird der Verbinder so an +// das Knotenobjekt gedockt, dass der schwarke Rahmen +// das gesamte Objekt umfasst, so versucht der +// Verbinder von den 4 Scheitelpunktklebepunkten (und +// zwar nur von denen) den guenstigsten herauszufinden. +// +////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDOEDGE_HXX + diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx new file mode 100644 index 000000000000..238f6953af7a --- /dev/null +++ b/svx/inc/svx/svdograf.hxx @@ -0,0 +1,236 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdograf.hxx,v $ + * $Revision: 1.5.18.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOGRAF_HXX +#define _SVDOGRAF_HXX + +#include <com/sun/star/io/XInputStream.hpp> +#include <vcl/graph.hxx> +#include <svx/svdorect.hxx> +#include <goodies/grfmgr.hxx> +#include "svx/svxdllapi.h" + +////////////////////////////////////////////////////////////////////////////// +// predeclarations + +namespace sdr +{ + namespace properties + { + class GraphicProperties; + } // end of namespace properties + namespace contact + { + class ViewObjectContactOfGraphic; + } // end of namespace contact +} // end of namespace sdr + +// ----------- +// - Defines - +// ----------- + +#define SDRGRAFOBJ_TRANSFORMATTR_NONE 0x00000000UL +#define SDRGRAFOBJ_TRANSFORMATTR_COLOR 0x00000001UL +#define SDRGRAFOBJ_TRANSFORMATTR_MIRROR 0x00000002UL +#define SDRGRAFOBJ_TRANSFORMATTR_ROTATE 0x00000004UL +#define SDRGRAFOBJ_TRANSFORMATTR_ALL 0xffffffffUL + +// --------------------- +// - SdrGrafObjGeoData - +// --------------------- + +// #109872# +class SdrGrafObjGeoData : public SdrTextObjGeoData +{ +public: + sal_Bool bMirrored; + + SdrGrafObjGeoData() + : bMirrored(sal_False) + { + } +}; + +// -------------- +// - SdrGrafObj - +// -------------- + +class GraphicObject; +class SdrGraphicLink; + +class SVX_DLLPUBLIC SdrGrafObj : public SdrRectObj +{ +private: + // BaseProperties section + SVX_DLLPRIVATE virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + // to allow sdr::properties::GraphicProperties access to SetXPolyDirty() + friend class sdr::properties::GraphicProperties; + + // to allow sdr::contact::ViewObjectContactOfGraphic access to ImpUpdateGraphicLink() + friend class sdr::contact::ViewObjectContactOfGraphic; + + friend class SdrGraphicLink; + +protected: + + void ImpSetAttrToGrafInfo(); // Werte vom Pool kopieren + void ImpSetGrafInfoToAttr(); // Werte in den Pool kopieren + GraphicAttr aGrafInfo; + + Rectangle aCropRect; // Wenn aCropRect nicht Empty ist, dann enthaelt es den sichtbaren + // Ausschnitt der Grafik in logischen Eingeiten der Grafik! Also Bitmap->=Pixel + String aFileName; // Wenn es sich um einen Link handelt, steht hier der Dateiname drin. + String aFilterName; + GraphicObject* pGraphic; // Zur Beschleunigung von Bitmapausgaben, besonders von gedrehten. + SdrGraphicLink* pGraphicLink; // Und hier noch ein Pointer fuer gelinkte Grafiken + bool bMirrored; // True bedeutet, die Grafik ist horizontal, d.h. ueber die Y-Achse gespiegelt auszugeben. + + // #111096# + // Flag for allowing text animation. Default is sal_true. + unsigned mbGrafAnimationAllowed : 1; + + // #i25616# + unsigned mbInsidePaint : 1; + unsigned mbIsPreview : 1; + +protected: + + void ImpLinkAnmeldung(); + void ImpLinkAbmeldung(); + sal_Bool ImpUpdateGraphicLink() const; + DECL_LINK( ImpSwapHdl, GraphicObject* ); + +public: + + TYPEINFO(); + + SdrGrafObj(); + SdrGrafObj(const Graphic& rGrf); + SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect); + virtual ~SdrGrafObj(); + + void SetGraphicObject( const GraphicObject& rGrfObj ); + const GraphicObject& GetGraphicObject( bool bForceSwapIn = false) const; + + void NbcSetGraphic(const Graphic& rGrf); + void SetGraphic(const Graphic& rGrf); + const Graphic& GetGraphic() const; + + Graphic GetTransformedGraphic( ULONG nTransformFlags = SDRGRAFOBJ_TRANSFORMATTR_ALL ) const; + + GraphicType GetGraphicType() const; + + // #111096# + // Keep ATM for SD. + sal_Bool IsAnimated() const; + sal_Bool IsEPS() const; + sal_Bool IsSwappedOut() const; + + const MapMode& GetGrafPrefMapMode() const; + const Size& GetGrafPrefSize() const; + + void SetGrafStreamURL( const String& rGraphicStreamURL ); + String GetGrafStreamURL() const; + + void ForceSwapIn() const; + void ForceSwapOut() const; + + void SetGraphicLink(const String& rFileName, const String& rFilterName); + void ReleaseGraphicLink(); + sal_Bool IsLinkedGraphic() const { return (BOOL)aFileName.Len(); } + + void SetFileName(const String& rFileName); + const String& GetFileName() const { return aFileName; } + void SetFilterName(const String& rFilterName); + const String& GetFilterName() const { return aFilterName; } + + void StartAnimation(OutputDevice* pOutDev, const Point& rPoint, const Size& rSize, long nExtraData=0L); + void StopAnimation(OutputDevice* pOutDev=NULL, long nExtraData=0L); + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + // #i25616# + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + + virtual void operator=(const SdrObject& rObj); + + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + virtual void NbcMirror(const Point& rRef1, const Point& rRef2); + virtual void NbcShear (const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual void NbcSetLogicRect(const Rectangle& rRect); + virtual SdrObjGeoData* NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + + FASTBOOL HasGDIMetaFile() const; + const GDIMetaFile* GetGDIMetaFile() const; + + virtual void SetPage(SdrPage* pNewPage); + virtual void SetModel(SdrModel* pNewModel); + + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + void AdjustToMaxRect( const Rectangle& rMaxRect, BOOL bShrinkOnly ); + + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + + bool IsMirrored() { return bMirrored; } + void SetMirrored( bool _bMirrored ) { bMirrored = _bMirrored; } + + // #111096# + // Access to GrafAnimationAllowed flag + sal_Bool IsGrafAnimationAllowed() const; + void SetGrafAnimationAllowed(sal_Bool bNew); + + // #i25616# + sal_Bool IsObjectTransparent() const; + + ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > getInputStream(); + + // #i103116# FullDrag support + virtual SdrObject* getFullDragClone() const; +}; + +#endif //_SVDOGRAF_HXX + diff --git a/svx/inc/svx/svdogrp.hxx b/svx/inc/svx/svdogrp.hxx new file mode 100644 index 000000000000..5f243d451f90 --- /dev/null +++ b/svx/inc/svx/svdogrp.hxx @@ -0,0 +1,130 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdogrp.hxx,v $ + * $Revision: 1.3.226.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOGRP_HXX +#define _SVDOGRP_HXX + +#include <tools/datetime.hxx> +#include <svx/svdobj.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SdrObjList; +class SdrObjListIter; +class SfxItemSet; + +//************************************************************ +// SdrObjGroup +//************************************************************ + +class SVX_DLLPUBLIC SdrObjGroup : public SdrObject +{ + // BaseProperties section + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // #110094# DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + +protected: + SdrObjList* pSub; // Subliste (Kinder) + long nDrehWink; + long nShearWink; + + Point aRefPoint; // Referenzpunkt innerhalb der Objektgruppe + FASTBOOL bRefPoint; // Ist ein RefPoint gesetzt? + +public: + TYPEINFO(); + SdrObjGroup(); + virtual ~SdrObjGroup(); + + virtual UINT16 GetObjIdentifier() const; + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual SdrLayerID GetLayer() const; + virtual void NbcSetLayer(SdrLayerID nLayer); + virtual void SetObjList(SdrObjList* pNewObjList); + virtual void SetPage(SdrPage* pNewPage); + virtual void SetModel(SdrModel* pNewModel); + virtual FASTBOOL HasRefPoint() const; + virtual Point GetRefPoint() const; + virtual void SetRefPoint(const Point& rPnt); + virtual SdrObjList* GetSubList() const; + + virtual const Rectangle& GetCurrentBoundRect() const; + virtual const Rectangle& GetSnapRect() const; + + virtual void operator=(const SdrObject& rObj); + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + virtual void RecalcSnapRect(); + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + + // special drag methods + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + + virtual long GetRotateAngle() const; + virtual long GetShearAngle(FASTBOOL bVertical=FALSE) const; + + virtual void Move(const Size& rSiz); + virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void Rotate(const Point& rRef, long nWink, double sn, double cs); + virtual void Mirror(const Point& rRef1, const Point& rRef2); + virtual void Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + virtual void SetAnchorPos(const Point& rPnt); + virtual void SetRelativePos(const Point& rPnt); + virtual void SetSnapRect(const Rectangle& rRect); + virtual void SetLogicRect(const Rectangle& rRect); + + virtual void NbcMove(const Size& rSiz); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + virtual void NbcMirror(const Point& rRef1, const Point& rRef2); + virtual void NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + virtual void NbcSetAnchorPos(const Point& rPnt); + virtual void NbcSetRelativePos(const Point& rPnt); + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual void NbcSetLogicRect(const Rectangle& rRect); + + virtual void NbcReformatText(); + virtual void ReformatText(); + + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; +}; + +#endif //_SVDOGRP_HXX + diff --git a/svx/inc/svx/svdomeas.hxx b/svx/inc/svx/svdomeas.hxx new file mode 100644 index 000000000000..406c5badbcb0 --- /dev/null +++ b/svx/inc/svx/svdomeas.hxx @@ -0,0 +1,221 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdomeas.hxx,v $ + * $Revision: 1.5.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOMEAS_HXX +#define _SVDOMEAS_HXX + +#include <svx/svdotext.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SdrOutliner; +struct ImpMeasureRec; +struct ImpMeasurePoly; + +namespace sdr { namespace properties { + class MeasureProperties; +}} + +//************************************************************ +// Hilfsklasse SdrMeasureObjGeoData +//************************************************************ + +class SdrMeasureObjGeoData : public SdrTextObjGeoData +{ +public: + Point aPt1; + Point aPt2; + +public: + SdrMeasureObjGeoData(); + virtual ~SdrMeasureObjGeoData(); +}; + +//************************************************************ +// SdrMeasureObj +//************************************************************ + +class SVX_DLLPUBLIC SdrMeasureObj : public SdrTextObj +{ +private: + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // to allow sdr::properties::MeasureProperties access to SetTextDirty() + friend class sdr::properties::MeasureProperties; + + friend class SdrMeasureField; + + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + +protected: + Point aPt1; + Point aPt2; + FASTBOOL bTextDirty; + +protected: + void ImpTakeAttr(ImpMeasureRec& rRec) const; + void ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& rPol) const; + basegfx::B2DPolyPolygon ImpCalcXPoly(const ImpMeasurePoly& rPol) const; + void ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) const; + void SetTextDirty() { bTextDirty=TRUE; SetTextSizeDirty(); if (!aOutRect.IsEmpty()) { SetBoundRectDirty(); SetRectsDirty(sal_True); } } + void UndirtyText() const; + + virtual SdrObjGeoData* NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + +public: + TYPEINFO(); + SdrMeasureObj(); + SdrMeasureObj(const Point& rPt1, const Point& rPt2); + virtual ~SdrMeasureObj(); + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const; + virtual void operator=(const SdrObject& rObj); + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + + // special drag methods + virtual bool hasSpecialDrag() const; + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + virtual String getSpecialDragComment(const SdrDragStat& rDrag) const; + + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + virtual FASTBOOL BckCreate(SdrDragStat& rStat); + virtual void BrkCreate(SdrDragStat& rStat); + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + virtual Pointer GetCreatePointer() const; + + virtual void NbcMove(const Size& rSiz); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + virtual void NbcMirror(const Point& rRef1, const Point& rRef2); + virtual void NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + virtual long GetRotateAngle() const; + virtual void RecalcSnapRect(); + + virtual sal_uInt32 GetSnapPointCount() const; + virtual Point GetSnapPoint(sal_uInt32 i) const; + + virtual sal_Bool IsPolyObj() const; + virtual sal_uInt32 GetPointCount() const; + virtual Point GetPoint(sal_uInt32 i) const; + virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i); + + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + virtual sal_Bool BegTextEdit(SdrOutliner& rOutl); + virtual const Size& GetTextSize() const; + virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText=FALSE, + Rectangle* pAnchorRect=NULL, BOOL bLineWidth=TRUE ) const; + virtual void TakeTextAnchorRect(Rectangle& rAnchorRect) const; + virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const; + virtual USHORT GetOutlinerViewAnchorMode() const; + virtual void NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject); + virtual OutlinerParaObject* GetOutlinerParaObject() const; + + virtual FASTBOOL CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos, + FASTBOOL bEdit, Color*& rpTxtColor, Color*& rpFldColor, String& rRet) const; + + // #i97878# + virtual sal_Bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const; + virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon); +}; + +///////////////////////////////////////////////////////////////////////////////////////////////// +// +// Creating: +// ~~~~~~~~~ +// Dragging von Bezugspunkt 1 zu Bezugspunkt 2 -> Bezugskante +// +// Die Defaults: +// ~~~~~~~~~~~~~ +// Masslinie und Masshilfslinien: Haarlinien solid schwarz +// Pfeile: 2mm x 4mm +// Textgroesse +// ___ +// | Masszahl | 2mm +// |<--------------------->|--- +// | | 8mm +// | | +// Pt1============# Pt2-- <----Bezugskante (von Pt1 nach Pt2) +// # # |___ <- Ueberstand der Masshilfslinie(n) +// # #=========# +// # Zu bemassendes Objekt # +// #=======================# +// +// Attribute: +// ~~~~~~~~~~ +// 1. Wo steht der Text: mitte, rechts oder links (def=automatik) +// 2. Text oberhalb der Linie oder unterhalb oder Linie unterbrochen durch Text (def=automatik) +// 3. Den Abstand der Masslinie zur Bezugskante (=zum bemassten Objekt). +// Default=8mm +// 4. Masslinie unterhalb der Bezugskante (default=nein) +// 5. Die Ueberlaenge(n) der Masshilfslinien ueber die Bezugskante (2x, default=0) +// 6. Den Ueberhang der Masshilfslinien ueber die Masslinie (default=2mm) +// 7. Den Abstand der Masshilfslinien zur Bezugskante +// +// Dragging: Handle Shift +// ~~~~~~~~~ +// - Die Bezugspunkte SolidQuadHdl nur die Laenge +// 1.+2. Anpacken des Textes +// 3.+4. Hdl am Pfeil (2x) SolidQuadHdl nur den Bool +// 5. Hdl am Endpunkt CircHdl beide Laengen? +// 6.+7. Kein Dragging +// +// Offen: +// ~~~~~~ +// - Radien (gleich als Typ verankern +// +// Special: +// ~~~~~~~~ +// Connecting an max. 2 Objekte +// -> Bei Copy, etc. den entspr. Code der Verbinder verwenden?!? +// wird wohl recht kompliziert werden ... +// +///////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDOMEAS_HXX + diff --git a/svx/inc/svx/svdomedia.hxx b/svx/inc/svx/svdomedia.hxx new file mode 100644 index 000000000000..4b612dcf7e9e --- /dev/null +++ b/svx/inc/svx/svdomedia.hxx @@ -0,0 +1,95 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdomedia.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOMEDIA_HXX +#define _SVDOMEDIA_HXX + +#include <svx/svdorect.hxx> +#include <avmedia/mediaitem.hxx> +#include "svx/svxdllapi.h" + +class Graphic; + +namespace sdr { namespace contact { class ViewContactOfSdrMediaObj; } } + +// --------------- +// - SdrMediaObj - +// --------------- + +class SVX_DLLPUBLIC SdrMediaObj : public SdrRectObj +{ + friend class ::sdr::contact::ViewContactOfSdrMediaObj; + +public: + + TYPEINFO(); + + SdrMediaObj(); + SdrMediaObj( const Rectangle& rRect ); + + virtual ~SdrMediaObj(); + + virtual FASTBOOL HasTextEdit() const; + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + virtual void operator=(const SdrObject& rObj); + +public: + + void setURL( const ::rtl::OUString& rURL ); + const ::rtl::OUString& getURL() const; + + void setMediaProperties( const ::avmedia::MediaItem& rState ); + const ::avmedia::MediaItem& getMediaProperties() const; + + bool hasPreferredSize() const; + Size getPreferredSize() const; + + const Graphic& getGraphic() const; + void setGraphic( const Graphic* pGraphic = NULL ); + +protected: + + virtual void mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState ); + +private: + + virtual ::sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + ::avmedia::MediaItem maMediaProperties; + ::std::auto_ptr< Graphic > mapGraphic; +}; + +#endif //_SVDOMEDIA_HXX diff --git a/svx/inc/svx/svdoole2.hxx b/svx/inc/svx/svdoole2.hxx new file mode 100644 index 000000000000..2b5a19f7b60b --- /dev/null +++ b/svx/inc/svx/svdoole2.hxx @@ -0,0 +1,194 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdoole2.hxx,v $ + * $Revision: 1.5.60.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOOLE2_HXX +#define _SVDOOLE2_HXX + +#include <svtools/embedhlp.hxx> +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/datatransfer/XTransferable.hpp> +#include "com/sun/star/awt/XWindow.hpp" +#include <svx/svdorect.hxx> +#include <vcl/graph.hxx> +#include <vcl/gdimtf.hxx> +#include <sot/storage.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// SdrOle2Obj +//************************************************************ + +class SvxUnoShapeModifyListener; +class SdrOle2ObjImpl; + +class SVX_DLLPUBLIC SdrOle2Obj : public SdrRectObj +{ +private: + + SVX_DLLPRIVATE void Connect_Impl(); + SVX_DLLPRIVATE void Disconnect_Impl(); + SVX_DLLPRIVATE void Reconnect_Impl(); + SVX_DLLPRIVATE void AddListeners_Impl(); + SVX_DLLPRIVATE void RemoveListeners_Impl(); + SVX_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::datatransfer::XTransferable > GetTransferable_Impl() const; + SVX_DLLPRIVATE void GetObjRef_Impl(); + SVX_DLLPRIVATE void SetGraphic_Impl(const Graphic* pGrf); + + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + +protected: + svt::EmbeddedObjectRef xObjRef; + Graphic* pGraphic; + String aProgName; + + // wg. Kompatibilitaet erstmal am SdrTextObj + BOOL bFrame : 1; + BOOL bInDestruction : 1; + mutable bool m_bTypeAsked; + mutable bool m_bChart; + + SdrOle2ObjImpl* mpImpl; + + SvxUnoShapeModifyListener* pModifyListener; + +protected: + + void ImpSetVisAreaSize(); + void Init(); + +public: + TYPEINFO(); + + SdrOle2Obj(FASTBOOL bFrame_=FALSE); + SdrOle2Obj(const svt::EmbeddedObjectRef& rNewObjRef, FASTBOOL bFrame_=FALSE); + SdrOle2Obj(const svt::EmbeddedObjectRef& rNewObjRef, const String& rNewObjName, FASTBOOL bFrame_=FALSE); + SdrOle2Obj(const svt::EmbeddedObjectRef& rNewObjRef, const String& rNewObjName, const Rectangle& rNewRect, FASTBOOL bFrame_=FALSE); + virtual ~SdrOle2Obj(); + + // access to svt::EmbeddedObjectRef + const svt::EmbeddedObjectRef& getEmbeddedObjectRef() const { return xObjRef; } + + sal_Int64 GetAspect() const { return xObjRef.GetViewAspect(); } + void SetAspect( sal_Int64 nAspect ); + + // Ein OLE-Zeichenobjekt kann eine StarView-Grafik beinhalten. + // Diese wird angezeigt, wenn das OLE-Objekt leer ist. + void SetGraphic(const Graphic* pGrf); + Graphic* GetGraphic() const; + void GetNewReplacement(); + + // the original size of the object ( size of the icon for iconified object ) + // no conversion is done if no target mode is provided + Size GetOrigObjSize( MapMode* pTargetMapMode = NULL ) const; + + + // OLE object has got a separate PersistName member now; + // !!! use ::SetPersistName( ... ) only, if you know what you do !!! + String GetPersistName() const; + void SetPersistName( const String& rPersistName ); + + // Einem SdrOle2Obj kann man ein Applikationsnamen verpassen, den man + // spaeter wieder abfragen kann (SD braucht das fuer Praesentationsobjekte). + void SetProgName(const String& rNam) { aProgName=rNam; } + const String& GetProgName() const { return aProgName; } + FASTBOOL IsEmpty() const; + + void SetObjRef(const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& rNewObjRef); + com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObjRef() const; + + SVX_DLLPRIVATE com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObjRef_NoInit() const; + + void AbandonObject(); + + virtual void SetPage(SdrPage* pNewPage); + virtual void SetModel(SdrModel* pModel); + + /** Change the IsClosedObj attribute + + @param bIsClosed + Whether the OLE object is closed, i.e. has opaque background + */ + void SetClosedObj( bool bIsClosed ); + + // FullDrag support + virtual SdrObject* getFullDragClone() const; + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + virtual void operator=(const SdrObject& rObj); + + virtual void NbcMove(const Size& rSize); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual void NbcSetLogicRect(const Rectangle& rRect); + virtual void SetGeoData(const SdrObjGeoData& rGeo); + + static sal_Bool CanUnloadRunningObj( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj, + sal_Int64 nAspect ); + static sal_Bool Unload( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj, sal_Int64 nAspect ); + BOOL Unload(); + void Connect(); + void Disconnect(); + void ObjectLoaded(); + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getXModel() const; + + // #109985# + sal_Bool IsChart() const; + sal_Bool IsCalc() const; + + sal_Bool UpdateLinkURL_Impl(); + void BreakFileLink_Impl(); + void DisconnectFileLink_Impl(); + void CheckFileLink_Impl(); + + // allows to transfer the graphics to the object helper + void SetGraphicToObj( const Graphic& aGraphic, const ::rtl::OUString& aMediaType ); + void SetGraphicToObj( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xGrStream, + const ::rtl::OUString& aMediaType ); + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetParentXModel() const; + sal_Bool CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScaleHeight, Size& aObjAreaSize ); + sal_Bool AddOwnLightClient(); + + // handy to get the empty replacement bitmap without accessing all the old stuff + static Bitmap GetEmtyOLEReplacementBitmap(); + + void SetWindow(const com::sun::star::uno::Reference < com::sun::star::awt::XWindow >& _xWindow); +}; + +#endif //_SVDOOLE2_HXX + diff --git a/svx/inc/svx/svdopage.hxx b/svx/inc/svx/svdopage.hxx new file mode 100644 index 000000000000..b138b7c12be9 --- /dev/null +++ b/svx/inc/svx/svdopage.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdopage.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOPAGE_HXX +#define _SVDOPAGE_HXX + +#include <svx/svdobj.hxx> +#include <svx/sdrpageuser.hxx> +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC SdrPageObj : public SdrObject, public sdr::PageUser +{ +public: + // this method is called form the destructor of the referenced page. + // do all necessary action to forget the page. It is not necessary to call + // RemovePageUser(), that is done form the destructor. + virtual void PageInDestruction(const SdrPage& rPage); + +private: + // BaseProperties section + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + // #111111# + // To make things more safe, remember the page, not a number + SdrPage* mpShownPage; + +public: + TYPEINFO(); + SdrPageObj(SdrPage* pNewPage = 0L); + SdrPageObj(const Rectangle& rRect, SdrPage* pNewPage = 0L); + ~SdrPageObj(); + + // #111111# + SdrPage* GetReferencedPage() const; + void SetReferencedPage(SdrPage* pNewPage); + + // #i96598# + virtual void SetBoundRectDirty(); + + virtual UINT16 GetObjIdentifier() const; + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual void operator=(const SdrObject& rObj); + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDOPAGE_HXX + diff --git a/svx/inc/svx/svdopath.hxx b/svx/inc/svx/svdopath.hxx new file mode 100644 index 000000000000..382f968f19b2 --- /dev/null +++ b/svx/inc/svx/svdopath.hxx @@ -0,0 +1,199 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdopath.hxx,v $ + * $Revision: 1.4.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOPATH_HXX +#define _SVDOPATH_HXX + +#include <svx/svdotext.hxx> +#include <svx/xpoly.hxx> +#include "svx/svxdllapi.h" +#include <basegfx/vector/b2enums.hxx> + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class ImpPathForDragAndCreate; + +//************************************************************ +// Hilfsklasse SdrPathObjGeoData +// +// fuer Undo/Redo +// +//************************************************************ + +class SdrPathObjGeoData : public SdrTextObjGeoData +{ +public: + basegfx::B2DPolyPolygon maPathPolygon; + SdrObjKind meKind; + + SdrPathObjGeoData(); + virtual ~SdrPathObjGeoData(); +}; + +//************************************************************ +// SdrPathObj +//************************************************************ + +class SVX_DLLPUBLIC SdrPathObj : public SdrTextObj +{ + friend class ImpPathForDragAndCreate; + + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + +protected: + basegfx::B2DPolyPolygon maPathPolygon; + SdrObjKind meKind; + + // for isolation of old Drag/Create code + ImpPathForDragAndCreate* mpDAC; + +protected: + // Hilfsfunktion fuer GET/SET/INS/etc. PNT + void ImpSetClosed(sal_Bool bClose); + void ImpForceKind(); + void ImpForceLineWink(); + ImpPathForDragAndCreate& impGetDAC() const; + void impDeleteDAC() const; + +public: + static sal_Bool ImpFindPolyPnt(const basegfx::B2DPolyPolygon& rPoly, sal_uInt32 nAbsPnt, sal_uInt32& rPolyNum, sal_uInt32& rPointNum); + virtual void SetRectsDirty(sal_Bool bNotMyself = sal_False); + +public: + TYPEINFO(); + SdrPathObj(SdrObjKind eNewKind); + SdrPathObj(SdrObjKind eNewKind, const basegfx::B2DPolyPolygon& rPathPoly); + virtual ~SdrPathObj(); + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const; + virtual void operator=(const SdrObject& rObj); + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + virtual void RecalcSnapRect(); + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + virtual sal_uInt32 GetPlusHdlCount(const SdrHdl& rHdl) const; + virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, sal_uInt32 nPlNum) const; + virtual void AddToHdlList(SdrHdlList& rHdlList) const; + + // special drag methods + virtual bool hasSpecialDrag() const; + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + virtual String getSpecialDragComment(const SdrDragStat& rDrag) const; + virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const; + + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + virtual FASTBOOL BckCreate(SdrDragStat& rStat); + virtual void BrkCreate(SdrDragStat& rStat); + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + Pointer GetCreatePointer() const; + + // during drag or create, allow accessing the so-far created/modified polyPolygon + basegfx::B2DPolyPolygon getObjectPolyPolygon(const SdrDragStat& rDrag) const; + basegfx::B2DPolyPolygon getDragPolyPolygon(const SdrDragStat& rDrag) const; + + virtual void NbcMove(const Size& aSize); + virtual void NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact); + virtual void NbcRotate(const Point& rRefPnt, long nAngle, double fSin, double fCos); + virtual void NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2); + virtual void NbcShear(const Point& rRefPnt, long nAngle, double fTan, FASTBOOL bVShear); + + virtual sal_uInt32 GetSnapPointCount() const; + virtual Point GetSnapPoint(sal_uInt32 i) const; + + virtual sal_Bool IsPolyObj() const; + virtual sal_uInt32 GetPointCount() const; + virtual Point GetPoint(sal_uInt32 nHdlNum) const; + virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 nHdlNum); + + // Punkt einfuegen + sal_uInt32 NbcInsPointOld(const Point& rPos, sal_Bool bNewObj, sal_Bool bHideHim); + sal_uInt32 NbcInsPoint(sal_uInt32 i, const Point& rPos, sal_Bool bNewObj, sal_Bool bHideHim); + + // An diesem Punkt auftrennen + SdrObject* RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index); + +protected: + virtual SdrObjGeoData* NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + +public: + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + // Bezierpolygon holen/setzen + const basegfx::B2DPolyPolygon& GetPathPoly() const { return maPathPolygon; } + void SetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly); + void NbcSetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly); + + // Spezialfunktionen fuer Bezierpolygon-Bearbeitung + sal_Bool IsClosed() const { return meKind==OBJ_POLY || meKind==OBJ_PATHPOLY || meKind==OBJ_PATHFILL || meKind==OBJ_FREEFILL || meKind==OBJ_SPLNFILL; } + sal_Bool IsLine() const { return meKind==OBJ_PLIN || meKind==OBJ_PATHPLIN || meKind==OBJ_PATHLINE || meKind==OBJ_FREELINE || meKind==OBJ_SPLNLINE || meKind==OBJ_LINE; } + sal_Bool IsFreeHand() const { return meKind==OBJ_FREELINE || meKind==OBJ_FREEFILL; } + sal_Bool IsBezier() const { return meKind==OBJ_PATHLINE || meKind==OBJ_PATHFILL; } + sal_Bool IsSpline() const { return meKind==OBJ_SPLNLINE || meKind==OBJ_SPLNFILL; } + + // Pfad schliessen bzw. oeffnen; im letzteren Fall den Endpunkt um + // "nOpenDistance" verschieben + void ToggleClosed(); // long nOpenDistance); + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // + // transformation interface for StarOfficeAPI. This implements support for + // homogen 3x3 matrices containing the transformation of the SdrObject. At the + // moment it contains a shearX, rotation and translation, but for setting all linear + // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported. + // + //////////////////////////////////////////////////////////////////////////////////////////////////// + // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon + // with the base geometry and returns TRUE. Otherwise it returns FALSE. + virtual sal_Bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const; + // sets the base geometry of the object using infos contained in the homogen 3x3 matrix. + // If it's an SdrPathObj it will use the provided geometry information. The Polygon has + // to use (0,0) as upper left and will be scaled to the given size in the matrix. + virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDOPATH_HXX + diff --git a/svx/inc/svx/svdorect.hxx b/svx/inc/svx/svdorect.hxx new file mode 100644 index 000000000000..d8b0d2767553 --- /dev/null +++ b/svx/inc/svx/svdorect.hxx @@ -0,0 +1,145 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdorect.hxx,v $ + * $Revision: 1.5.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDORECT_HXX +#define _SVDORECT_HXX + +#include <svx/svdotext.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class XPolygon; + +namespace sdr { namespace properties { + class RectangleProperties; +}} + +//************************************************************ +// SdrRectObj +// +// Rechteck-Objekte (Rechteck,Kreis,...) +// +//************************************************************ + +class SVX_DLLPUBLIC SdrRectObj : public SdrTextObj +{ +private: + // BaseProperties section + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // to allow sdr::properties::RectangleProperties access to SetXPolyDirty() + friend class sdr::properties::RectangleProperties; + + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + friend class SdrTextObj; // wg SetXPolyDirty bei GrowAdjust + +protected: + XPolygon* mpXPoly; + +protected: + // Liefert TRUE, wenn das Painten ein Polygon erfordert. + FASTBOOL PaintNeedsXPoly(long nEckRad) const; + +protected: + XPolygon ImpCalcXPoly(const Rectangle& rRect1, long nRad1) const; + void SetXPolyDirty(); + + // RecalcXPoly sollte ueberladen werden. Dabei muss dann eine XPolygon + // Instanz generiert (new) und an mpXPoly zugewiesen werden. + virtual void RecalcXPoly(); + const XPolygon& GetXPoly() const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + +public: + TYPEINFO(); + // Der Eckenradius-Parameter fliegt irgendwann raus. Der Eckenradius + // ist dann (spaeter) ueber SfxItems einzustellen (SetAttributes()). + // Konstruktion eines Rechteck-Zeichenobjekts + + SdrRectObj(); + SdrRectObj(const Rectangle& rRect); + + // Konstruktion eines Textrahmens + SdrRectObj(SdrObjKind eNewTextKind); + SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect); + // der USHORT eFormat nimmt Werte des enum EETextFormat entgegen + SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect, SvStream& rInput, const String& rBaseURL, USHORT eFormat); + virtual ~SdrRectObj(); + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const; + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + virtual void operator=(const SdrObject& rObj); + virtual void RecalcSnapRect(); + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual void NbcSetLogicRect(const Rectangle& rRect); + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + + // special drag methods + virtual bool hasSpecialDrag() const; + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + virtual String getSpecialDragComment(const SdrDragStat& rDrag) const; + + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + virtual Pointer GetCreatePointer() const; + + virtual void NbcMove(const Size& rSiz); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + virtual void NbcMirror(const Point& rRef1, const Point& rRef2); + virtual void NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + + virtual FASTBOOL DoMacro(const SdrObjMacroHitRec& rRec); + virtual XubString GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const; + + virtual SdrGluePoint GetVertexGluePoint(USHORT nNum) const; + virtual SdrGluePoint GetCornerGluePoint(USHORT nNum) const; + + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); +}; + +#endif //_SVDORECT_HXX + diff --git a/svx/inc/svx/svdotable.hxx b/svx/inc/svx/svdotable.hxx new file mode 100644 index 000000000000..a524ce757898 --- /dev/null +++ b/svx/inc/svx/svdotable.hxx @@ -0,0 +1,348 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdotable.hxx,v $ + * $Revision: 1.4.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_SVDOTABLE_HXX +#define _SVX_SVDOTABLE_HXX + +#include <com/sun/star/text/WritingMode.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/table/XTable.hpp> +#include <rtl/ref.hxx> +#include "svdotext.hxx" +#include "svx/svxdllapi.h" + +//------------------------------------------------------------------------ + +class SvStream; +class SfxStyleSheet; + +namespace sdr { namespace contact { + class ViewContactOfTableObj; +}} + +namespace sdr { namespace table { + +class TableLayouter; +struct ImplTableShadowPaintInfo; + +#ifndef CellRef + class Cell; + typedef rtl::Reference< Cell > CellRef; +#endif + +//------------------------------------------------------------------------ +// SdrTableHitKind +//------------------------------------------------------------------------ + +enum TableHitKind +{ + SDRTABLEHIT_NONE, + SDRTABLEHIT_CELL, + SDRTABLEHIT_CELLTEXTAREA, + SDRTABLEHIT_HORIZONTAL_BORDER, + SDRTABLEHIT_VERTICAL_BORDER +}; + +//------------------------------------------------------------------------ + +struct CellPos +{ + sal_Int32 mnCol; + sal_Int32 mnRow; + + CellPos() : mnCol( 0 ), mnRow( 0 ) {} + CellPos( sal_Int32 nCol, sal_Int32 nRow ) { mnCol = nCol; mnRow = nRow; } + + bool operator==( const CellPos& r ) const { return (r.mnCol == mnCol) && (r.mnRow == mnRow); } + bool operator!=( const CellPos& r ) const { return (r.mnCol != mnCol) || (r.mnRow != mnRow); } +}; + +//------------------------------------------------------------------------ +// TableStyleSettings +//------------------------------------------------------------------------ + +struct SVX_DLLPUBLIC TableStyleSettings +{ + bool mbUseFirstRow; + bool mbUseLastRow; + bool mbUseFirstColumn; + bool mbUseLastColumn; + bool mbUseRowBanding; + bool mbUseColumnBanding; + + TableStyleSettings(); + TableStyleSettings( const TableStyleSettings& rStyle ); + TableStyleSettings& operator=(const TableStyleSettings& rStyle); + + bool operator==( const TableStyleSettings& r ) const; +}; + +//------------------------------------------------------------------------ +// SdrTableObj +//------------------------------------------------------------------------ + +class SdrTableObjImpl; + +class SVX_DLLPUBLIC SdrTableObj : public ::SdrTextObj +{ + friend class Cell; + friend class SdrTableObjImpl; + friend class SdrTableModifyGuard; + +public: + SdrTableObj(SdrModel* _pModel); + SdrTableObj(SdrModel* _pModel, const ::Rectangle& rNewRect, sal_Int32 nColumns, sal_Int32 nRows); + virtual ~SdrTableObj(); + + TYPEINFO(); + + // table stuff + + SdrTableObj* CloneRange( const CellPos& rStartPos, const CellPos& rEndPos ); + void DistributeColumns( sal_Int32 nFirstColumn, sal_Int32 nLastColumn ); + void DistributeRows( sal_Int32 nFirstRow, sal_Int32 nLastRow ); + + com::sun::star::uno::Reference< com::sun::star::table::XTable > getTable() const; + + bool isValid( const sdr::table::CellPos& rPos ) const; + CellPos getFirstCell() const; + CellPos getLastCell() const; + CellPos getLeftCell( const CellPos& rPos, bool bEdgeTravel ) const; + CellPos getRightCell( const CellPos& rPos, bool bEdgeTravel ) const; + CellPos getUpCell( const CellPos& rPos, bool bEdgeTravel ) const; + CellPos getDownCell( const CellPos& rPos, bool bEdgeTravel ) const; + CellPos getPreviousCell( const CellPos& rPos, bool bEdgeTravel ) const; + CellPos getNextCell( const CellPos& rPos, bool bEdgeTravel ) const; + CellPos getPreviousRow( const CellPos& rPos, bool bEdgeTravel ) const; + CellPos getNextRow( const CellPos& rPos, bool bEdgeTravel ) const; + + void createCell( ::sdr::table::CellRef& xCell ); + + const ::sdr::table::TableStyleSettings& getTableStyleSettings() const; + void setTableStyleSettings( const ::sdr::table::TableStyleSettings& rStyle ); + + TableHitKind CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_Int32& rnY, int nTol ) const; + + void uno_lock(); + void uno_unlock(); + + /** the active table has the focus or is currently edited */ + const ::sdr::table::CellRef& getActiveCell() const; + + void setActiveCell( const sdr::table::CellPos& rPos ); + void getActiveCellPos( sdr::table::CellPos& rPos ) const; + + sal_Int32 getRowCount() const; + sal_Int32 getColumnCount() const; + + void getCellBounds( const sdr::table::CellPos& rPos, ::Rectangle& rCellRect ); + + const SfxItemSet& GetActiveCellItemSet() const; + + void InsertRows( sal_Int32 nIndex, sal_Int32 nCount = 1 ); + void InsertColumns( sal_Int32 nIndex, sal_Int32 nCount = 1 ); + void DeleteRows( sal_Int32 nIndex, sal_Int32 nCount = 1 ); + void DeleteColumns( sal_Int32 nIndex, sal_Int32 nCount = 1 ); + + void setTableStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xAutoFormatStyle ); + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& getTableStyle() const; + + // text stuff + + /** returns the currently active text. */ + virtual SdrText* getActiveText() const; + + /** returns the nth available text. */ + virtual SdrText* getText( sal_Int32 nIndex ) const; + + /** returns the number of texts available for this object. */ + virtual sal_Int32 getTextCount() const; + + /** changes the current active text */ + virtual void setActiveText( sal_Int32 nIndex ); + + /** returns the index of the text that contains the given point or -1 */ + virtual sal_Int32 CheckTextHit(const Point& rPnt) const; + + virtual bool HasText() const; + sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); } + bool IsTextEditActive( const sdr::table::CellPos& rPos ); + + /** returns true only if we are in edit mode and the user actually changed anything */ + virtual bool IsRealyEdited() const; + + void FitFrameToTextSize(); + + SdrOutliner* GetCellTextEditOutliner( const sdr::table::CellPos& rPos ) const; + + // Gleichzeitig wird der Text in den Outliner gesetzt (ggf. + // der des EditOutliners) und die PaperSize gesetzt. + virtual void TakeTextRect( const sdr::table::CellPos& rPos, SdrOutliner& rOutliner, ::Rectangle& rTextRect, FASTBOOL bNoEditText=FALSE, ::Rectangle* pAnchorRect=NULL, BOOL bLineWidth=TRUE ) const; + virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText=FALSE, Rectangle* pAnchorRect=NULL, BOOL bLineWidth=TRUE ) const; + virtual void TakeTextAnchorRect(const sdr::table::CellPos& rPos, ::Rectangle& rAnchorRect ) const; + virtual void TakeTextAnchorRect(::Rectangle& rAnchorRect) const; + + virtual FASTBOOL IsAutoGrowHeight() const; + long GetMinTextFrameHeight() const; + long GetMaxTextFrameHeight() const; + virtual FASTBOOL IsAutoGrowWidth() const; + long GetMinTextFrameWidth() const; + long GetMaxTextFrameWidth() const; + + virtual FASTBOOL IsFontwork() const; + + virtual void SetPage(SdrPage* pNewPage); + virtual void SetModel(SdrModel* pNewModel); + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + virtual void SetChanged(); + + virtual FASTBOOL AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt=TRUE, FASTBOOL bWdt=TRUE) const; + virtual FASTBOOL AdjustTextFrameWidthAndHeight(FASTBOOL bHgt=TRUE, FASTBOOL bWdt=TRUE); + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + virtual void operator=(const SdrObject& rObj); + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + virtual basegfx::B2DPolyPolygon TakeContour() const; + virtual void RecalcSnapRect(); + virtual const Rectangle& GetSnapRect() const; + virtual void NbcSetSnapRect(const Rectangle& rRect); + + virtual const Rectangle& GetLogicRect() const; + virtual void NbcSetLogicRect(const Rectangle& rRect); + + virtual sal_uInt32 GetSnapPointCount() const; + virtual Point GetSnapPoint(sal_uInt32 i) const; + + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + virtual void AddToHdlList(SdrHdlList& rHdlList) const; + + // special drag methods + virtual bool hasSpecialDrag() const; + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + virtual String getSpecialDragComment(const SdrDragStat& rDrag) const; + virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const; + + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + virtual FASTBOOL BckCreate(SdrDragStat& rStat); + virtual void BrkCreate(SdrDragStat& rStat); + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + virtual Pointer GetCreatePointer() const; + + virtual void NbcMove(const Size& rSiz); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + + virtual sal_Bool BegTextEdit(SdrOutliner& rOutl); + virtual void EndTextEdit(SdrOutliner& rOutl); + virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const; + virtual void TakeTextEditArea(const sdr::table::CellPos& rPos, Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const; + virtual USHORT GetOutlinerViewAnchorMode() const; + + virtual void NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject); + + virtual OutlinerParaObject* GetOutlinerParaObject() const; + virtual OutlinerParaObject* GetEditOutlinerParaObject() const; + + virtual void NbcReformatText(); + virtual void ReformatText(); + + void SetTextEditOutliner(SdrOutliner* pOutl) { pEdtOutl=pOutl; } + + virtual sal_Bool IsVerticalWriting() const; + virtual void SetVerticalWriting(sal_Bool bVertical); + + com::sun::star::text::WritingMode GetWritingMode() const; + + virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus ); + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // + // transformation interface for StarOfficeAPI. This implements support for + // homogen 3x3 matrices containing the transformation of the SdrObject. At the + // moment it contains a shearX, rotation and translation, but for setting all linear + // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported. + // + //////////////////////////////////////////////////////////////////////////////////////////////////// + // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon + // with the base geometry and returns TRUE. Otherwise it returns FALSE. + virtual sal_Bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const; + + // sets the base geometry of the object using infos contained in the homogen 3x3 matrix. + // If it's an SdrPathObj it will use the provided geometry information. The Polygon has + // to use (0,0) as upper left and will be scaled to the given size in the matrix. + virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon); + + // #103836# iterates over the paragraphs of a given SdrObject and removes all + // hard set character attributes with the which ids contained in the + // given vector +// virtual void RemoveOutlinerCharacterAttribs( const std::vector<sal_uInt16>& rCharWhichIds ); + + /** hack for clipboard with calc and writer, export and import table content as rtf table */ + static void ExportAsRTF( SvStream& rStrm, SdrTableObj& rObj ); + static void ImportAsRTF( SvStream& rStrm, SdrTableObj& rObj ); + +private: + void init( sal_Int32 nColumns, sal_Int32 nRows ); + + // BaseProperties section + SVX_DLLPRIVATE virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + +protected: + virtual SdrObjGeoData* NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + +private: + SdrOutliner* GetCellTextEditOutliner( const ::sdr::table::Cell& rCell ) const; + +private: + // for the ViewContactOfTableObj to build the primitive representation, it is necessary to access the + // TableLayouter for position and attribute informations + friend class sdr::contact::ViewContactOfTableObj; + const TableLayouter& getTableLayouter() const; + + Rectangle maLogicRect; +private: + SdrTableObjImpl* mpImpl; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +} } + +#endif diff --git a/svx/inc/svx/svdotext.hxx b/svx/inc/svx/svdotext.hxx new file mode 100644 index 000000000000..6ffa4ab5bd22 --- /dev/null +++ b/svx/inc/svx/svdotext.hxx @@ -0,0 +1,615 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdotext.hxx,v $ + * $Revision: 1.5.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOTEXT_HXX +#define _SVDOTEXT_HXX + +#include <vcl/field.hxx> +#include <svx/svdoattr.hxx> +#include <svx/svdtrans.hxx> // GeoStat +#include <tools/datetime.hxx> +#include <svx/xtextit0.hxx> +#include "svdtext.hxx" +#include <vector> +#include <boost/shared_ptr.hpp> +#include "svx/svxdllapi.h" +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <svx/svdpagv.hxx> + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class OutlinerParaObject; +class SdrOutliner; +class SdrTextObj; +class SvxFieldItem; +class ImpSdrObjTextLink; +class EditStatus; + +namespace sdr { namespace properties { + class TextProperties; +}} + +namespace drawinglayer { namespace primitive2d { + class SdrContourTextPrimitive2D; + class SdrPathTextPrimitive2D; + class SdrBlockTextPrimitive2D; + class SdrStretchTextPrimitive2D; +}} + +namespace drawinglayer { namespace animation { + class AnimationEntryList; +}} + +namespace drawinglayer { namespace geometry { + class ViewInformation2D; +}} + +namespace sdr { namespace table { + class Cell; + class SdrTableRtfExporter; + class SdrTableRTFParser; +}} + +//************************************************************ +// Defines +//************************************************************ + +#define SDRUSERDATA_OBJTEXTLINK (1) + +//************************************************************ +// Hilfsklasse SdrTextObjGeoData +//************************************************************ + +class SdrTextObjGeoData : public SdrObjGeoData +{ +public: + Rectangle aRect; + GeoStat aGeo; +}; + +//************************************************************ +// Hilfsklasse ImpSdrObjTextLinkUserData +//************************************************************ + +class ImpSdrObjTextLinkUserData : public SdrObjUserData +{ + friend class SdrTextObj; + friend class ImpSdrObjTextLink; + + SdrTextObj* pObj; + String aFileName; // Name des referenzierten Dokuments + String aFilterName; // ggf. ein Filter + DateTime aFileDate0; // Unnoetiges neuladen vermeiden + ImpSdrObjTextLink* pLink; + rtl_TextEncoding eCharSet; + +public: + TYPEINFO(); + ImpSdrObjTextLinkUserData(SdrTextObj* pObj1); + virtual ~ImpSdrObjTextLinkUserData(); + + virtual SdrObjUserData* Clone(SdrObject* pObj1) const; +}; + +namespace sdr +{ + namespace properties + { + class CustomShapeProperties; + class CellProperties; + } // end of namespace properties +} // end of namespace sdr + +//************************************************************ +// SdrTextObj +//************************************************************ + +class SVX_DLLPUBLIC SdrTextObj : public SdrAttrObj +{ +private: + // Cell needs access to ImpGetDrawOutliner(); + + friend class sdr::table::Cell; + friend class sdr::table::SdrTableRtfExporter; + friend class sdr::table::SdrTableRTFParser; + + // CustomShapeproperties need to access the "bTextFrame" member: + friend class sdr::properties::CustomShapeProperties; + + // BaseProperties section + SVX_DLLPRIVATE virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // DrawContact section +private: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + + // This method is only allowed for sdr::properties::TextProperties + SVX_DLLPRIVATE SdrOutliner* GetTextEditOutliner() const + { + return pEdtOutl; + } + + // This method is only allowed for sdr::properties::TextProperties + SVX_DLLPRIVATE void SetPortionInfoChecked(sal_Bool bNew) + { + bPortionInfoChecked = bNew; + } + + // to allow sdr::properties::TextProperties access to SetPortionInfoChecked() + // and GetTextEditOutliner() + friend class sdr::properties::TextProperties; + friend class sdr::properties::CellProperties; + + friend class ImpTextPortionHandler; + friend class ImpSdrObjTextLink; + friend class ImpSdrObjTextLinkUserData; + friend class SdrPowerPointImport; // fuer PowerPointImport + friend class SdrExchangeView; // fuer ImpGetDrawOutliner + friend class SdrView; // fuer ImpGetDrawOutliner + friend class SdrObjEditView; // fuer TextEdit + friend class SdrMeasureObj; // fuer ImpGetDrawOutliner + friend class SvxMSDffManager; // fuer ImpGetDrawOutliner + friend class SdrObjCustomShape;// fuer ImpGetDrawOutliner + friend class SdrText; // fuer ImpGetDrawOutliner + +protected: + // Das aRect ist gleichzeig auch das Rect vom RectObj und CircObj. + // Bei bTextFrame=TRUE wird der Text in dieses Rect hineinformatiert. + // Bei bTextFrame=FALSE wird der Text am Mittelpunkt des Rect zentriert. + Rectangle aRect; + + // Der GeoStat enthaelt den Drehwinkel und einen Shearwinkel + GeoStat aGeo; + + // this is the active text + SdrText* mpText; + + // Hier merke ich mir die Ausmasse des Textes (n.i.) + Size aTextSize; + + // Ein Outliner*, damit + // 1. das TextObj nicht von mehreren Views gleichzeitig editiert und + // 2. beim Streamen waerend des Editierens ein Flush() ausgefuehrt + // werden kann + SdrOutliner* pEdtOutl; + + // Bei Fontwork muss soviel auf's BoundRect draufgerechnet werden + // damit es ausreichend gross ist. + Rectangle* pFormTextBoundRect; + + // Moegliche Werte fuer eTextKind sind: + // OBJ_TEXT normaler Textrahmen + // OBJ_TEXTEXT Textfortsetzungsrahmen + // OBJ_TITLETEXT TitleText fuer StarDraw-Praesentation + // OBJ_OUTLINETEXT OutlineText fuer StarDraw-Praesentation + // eTextKind hat nur Bedeutung, wenn bTextFrame=TRUE, da es sich sonst + // um ein beschriftetes Grafikobjekt handelt. + SdrObjKind eTextKind; + + // #108784# + // For text editing in SW Haeder/Footer it is necessary to be + // able to set an offset for the text edit to allow text editing at the + // position of the virtual object. This offset is used when setting up + // and maintaining the OutlinerView. + Point maTextEditOffset; +public: + const Point& GetTextEditOffset() const { return maTextEditOffset; } + void SetTextEditOffset(const Point& rNew) { maTextEditOffset = rNew; } + +protected: + // Fuer beschriftete Zeichenobjekte ist bTextFrame=FALSE. Der Textblock + // wird dann hoizontal und vertikal an aRect zentriert. Bei bTextFrame= + // TRUE wird der Text in aRect hineinformatiert. Der eigentliche Textrahmen + // ist durch ein SdrRectObj mit bTextFrame=TRUE realisiert. + BOOL bTextFrame : 1; + BOOL bPortionInfoChecked : 1; // Fuer Optimierung von Textobjekten + BOOL bNoShear : 1; // Obj darf nicht gesheart werden (->Graf+Ole+TextFrame) + BOOL bNoRotate : 1; // Obj darf nicht gedreht werden (->Ole) + BOOL bNoMirror : 1; // Obj darf nicht gespiegelt werden (->Ole,TextFrame) + BOOL bTextSizeDirty : 1; + + // #101684# + BOOL mbInEditMode : 1; // Is this text obejct in edit mode? + + // Fuer Objekt mit freier Groesse im Draw (Mengentext). Das Flag wird vom + // der App beim Create gesetzt. + // Wenn das Objekt dann spaeter in der Breite resized wird, wird + // AutoGrowWidth abgeschaltet (Hart auf FALSE attributiert). Das Flag wird + // dann ebenfalls auf FALSE gesetzt, sodass sich das Objekt anschliessend + // wie ein normales Textobjekt verhaelt. + // Resize in der Breite kann sein: + // - Interaktives Resize in Einfach- oder Mehrfachselektion + // - Positions+Groesse Dialog + BOOL bDisableAutoWidthOnDragging : 1; + + // #111096# + // Allow text suppression + BOOL mbTextHidden : 1; + + // #111096# + // Flag for allowing text animation. Default is sal_true. + BOOL mbTextAnimationAllowed : 1; + + SdrOutliner& ImpGetDrawOutliner() const; + +private: + SVX_DLLPRIVATE void ImpCheckMasterCachable(); + // #101029#: Extracted from ImpGetDrawOutliner() + SVX_DLLPRIVATE void ImpInitDrawOutliner( SdrOutliner& rOutl ) const; + // #101029#: Extracted from Paint() + SVX_DLLPRIVATE void ImpSetupDrawOutlinerForPaint( FASTBOOL bContourFrame, + SdrOutliner& rOutliner, + Rectangle& rTextRect, + Rectangle& rAnchorRect, + Rectangle& rPaintRect, + Fraction& aFitXKorreg ) const; + SVX_DLLPRIVATE SdrObject* ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const; + SVX_DLLPRIVATE void ImpLinkAnmeldung(); + SVX_DLLPRIVATE void ImpLinkAbmeldung(); + SVX_DLLPRIVATE ImpSdrObjTextLinkUserData* GetLinkUserData() const; +// void ImpCheckItemSetChanges(const SfxItemSet& rAttr); + +protected: + bool ImpCanConvTextToCurve() const; + SdrObject* ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, sal_Bool bClosed, sal_Bool bBezier, sal_Bool bNoSetAttr = sal_False) const; + SdrObject* ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) const; + void ImpSetTextStyleSheetListeners(); + void ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& rTextRect, const Rectangle& rAnchorRect, Fraction& rFitXKorreg) const; + void ImpJustifyRect(Rectangle& rRect) const; + void ImpCheckShear(); + Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const; + void ImpSetTextEditParams() const; + void SetTextSizeDirty() { bTextSizeDirty=TRUE; } + + // rAnchorRect ist InOut-Parameter! + void ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, BOOL bLineWidth ) const; + + virtual SdrObjGeoData* NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + FASTBOOL NbcSetEckenradius(long nRad); + FASTBOOL NbcSetAutoGrowHeight(bool bAuto); + FASTBOOL NbcSetMinTextFrameHeight(long nHgt); + FASTBOOL NbcSetMaxTextFrameHeight(long nHgt); + FASTBOOL NbcSetAutoGrowWidth(bool bAuto); + FASTBOOL NbcSetMinTextFrameWidth(long nWdt); + FASTBOOL NbcSetMaxTextFrameWidth(long nWdt); + FASTBOOL NbcSetFitToSize(SdrFitToSizeType eFit); + + // Konstruktoren fuer beschriftete Zeichenobjekte + SdrTextObj(); + SdrTextObj(const Rectangle& rNewRect); + + // Konstruktoren fuer Textrahmen + SdrTextObj(SdrObjKind eNewTextKind); + SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect); + + // der USHORT eFormat nimmt Werte des enum EETextFormat entgegen + SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect, SvStream& rInput, const String& rBaseURL, USHORT eFormat); + virtual ~SdrTextObj(); + +public: + TYPEINFO(); + + // #101684# + BOOL IsInEditMode() const { return mbInEditMode; } + + // via eCharSet kann der CharSet der vorliegenden Datei uebergeben werden. + // Bei RTL_TEXTENCODING_DONTKNOW wird der CharSet der aktuellen Plattform verwendet. + // Derzeit unterstuetzt wird ASCII und RTF wobei ich die Unterscheidung + // selbst treffe. rFilterName ist noch ohne Bedeutung und muss leer gelassen + // werden. + // I.d.R. muss die App nur SetTextLink() rufen - der Rest geschieht von + // selbst (SfxLinkManager). Die Methode LoadText() kann ausserdem verwendet + // werden, um eine Datei in ein Textobjekt zu laden (ohne Verknuepfung). + // TextLinks koennen nicht editiert werden (allenfalls spaeter mal ReadOnly). + // Eine Attributierung kann nur am Textrahmen vollzogen werden. + void SetTextLink(const String& rFileName, const String& rFilterName, rtl_TextEncoding eCharSet); + void ReleaseTextLink(); + FASTBOOL IsLinkedText() const { return pPlusData!=NULL && GetLinkUserData()!=NULL; } + FASTBOOL ReloadLinkedText(FASTBOOL bForceLoad=FALSE); + FASTBOOL LoadText(const String& rFileName, const String& rFilterName, rtl_TextEncoding eCharSet); + + virtual FASTBOOL AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt=TRUE, FASTBOOL bWdt=TRUE) const; + virtual FASTBOOL NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt=TRUE, FASTBOOL bWdt=TRUE); + virtual FASTBOOL AdjustTextFrameWidthAndHeight(FASTBOOL bHgt=TRUE, FASTBOOL bWdt=TRUE); + void NbcResizeTextAttributes(const Fraction& xFact, const Fraction& yFact); + FASTBOOL IsTextFrame() const { return bTextFrame; } + FASTBOOL IsOutlText() const { return bTextFrame && (eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT); } + SdrObjKind GetTextKind() const { return eTextKind; } + + virtual bool HasText() const; + FASTBOOL HasEditText() const; + sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); } + + /** returns the currently active text. */ + virtual SdrText* getActiveText() const; + + /** returns the nth available text. */ + virtual SdrText* getText( sal_Int32 nIndex ) const; + + /** returns the number of texts available for this object. */ + virtual sal_Int32 getTextCount() const; + + /** returns true only if we are in edit mode and the user actually changed anything */ + virtual bool IsRealyEdited() const; + + /** changes the current active text */ + virtual void setActiveText( sal_Int32 nIndex ); + + /** returns the index of the text that contains the given point or -1 */ + virtual sal_Int32 CheckTextHit(const Point& rPnt) const; + + void SetDisableAutoWidthOnDragging(FASTBOOL bOn) { bDisableAutoWidthOnDragging=bOn; } + FASTBOOL IsDisableAutoWidthOnDragging() { return bDisableAutoWidthOnDragging; } + void NbcSetText(const String& rStr); + void SetText(const String& rStr); + void NbcSetText(SvStream& rInput, const String& rBaseURL, USHORT eFormat); + void SetText(SvStream& rInput, const String& rBaseURL, USHORT eFormat); + + // FitToSize und Fontwork wird bei GetTextSize() nicht berueksichtigt! + virtual const Size& GetTextSize() const; + void FitFrameToTextSize(); + + // Gleichzeitig wird der Text in den Outliner gesetzt (ggf. + // der des EditOutliners) und die PaperSize gesetzt. + virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText=FALSE, + Rectangle* pAnchorRect=NULL, BOOL bLineWidth=TRUE ) const; + virtual void TakeTextAnchorRect(::Rectangle& rAnchorRect) const; + const GeoStat& GetGeoStat() const { return aGeo; } + + long GetEckenradius() const; + virtual FASTBOOL IsAutoGrowHeight() const; + long GetMinTextFrameHeight() const; + long GetMaxTextFrameHeight() const; + virtual FASTBOOL IsAutoGrowWidth() const; + long GetMinTextFrameWidth() const; + long GetMaxTextFrameWidth() const; + + SdrFitToSizeType GetFitToSize() const; + const Rectangle &GetGeoRect() const { return aRect; } + + // Feststellen, ob TextFontwork + virtual FASTBOOL IsFontwork() const; + + // Soll die Fontwork-Kontour versteckt werden? + FASTBOOL IsHideContour() const; + + // Textfluss innerhalb Kontur + FASTBOOL IsContourTextFrame() const; + + // Horizontale Textausrichtung + SdrTextHorzAdjust GetTextHorizontalAdjust(const SfxItemSet& rSet) const; + SdrTextHorzAdjust GetTextHorizontalAdjust() const; + + // Vertikale Textausrichtung + SdrTextVertAdjust GetTextVerticalAdjust(const SfxItemSet& rSet) const; + SdrTextVertAdjust GetTextVerticalAdjust() const; + + // Textrahmenabstaende + long GetTextLeftDistance() const; + long GetTextRightDistance() const; + long GetTextUpperDistance() const; + long GetTextLowerDistance() const; + SdrTextAniKind GetTextAniKind() const; + SdrTextAniDirection GetTextAniDirection() const; + + virtual void SetPage(SdrPage* pNewPage); + virtual void SetModel(SdrModel* pNewModel); + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + + // Wird zur Bestimmung des Textankerbereichs benoetigt + virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const; + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + virtual void operator=(const SdrObject& rObj); + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + virtual basegfx::B2DPolyPolygon TakeContour() const; + virtual void RecalcSnapRect(); + virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual void NbcSetLogicRect(const Rectangle& rRect); + virtual const Rectangle& GetLogicRect() const; + virtual long GetRotateAngle() const; + virtual long GetShearAngle(FASTBOOL bVertical=FALSE) const; + + virtual sal_uInt32 GetSnapPointCount() const; + virtual Point GetSnapPoint(sal_uInt32 i) const; + + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + + // special drag methods + virtual bool hasSpecialDrag() const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + virtual String getSpecialDragComment(const SdrDragStat& rDrag) const; + + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + virtual FASTBOOL BckCreate(SdrDragStat& rStat); + virtual void BrkCreate(SdrDragStat& rStat); + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + virtual Pointer GetCreatePointer() const; + + virtual void NbcMove(const Size& rSiz); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + virtual void NbcMirror(const Point& rRef1, const Point& rRef2); + virtual void NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + + virtual FASTBOOL HasTextEdit() const; + virtual sal_Bool BegTextEdit(SdrOutliner& rOutl); + virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const; + virtual void EndTextEdit(SdrOutliner& rOutl); + virtual USHORT GetOutlinerViewAnchorMode() const; + + void StartTextAnimation(OutputDevice* pOutDev, const Point& rOffset, long nExtraData=0L); + void StopTextAnimation(OutputDevice* pOutDev=NULL, long nExtraData=0L); + + virtual void NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject); + void NbcSetOutlinerParaObjectForText( OutlinerParaObject* pTextObject, SdrText* pText ); + virtual OutlinerParaObject* GetOutlinerParaObject() const; + virtual OutlinerParaObject* GetEditOutlinerParaObject() const; + virtual bool HasOutlinerParaObject() const; + + virtual void NbcReformatText(); + virtual void ReformatText(); + + virtual FASTBOOL CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos, + FASTBOOL bEdit, Color*& rpTxtColor, Color*& rpFldColor, String& rRet) const; + + virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; + + void SetTextEditOutliner(SdrOutliner* pOutl) { pEdtOutl=pOutl; } + + /** Setup given Outliner equivalently to SdrTextObj::Paint() + + To setup an arbitrary Outliner in the same way as the draw + outliner on SdrTextObj::Paint(). Among others, the paper size, + control word and character stretching are initialized, such + that the formatting should match the screen representation. + The textual content of the outliner is not touched, i.e. no + Init() or Clear() is called on the Outliner. + + @param rOutl + The Outliner to setup. + + @param rPaintRect + The region to paint the outliner content into. This is useful + to e.g. determine the top, left position of text in shapes. + */ + void SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const; + + /** Update given Outliner equivalently to SdrTextObj::Paint() + + Same functionality as in SetupOutlinerFormatting(), except + that the outliner content is not cleared. + + @param rOutl + The Outliner to update. + + @param rPaintRect + The region to paint the outliner content into. This is useful + to e.g. determine the top, left position of text in shapes. + */ + void UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const; + void ForceOutlinerParaObject(); + virtual sal_Bool IsVerticalWriting() const; + virtual void SetVerticalWriting(sal_Bool bVertical); + + /** called from the SdrObjEditView during text edit when the status of the edit outliner changes */ + virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus ); + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // + // transformation interface for StarOfficeAPI. This implements support for + // homogen 3x3 matrices containing the transformation of the SdrObject. At the + // moment it contains a shearX, rotation and translation, but for setting all linear + // transforms like Scale, ShearX, ShearY, Rotate and Translate are supported. + // + //////////////////////////////////////////////////////////////////////////////////////////////////// + // gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon + // with the base geometry and returns TRUE. Otherwise it returns FALSE. + virtual sal_Bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const; + + // sets the base geometry of the object using infos contained in the homogen 3x3 matrix. + // If it's an SdrPathObj it will use the provided geometry information. The Polygon has + // to use (0,0) as upper left and will be scaled to the given size in the matrix. + virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DPolyPolygon& rPolyPolygon); + + // #103836# iterates over the paragraphs of a given SdrObject and removes all + // hard set character attributes with the which ids contained in the + // given vector + virtual void RemoveOutlinerCharacterAttribs( const std::vector<sal_uInt16>& rCharWhichIds ); + + // #111096# + // Access to thext hidden flag + sal_Bool GetTextHidden() const; + void NbcSetTextHidden(sal_Bool bNew); + + // #111096# + // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a + // painting rectangle. Rotation is taken from the object. + GDIMetaFile* GetTextScrollMetaFileAndRectangle(Rectangle& rScrollRectangle, Rectangle& rPaintRectangle); + + // #111096# + // Access to TextAnimationAllowed flag + bool IsTextAnimationAllowed() const; + void SetTextAnimationAllowed(sal_Bool bNew); + + // #i8824# + // Set single item at the local ItemSet. *Does not use* AllowItemChange(), + // ItemChange(), PostItemChange() and ItemSetChanged() calls. + void SetObjectItemNoBroadcast(const SfxPoolItem& rItem); + +public: + ////////////////////////////////////////////////////////////////////////////// + // text primitive decomposition helpers + void impDecomposeContourTextPrimitive( + drawinglayer::primitive2d::Primitive2DSequence& rTarget, + const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive, + const drawinglayer::geometry::ViewInformation2D& aViewInformation) const; + void impDecomposePathTextPrimitive( + drawinglayer::primitive2d::Primitive2DSequence& rTarget, + const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive, + const drawinglayer::geometry::ViewInformation2D& aViewInformation) const; + void impDecomposeBlockTextPrimitive( + drawinglayer::primitive2d::Primitive2DSequence& rTarget, + const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive, + const drawinglayer::geometry::ViewInformation2D& aViewInformation) const; + void impDecomposeStretchTextPrimitive( + drawinglayer::primitive2d::Primitive2DSequence& rTarget, + const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive, + const drawinglayer::geometry::ViewInformation2D& aViewInformation) const; + + ////////////////////////////////////////////////////////////////////////////// + // timing generators + void impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const; + void impGetScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const; + + /** returns false if the given pointer is NULL + or if the given SdrOutliner contains no text. + Also checks for one empty paragraph. + */ + static bool HasTextImpl( SdrOutliner* pOutliner ); + + /** returns a new created and non shared outliner. + The outliner will not get updated when the SdrModel is changed. + */ + boost::shared_ptr< SdrOutliner > CreateDrawOutliner(); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDOTEXT_HXX + diff --git a/svx/inc/svx/svdouno.hxx b/svx/inc/svx/svdouno.hxx new file mode 100644 index 000000000000..83019f6b1cc5 --- /dev/null +++ b/svx/inc/svx/svdouno.hxx @@ -0,0 +1,166 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdouno.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOUNO_HXX +#define _SVDOUNO_HXX + +#include <com/sun/star/awt/XControlModel.hpp> +#include <com/sun/star/awt/XControl.hpp> +#ifndef _COM_SUN_STAR_AWT_XMULTISERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#endif +#include <com/sun/star/awt/XControlContainer.hpp> +#include "svx/svxdllapi.h" +#include <svx/svdorect.hxx> + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SdrView; +class SdrPageWindow; +class SdrControlEventListenerImpl; + +namespace sdr { namespace contact { + class ViewContactOfUnoControl; +}} + +//************************************************************ +// SdrUnoObj +//************************************************************ + +struct SdrUnoObjDataHolder; +class SVX_DLLPUBLIC SdrUnoObj : public SdrRectObj +{ + friend class SdrPageView; + friend class SdrControlEventListenerImpl; + + SdrUnoObjDataHolder* m_pImpl; + + String aUnoControlModelTypeName; + String aUnoControlTypeName; + BOOL bOwnUnoControlModel; + +protected: + ::com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > xUnoControlModel; // kann auch von aussen gesetzt werden + +private: + SVX_DLLPRIVATE void CreateUnoControlModel(const String& rModelName); + SVX_DLLPRIVATE void CreateUnoControlModel(const String& rModelName, + const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac ); + +public: + TYPEINFO(); + + SdrUnoObj(const String& rModelName, BOOL bOwnsModel = TRUE); + SdrUnoObj(const String& rModelName, + const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac, + BOOL bOwnsModel = TRUE); + virtual ~SdrUnoObj(); + + virtual void SetPage(SdrPage* pNewPage); + virtual void SetModel(SdrModel* pModel); + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT16 GetObjIdentifier() const; + + virtual void operator = (const SdrObject& rObj); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcSetLayer(SdrLayerID nLayer); + + // SpecialDrag support + virtual bool hasSpecialDrag() const; + + // FullDrag support + virtual bool supportsFullDrag() const; + virtual SdrObject* getFullDragClone() const; + + virtual void TakeObjNameSingul(XubString& rName) const; + virtual void TakeObjNamePlural(XubString& rName) const; + + virtual void SetContextWritingMode( const sal_Int16 _nContextWritingMode ); + + ::com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > GetUnoControlModel() const {return xUnoControlModel;} + ::com::sun::star::uno::Reference< com::sun::star::awt::XControl > GetUnoControl(const SdrView& _rView, const OutputDevice& _rOut) const; + + /** retrieves a temporary XControl instance for a given output device + + The method GetUnoControl, used to retrieve the XControl whose parent is a given device, only works + if the SdrUnoObj has already been painted at least once onto this device. However, there are valid + scenarios where you need certain information on how a control is painted onto a window, without + actually painting it. For example, you might be interested in the DeviceInfo of an UNO control. + + For those cases, you can ontain an XControl which behaves as the control which *would* be used to + paint onto a window. + + @param _rWindow + the window for which should act as parent for the temporary control + @param _inout_ControlContainer + the control container belonging to the window, necessary as context + for the newly created control. A control container is usually created by calling + VCLUnoHelper::CreateControlContainer. + If _inout_ControlContainer is <NULL/>, it will be created internally, and passed to the caller. + In this case, the caller also takes ownership of the control container, and is responsible for + disposing it when not needed anymore. + @return + The requested control. This control is temporary only, and the caller is responsible for it. + In particular, the caller is required to dispose it when it's not needed anymore. + + */ + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > + GetTemporaryControlForWindow( + const Window& _rWindow, + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _inout_ControlContainer + ) const; + + const String& GetUnoControlModelTypeName() const { return aUnoControlTypeName; } + const String& GetUnoControlTypeName() const { return aUnoControlTypeName; } + + virtual void SetUnoControlModel( const ::com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& xModel ); + +protected: + // SdrObject overridables + virtual ::sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + +private: + /** retrieves the typed ViewContact for the object + @param _out_rpContact + Upon successfull return, ->_out_rpContact contains the ViewContact. + @return + <TRUE/> if and only if the contact was successfully retrieved. In this case, + ->_out_rpContact contains a pointer to this contact. + A failure to retrieve the contact object fires an assertion in non-product builds. + */ + SVX_DLLPRIVATE bool impl_getViewContact( ::sdr::contact::ViewContactOfUnoControl*& _out_rpContact ) const; +}; + + +#endif // _SVDOUNO_HXX + diff --git a/svx/inc/svx/svdoutl.hxx b/svx/inc/svx/svdoutl.hxx new file mode 100644 index 000000000000..286e19ec6dea --- /dev/null +++ b/svx/inc/svx/svdoutl.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdoutl.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOUTL_HXX +#define _SVDOUTL_HXX + +#include <svx/outliner.hxx> +#include "svx/svxdllapi.h" +#include <svx/svdobj.hxx> + +class SdrTextObj; +class SdrPaintInfoRec; +class SdrPage; + +class SVX_DLLPUBLIC SdrOutliner : public Outliner +{ +protected: + SdrObjectWeakRef mpTextObj; + const SdrPage* mpVisualizedPage; + +public: + SdrOutliner( SfxItemPool* pItemPool, USHORT nMode ); + virtual ~SdrOutliner() ; + + void SetTextObj( const SdrTextObj* pObj ); + void SetTextObjNoInit( const SdrTextObj* pObj ); + const SdrTextObj* GetTextObj() const; + + void setVisualizedPage(const SdrPage* pPage) { if(pPage != mpVisualizedPage) mpVisualizedPage = pPage; } + const SdrPage* getVisualizedPage() const { return mpVisualizedPage; } + + virtual String CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor); +}; + +#endif //_SVDOUTL_HXX + diff --git a/svx/inc/svx/svdovirt.hxx b/svx/inc/svx/svdovirt.hxx new file mode 100644 index 000000000000..190576fc68c6 --- /dev/null +++ b/svx/inc/svx/svdovirt.hxx @@ -0,0 +1,170 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdovirt.hxx,v $ + * $Revision: 1.4.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDOVIRT_HXX +#define _SVDOVIRT_HXX + +#include <svx/svdobj.hxx> +#include "svx/svxdllapi.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// SdrVirtObj +// +// Achtung! Das virtuelle Objekt ist noch nicht bis in alle Feinheiten +// durchprogrammiert und getestet. Z.Zt. kommt es nur in abgeleiteter +// beim Writer zum Einsatz. +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrVirtObj : public SdrObject +{ +public: + virtual sdr::properties::BaseProperties& GetProperties() const; + +private: + // AW, OD 2004-05-03 #i27224# + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); + +protected: + SdrObject& rRefObj; // Referenziertes Zeichenobjekt + Rectangle aSnapRect; + +protected: + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + + virtual SdrObjGeoData* NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + +public: + TYPEINFO(); + SdrVirtObj(SdrObject& rNewObj); + SdrVirtObj(SdrObject& rNewObj, const Point& rAnchorPos); + virtual ~SdrVirtObj(); + virtual SdrObject& ReferencedObj(); + virtual const SdrObject& GetReferencedObj() const; + virtual void NbcSetAnchorPos(const Point& rAnchorPos); + virtual void SetModel(SdrModel* pNewModel); + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual UINT32 GetObjInventor() const; + virtual UINT16 GetObjIdentifier() const; + virtual SdrObjList* GetSubList() const; + + virtual const Rectangle& GetCurrentBoundRect() const; + virtual const Rectangle& GetLastBoundRect() const; + virtual void RecalcBoundRect(); + virtual void SetChanged(); + virtual SdrObject* Clone() const; + virtual void operator=(const SdrObject& rObj); + + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + + virtual basegfx::B2DPolyPolygon TakeXorPoly() const; + virtual sal_uInt32 GetHdlCount() const; + virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; + virtual sal_uInt32 GetPlusHdlCount(const SdrHdl& rHdl) const; + virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, sal_uInt32 nPlNum) const; + virtual void AddToHdlList(SdrHdlList& rHdlList) const; + + // special drag methods + virtual bool hasSpecialDrag() const; + virtual bool beginSpecialDrag(SdrDragStat& rDrag) const; + virtual bool applySpecialDrag(SdrDragStat& rDrag); + virtual String getSpecialDragComment(const SdrDragStat& rDrag) const; + virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const; + + // FullDrag support + virtual bool supportsFullDrag() const; + virtual SdrObject* getFullDragClone() const; + + virtual FASTBOOL BegCreate(SdrDragStat& rStat); + virtual FASTBOOL MovCreate(SdrDragStat& rStat); + virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + virtual FASTBOOL BckCreate(SdrDragStat& rStat); + virtual void BrkCreate(SdrDragStat& rStat); + virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat& rDrag) const; + + virtual void NbcMove(const Size& rSiz); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + virtual void NbcMirror(const Point& rRef1, const Point& rRef2); + virtual void NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + + virtual void Move(const Size& rSiz); + virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + virtual void Rotate(const Point& rRef, long nWink, double sn, double cs); + virtual void Mirror(const Point& rRef1, const Point& rRef2); + virtual void Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear); + + virtual void RecalcSnapRect(); + virtual const Rectangle& GetSnapRect() const; + virtual void SetSnapRect(const Rectangle& rRect); + virtual void NbcSetSnapRect(const Rectangle& rRect); + + virtual const Rectangle& GetLogicRect() const; + virtual void SetLogicRect(const Rectangle& rRect); + virtual void NbcSetLogicRect(const Rectangle& rRect); + + virtual long GetRotateAngle() const; + virtual long GetShearAngle(FASTBOOL bVertical=FALSE) const; + + virtual sal_uInt32 GetSnapPointCount() const; + virtual Point GetSnapPoint(sal_uInt32 i) const; + + virtual sal_Bool IsPolyObj() const; + virtual sal_uInt32 GetPointCount() const; + virtual Point GetPoint(sal_uInt32 i) const; + virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i); + + virtual SdrObjGeoData* GetGeoData() const; + virtual void SetGeoData(const SdrObjGeoData& rGeo); + + virtual void NbcReformatText(); + virtual void ReformatText(); + + virtual FASTBOOL HasMacro() const; + virtual SdrObject* CheckMacroHit (const SdrObjMacroHitRec& rRec) const; + virtual Pointer GetMacroPointer (const SdrObjMacroHitRec& rRec) const; + virtual void PaintMacro (OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const; + virtual FASTBOOL DoMacro (const SdrObjMacroHitRec& rRec); + virtual XubString GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const; + + // OD 30.06.2003 #108784# - virtual <GetOffset()> returns Point(0,0) + // #i73248# for default SdrVirtObj, offset is aAnchor, not (0,0) + virtual const Point GetOffset() const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDOVIRT_HXX + diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx new file mode 100644 index 000000000000..3523308b6e8f --- /dev/null +++ b/svx/inc/svx/svdpage.hxx @@ -0,0 +1,604 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdpage.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDPAGE_HXX +#define _SVDPAGE_HXX + +#include <vcl/bitmap.hxx> + +#ifndef _PRINT_HXX //autogen +#include <vcl/print.hxx> +#endif +#ifndef _GDIMTF_HXX //autogen +#include <vcl/gdimtf.hxx> +#endif +#include <tools/weakbase.hxx> +#include <cppuhelper/weakref.hxx> +#include <svx/svdtypes.hxx> +#include <svx/svdlayer.hxx> + +////////////////////////////////////////////////////////////////////////////// +// sdr::Comment interface +#include <svx/sdrcomment.hxx> + +// #111111# +#include <vector> +#include <svx/sdrpageuser.hxx> + +// StandardCheckVisisbilityRedirector +#include <svx/sdr/contact/viewobjectcontactredirector.hxx> +#include <svx/sdrmasterpagedescriptor.hxx> +#include "svx/svxdllapi.h" + +#include <com/sun/star/container/XIndexAccess.hpp> +#include <svx/svdobj.hxx> +#include <boost/scoped_ptr.hpp> + +// #110094# +namespace sdr +{ + namespace contact + { + class ViewContact; + } // end of namespace contact +} // end of namespace sdr + +// ------------------------------ +// - intern benutzte Paint-Modi - +// ------------------------------ + +//#if 0 // _SOLAR__PRIVATE + +#define IMP_PAGEPAINT_NORMAL 0 +#define IMP_PAGEPAINT_PREPARE_CACHE 1 +#define IMP_PAGEPAINT_PAINT_CACHE 2 +#define IMP_PAGEPAINT_PREPARE_BG_CACHE 3 +#define IMP_PAGEPAINT_PAINT_BG_CACHE 4 + +//#endif // __PRIVATE + +class SdrPage; +class SdrModel; +class SfxItemPool; +class SdrPageView; +class SdrLayerAdmin; +class SetOfByte; +class Color; +class SfxStyleSheet; +class SvxUnoDrawPagesAccess; + +enum SdrInsertReasonKind {SDRREASON_UNKNOWN, // unbekannt + SDRREASON_STREAMING, // einlesen eines Doks + SDRREASON_UNDO, // kommt aus dem Undo + SDRREASON_COPY, // irgendjemand kopiert... + SDRREASON_VIEWCREATE, // vom Anwender interaktiv erzeugt + SDRREASON_VIEWCALL}; // Durch SdrView::Group(), ... + +class SdrInsertReason { + const SdrObject* pRefObj; + SdrInsertReasonKind eReason; +public: + SdrInsertReason(): pRefObj(NULL),eReason(SDRREASON_UNKNOWN) {} + SdrInsertReason(SdrInsertReasonKind eR,const SdrObject* pO=NULL): pRefObj(pO),eReason(eR) {} + void SetReferenceObject(const SdrObject* pO) { pRefObj=pO; } + const SdrObject* GetReferenceObject() const { return pRefObj; } + void SetReason(SdrInsertReasonKind eR) { eReason=eR; } + SdrInsertReasonKind GetReason() const { return eReason; } +}; + +class SVX_DLLPUBLIC SdrObjList { +private: + typedef ::std::vector<SdrObject*> SdrObjectContainerType; + SdrObjectContainerType maList; + +protected: +friend class SdrObjListIter; +friend class SdrEditView; + SdrObjList* pUpList; // Vaterliste + SdrModel* pModel; // Diese Liste gehoert zu diesem Model (Layer,ItemPool,Storage). + SdrPage* pPage; // Page, in die Liste haengt. Kann auch this sein. + SdrObject* pOwnerObj; // OwnerObject, falls Liste eines GruppenObjekts. + Rectangle aOutRect; + Rectangle aSnapRect; + SdrObjListKind eListKind; + FASTBOOL bObjOrdNumsDirty; + FASTBOOL bRectsDirty; +protected: + virtual void RecalcRects(); + +private: + /// simple ActionChildInserted forwarder to have it on a central place + void impChildInserted(SdrObject& rChild) const; +public: + TYPEINFO(); + SdrObjList(SdrModel* pNewModel, SdrPage* pNewPage, SdrObjList* pNewUpList=NULL); + SdrObjList(const SdrObjList& rSrcList); + virtual ~SdrObjList(); + // !!! Diese Methode nur fuer Leute, die ganz genau wissen was sie tun !!! + + // #110094# This should not be needed (!) + void SetObjOrdNumsDirty() { bObjOrdNumsDirty=TRUE; } + // pModel, pPage, pUpList und pOwnerObj werden Zuweisungeoperator nicht veraendert! + void operator=(const SdrObjList& rSrcList); + void CopyObjects(const SdrObjList& rSrcList); + // alles Aufraeumen (ohne Undo) + void Clear(); + SdrObjListKind GetListKind() const { return eListKind; } + void SetListKind(SdrObjListKind eNewKind) { eListKind=eNewKind; } + SdrObjList* GetUpList() const { return pUpList; } + void SetUpList(SdrObjList* pNewUpList) { pUpList=pNewUpList; } + SdrObject* GetOwnerObj() const { return pOwnerObj; } + void SetOwnerObj(SdrObject* pNewOwner) { pOwnerObj=pNewOwner; } + virtual SdrPage* GetPage() const; + virtual void SetPage(SdrPage* pNewPage); + virtual SdrModel* GetModel() const; + virtual void SetModel(SdrModel* pNewModel); + // Neuberechnung der Objekt-Ordnungsnummern + void RecalcObjOrdNums(); + FASTBOOL IsObjOrdNumsDirty() const { return bObjOrdNumsDirty; } + virtual void NbcInsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND + , const SdrInsertReason* pReason=NULL + ); + virtual void InsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND + , const SdrInsertReason* pReason=NULL + ); + // aus Liste entfernen ohne delete + virtual SdrObject* NbcRemoveObject(ULONG nObjNum); + virtual SdrObject* RemoveObject(ULONG nObjNum); + // Vorhandenes Objekt durch ein anderes ersetzen. + // Wie Remove&Insert jedoch performanter, da die Ordnungsnummern + // nicht Dirty gesetzt werden muessen. + virtual SdrObject* NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum); + virtual SdrObject* ReplaceObject(SdrObject* pNewObj, ULONG nObjNum); + // Die Z-Order eines Objekts veraendern + virtual SdrObject* NbcSetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum); + virtual SdrObject* SetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum); + + virtual void SetRectsDirty(); + + const Rectangle& GetAllObjSnapRect() const; + const Rectangle& GetAllObjBoundRect() const; + + // Alle Textobjekte neu formatieren, z.B. bei Druckerwechsel + void NbcReformatAllTextObjects(); + void ReformatAllTextObjects(); + + /** #103122# reformats all edge objects that are connected to other objects */ + void ReformatAllEdgeObjects(); + + // Die Vorlagenattribute der Zeichenobjekte in harte Attribute verwandeln. + void BurnInStyleSheetAttributes(); + + ULONG GetObjCount() const; + SdrObject* GetObj(ULONG nNum) const; + + // Gelinkte Seite oder gelinktes Gruppenobjekt + virtual FASTBOOL IsReadOnly() const; + + // Zaehlt alle Objekte inkl. Objekte in Objektgruppen, ... + ULONG CountAllObjects() const; + + // Alle aufgelagerten Teile (z.B. Grafiken) der Liste in den + // Speicher laden. + void ForceSwapInObjects() const; + void ForceSwapOutObjects() const; + + void SwapInAll() const { ForceSwapInObjects(); } + void SwapOutAll() const { ForceSwapOutObjects(); } + + /** Makes the object list flat, i.e. the object list content are + then tree leaves + + This method travels recursively over all group objects in this + list, extracts the content, inserts it flat to the list and + removes the group object afterwards. + */ + virtual void FlattenGroups(); + /** Ungroup the object at the given index + + This method ungroups the content of the group object at the + given index, i.e. the content is put flat into the object list + (if the object at the given index is no group, this method is + a no-op). If the group itself contains group objects, the + operation is performed recursively, such that the content of + the given object contains no groups afterwards. + */ + virtual void UnGroupObj( ULONG nObjNum ); + + /** Return whether there is an explicit, user defined, object navigation + order. When there is one this method returns <TRUE/> and the + GetObjectForNavigationPosition() and + SdrObject::GetNavigationPosition() methods will return values + different from those returne by SdrObject::GetOrdNum() and + GetObj(). + */ + bool HasObjectNavigationOrder (void) const; + + /** Set the navigation position of the given object to the specified + value. Note that this changes the navigation position for all + objects on or following the old or new position. + */ + void SetObjectNavigationPosition ( + SdrObject& rObject, + const sal_uInt32 nNewNavigationPosition); + + /** Return the object for the given navigation position. When there is + a user defined navigation order, i.e. mpNavigationOrder is not NULL, + then that is used to look up the object. Otherwise the z-order is + used by looking up the object in maList. + @param nNavigationPosition + Valid values include 0 and are smaller than the number of + objects as returned by GetObjCount(). + @return + The returned pointer is NULL for invalid positions. + */ + SdrObject* GetObjectForNavigationPosition (const sal_uInt32 nNavigationPosition) const; + + /** Restore the navigation order to that defined by the z-order. + */ + void ClearObjectNavigationOrder (void); + + /** Set the navigation position of all SdrObjects to their position in + the mpNavigationOrder list. This method returns immediately when no + update is necessary. + @return + This method returns <TRUE/> when the navigation positions stored + in SdrObjects are up to date. + It returns <FALSE/> when teh navigation positions are not valid, + for example because no explicit navigation order has been + defined, i.e. HasObjectNavigationOrder() would return <FALSE/>. + */ + bool RecalcNavigationPositions (void); + + /** Set the navigation order to the one defined by the given list of + XShape objects. + @param rxOrder + When this is an empty reference then the navigation order is + reset to the z-order. The preferred way to do this, however, is + to call ClearObjectNavigationOrder(). + Otherwise this list is expected to contain all the shapes in the + called SdrObjList. + */ + void SetNavigationOrder (const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XIndexAccess>& rxOrder); + +private: + class WeakSdrObjectContainerType; + /// This list, if it exists, defines the navigation order. It it does + /// not exist then maList defines the navigation order. + ::boost::scoped_ptr<WeakSdrObjectContainerType> mpNavigationOrder; + + /// This flag is <TRUE/> when the mpNavigation list has been changed but + /// the indices of the referenced SdrObjects still have their old values. + bool mbIsNavigationOrderDirty; + + /** Insert an SdrObject into maList. Do not modify the maList member + directly. + @param rObject + The object to insert into the object list. + @param nInsertPosition + The given object is inserted before the object at this + position. Valid values include 0 (the object is inserted at the + head of the list) and the number of objects in the list as + returned by GetObjCount() (the object is inserted at the end of + the list.) + */ + void InsertObjectIntoContainer ( + SdrObject& rObject, + const sal_uInt32 nInsertPosition); + + /** Replace an object in the object list. + @param rObject + The new object that replaces the one in the list at the + specified position. + @param nObjectPosition + The object at this position in the object list is replaced by + the given object. Valid values include 0 and are smaller than + the number of objects in the list. + */ + void ReplaceObjectInContainer ( + SdrObject& rObject, + const sal_uInt32 nObjectPosition); + + /** Remove an object from the object list. + The object list has to contain at least one element. + @param nObjectPosition + The object at this position is removed from the object list. + Valid values include 0 and are smaller than the number of + objects in the list. + */ + void RemoveObjectFromContainer ( + const sal_uInt32 nObjectPosition); +}; + +/* +Eine Sdraw-Seite enthaelt genau eine Objektliste sowie eine Beschreibung +der physikalischen Seitendimensionen (Groesse/Raender). Letzteres wird +lediglich zum Fangen von Objekten beim Draggen benoetigt. +An der Seite lassen sich (ueber SdrObjList) Objekte einfuegen und loeschen, +nach vorn und nach hinten stellen. Ausserdem kann die Ordnungszahl eines +Objektes abgefragt sowie direkt gesetzt werden. +*/ + +// Used for all methods which return a page number +#define SDRPAGE_NOTFOUND 0xFFFF + +// Fuer das Fangraster/Punkgitter im Writer +class SdrPageGridFrame { + Rectangle aPaper; + Rectangle aUserArea; +public: + SdrPageGridFrame(const Rectangle& rPaper): aPaper(rPaper), aUserArea(rPaper) {} + SdrPageGridFrame(const Rectangle& rPaper, const Rectangle& rUser): aPaper(rPaper), aUserArea(rUser) {} + void SetPaperRect(const Rectangle& rPaper) { aPaper=rPaper; } + void SetUserArea(const Rectangle& rUser) { aUserArea=rUser; } + const Rectangle& GetPaperRect() const { return aPaper; } + const Rectangle& GetUserArea() const { return aUserArea; } +}; + +class SVX_DLLPUBLIC SdrPageGridFrameList { + Container aList; +private: + SVX_DLLPRIVATE SdrPageGridFrameList(const SdrPageGridFrameList& rSrcList); // never implemented + SVX_DLLPRIVATE void operator=(const SdrPageGridFrameList& rSrcList); // never implemented +protected: + SdrPageGridFrame* GetObject(USHORT i) const { return (SdrPageGridFrame*)(aList.GetObject(i)); } +public: + SdrPageGridFrameList(): aList(1024,4,4) {} + ~SdrPageGridFrameList() { Clear(); } + void Clear(); + USHORT GetCount() const { return USHORT(aList.Count()); } + void Insert(const SdrPageGridFrame& rGF, USHORT nPos=0xFFFF) { aList.Insert(new SdrPageGridFrame(rGF),nPos); } + void Delete(USHORT nPos) { delete (SdrPageGridFrame*)aList.Remove(nPos); } + void Move(USHORT nPos, USHORT nNewPos) { aList.Insert(aList.Remove(nPos),nNewPos); } + SdrPageGridFrame& operator[](USHORT nPos) { return *GetObject(nPos); } + const SdrPageGridFrame& operator[](USHORT nPos) const { return *GetObject(nPos); } +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrPage: public SdrObjList, public tools::WeakBase< SdrPage > +{ + /////////////////////////////////////////////////////////////////////////////// + // start PageUser section +private: + // #111111# PageUser section + sdr::PageUserVector maPageUsers; + +public: + void AddPageUser(sdr::PageUser& rNewUser); + void RemovePageUser(sdr::PageUser& rOldUser); + + /////////////////////////////////////////////////////////////////////////////// + // end PageUser section + + /////////////////////////////////////////////////////////////////////////////// + // #110094# DrawContact section +private: + sdr::contact::ViewContact* mpViewContact; + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); +public: + sdr::contact::ViewContact& GetViewContact() const; + + // #110094# DrawContact support: Methods for handling Page changes + void ActionChanged() const; + + // #i9076# + friend class SdrModel; + friend class SvxUnoDrawPagesAccess; + +// this class uses its own UNO wrapper +// and thus has to set mxUnoPage +friend class ChXChartDocument; + + INT32 nWdt; // Seitengroesse + INT32 nHgt; // Seitengroesse + INT32 nBordLft; // Seitenrand links + INT32 nBordUpp; // Seitenrand oben + INT32 nBordRgt; // Seitenrand rechts + INT32 nBordLwr; // Seitenrand unten + + // this is a weak reference to a possible living api wrapper for this page + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxUnoPage; + +protected: + SdrLayerAdmin* pLayerAdmin; + SdrObject* pBackgroundObj; + + // new MasterPageDescriptorVector + ::sdr::MasterPageDescriptor* mpMasterPageDescriptor; + + SetOfByte aPrefVisiLayers; + USHORT nPageNum; + + // bitfield + unsigned mbMaster : 1; // flag if this is a MasterPage + unsigned mbInserted : 1; + unsigned mbObjectsNotPersistent : 1; + unsigned mbSwappingLocked : 1; + + // #i93597# + unsigned mbPageBorderOnlyLeftRight : 1; + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage(); + +public: + TYPEINFO(); + SdrPage(SdrModel& rNewModel, bool bMasterPage=false); + // Copy-Ctor und Zuweisungeoperator sind nicht getestet! + SdrPage(const SdrPage& rSrcPage); + virtual ~SdrPage(); + // pModel, pPage, pUpList, pOwnerObj und mbInserted werden Zuweisungeoperator nicht veraendert! + virtual void operator=(const SdrPage& rSrcPage); + virtual SdrPage* Clone() const; + virtual SdrPage* Clone(SdrModel* pNewModel) const; + bool IsMasterPage() const { return mbMaster; } + void SetInserted(bool bNew = true); + FASTBOOL IsInserted() const { return mbInserted; } + virtual void SetChanged(); + + // #i68775# React on PageNum changes (from Model in most cases) + void SetPageNum(sal_uInt16 nNew); + sal_uInt16 GetPageNum() const; + + // #i93597# Allow page border definition to not be the full rectangle but to + // use only the left and right vertical edges (reportdesigner) + void setPageBorderOnlyLeftRight(bool bNew) { mbPageBorderOnlyLeftRight = bNew; } + bool getPageBorderOnlyLeftRight() const { return mbPageBorderOnlyLeftRight; } + + virtual void SetSize(const Size& aSiz); + virtual Size GetSize() const; + virtual void SetOrientation(Orientation eOri); + virtual Orientation GetOrientation() const; + virtual INT32 GetWdt() const; + virtual INT32 GetHgt() const; + virtual void SetBorder(INT32 nLft, INT32 nUpp, INT32 nRgt, INT32 Lwr); + virtual void SetLftBorder(INT32 nBorder); + virtual void SetUppBorder(INT32 nBorder); + virtual void SetRgtBorder(INT32 nBorder); + virtual void SetLwrBorder(INT32 nBorder); + virtual INT32 GetLftBorder() const; + virtual INT32 GetUppBorder() const; + virtual INT32 GetRgtBorder() const; + virtual INT32 GetLwrBorder() const; + + virtual void SetModel(SdrModel* pNewModel); + + // New MasterPage interface + sal_Bool TRG_HasMasterPage() const { return (0L != mpMasterPageDescriptor); } + void TRG_SetMasterPage(SdrPage& rNew); + void TRG_ClearMasterPage(); + SdrPage& TRG_GetMasterPage() const; + const SetOfByte& TRG_GetMasterPageVisibleLayers() const; + void TRG_SetMasterPageVisibleLayers(const SetOfByte& rNew); + sdr::contact::ViewContact& TRG_GetMasterPageDescriptorViewContact() const; + +//#if 0 // _SOLAR__PRIVATE +protected: + void TRG_ImpMasterPageRemoved(const SdrPage& rRemovedPage); +//#endif // __PRIVATE +public: + + // Aenderungen an den Layern setzen nicht das Modified-Flag ! + const SdrLayerAdmin& GetLayerAdmin() const { return *pLayerAdmin; } + SdrLayerAdmin& GetLayerAdmin() { return *pLayerAdmin; } + + // GetBitmap und GetMetafile sind noch nicht implementiert. + // Bitmap in Bildschirmaufloesung und -farbtiefe aus den Objekten der + // Page erzeugen. + Bitmap GetBitmap(FASTBOOL bTrimBorders=TRUE) const { return GetBitmap(aPrefVisiLayers,bTrimBorders); } + Bitmap GetBitmap(const SetOfByte& rVisibleLayers, FASTBOOL bTrimBorders=TRUE) const; + // Metafile aus den Objekten der Page erzeugen + GDIMetaFile GetMetaFile(FASTBOOL bTrimBorders=TRUE) { return GetMetaFile(aPrefVisiLayers,bTrimBorders); } + GDIMetaFile GetMetaFile(const SetOfByte& rVisibleLayers, FASTBOOL bTrimBorders=TRUE); + + virtual String GetLayoutName() const; + + // fuer's Raster im Writer, auch fuer AlignObjects wenn 1 Objekt markiert ist + // wenn pRect!=NULL, dann die Seiten, die von diesem Rect intersected werden + // ansonsten die sichtbaren Seiten. + virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV, const Rectangle* pRect) const; + bool IsObjectsNotPersistent() const { return mbObjectsNotPersistent; } + void SetObjectsNotPersistent(bool b) { mbObjectsNotPersistent = b; } + // Durch Setzen dieses Flags, kann das Auslagern (Swappen) von + // Teilen der Page (z.B. Grafiken) unterbunden werden. + // Es werden hierdurch jedoch nicht automatisch alle ausgelagerten + // Teile nachgeladen, dies geschieht erst bei konkretem Bedarf oder + // durch Aufruf von SwapInAll(). + // Fuer die MasterPage(s) der Page muss dies ggf. separat gemacht werden. + bool IsSwappingLocked() const { return mbSwappingLocked; } + void SetSwappingLocked(bool bLock) { mbSwappingLocked = bLock; } + + SdrObject* GetBackgroundObj() const { return pBackgroundObj; } + void SetBackgroundObj( SdrObject* pObj ); + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoPage(); + + virtual SfxStyleSheet* GetTextStyleSheetForObject( SdrObject* pObj ) const; + + FASTBOOL HasTransparentObjects( BOOL bCheckForAlphaChannel = FALSE ) const; + + /** *deprecated* returns an averaged background color of this page */ + // #i75566# GetBackgroundColor -> GetPageBackgroundColor + Color GetPageBackgroundColor() const; + + /** *deprecated* returns an averaged background color of this page */ + // #i75566# GetBackgroundColor -> GetPageBackgroundColor and bScreenDisplay hint value + Color GetPageBackgroundColor( SdrPageView* pView, bool bScreenDisplay = true) const; + + /** this method returns 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 ); + + /** Check if page is the HandoutMasterPage (in SVX, no PK_HANDOUT available) */ + bool isHandoutMasterPage() const; + +////////////////////////////////////////////////////////////////////////////// +// sdr::Comment interface +private: + sdr::CommentVector maComments; + +public: + sal_uInt32 GetCommentCount() const { return maComments.size(); } + const sdr::Comment& GetCommentByIndex(sal_uInt32 nIndex); + void AddComment(const sdr::Comment& rNew); + void ReplaceCommentByIndex(sal_uInt32 nIndex, const sdr::Comment& rNew); + +////////////////////////////////////////////////////////////////////////////// +}; + +typedef tools::WeakReference< SdrPage > SdrPageWeakRef; + +////////////////////////////////////////////////////////////////////////////// +// use new redirector instead of pPaintProc + +class SVX_DLLPUBLIC StandardCheckVisisbilityRedirector : public ::sdr::contact::ViewObjectContactRedirector +{ +public: + StandardCheckVisisbilityRedirector(); + virtual ~StandardCheckVisisbilityRedirector(); + + // all default implementations just call the same methods at the original. To do something + // different, overload the method and at least do what the method does. + virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence( + const sdr::contact::ViewObjectContact& rOriginal, + const sdr::contact::DisplayInfo& rDisplayInfo); +}; + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDPAGE_HXX + diff --git a/svx/inc/svx/svdpagv.hxx b/svx/inc/svx/svdpagv.hxx new file mode 100644 index 000000000000..2d6323cc5a5d --- /dev/null +++ b/svx/inc/svx/svdpagv.hxx @@ -0,0 +1,297 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdpagv.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDPAGV_HXX +#define _SVDPAGV_HXX + +#include <com/sun/star/awt/XControlContainer.hpp> +#include <svl/lstner.hxx> +#include <svx/svdhlpln.hxx> +#include <cppuhelper/implbase4.hxx> +#include <svx/svdsob.hxx> +#include <svx/svdtypes.hxx> +#include "svx/svxdllapi.h" + +#include <cppuhelper/implbase3.hxx> +#include <vector> +#include <basegfx/polygon/b2dpolypolygon.hxx> + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class Region; +class SdrObjList; +class SdrObject; +class SdrPage; +class SdrUnoObj; +class SdrPaintWindow; +class SdrView; +class SdrPageObj; +class B2dIAOManager; +class SdrPageView; + +// #110094# +namespace sdr +{ + namespace contact + { + class ViewObjectContactRedirector; + class DisplayInfo; + class ViewObjectContactRedirector; + } // end of namespace contact +} // end of namespace sdr + +// typedefs for a list of SdrPageWindow +class SdrPageWindow; +typedef ::std::vector< SdrPageWindow* > SdrPageWindowVector; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrPageView : public SfxListener +{ +protected: + SdrView& mrView; + SdrPage* mpPage; + Point aPgOrg; // Nullpunkt der Page + + Rectangle aMarkBound; // wird + Rectangle aMarkSnap; // von + sal_Bool mbHasMarked; + sal_Bool mbVisible; + + SetOfByte aLayerVisi; // Menge der sichtbaren Layer + SetOfByte aLayerLock; // Menge der nicht editierbaren Layer + SetOfByte aLayerPrn; // Menge der druckbaren Layer + + SdrObjList* pAktList; // Aktuelle Liste, in der Regel die Page. + SdrObject* pAktGroup; // Aktuelle Gruppe. NULL=Keine. + + SdrHelpLineList aHelpLines; // Hilfslinien und -punkte + + // #103911# Use one reserved slot (bReserveBool2) for the document color + Color maDocumentColor; + + // #103834# Use one reserved slot (bReserveBool1) for the background color + Color maBackgroundColor; + + SdrPageWindowVector maPageWindows; + + // #i72752# member to remember with which SdrPageWindow the BeginDrawLayer + // was done + SdrPageWindow* mpPreparedPageWindow; + + // interface to SdrPageWindow +protected: + void ClearPageWindows(); + void AppendPageWindow(SdrPageWindow& rNew); + SdrPageWindow* RemovePageWindow(sal_uInt32 nPos); + SdrPageWindow* RemovePageWindow(SdrPageWindow& rOld); +public: + sal_uInt32 PageWindowCount() const { return maPageWindows.size(); } + SdrPageWindow* FindPageWindow( SdrPaintWindow& rPaintWindow ) const; + SdrPageWindow* FindPageWindow( const OutputDevice& rOutDev ) const; + SdrPageWindow* GetPageWindow(sal_uInt32 nIndex) const; + + /** finds the page window whose PaintWindow belongs to the given output device + + In opposite to FindPageWindow, this method also cares possibly patched PaintWindow instances. + That is, a SdrPageWindow might have an original, and a patched SdrPaintWindow instance - if + this is the case, then the original SdrPaintWindow is examined before the patched one. + */ + const SdrPageWindow* FindPatchedPageWindow( const OutputDevice& rOutDev ) const; + + void PaintOutlinerView(OutputDevice* pOut, const Rectangle& rRect) const; +private: + SVX_DLLPRIVATE SdrPageWindow& CreateNewPageWindowEntry(SdrPaintWindow& rPaintWindow); + +protected: + void ImpInvalidateHelpLineArea(USHORT nNum) const; + +protected: + void SetLayer(const String& rName, SetOfByte& rBS, sal_Bool bJa); + sal_Bool IsLayer(const String& rName, const SetOfByte& rBS) const; + void SetAllLayers(SetOfByte& rB, sal_Bool bJa); + + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + + // Nachsehen, ob AktGroup noch Inserted ist. + void CheckAktGroup(); + + void AdjHdl(); + +public: + TYPEINFO(); + SdrPageView(SdrPage* pPage1, SdrView& rNewView); + ~SdrPageView(); + + // Wird von der PaintView gerufen, wenn Modelaenderungen abgeschlossen sind + void ModelHasChanged(); + + void Show(); + void Hide(); + + void AddPaintWindowToPageView(SdrPaintWindow& rPaintWindow); + void RemovePaintWindowFromPageView(SdrPaintWindow& rPaintWindow); + + SdrView& GetView() { return mrView; } + const SdrView& GetView() const { return mrView; } + + /** looks up the control container belonging to given output device + + @return + If the given output device belongs to one of the SdrPageViewWinRecs associated with this + SdrPageView instance, the XControlContainer for this output device is returned, <NULL/> + otherwise. + */ + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > + GetControlContainer( const OutputDevice& _rDevice ) const; + + /** sets all elements in the view which support a design and a alive mode into the given mode + */ + void SetDesignMode( bool _bDesignMode ) const; + + sal_Bool IsVisible() const { return mbVisible; } + + // Invalidiert den gesamten Bereich der Page + void InvalidateAllWin(); + + // rRect bezieht sich auf die Page + void InvalidateAllWin(const Rectangle& rRect, sal_Bool bPlus1Pix=FALSE); + + // PrePaint call forwarded from app windows + void PrePaint(); + + // rReg bezieht sich auf's OutDev, nicht auf die Page + void CompleteRedraw(SdrPaintWindow& rPaintWindow, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L) const; + + // write access to mpPreparedPageWindow + void setPreparedPageWindow(SdrPageWindow* pKnownTarget); + + void DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget = 0, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L) const; + void DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, Color aColor = Color( COL_BLACK ) ); + + Rectangle GetPageRect() const; + SdrPage* GetPage() const { return mpPage; } + + // Betretene Liste rausreichen + SdrObjList* GetObjList() const { return pAktList; } + + // Betretene Gruppe rausreichen + SdrObject* GetAktGroup() const { return pAktGroup; } + + // Betretene Gruppe und Liste setzen + void SetAktGroupAndList(SdrObject* pNewGroup, SdrObjList* pNewList); + + sal_Bool HasMarkedObjPageView() const { return mbHasMarked; } + void SetHasMarkedObj(sal_Bool bOn) { mbHasMarked = bOn; } + + const Rectangle& MarkBound() const { return aMarkBound; } + const Rectangle& MarkSnap() const { return aMarkSnap; } + Rectangle& MarkBound() { return aMarkBound; } + Rectangle& MarkSnap() { return aMarkSnap; } + + void SetLayerVisible(const String& rName, sal_Bool bShow = sal_True) { SetLayer(rName, aLayerVisi, bShow); if(!bShow) AdjHdl(); InvalidateAllWin(); } + sal_Bool IsLayerVisible(const String& rName) const { return IsLayer(rName, aLayerVisi); } + void SetAllLayersVisible(sal_Bool bShow = sal_True) { SetAllLayers(aLayerVisi, bShow); if(!bShow) AdjHdl(); InvalidateAllWin(); } + + void SetLayerLocked(const String& rName, sal_Bool bLock = sal_True) { SetLayer(rName, aLayerLock, bLock); if(bLock) AdjHdl(); } + sal_Bool IsLayerLocked(const String& rName) const { return IsLayer(rName,aLayerLock); } + void SetAllLayersLocked(sal_Bool bLock = sal_True) { SetAllLayers(aLayerLock, bLock); if(bLock) AdjHdl(); } + + void SetLayerPrintable(const String& rName, sal_Bool bPrn = sal_True) { SetLayer(rName, aLayerPrn, bPrn); } + sal_Bool IsLayerPrintable(const String& rName) const { return IsLayer(rName, aLayerPrn); } + void SetAllLayersPrintable(sal_Bool bPrn = sal_True) { SetAllLayers(aLayerPrn, bPrn); } + + // PV stellt eine RefPage oder eine SubList eines RefObj dar oder Model ist ReadOnly + sal_Bool IsReadOnly() const; + + // der Origin bezieht sich immer auf die obere linke Ecke der Page + const Point& GetPageOrigin() const { return aPgOrg; } + void SetPageOrigin(const Point& rOrg); + + void LogicToPagePos(Point& rPnt) const { rPnt-=aPgOrg; } + void LogicToPagePos(Rectangle& rRect) const { rRect.Move(-aPgOrg.X(),-aPgOrg.Y()); } + void PagePosToLogic(Point& rPnt) const { rPnt+=aPgOrg; } + void PagePosToLogic(Rectangle& rRect) const { rRect.Move(aPgOrg.X(),aPgOrg.Y()); } + + void SetVisibleLayers(const SetOfByte& rSet) { aLayerVisi=rSet; InvalidateAllWin(); } + const SetOfByte& GetVisibleLayers() const { return aLayerVisi; } + void SetPrintableLayers(const SetOfByte& rSet) { aLayerPrn=rSet; } + const SetOfByte& GetPrintableLayers() const { return aLayerPrn; } + void SetLockedLayers(const SetOfByte& rSet) { aLayerLock=rSet; } + const SetOfByte& GetLockedLayers() const { return aLayerLock; } + + const SdrHelpLineList& GetHelpLines() const { return aHelpLines; } + void SetHelpLines(const SdrHelpLineList& rHLL); + //void SetHelpLinePos(USHORT nNum, const Point& rNewPos); + void SetHelpLine(USHORT nNum, const SdrHelpLine& rNewHelpLine); + void DeleteHelpLine(USHORT nNum); + void InsertHelpLine(const SdrHelpLine& rHL, USHORT nNum=0xFFFF); + void MoveHelpLine(USHORT nNum, USHORT nNewNum) { aHelpLines.Move(nNum,nNewNum); } + + // Liefert TRUE, wenn Layer des Obj sichtbar und nicht gesperrt. + // Beim Gruppenobjekt muss wenigstens ein Member sichtbar sein, + // gesperrt sein darf keiner. + sal_Bool IsObjMarkable(SdrObject* pObj) const; + + // Betreten (Editieren) einer Objektgruppe. Anschliessend liegen alle + // Memberobjekte der Gruppe im direkten Zugriff. Alle anderen Objekte + // koennen waerendessen nicht bearbeitet werden (bis zum naechsten + // LeaveGroup()). (wie MsDos chdir bla). + sal_Bool EnterGroup(SdrObject* pObj); + + // Verlassen einer betretenen Objektgruppe. (wie MsDos chdir ..) + void LeaveOneGroup(); + + // Verlassen aller betretenen Objektgruppen. (wie MsDos chdir \) + void LeaveAllGroup(); + + // Feststellen, wie weit hinabgestiegen wurde (0=Root(Page)) + USHORT GetEnteredLevel() const; + + // Name der aktuellen Objektgruppe + String GetActualGroupName() const; + + // Die Namen aller z.Zt. betretenen Gruppen + String GetActualPathName(sal_Unicode cSep = sal_Unicode('|')) const; + + // #103834# Set background color for svx at SdrPageViews + void SetApplicationBackgroundColor(Color aBackgroundColor); + + // #109585# + Color GetApplicationBackgroundColor() const; + + // #103911# Set/Get document color for svx at SdrPageViews + void SetApplicationDocumentColor(Color aDocumentColor); + Color GetApplicationDocumentColor() const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDPAGV_HXX diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx new file mode 100755 index 000000000000..014afacb0706 --- /dev/null +++ b/svx/inc/svx/svdpntv.hxx @@ -0,0 +1,580 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdpntv.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDPNTV_HXX +#define _SVDPNTV_HXX + +#include <svl/brdcst.hxx> +#include <svl/lstner.hxx> +#include <svl/smplhint.hxx> +#include <svl/undo.hxx> +#include <svx/svddrag.hxx> +#include <svx/svdlayer.hxx> // fuer SetOfByte +#include <vcl/window.hxx> +#include <svtools/colorcfg.hxx> +#include <com/sun/star/awt/XControlContainer.hpp> +#include <svl/itemset.hxx> +#include <vcl/timer.hxx> +#include "svx/svxdllapi.h" +#include <svtools/optionsdrawinglayer.hxx> +#include <unotools/options.hxx> + +//************************************************************ +// Pre-Defines +//************************************************************ + +class SdrPageWindow; + +namespace com { namespace sun { namespace star { namespace awt { + class XControlContainer; +}}}} + +class SdrPage; +class SdrView; +class SfxItemSet; +class SfxStyleSheet; +class SdrOle2Obj; +class SdrModel; +class SdrObject; +class SdrViewUserMarker; +class B2dIAOManager; + +#ifdef DBG_UTIL +class SdrItemBrowser; +#endif + +namespace sdr { namespace contact { + class ViewObjectContactRedirector; +}} + +//************************************************************ +// Defines for AnimationMode +//************************************************************ + +enum SdrAnimationMode +{ + SDR_ANIMATION_ANIMATE, + SDR_ANIMATION_DONT_ANIMATE, + SDR_ANIMATION_DISABLE +}; + +//************************************************************ +// Typedef's und defines +//************************************************************ + +typedef unsigned char TRISTATE; +#define FUZZY (2) +#define SDR_ANYFORMAT (0xFFFFFFFF) +#define SDR_ANYITEM (0xFFFF) +#define SDRVIEWWIN_NOTFOUND (0xFFFF) + + +//////////////////////////////////////////////////////////////////////////////////////////////////// +class SdrPaintView; + +namespace sdr +{ + namespace contact + { + class ViewObjectContactRedirector; + } // end of namespace contact +} // end of namespace sdr + +//////////////////////////////////////////////////////////////////////////////////////////////////// + + +class SVX_DLLPUBLIC SvxViewHint : public SfxHint +{ +public: + enum HintType { SVX_HINT_VIEWCHANGED }; + TYPEINFO(); + SvxViewHint (HintType eType); + HintType GetHintType (void) const; + +private: + HintType meHintType; +}; + +// typedefs for a list of SdrPaintWindows +class SdrPaintWindow; +typedef ::std::vector< SdrPaintWindow* > SdrPaintWindowVector; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrPaintView : public SfxListener, public SfxRepeatTarget, public SfxBroadcaster, public ::utl::ConfigurationListener +{ + friend class SdrPageView; + friend class FrameAnimator; + friend class SdrGrafObj; + +protected: + // #114409#-2 Migrate Encirclement + class ImplEncirclementOverlay* mpEncirclementOverlay; + + SdrModel* pMod; +#ifdef DBG_UTIL + SdrItemBrowser* pItemBrowser; +#endif + const OutputDevice* pActualOutDev; // Nur zum vergleichen + OutputDevice* pDragWin; + SfxStyleSheet* pDefaultStyleSheet; + + String aAktLayer; // Aktueller Zeichenlayer + String aMeasureLayer; // Aktueller Layer fuer Bemassung + +// Container aPagV; // Liste von SdrPageViews + SdrPageView* mpPageView; + + // All windows this view is displayed on + SdrPaintWindowVector maPaintWindows; + + MapMode aActualMapMode; + Size aGridBig; // muss dann mal raus + Size aGridFin; // muss dann mal raus + SdrDragStat aDragStat; + Rectangle aMaxWorkArea; + SfxItemSet aDefaultAttr; + Timer aComeBackTimer; + + SdrAnimationMode eAnimationMode; + + USHORT nHitTolPix; + USHORT nMinMovPix; + USHORT nHitTolLog; + USHORT nMinMovLog; + ULONG nMasterCacheMode; + ULONG nGraphicManagerDrawMode; + + // hold an incarnation of Drawinglayer configuration options + SvtOptionsDrawinglayer maDrawinglayerOpt; + + unsigned bPageVisible : 1; + unsigned bPageBorderVisible : 1; + unsigned bBordVisible : 1; + unsigned bGridVisible : 1; + unsigned bGridFront : 1; + unsigned bHlplVisible : 1; + unsigned bHlplFront : 1; + unsigned bGlueVisible : 1; // Persistent. Klebepunkte anzeigen + unsigned bGlueVisible2 : 1; // Klebepunkte auch bei GluePointEdit anzeigen + unsigned bGlueVisible3 : 1; // Klebepunkte auch bei EdgeTool anzeigen + unsigned bGlueVisible4 : 1; // Klebepunkte anzeigen, wenn 1 Edge markiert + unsigned bRestoreColors : 1; // Pens und Brushes werden zurueckgesetzt. + unsigned bSomeObjChgdFlag : 1; + unsigned bSwapAsynchron : 1; + unsigned bPrintPreview : 1; + + // BOOL fuer die Verwaltung des anzuzeigenden Status + // Gruppe Betreten/Verlassen. Default ist TRUE, wird aber + // beispielsweise beim Chart auf FALSE gesetzt, da dort + // die Ghosted-Effekte zur Darstellug unerwuenscht sind. + unsigned bVisualizeEnteredGroup : 1; + unsigned bAnimationPause : 1; + + // #114898# + // Flag which decides if buffered output for this view is allowed. When + // set, PreRendering for PageView rendering will be used. Default is sal_False + unsigned mbBufferedOutputAllowed : 1; + + // #114898# + // Flag which decides if buffered overlay for this view is allowed. When + // set, the output will be buffered in an overlay vdev. When not, overlay is + // directly painted to OutDev. Default is sal_False. + unsigned mbBufferedOverlayAllowed : 1; + + // allow page painting at all? + unsigned mbPagePaintingAllowed : 1; + + // is this a preview renderer? + unsigned mbPreviewRenderer : 1; + + // flags for calc and sw for suppressing OLE, CHART or DRAW objects + unsigned mbHideOle : 1; + unsigned mbHideChart : 1; + unsigned mbHideDraw : 1; // hide draw objects other than form controls + unsigned mbHideFormControl : 1; // hide form controls only + +public: + // #114898# + // interface for PagePaintingAllowed flag + bool IsBufferedOutputAllowed() const; + void SetBufferedOutputAllowed(bool bNew); + + // interface for BufferedOverlayAllowed flag + bool IsBufferedOverlayAllowed() const; + void SetBufferedOverlayAllowed(bool bNew); + + // allow page painting at all? + sal_Bool IsPagePaintingAllowed() const; + void SetPagePaintingAllowed(bool bNew); + +protected: + svtools::ColorConfig maColorConfig; + Color maGridColor; + + // interface to SdrPaintWindow +protected: + void AppendPaintWindow(SdrPaintWindow& rNew); + SdrPaintWindow* RemovePaintWindow(SdrPaintWindow& rOld); + void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, sal_uInt32 ); + +public: + sal_uInt32 PaintWindowCount() const { return maPaintWindows.size(); } + SdrPaintWindow* FindPaintWindow(const OutputDevice& rOut) const; + SdrPaintWindow* GetPaintWindow(sal_uInt32 nIndex) const; + // replacement for GetWin(0), may return 0L (!) + OutputDevice* GetFirstOutputDevice() const; + +private: + SVX_DLLPRIVATE void ImpClearVars(); + DECL_LINK(ImpComeBackHdl,Timer*); + +protected: + USHORT ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const; + USHORT ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const; + + // Wenn man den IdleStatus des Systems nicht abwarten will (auf const geschummelt): + void FlushComeBackTimer() const; + void TheresNewMapMode(); + void ImpSetGlueVisible2(bool bOn) { if (bGlueVisible2!=(unsigned)bOn) { bGlueVisible2=bOn; if (!bGlueVisible && !bGlueVisible3 && !bGlueVisible4) GlueInvalidate(); } } + void ImpSetGlueVisible3(bool bOn) { if (bGlueVisible3!=(unsigned)bOn) { bGlueVisible3=bOn; if (!bGlueVisible && !bGlueVisible2 && !bGlueVisible4) GlueInvalidate(); } } + void ImpSetGlueVisible4(bool bOn) { if (bGlueVisible4!=(unsigned)bOn) { bGlueVisible4=bOn; if (!bGlueVisible && !bGlueVisible2 && !bGlueVisible3) GlueInvalidate(); } } + BOOL ImpIsGlueVisible2() const { return bGlueVisible2; } + BOOL ImpIsGlueVisible3() const { return bGlueVisible3; } + BOOL ImpIsGlueVisible4() const { return bGlueVisible4; } + +public: + BOOL ImpIsGlueVisible() { return bGlueVisible || bGlueVisible2 || bGlueVisible3 || bGlueVisible4; } +protected: + + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); + void GlueInvalidate() const; + + void ShowEncirclement(OutputDevice* pOut); + void HideEncirclement(OutputDevice* pOut); + void DrawEncirclement(OutputDevice* pOut) const; + + // ModelHasChanged wird gerufen, sobald nach beliebig vielen HINT_OBJCHG + // das System wieder idle ist (StarView-Timer). Wer diese Methode ueberlaed, + // muss unbedingt ModelHasChanged() der Basisklasse rufen. + virtual void ModelHasChanged(); + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrPaintView(SdrModel* pModel1, OutputDevice* pOut = 0L); + virtual ~SdrPaintView(); + +public: + TYPEINFO(); + + virtual void ClearPageView(); +// virtual void ClearAll(); +// virtual void Clear(); // PageViews loeschen, Markierungen weg, ... + SdrModel* GetModel() const { return pMod; } + + virtual BOOL IsAction() const; + virtual void MovAction(const Point& rPnt); + virtual void EndAction(); + virtual void BckAction(); + virtual void BrkAction(); // Alle Actions z.B. Draggen abbrechen. + virtual void TakeActionRect(Rectangle& rRect) const; + + // info about TextEdit. Default is sal_False. + virtual bool IsTextEdit() const; + + // info about TextEditPageView. Default is 0L. + virtual SdrPageView* GetTextEditPageView() const; + + // Muss dann bei jedem Fensterwechsel (wenn die SdrView in mehreren + // Fenstern gleichzeitig dargestellt wird (->z.B. Splitter)) und bei + // jedem MapMode(Scaling)-wechsel gerufen werden, damit ich aus meinen + // Pixelwerten logische Werte berechnen kann. + void SetActualWin(const OutputDevice* pWin); + void SetMinMoveDistancePixel(USHORT nVal) { nMinMovPix=nVal; TheresNewMapMode(); } + USHORT GetMinMoveDistancePixel() const { return (USHORT)nMinMovPix; } + void SetHitTolerancePixel(USHORT nVal) { nHitTolPix=nVal; TheresNewMapMode(); } + USHORT GetHitTolerancePixel() const { return (USHORT)nHitTolPix; } + + // data read access on logic HitTolerance and MinMoveTolerance + USHORT getHitTolLog() const { return nHitTolLog; } + USHORT getMinMovLog() const { return nMinMovLog; } + + // Flag zur Visualisierung von Gruppen abfragen/testen + BOOL DoVisualizeEnteredGroup() const { return bVisualizeEnteredGroup; } + void SetVisualizeEnteredGroup(BOOL bNew) { bVisualizeEnteredGroup = bNew; } + + // Am DragStatus laesst sich beispielsweise erfragen, welche + // entfernung bereits gedraggd wurde, etc. + const SdrDragStat& GetDragStat() const { return aDragStat; } + + // Anmelden/Abmelden einer PageView an der View. + // Dieselbe // Seite kann nicht mehrfach angemeldet werden. + // Methoden mit dem Suffix PgNum erwarten als numerischen Parameter + // eine Seitennummer (0...). Methoden mit dem Suffix PvNum erwarten + // degagen als numerischen Parameter die Nummer der PageView an der + // SdrView (Iterieren ueber alle angemeldeten Pages). + virtual SdrPageView* ShowSdrPage(SdrPage* pPage); + virtual void HideSdrPage(); + + // Iterieren ueber alle angemeldeten PageViews +// USHORT GetPageViewCount() const { return USHORT(aPagV.Count()); } +// SdrPageView* GetPageViewByIndex(USHORT nPvNum) const { return ((SdrPageView*)aPagV.GetObject(nPvNum)); } + SdrPageView* GetSdrPageView() const { return mpPageView; } + + // Pageview einer bestimmten Seite ermitteln +// SdrPageView* GetPageViewByPage(const SdrPage* pPage) const; +// sal_uInt16 GetIndexByPageView(const SdrPageView* pPV) const; + + // Test, ob eine Seite getroffen +// SdrPageView* HitPage(const Point& rPnt) const; + + // Die Seite, die dem Punkt am naechsten ist. Liefert nur NULL, + // wenn absolut keine Seite angemeldet ist. +// SdrPageView* GetPageViewByPosition(const Point& rPnt) const; + + // Eine SdrView kann auf mehreren Fenstern gleichzeitig abgebiltet sein: + virtual void AddWindowToPaintView(OutputDevice* pNewWin); + virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin); + + void SetLayerVisible(const String& rName, BOOL bShow=TRUE); + bool IsLayerVisible(const String& rName) const; + void SetAllLayersVisible(BOOL bShow=TRUE); + + void SetLayerLocked(const String& rName, BOOL bLock=TRUE); + bool IsLayerLocked(const String& rName) const; + void SetAllLayersLocked(BOOL bLock=TRUE); + + void SetLayerPrintable(const String& rName, BOOL bPrn=TRUE); + bool IsLayerPrintable(const String& rName) const; + void SetAllLayersPrintable(BOOL bPrn=TRUE); + + // PrePaint call forwarded from app windows + void PrePaint(); + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // used internally for Draw/Impress/sch/chart2 + virtual void CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0); + + // #i72889# used from CompleteRedraw() implementation internally, added to be able to do a complete redraw in single steps + // + // BeginCompleteRedraw returns (or even creates) a SdrPaintWindow whcih shall then be used as + // target for paints. Since paints may be buffered, use it's GetTargetOutputDevice() method which will + // return the buffer in case of bufered. + // DoCompleteRedraw draws the DrawingLayer hierarchy then. + // EndCompleteRedraw does the necessary refreshes, evtl. paints text edit and overlay and evtl destroys the + // SdrPaintWindow again. This means: the SdrPaintWindow is no longer safe after this closing call. + virtual SdrPaintWindow* BeginCompleteRedraw(OutputDevice* pOut); + virtual void DoCompleteRedraw(SdrPaintWindow& rPaintWindow, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0); + virtual void EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer); + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // used for the other applications basctl/sc/sw which call DrawLayer at PageViews + // #i74769# Interface change to use common BeginCompleteRedraw/EndCompleteRedraw + // #i76114# bDisableIntersect disables intersecting rReg with the Window's paint region + SdrPaintWindow* BeginDrawLayers(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect = false); + void EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer); + +protected: + //////////////////////////////////////////////////////////////////////////////////////////////////// + // used to call the old PaintOutlinerView at the single PageViews. Will be replaced when the + // outliner will be displayed on the overlay in edit mode. + void ImpTextEditDrawing(SdrPaintWindow& rPaintWindow) const; + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // used to paint the form layer after the PreRender device is flushed (painted) to the window. + void ImpFormLayerDrawing(SdrPaintWindow& rPaintWindow) const; + +public: + BOOL IsPageVisible() const { return bPageVisible; } // Seite (weisse Flaeche) malen oder nicht + BOOL IsPageBorderVisible() const { return bPageBorderVisible; } // Seite (weisse Flaeche) malen oder nicht + BOOL IsBordVisible() const { return bBordVisible; } // Seitenrandlinie malen oder nicht + BOOL IsGridVisible() const { return bGridVisible; } // Rastergitter malen oder nicht + BOOL IsGridFront() const { return bGridFront ; } // Rastergitter ueber die Objekte druebermalen oder dahinter + BOOL IsHlplVisible() const { return bHlplVisible; } // Hilfslinien der Seiten malen oder nicht + BOOL IsHlplFront() const { return bHlplFront ; } // Hilfslinie ueber die Objekte druebermalen oder dahinter + BOOL IsGlueVisible() const { return bGlueVisible; } // Konnektoren der objekte sichtbar oder nicht + Color GetGridColor() const; + void SetPageVisible(bool bOn = true) { bPageVisible=bOn; InvalidateAllWin(); } + void SetPageBorderVisible(bool bOn = true) { bPageBorderVisible=bOn; InvalidateAllWin(); } + void SetBordVisible(bool bOn = true) { bBordVisible=bOn; InvalidateAllWin(); } + void SetGridVisible(bool bOn = true) { bGridVisible=bOn; InvalidateAllWin(); } + void SetGridFront(bool bOn = true) { bGridFront =bOn; InvalidateAllWin(); } + void SetHlplVisible(bool bOn = true) { bHlplVisible=bOn; InvalidateAllWin(); } + void SetHlplFront(bool bOn = true) { bHlplFront =bOn; InvalidateAllWin(); } + void SetGlueVisible(bool bOn = true) { if (bGlueVisible!=(unsigned)bOn) { bGlueVisible=bOn; if (!bGlueVisible2 && !bGlueVisible3 && !bGlueVisible4) GlueInvalidate(); } } + void SetGridColor( Color aColor ); + + sal_Bool IsPreviewRenderer() const { return (sal_Bool )mbPreviewRenderer; } + void SetPreviewRenderer(bool bOn) { if((unsigned)bOn != mbPreviewRenderer) { mbPreviewRenderer=bOn; }} + + // access methods for calc and sw hide object modes + bool getHideOle() const { return mbHideOle; } + bool getHideChart() const { return mbHideChart; } + bool getHideDraw() const { return mbHideDraw; } + bool getHideFormControl() const { return mbHideFormControl; } + void setHideOle(bool bNew) { if(bNew != (bool)mbHideOle) mbHideOle = bNew; } + void setHideChart(bool bNew) { if(bNew != (bool)mbHideChart) mbHideChart = bNew; } + void setHideDraw(bool bNew) { if(bNew != (bool)mbHideDraw) mbHideDraw = bNew; } + void setHideFormControl(bool bNew) { if(bNew != (bool)mbHideFormControl) mbHideFormControl = bNew; } + + void SetGridCoarse(const Size& rSiz) { aGridBig=rSiz; } + void SetGridFine(const Size& rSiz) { aGridFin=rSiz; if (aGridFin.Height()==0) aGridFin.Height()=aGridFin.Width(); if (bGridVisible) InvalidateAllWin(); } // #40479# + const Size& GetGridCoarse() const { return aGridBig; } + const Size& GetGridFine() const { return aGridFin; } + + void InvalidateAllWin(); + void InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix=FALSE); + + // Wenn die View kein Invalidate() an den Fenstern durchfuehren soll, muss + // man diese beiden folgenden Methoden ueberladen und entsprechend anders + // reagieren. + virtual void InvalidateOneWin(Window& rWin); + virtual void InvalidateOneWin(Window& rWin, const Rectangle& rRect); + + void SetActiveLayer(const String& rName) { aAktLayer=rName; } + const String& GetActiveLayer() const { return aAktLayer; } + + // Verlassen einer betretenen Objektgruppe aller sichtbaren Seiten. + // (wie MsDos chdir ..) + void LeaveOneGroup(); + + // Verlassen aller betretenen Objektgruppen aller sichtbaren Seiten. + // (wie MsDos chdir \) + void LeaveAllGroup(); + + // Feststellen, ob Leave sinnvoll ist. + bool IsGroupEntered() const; + + // DefaultAttribute an der View: Neu erzeugte Objekte bekommen diese + // Attribute direkt nach dem Erzeugen erstmal zugewiesen. + void SetDefaultAttr(const SfxItemSet& rAttr, BOOL bReplaceAll); + const SfxItemSet& GetDefaultAttr() const { return aDefaultAttr; } + void SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr); + SfxStyleSheet* GetDefaultStyleSheet() const { return pDefaultStyleSheet; } + + void SetNotPersistDefaultAttr(const SfxItemSet& rAttr, BOOL bReplaceAll); + void MergeNotPersistDefaultAttr(SfxItemSet& rAttr, BOOL bOnlyHardAttr) const; + + // Aufziehen eines animierten Rechtecks fuer Applikationsspeziefische + // Verwendung. Alle Positionsangaben in logischen View-Koordinaten. + // pOut bezeichnet das OutputDevice, in das animierte Rechteck dargestellt + // werden soll. Wird NULL uebergeben, wird es in allen an der View + // angemeldeten OutputDevices gleichzeitig dargestellt. + void BegEncirclement(const Point& rPnt); + void MovEncirclement(const Point& rPnt); + Rectangle EndEncirclement(sal_Bool bNoJustify = sal_False); + void BrkEncirclement(); + sal_Bool IsEncirclement() const { return (0L != mpEncirclementOverlay); } + + // use this mode as mode to draw all internal GraphicManager objects with + ULONG GetGraphicManagerDrawMode() const { return nGraphicManagerDrawMode; } + void SetGraphicManagerDrawMode( ULONG nMode ) { nGraphicManagerDrawMode = nMode; } + + // SwapIn (z.B. von Grafiken) asynchron durchfuehren. Also nicht + // beim Paint sofort nachladen, sondern dort das Nachladen anstossen. + // Nach Abschluss des Nachladens wird das Objekt dann angezeigt. + // Hat nur z.Zt. Wirkung, wenn SwapGraphics am Model eingeschaltet ist. + // Default=FALSE. Flag ist nicht persistent. + BOOL IsSwapAsynchron() const { return bSwapAsynchron; } + void SetSwapAsynchron(BOOL bJa=TRUE) { bSwapAsynchron=bJa; } + virtual BOOL KeyInput(const KeyEvent& rKEvt, Window* pWin); + + virtual BOOL MouseButtonDown(const MouseEvent& /*rMEvt*/, Window* /*pWin*/) { return FALSE; } + virtual BOOL MouseButtonUp(const MouseEvent& /*rMEvt*/, Window* /*pWin*/) { return FALSE; } + virtual BOOL MouseMove(const MouseEvent& /*rMEvt*/, Window* /*pWin*/) { return FALSE; } + virtual BOOL Command(const CommandEvent& /*rCEvt*/, Window* /*pWin*/) { return FALSE; } + BOOL Cut(ULONG /*nFormat*/=SDR_ANYFORMAT) { return FALSE; } + BOOL Yank(ULONG /*nFormat*/=SDR_ANYFORMAT) { return FALSE; } + BOOL Paste(Window* /*pWin*/=NULL, ULONG /*nFormat*/=SDR_ANYFORMAT) { return FALSE; } + + /* new interface src537 */ + BOOL GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr=FALSE) const; + + BOOL SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll); + SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(BOOL& rOk) const; + BOOL SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr); + + virtual void MakeVisible(const Rectangle& rRect, Window& rWin); + + // Fuer PlugIn. Wird vom Paint des OLE-Obj gerufen. + virtual void DoConnect(SdrOle2Obj* pOleObj); + + // Animation aktivieren/deaktivieren fuer ::Paint + // wird z.Zt. ausgewertet von SdrGrafObj, wenn in dem eine Animation steckt + // Das Unterbinden der automatischen Animation wird z.B. fuer die Dia-Show benoetigt + BOOL IsAnimationEnabled() const { return ( SDR_ANIMATION_ANIMATE == eAnimationMode ); } + void SetAnimationEnabled( BOOL bEnable=TRUE ); + + // set/unset pause state for animations + bool IsAnimationPause() const { return bAnimationPause; } + void SetAnimationPause( bool bSet ); + + // Verhalten beim Starten von Animation im Paint-Handler: + // 1. Animation normal starten( SDR_ANIMATION_ANIMATE ) => DEFAULT + // 2. Nur die Ersatzdarstellung der Animation zeichnen ( SDR_ANIMATION_DONT_ANIMATE ) + // 3. Nicht starten und nichts ersatzweise ausgeben ( SDR_ANIMATION_DISABLE ) + void SetAnimationMode( const SdrAnimationMode eMode ); + SdrAnimationMode GetAnimationMode() const { return eAnimationMode; } + + // bei bShow=FALSE wird der Browser destruiert +#ifdef DBG_UTIL + void ShowItemBrowser(BOOL bShow=TRUE); + BOOL IsItemBrowserVisible() const { return pItemBrowser!=NULL && ((Window*)pItemBrowser)->IsVisible(); } + Window* GetItemBrowser() const { return (Window*)pItemBrowser; } +#endif + + // Muss von App beim Scrollen usw. gerufen werden, damit ein u.U. + // aktives FormularControl mitverschoben werden kann + void VisAreaChanged(const OutputDevice* pOut=NULL); + void VisAreaChanged(const SdrPageWindow& rWindow); + + BOOL IsPrintPreview() const { return bPrintPreview; } + void SetPrintPreview(bool bOn = true) { bPrintPreview=bOn; } + + const svtools::ColorConfig& getColorConfig() const; + + virtual void onChangeColorConfig(); + + // #103834# Set background color for svx at SdrPageViews + void SetApplicationBackgroundColor(Color aBackgroundColor); + + // #103911# Set document color for svx at SdrPageViews + void SetApplicationDocumentColor(Color aDocumentColor); + + // #i38135# + // Sets the timer for Object animations and restarts. + void SetAnimationTimer(sal_uInt32 nTime); + + // access to Drawinglayer configuration options + const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; } +}; + +#endif //_SVDPNTV_HXX + diff --git a/svx/inc/svx/svdpoev.hxx b/svx/inc/svx/svdpoev.hxx new file mode 100644 index 000000000000..9f79c1fcec44 --- /dev/null +++ b/svx/inc/svx/svdpoev.hxx @@ -0,0 +1,113 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdpoev.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDPOEV_HXX +#define _SVDPOEV_HXX + +#include "svx/svxdllapi.h" +#include <svx/svdedtv.hxx> + +#include "svx/ipolypolygoneditorcontroller.hxx" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@@ @@@@ @@ @@ @@ @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@@@@ @@ @@ @@ @@@@ @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@ @@@@ @@@@@ @@ @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrPolyEditView: public SdrEditView, public IPolyPolygonEditorController +{ + friend class SdrEditView; + +protected: + BOOL bSetMarkedPointsSmoothPossible : 1; + BOOL bSetMarkedSegmentsKindPossible : 1; + + SdrPathSmoothKind eMarkedPointsSmooth; + SdrPathSegmentKind eMarkedSegmentsKind; + +private: + SVX_DLLPRIVATE void ImpClearVars(); + SVX_DLLPRIVATE void ImpResetPolyPossibilityFlags(); + SVX_DLLPRIVATE void ImpCheckPolyPossibilities(); + + // Markierte Punkte kopieren und anstelle der alten markieren + // ist noch nicht implementiert! + SVX_DLLPRIVATE void ImpCopyMarkedPoints(); + typedef void (*PPolyTrFunc)(Point&, Point*, Point*, const void*, const void*, const void*, const void*, const void*); + SVX_DLLPRIVATE void ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* p1=NULL, const void* p2=NULL, const void* p3=NULL, const void* p4=NULL, const void* p5=NULL); + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrPolyEditView(SdrModel* pModel1, OutputDevice* pOut = 0L); + virtual ~SdrPolyEditView(); + +public: + BOOL IsSetMarkedPointsSmoothPossible() const; + SdrPathSmoothKind GetMarkedPointsSmooth() const; + void SetMarkedPointsSmooth(SdrPathSmoothKind eKind); + + // Ein PolySegment kann eine Strecke oder eine Bezierkurve sein. + BOOL IsSetMarkedSegmentsKindPossible() const; + SdrPathSegmentKind GetMarkedSegmentsKind() const; + void SetMarkedSegmentsKind(SdrPathSegmentKind eKind); + + // Moeglicherweise ist das Obj hinterher geloescht: + void DeleteMarkedPoints(); + BOOL IsDeleteMarkedPointsPossible() const; + + void MoveMarkedPoints(const Size& rSiz, bool bCopy=false); + void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false); + void RotateMarkedPoints(const Point& rRef, long nWink, bool bCopy=false); + + // Hierbei entstehen eventuell beliebig viele neue Objekte: + void RipUpAtMarkedPoints(); + bool IsRipUpAtMarkedPointsPossible() const; + + // Alle markierten Polylines werden zu Polygonen, alle offenen + // Bezierkurven zu geschlossenen. + void ShutMarkedObjects(); + void CloseMarkedObjects(BOOL bToggle=FALSE, BOOL bOpen=FALSE); // , long nOpenDistance=0); + bool IsOpenCloseMarkedObjectsPossible() const; + SdrObjClosedKind GetMarkedObjectsClosedState() const; + + void CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmooth, bool& b1stSegm, bool& bCurve, bool& bSmoothFuz, bool& bSegmFuz, basegfx::B2VectorContinuity& eSmooth ); +}; + +#endif //_SVDPOEV_HXX + diff --git a/svx/inc/svx/svdpool.hxx b/svx/inc/svx/svdpool.hxx new file mode 100644 index 000000000000..d6cf4f8543b6 --- /dev/null +++ b/svx/inc/svx/svdpool.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdpool.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDPOOL_HXX +#define _SVDPOOL_HXX + +#include <svx/xpool.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +class XLineAttrSetItem; +class XFillAttrSetItem; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrItemPool : public XOutdevItemPool +{ +public: + SdrItemPool(SfxItemPool* pMaster = 0L, sal_Bool bLoadRefCounts = sal_True); + SdrItemPool(const SdrItemPool& rPool); +protected: + virtual ~SdrItemPool(); +public: + + virtual SfxItemPool* Clone() const; + virtual SfxItemPresentation GetPresentation(const SfxPoolItem& rItem, + SfxItemPresentation ePresentation, + SfxMapUnit ePresentationMetric, + String& rText, + const IntlWrapper * pIntlWrapper + = 0) const; + + static void TakeItemName(sal_uInt16 nWhich, String& rItemName); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif // _SVDPOOL_HXX +// eof diff --git a/svx/inc/svx/svdsnpv.hxx b/svx/inc/svx/svdsnpv.hxx new file mode 100644 index 000000000000..bf93d6b179a3 --- /dev/null +++ b/svx/inc/svx/svdsnpv.hxx @@ -0,0 +1,341 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdsnpv.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDSNPV_HXX +#define _SVDSNPV_HXX + +#include <svx/svdpntv.hxx> +#include <svx/svdhlpln.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Defines +//************************************************************ + +#define SDRSNAP_NOTSNAPPED 0x0000 +#define SDRSNAP_XSNAPPED 0x0001 +#define SDRSNAP_YSNAPPED 0x0002 +#define SDRSNAP_XYSNAPPED 0x0003 + +// SDRCROOK_STRETCH ist noch nicht implementiert! +enum SdrCrookMode { + SDRCROOK_ROTATE, + SDRCROOK_SLANT, + SDRCROOK_STRETCH +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@ @@ @@ @@@@ @@@@@ @@ @@ @@ @@@@@ @@ @@ +// @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@@@ @@@@@@ @@@@@@ @@@@@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @@ @@@ @@ @@ @@ @@@ @@ @@ @@@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@@@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// #114409#-1 Migrate PageOrigin +class ImplPageOriginOverlay; + +class SVX_DLLPUBLIC SdrSnapView: public SdrPaintView +{ +protected: + // #114409#-1 Migrate PageOrigin + class ImplPageOriginOverlay* mpPageOriginOverlay; + + // #114409#-2 Migrate HelpLine + class ImplHelpLineOverlay* mpHelpLineOverlay; + + Size aMagnSiz; + Fraction aSnapWdtX; + Fraction aSnapWdtY; + + USHORT nMagnSizPix; + long nSnapAngle; + long nEliminatePolyPointLimitAngle; + + SdrCrookMode eCrookMode; + + unsigned bSnapEnab : 1; + unsigned bGridSnap : 1; + unsigned bSnapTo1Pix : 1; // Wenn GridSnap aus, auf ein Pixel fangen um Werte wie 10.01 zu vermeiden + unsigned bBordSnap : 1; + unsigned bHlplSnap : 1; + unsigned bOFrmSnap : 1; + unsigned bOPntSnap : 1; + unsigned bOConSnap : 1; + unsigned bMoveMFrmSnap : 1; + unsigned bMoveOFrmSnap : 1; + unsigned bMoveOPntSnap : 1; + unsigned bMoveOConSnap : 1; + unsigned bMoveSnapOnlyTopLeft : 1; // Speacial fuer den Dialogeditor + unsigned bOrtho : 1; + unsigned bBigOrtho : 1; + unsigned bAngleSnapEnab : 1; + unsigned bMoveOnlyDragging : 1; // Objekte nur verschieben bei Resize/Rotate/... + unsigned bSlantButShear : 1; // Slant anstelle von Shear anwenden + unsigned bCrookNoContortion : 1; // Objekte bei Crook nicht verzerren + unsigned bHlplFixed : 1; // TRUE=Hilfslinien fixiert, also nicht verschiebbar + unsigned bEliminatePolyPoints : 1; + +private: + SVX_DLLPRIVATE void ClearVars(); + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrSnapView(SdrModel* pModel1, OutputDevice* pOut = 0L); + virtual ~SdrSnapView(); + +public: + virtual BOOL IsAction() const; + virtual void MovAction(const Point& rPnt); + virtual void EndAction(); + virtual void BckAction(); + virtual void BrkAction(); // f.abg.Klassen Actions z,B, Draggen abbrechen. + virtual void TakeActionRect(Rectangle& rRect) const; + + void SetSnapGridWidth(const Fraction& rX, const Fraction& rY) { aSnapWdtX=rX; aSnapWdtY=rY; } + const Fraction& GetSnapGridWidthX() const { return aSnapWdtX; } + const Fraction& GetSnapGridWidthY() const { return aSnapWdtY; } + + void SetSnapMagnetic(const Size& rSiz) { if (rSiz!=aMagnSiz) { aMagnSiz=rSiz; } } + const Size& GetSnapMagnetic() const { return aMagnSiz; } + void SetSnapMagneticPixel(USHORT nPix) { nMagnSizPix=nPix; } + USHORT GetSnapMagneticPixel() const { return nMagnSizPix; } + + // RecalcLogicSnapMagnetic muss bei jedem Wechsel des OutputDevices + // sowie bei jedem Wechsel des MapModes gerufen werden! + void RecalcLogicSnapMagnetic(const OutputDevice& rOut) { SetSnapMagnetic(rOut.PixelToLogic(Size(nMagnSizPix,nMagnSizPix))); } + void SetActualWin(const OutputDevice* pWin) { SdrPaintView::SetActualWin(pWin); if (pWin!=NULL) RecalcLogicSnapMagnetic(*pWin); } + + // Auf die View bezogene Koordinaten! + // Rueckgabewerte sind SDRSNAP_NOTSNAPPED,SDRSNAP_XSNAPPED, + // SDRSNAP_YSNAPPED oder SDRSNAP_XYSNAPPED + USHORT SnapPos(Point& rPnt, const SdrPageView* pPV) const; + Point GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const; + USHORT SnapRect(const Rectangle& rRect, const SdrPageView* pPV, long& rDX, long& rDY) const; + void CheckSnap(const Point& rPt, const SdrPageView* pPV, long& nBestXSnap, long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const; + + // Alle Fangeinstellungen sind Persistent. + BOOL IsSnapEnabled() const { return bSnapEnab; } + BOOL IsGridSnap() const { return bGridSnap; } // Fang auf Rastergitter + BOOL IsBordSnap() const { return bBordSnap; } // Fang auf Seitenraender + BOOL IsHlplSnap() const { return bHlplSnap; } // Fang auf Hilfslinien + BOOL IsOFrmSnap() const { return bOFrmSnap; } // Fang auf LogFram von umgebenden Zeichenobjekten + BOOL IsOPntSnap() const { return bOPntSnap; } // Fang auf ausgepraegte Punkte von umgebenden Zeichenobjekten + BOOL IsOConSnap() const { return bOConSnap; } // Fang auf Konnektoren der Zeichenobjekte + void SetSnapEnabled(BOOL bOn) { bSnapEnab=bOn; } + void SetGridSnap(BOOL bOn) { bGridSnap=bOn; } + void SetBordSnap(BOOL bOn) { bBordSnap=bOn; } + void SetHlplSnap(BOOL bOn) { bHlplSnap=bOn; } + void SetOFrmSnap(BOOL bOn) { bOFrmSnap=bOn; } + void SetOPntSnap(BOOL bOn) { bOPntSnap=bOn; } + void SetOConSnap(BOOL bOn) { bOConSnap=bOn; } + + // Normalerweise werden beim Move-Dragging von Zeichenobjekten alle + // 4 Ecken des Object-SnapRects gefangen. Folgende Einstellmoeglichkeit, + // wenn man nur auf die linke obere Ecke fangen will (z.B. DialogEditor): + // Persistent, Default=FALSE. + void SetMoveSnapOnlyTopLeft(BOOL bOn) { bMoveSnapOnlyTopLeft=bOn; } + BOOL IsMoveSnapOnlyTopLeft() const { return bMoveSnapOnlyTopLeft; } + + // Hilfslinien fixiert (nicht verschiebbar) + // Persistent, Default=FALSE. + BOOL IsHlplFixed() const { return bHlplFixed; } + void SetHlplFixed(BOOL bOn) { bHlplFixed=bOn; } + + BOOL IsMoveMFrmSnap() const { return bMoveMFrmSnap; } // Fang des LogFram aller markierten Objekte + BOOL IsMoveOFrmSnap() const { return bMoveOFrmSnap; } // Fang aller LogFram der markierten Objekte + BOOL IsMoveOPntSnap() const { return bMoveOPntSnap; } // Fang ausgepraegter Punkte der markierten Objekte + BOOL IsMoveOConSnap() const { return bMoveOConSnap; } // Fang der Konnektoren der markierten Objekte + + void SetMoveMFrmSnap(BOOL bOn) { bMoveMFrmSnap=bOn; } + void SetMoveOFrmSnap(BOOL bOn) { bMoveOFrmSnap=bOn; } + void SetMoveOPntSnap(BOOL bOn) { bMoveOPntSnap=bOn; } + void SetMoveOConSnap(BOOL bOn) { bMoveOConSnap=bOn; } + + // #114409#-1 Migrate PageOrigin + sal_Bool BegSetPageOrg(const Point& rPnt); + void MovSetPageOrg(const Point& rPnt); + sal_Bool EndSetPageOrg(); + void BrkSetPageOrg(); + sal_Bool IsSetPageOrg() const { return (0L != mpPageOriginOverlay); } + + // HitTest. Bei TRUE steht in rnHelpLineNum die Nummer der Hilfslinie und in rpPV + // die zugehoerige PageView. + sal_Bool PickHelpLine(const Point& rPnt, short nTol, const OutputDevice& rOut, USHORT& rnHelpLineNum, SdrPageView*& rpPV) const; + + // Verschieben einer vorhandenen Hilfslinie. nHelpLineNum und pPV von PickHelpLine verwenden. + sal_Bool BegDragHelpLine(USHORT nHelpLineNum, SdrPageView* pPV); + // Interaktives einfuegen einer neuen Hilfslinie + sal_Bool BegDragHelpLine(const Point& rPnt, SdrHelpLineKind eNewKind); + Pointer GetDraggedHelpLinePointer() const; + + // Aendern des Hilfslinientyps waerend des draggens + // void SetDraggedHelpLineKind(SdrHelpLineKind eNewKind); + void MovDragHelpLine(const Point& rPnt); + sal_Bool EndDragHelpLine(); + void BrkDragHelpLine(); + sal_Bool IsDragHelpLine() const { return (0L != mpHelpLineOverlay); } + + // SnapAngle ist fuer Winkel im Kreis, RotateDragging, ... + // Der Winkelfang wird unterdrueckt, wenn er mit + // durch SetAngleSnapEnabled(FALSE) ausgeschaltet ist. + // Der Winkelfang ist unabhaengig vom Koordinatenfang + // und somit von der Einstellung IsSnapEnabled() + // Es sollten nur Werte angegeben werden fuer die gilt: + // 36000 modulu nWink = 0 + // Implementiert fuer: + // - Rotate (Dragging) + // - Shear (Dragging) + // - Kreisbogen/-sektor/-abschnitt Winkel (Create und Dragging) + // Persistent. + void SetAngleSnapEnabled(BOOL bOn) { bAngleSnapEnab=bOn; } + BOOL IsAngleSnapEnabled() const { return bAngleSnapEnab; } + void SetSnapAngle(long nWink) { nSnapAngle=nWink; } + long GetSnapAngle() const { return nSnapAngle; } + + // Ortho hat je nach Kontext verschiedene Effekte: + // - Create + // - Linien werden nur im 45deg Raster zugelassen + // - Statt Rechtecke werden Quadrate erzeugt + // - Statt Ellipsen werden Kreise erzeugt + // - Dragging + // - allgemeines Dragging + // - Move nur Hor, Vert oder 45deg + // - Resize proportional + // - Mirror: nichts + // - Shear ohne Resize + // - Crook ohne Resize + // - verschieben der Handles + // - Spiegelachse nur 45deg Raster + // - Objekteigenes Dragging + // - Rechteck Eckenradius: nichts + // - Kreisobjekt Winkel: nichts + // - Linie behaelt beim Draggen ihren Winkel bei und wird nur (ni) + // verlaengert bzw. verkuerzt. + // Defaultmaessig ist Ortho ausgeschaltet. Persistent. + void SetOrtho(BOOL bOn) { bOrtho=bOn; } // unvollstaendig + BOOL IsOrtho() const { return bOrtho; } + + // BigOrtho hat nur Relevanz wenn Ortho eingeschaltet ist. + // Beispiel: Ein Rechteck wird mit eingeschaltetem Ortho (also ein Quadrat) + // erzeugt und die Maus wurde dabei vom Nullpunkt zu den Koordinaten + // (80,30) gedraggt. Dann stuenden nun 2 Alternativen zur Bestimmung der + // Kantenlaenge des Quadrats zur Wahl: 30 und 80. + // Die normale Ortho-Funktuionalitaet brachte hierbei ein Quadrat mit + // Kantenlaenge 30 (also immer die kleinere Groesse). Bei hinzugeschal- + // tetem BigOrtho bekaeme man dagegen ein Quadrat der Kantenlaenge 80. + // Gleiches gilt auch fuer Resize. + // Defaultmaessig ist BigOrtho eingeschaltet. Persistent. + void SetBigOrtho(BOOL bOn) { bBigOrtho=bOn; } + BOOL IsBigOrtho() const { return bBigOrtho; } + + // bei MoveOnlyDragging=TRUE wird bei Resize/Rotate/Shear/Mirror/Crook + // nur das Zentrum der markierten Objekte transformiert. Groesse, Form + // und Drehwinkel der Objekte bleiben erhalten, nur ihre Positionen + // aendern sich. Persistent. Default=FALSE. (ni) + void SetMoveOnlyDragging(BOOL bOn) { bMoveOnlyDragging=bOn; } + BOOL IsMoveOnlyDragging() const { return bMoveOnlyDragging; } + + // Slant anstelle von Shear anwenden. Persistent. Default=FALSE. + void SetSlantButShear(BOOL bOn) { bSlantButShear=bOn; } + BOOL IsSlantButShear() const { return bSlantButShear; } + + // Objekte bei Crook nicht verzerren. Persistent. Default=FALSE. (ni) + void SetCrookNoContortion(BOOL bOn) { bCrookNoContortion=bOn; } + BOOL IsCrookNoContortion() const { return bCrookNoContortion; } + + // Crook-Modus. Persistent. Default=SDRCROOK_ROTATE. (ni) + void SetCrookMode(SdrCrookMode eMode) { eCrookMode=eMode; } + SdrCrookMode GetCrookMode() const { return eCrookMode; } + + // Special fuer IBM: Beim Draggen eines Polygonpunkts wird dieser + // geloescht, wenn seine beiden angrenzenden Linien eh' fast eine + // durchgehende Linie sind. + void SetEliminatePolyPoints(BOOL bOn) { bEliminatePolyPoints=bOn; } + BOOL IsEliminatePolyPoints() const { return bEliminatePolyPoints; } + void SetEliminatePolyPointLimitAngle(long nAngle) { nEliminatePolyPointLimitAngle=nAngle; } + long GetEliminatePolyPointLimitAngle() const { return nEliminatePolyPointLimitAngle; } +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// Begriffsdefinition: +// - Etwas fangen=Gefangen werden kann z.B. der Mauszeiger oder die z.Zt. im +// Drag befindlichen markierten Objekte. +// - Auf etwas fangen=Man kann z.B. auf das Grid oder auf Hilfslinien fangen. +// +// Grundsaetzlich wird nur gefangen auf sichtbare Elemente (-> Border, +// Hilfslinien, Konnektoren; Ausnahme: Grid). Ebenso koennen nur sichtbare +// Elemente gefangen werden (->Konnektoren). +// +// Auf's Grid wird immer erst dann gefangen, wenn nix Anderes in der Naehe +// (->Magnetic) ist. +// +// Der "Cursor" (also der Mauszeiger) beim Erzeugen von Objekten, beim Draggen +// von Polygonpunkten, ... wird immer auf allen eingeschalteten Fangalternativen +// gefangen (max 6). +// +// Beim Verschieben markierter Objekte ist das etwas anders. Statt des einen +// Mauscursors gibt es hier 4 Alternativen an den markierten Objekten, die +// gefangen werden koennen: +// 1. die logisch-umschliessenden Rahmen der einzelnen Objekte +// 2. der logisch-umschliessende Rahmen aller markierten Objekte +// 3. ausgezeichnete Punkte der markierten Objekte (Polygonpunkte, ...) +// 4. die Konnektoren der markierten Objekte +// Da 1. und 2. einander ausschliessen (2. ist eine Verfeinerung von 1.) +// bleiben 3 voneinander unabhaengige Alternativen. Bei 6. Moeglichkeiten auf +// die gefangen werden kann kaeme man auf max. 18 Kombinationsmoeglichkeiten! +// Deshalb werden folgende Vereinfachungen festgelegt: +// 1. Konnektoren fangen sich nur auf Konnektoren. +// Verbleiben also nun noch max. 2x5+1=11 Fangkombinationen beim MoveDrag: +// 1-3. umschliessende(r) Rahmen auf Grid/Border/Hilfslinien +// 4. umschliessende(r) Rahmen auf ausgezeichnete Objektpunkte +// 5. umschliessende(r) Rahmen auf umschliessenden Rahmen +// 6-8. ausgezeichnete Punkte auf Grid/Border/Hilfslinien +// 7. ausgezeichnete Punkte auf ausgezeichnete Objektpunkte +// 8-10. ausgezeichnete Punkte auf umschliessenden Rahmen +// 11. Konnektoren auf Konnektoren +// Beim MouseMove-Event im DragMove werden also diese bis zu max. 11 moeglichen +// Alternativen durchgetestet und die mit dem gerigsten Korrekturaufwand +// vollzogen. +// +// Beim Resize, ... wird immer nur der logisch-umschliessende Rahmen der +// markierten Objekte gefangen. +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDSNPV_HXX + diff --git a/svx/inc/svx/svdsob.hxx b/svx/inc/svx/svdsob.hxx new file mode 100644 index 000000000000..02fa14129e38 --- /dev/null +++ b/svx/inc/svx/svdsob.hxx @@ -0,0 +1,136 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdsob.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDSOB_HXX +#define _SVDSOB_HXX + +#include <com/sun/star/uno/Any.hxx> +#include <tools/stream.hxx> + +#ifndef _STRING_H +#include <tools/string.hxx> //wg. memset +#define _STRING_H +#endif +#include "svx/svxdllapi.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +/* + Deklaration eines statischen Mengentyps. Die Menge kann die Elemente + 0..255 aufnehmen und verbraucht stets 32 Bytes. +*/ + +class SVX_DLLPUBLIC SetOfByte +{ +protected: + sal_uInt8 aData[32]; + +public: + SetOfByte(sal_Bool bInitVal = sal_False) + { + memset(aData, bInitVal ? 0xFF : 0x00, sizeof(aData)); + } + + sal_Bool operator==(const SetOfByte& rCmpSet) const + { + return (memcmp(aData, rCmpSet.aData, sizeof(aData)) == 0); + } + + sal_Bool operator!=(const SetOfByte& rCmpSet) const + { + return (memcmp(aData, rCmpSet.aData, sizeof(aData))!=0); + } + + void Set(sal_uInt8 a) + { + aData[a/8] |= 1<<a%8; + } + + void Clear(sal_uInt8 a) + { + aData[a/8] &= ~(1<<a%8); + } + + void Set(sal_uInt8 a, sal_Bool b) + { + if(b) + Set(a); + else + Clear(a); + } + + sal_Bool IsSet(sal_uInt8 a) const + { + return (aData[a/8] & 1<<a%8) != 0; + } + + void SetAll() + { + memset(aData, 0xFF, sizeof(aData)); + } + + void ClearAll() + { + memset(aData, 0x00, sizeof(aData)); + } + + sal_Bool IsEmpty() const; + sal_Bool IsFull() const; + + sal_uInt16 GetSetCount() const; + sal_uInt8 GetSetBit(sal_uInt16 nNum) const; + sal_uInt16 GetClearCount() const; + sal_uInt8 GetClearBit(sal_uInt16 nNum) const; + void operator&=(const SetOfByte& r2ndSet); + void operator|=(const SetOfByte& r2ndSet); + + friend inline SvStream& operator<<(SvStream& rOut, const SetOfByte& rSet); + friend inline SvStream& operator>>(SvStream& rIn, SetOfByte& rSet); + + // initialize this set with a uno sequence of sal_Int8 + void PutValue(const com::sun::star::uno::Any & rAny); + + // returns a uno sequence of sal_Int8 + void QueryValue(com::sun::star::uno::Any & rAny) const; +}; + +inline SvStream& operator<<(SvStream& rOut, const SetOfByte& rSet) +{ + rOut.Write((char*)rSet.aData,32); + return rOut; +} + +inline SvStream& operator>>(SvStream& rIn, SetOfByte& rSet) +{ + rIn.Read((char*)rSet.aData,32); + return rIn; +} + +#endif // _SVDSOB_HXX + diff --git a/svx/inc/svx/svdtext.hxx b/svx/inc/svx/svdtext.hxx new file mode 100644 index 000000000000..d745bbe170de --- /dev/null +++ b/svx/inc/svx/svdtext.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdtext.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDTEXT_HXX +#define _SVDTEXT_HXX + +#include <sal/types.h> +#include "svx/svxdllapi.h" +#include <tools/weakbase.hxx> + +// -------------------------------------------------------------------- + +class OutlinerParaObject; +class SdrOutliner; +class SdrTextObj; +class SdrModel; +class SfxItemSet; + +namespace sdr { namespace properties { + class TextProperties; +}} + +/** This class stores information about one text inside a shape. +*/ + +class SVX_DLLPUBLIC SdrText : public tools::WeakBase< SdrText > +{ +public: + SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject = 0 ); + virtual ~SdrText(); + + virtual void SetModel(SdrModel* pNewModel); + virtual void ForceOutlinerParaObject( USHORT nOutlMode ); + + virtual void SetOutlinerParaObject( OutlinerParaObject* pTextObject ); + virtual OutlinerParaObject* GetOutlinerParaObject() const; + + virtual void CheckPortionInfo( SdrOutliner& rOutliner ); + virtual void ReformatText(); + + // default uses GetObjectItemSet, but may be overloaded to + // return a text-specific ItemSet + virtual const SfxItemSet& GetItemSet() const; + + SdrModel* GetModel() const { return mpModel; } + SdrTextObj& GetObject() const { return mrObject; } + + /** returns the current OutlinerParaObject and removes it from this instance */ + OutlinerParaObject* RemoveOutlinerParaObject(); + +protected: + virtual const SfxItemSet& GetObjectItemSet(); + virtual void SetObjectItem(const SfxPoolItem& rItem); + virtual SfxStyleSheet* GetStyleSheet() const; + +private: + OutlinerParaObject* mpOutlinerParaObject; + SdrTextObj& mrObject; + SdrModel* mpModel; + bool mbPortionInfoChecked; +}; + +#endif //_SVDTEXT_HXX + diff --git a/svx/inc/svx/svdtrans.hxx b/svx/inc/svx/svdtrans.hxx new file mode 100644 index 000000000000..7e21ef848c9b --- /dev/null +++ b/svx/inc/svx/svdtrans.hxx @@ -0,0 +1,329 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdtrans.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDTRANS_HXX +#define _SVDTRANS_HXX + +#include <tools/gen.hxx> +#include <tools/poly.hxx> +#include <tools/fract.hxx> + +#ifndef _MAPMOD_HXX //autogen +#include <vcl/mapmod.hxx> +#endif +#include <tools/string.hxx> +#include "svx/svxdllapi.h" + +#include <vcl/field.hxx> + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// Winkelangaben der DrawingEngine sind 1/100 Degree +// #i19054# nowhere used, removed // const int nWinkDiv=100; +// Um Winkel der DrawingEngine mit den Trigonometrischen Funktionen +// verarbeiten zu koennen, muessen sie zunaest ins Bogenmass umgerechnet +// werden. Dies gestaltet sich recht einfach mit der folgenden Konstanten +// nPi180. Sei nWink ein Winkel in 1/100 Deg so schreibt man z.B.: +// double nSin=sin(nWink*nPi180); +// Rueckwandlung entsprechend durch Teilen. +const double nPi=3.14159265358979323846; +const double nPi180=0.000174532925199432957692222; // Bei zuweing Stellen ist tan(4500*nPi180)!=1.0 + +// Der maximale Shearwinkel +#define SDRMAXSHEAR 8900 + +class XPolygon; +class XPolyPolygon; + +inline long Round(double a) { return a>0.0 ? (long)(a+0.5) : -(long)((-a)+0.5); } + +inline void MoveRect(Rectangle& rRect, const Size& S) { rRect.Move(S.Width(),S.Height()); } +inline void MovePoint(Point& rPnt, const Size& S) { rPnt.X()+=S.Width(); rPnt.Y()+=S.Height(); } +inline void MovePoly(Polygon& rPoly, const Size& S) { rPoly.Move(S.Width(),S.Height()); } +inline void MovePoly(PolyPolygon& rPoly, const Size& S) { rPoly.Move(S.Width(),S.Height()); } +void MoveXPoly(XPolygon& rPoly, const Size& S); +void MoveXPoly(XPolyPolygon& rPoly, const Size& S); + +SVX_DLLPUBLIC void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& xFact, const Fraction& yFact, FASTBOOL bNoJustify=FALSE); +inline void ResizePoint(Point& rPnt, const Point& rRef, Fraction xFact, Fraction yFact); +void ResizePoly(Polygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact); +void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact); +void ResizePoly(PolyPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact); +void ResizeXPoly(XPolyPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact); + +inline void RotatePoint(Point& rPnt, const Point& rRef, double sn, double cs); +SVX_DLLPUBLIC void RotatePoly(Polygon& rPoly, const Point& rRef, double sn, double cs); +void RotateXPoly(XPolygon& rPoly, const Point& rRef, double sn, double cs); +void RotatePoly(PolyPolygon& rPoly, const Point& rRef, double sn, double cs); +void RotateXPoly(XPolyPolygon& rPoly, const Point& rRef, double sn, double cs); + +// MirrorRect macht nur Sinn bei Spiegelachsen +// mit einem durch 45 Degree teilbaren Winkel! +void MirrorRect(Rectangle& rRect, const Point& rRef1, const Point& rRef2, FASTBOOL bNoJustify); // ni. +void MirrorPoint(Point& rPnt, const Point& rRef1, const Point& rRef2); +void MirrorPoly(Polygon& rPoly, const Point& rRef1, const Point& rRef2); +void MirrorXPoly(XPolygon& rPoly, const Point& rRef1, const Point& rRef2); +void MirrorPoly(PolyPolygon& rPoly, const Point& rRef1, const Point& rRef2); +void MirrorXPoly(XPolyPolygon& rPoly, const Point& rRef1, const Point& rRef2); + +inline void ShearPoint(Point& rPnt, const Point& rRef, double tn, FASTBOOL bVShear=FALSE); +SVX_DLLPUBLIC void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear=FALSE); +void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear=FALSE); +void ShearPoly(PolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear=FALSE); +void ShearXPoly(XPolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear=FALSE); + +// rPnt.X bzw rPnt.Y wird auf rCenter.X bzw. rCenter.Y gesetzt! +// anschliessend muss rPnt nur noch um rCenter gedreht werden. +// Der Rueckgabewinkel ist ausnahmsweise in Rad. +inline double GetCrookAngle(Point& rPnt, const Point& rCenter, const Point& rRad, FASTBOOL bVertical); +// Die folgenden Methoden behandeln einen Punkt eines XPolygons, wobei die +// benachbarten Kontrollpunkte des eigentlichen Punktes ggf. in pC1/pC2 +// uebergeben werden. Ueber rSin/rCos wird gleichzeitig sin(nWink) und cos(nWink) +// zurueckgegeben. +// Der Rueckgabewinkel ist hier ebenfalls in Rad. +double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, + const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert); +double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, + const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert); +double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, + const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert, + const Rectangle rRefRect); + +void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert); +void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert); +void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert, const Rectangle rRefRect); + +void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert); +void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert); +void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert, const Rectangle rRefRect); + +/**************************************************************************************************/ +/* Inline */ +/**************************************************************************************************/ + +inline void ResizePoint(Point& rPnt, const Point& rRef, Fraction xFact, Fraction yFact) +{ + if (xFact.GetDenominator()==0) xFact=Fraction(xFact.GetNumerator(),1); // DivZero abfangen + if (yFact.GetDenominator()==0) yFact=Fraction(yFact.GetNumerator(),1); // DivZero abfangen + rPnt.X()=rRef.X()+ Round(((double)(rPnt.X()-rRef.X())*xFact.GetNumerator())/xFact.GetDenominator()); + rPnt.Y()=rRef.Y()+ Round(((double)(rPnt.Y()-rRef.Y())*yFact.GetNumerator())/yFact.GetDenominator()); +} + +inline void RotatePoint(Point& rPnt, const Point& rRef, double sn, double cs) +{ + long dx=rPnt.X()-rRef.X(); + long dy=rPnt.Y()-rRef.Y(); + rPnt.X()=Round(rRef.X()+dx*cs+dy*sn); + rPnt.Y()=Round(rRef.Y()+dy*cs-dx*sn); +} + +inline void ShearPoint(Point& rPnt, const Point& rRef, double tn, FASTBOOL bVShear) +{ + if (!bVShear) { // Horizontal + if (rPnt.Y()!=rRef.Y()) { // sonst nicht noetig + rPnt.X()-=Round((rPnt.Y()-rRef.Y())*tn); + } + } else { // ansonsten vertikal + if (rPnt.X()!=rRef.X()) { // sonst nicht noetig + rPnt.Y()-=Round((rPnt.X()-rRef.X())*tn); + } + } +} + +inline double GetCrookAngle(Point& rPnt, const Point& rCenter, const Point& rRad, FASTBOOL bVertical) +{ + double nWink; + if (bVertical) { + long dy=rPnt.Y()-rCenter.Y(); + nWink=(double)dy/(double)rRad.Y(); + rPnt.Y()=rCenter.Y(); + } else { + long dx=rCenter.X()-rPnt.X(); + nWink=(double)dx/(double)rRad.X(); + rPnt.X()=rCenter.X(); + } + return nWink; +} + +/**************************************************************************************************/ +/**************************************************************************************************/ + +// Y-Achse zeigt nach unten! Die Funktion negiert bei der +// Winkelberechnung die Y-Achse, sodass GetAngle(Point(0,-1))=90.00deg. +// GetAngle(Point(0,0)) liefert 0. +// Der Rueckgabewert liegt im Bereich -180.00..179.99 Degree und +// ist in 1/100 Degree angegeben. +SVX_DLLPUBLIC long GetAngle(const Point& rPnt); +long NormAngle180(long a); // Winkel normalisieren auf -180.00..179.99 +SVX_DLLPUBLIC long NormAngle360(long a); // Winkel normalisieren auf 0.00..359.99 +USHORT GetAngleSector(long nWink); // Sektor im kartesischen Koordinatensystem bestimmen +// Berechnet die Laenge von (0,0) via a^2 + b^2 = c^2 +// Zur Vermeidung von Ueberlaeufen werden ggf. einige Stellen ignoriert. +long GetLen(const Point& rPnt); + +/* + Transformation eines Rechtecks in ein Polygon unter ------------ + Anwendung der Winkelparameter aus GeoStat. /1 2/ + Referenzpunkt ist stets der Punkt 0, also die linke / / + obere Ecke des Ausgangsrects. / / + Bei der Berechnung des Polygons ist die Reihenfolge / / + (erst Shear, dann Rotation vorgegeben). / / \ + / / | + A) Ausgangsrechteck aRect B) Nach Anwendung von Shear /0 3/ Rot| + +------------------+ -------------------- ------------ ------ + |0 1| \0 1\ C) Nach Anwendung + | | \ \ von Rotate + | | | \ \ + |3 2| | \3 2\ + +------------------+ | -------------------- + |Shr | + Bei Rueckkonvertierung des Polygons in ein Rect ist die Reihenfolge + zwangslaeufig umgekehrt: + - Berechnung des Drehwinkels: Winkel der Strecke 0-1 aus Abb. C) zum Horizont + - Rueckdrehung des geshearten Rects (man erhaelt Abb B)) + - Bestimmung der Breite des Rects=Laenge der Strecke 0-1 aus Abb. B) + - Bestimmung der Hoehe des Rects=vertikaler Abstand zwischen den Punkten + 0 und 3 aus Abb. B) + - Bestimmung des Shear-Winkels aus der Strecke 0-3 zur Senkrechten. + Es ist darauf zu achten, dass das Polygon bei einer zwischenzeitlichen + Transformation evtl. gespiegelt wurde (Mirror oder Resize mit neg. Faktor). + In diesem Fall muss zunaecht eine Normalisierung durch Vertauschung der + Punkte (z.B. 0 mit 3 und 1 mit 2) durchgefuehrt werden, damit der + Richtungssinn im Polygon wieder stimmig ist. + Hinweis: Positiver Shear-Winkel bedeutet Shear mit auf dem Bildschirm + sichtbarer positiver Kursivierung. Mathematisch waere dass eine negative + Kursivierung, da die Y-Achse auf dem Bildschirm von oben nach unten verlaeuft. + Drehwinkel: Positiv bedeutet auf dem Bildschirm sichtbare Linksdrehung. +*/ + +class GeoStat { // Geometrischer Status fuer ein Rect +public: + long nDrehWink; + long nShearWink; + double nTan; // tan(nShearWink) + double nSin; // sin(nDrehWink) + double nCos; // cos(nDrehWink) + bool bMirrored; // Horizontal gespiegelt? (ni) +public: + GeoStat(): nDrehWink(0),nShearWink(0),nTan(0.0),nSin(0.0),nCos(1.0),bMirrored(false) {} + void RecalcSinCos(); + void RecalcTan(); +}; + +Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo); +void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo); + +SVX_DLLPUBLIC void OrthoDistance8(const Point& rPt0, Point& rPt, FASTBOOL bBigOrtho); +SVX_DLLPUBLIC void OrthoDistance4(const Point& rPt0, Point& rPt, FASTBOOL bBigOrtho); + +// Multiplikation und anschliessende Division. +// Rechnung und Zwischenergebnis sind BigInt. +SVX_DLLPUBLIC long BigMulDiv(long nVal, long nMul, long nDiv); + +// Fehlerbehaftetes Kuerzen einer Fraction. +// nDigits gibt an, wieviele signifikante Stellen in +// Zaehler/Nenner mindestens erhalten bleiben sollen. +void Kuerzen(Fraction& rF, unsigned nDigits); + + +class FrPair { + Fraction aX; + Fraction aY; +public: + FrPair() : aX(0,1),aY(0,1) {} + FrPair(const Fraction& rBoth) : aX(rBoth),aY(rBoth) {} + FrPair(const Fraction& rX, const Fraction& rY) : aX(rX),aY(rY) {} + FrPair(long nMul, long nDiv) : aX(nMul,nDiv),aY(nMul,nDiv) {} + FrPair(long xMul, long xDiv, long yMul, long yDiv): aX(xMul,xDiv),aY(yMul,yDiv) {} + const Fraction& X() const { return aX; } + const Fraction& Y() const { return aY; } + Fraction& X() { return aX; } + Fraction& Y() { return aY; } +}; + +// Fuer die Umrechnung von Masseinheiten +SVX_DLLPUBLIC FrPair GetMapFactor(MapUnit eS, MapUnit eD); +FrPair GetMapFactor(MapUnit eS, FieldUnit eD); +FrPair GetMapFactor(FieldUnit eS, MapUnit eD); +FrPair GetMapFactor(FieldUnit eS, FieldUnit eD); + +inline FASTBOOL IsMetric(MapUnit eU) { + return (eU==MAP_100TH_MM || eU==MAP_10TH_MM || eU==MAP_MM || eU==MAP_CM); +} + +inline FASTBOOL IsInch(MapUnit eU) { + return (eU==MAP_1000TH_INCH || eU==MAP_100TH_INCH || eU==MAP_10TH_INCH || eU==MAP_INCH || + eU==MAP_POINT || eU==MAP_TWIP); +} + +inline FASTBOOL IsMetric(FieldUnit eU) { + return (eU==FUNIT_MM || eU==FUNIT_CM || eU==FUNIT_M || eU==FUNIT_KM || eU==FUNIT_100TH_MM); +} + +inline FASTBOOL IsInch(FieldUnit eU) { + return (eU==FUNIT_TWIP || eU==FUNIT_POINT || eU==FUNIT_PICA || + eU==FUNIT_INCH || eU==FUNIT_FOOT || eU==FUNIT_MILE); +} + +class SVX_DLLPUBLIC SdrFormatter { + Fraction aScale; + long nMul_; + long nDiv_; + short nKomma_; + FASTBOOL bSrcFU; + FASTBOOL bDstFU; + FASTBOOL bDirty; + MapUnit eSrcMU; + MapUnit eDstMU; + FieldUnit eSrcFU; + FieldUnit eDstFU; +private: + SVX_DLLPRIVATE void Undirty(); + SVX_DLLPRIVATE void ForceUndirty() const { if (bDirty) ((SdrFormatter*)this)->Undirty(); } +public: + SdrFormatter(MapUnit eSrc, MapUnit eDst) { eSrcMU=eSrc; bSrcFU=FALSE; eDstMU=eDst; bDstFU=FALSE; bDirty=TRUE; } + SdrFormatter(MapUnit eSrc, FieldUnit eDst) { eSrcMU=eSrc; bSrcFU=FALSE; eDstFU=eDst; bDstFU=TRUE; bDirty=TRUE; } + SdrFormatter(FieldUnit eSrc, MapUnit eDst) { eSrcFU=eSrc; bSrcFU=TRUE; eDstMU=eDst; bDstFU=FALSE; bDirty=TRUE; } + SdrFormatter(FieldUnit eSrc, FieldUnit eDst) { eSrcFU=eSrc; bSrcFU=TRUE; eDstFU=eDst; bDstFU=TRUE; bDirty=TRUE; } + void SetSourceUnit(MapUnit eSrc) { eSrcMU=eSrc; bSrcFU=FALSE; bDirty=TRUE; } + void SetSourceUnit(FieldUnit eSrc) { eSrcFU=eSrc; bSrcFU=TRUE; bDirty=TRUE; } + void SetDestinationUnit(MapUnit eDst) { eDstMU=eDst; bDstFU=FALSE; bDirty=TRUE; } + void SetDestinationUnit(FieldUnit eDst) { eDstFU=eDst; bDstFU=TRUE; bDirty=TRUE; } + void TakeStr(long nVal, XubString& rStr) const; + static void TakeUnitStr(MapUnit eUnit, XubString& rStr); + static void TakeUnitStr(FieldUnit eUnit, XubString& rStr); + static XubString GetUnitStr(MapUnit eUnit) { XubString aStr; TakeUnitStr(eUnit,aStr); return aStr; } + static XubString GetUnitStr(FieldUnit eUnit) { XubString aStr; TakeUnitStr(eUnit,aStr); return aStr; } +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDTRANS_HXX + diff --git a/svx/inc/svx/svdtypes.hxx b/svx/inc/svx/svdtypes.hxx new file mode 100644 index 000000000000..f7c15bae9b3f --- /dev/null +++ b/svx/inc/svx/svdtypes.hxx @@ -0,0 +1,172 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdtypes.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDTYPES_HXX +#define _SVDTYPES_HXX + +#include <tools/solar.h> + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// @@@@ @@@@@ @@@@@ @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@@@ @@ @@ @@@@@ @@ @@ @@@@@ @@ @@@@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@@@ @@@@@ @@ @@ @@@@ @@@@@ @@@@ @@@@@ @@@@ @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// + +const UINT32 SdrInventor=UINT32('S')*0x00000001+ + UINT32('V')*0x00000100+ + UINT32('D')*0x00010000+ + UINT32('r')*0x01000000; + +// Kommandos fuer EndCreate() +enum SdrCreateCmd {SDRCREATE_NEXTPOINT, // Naechster Polygonpunkt, Kreissegment: Naechste Koordinate + SDRCREATE_NEXTOBJECT, // Naechstes Polygon im PolyPolygon + SDRCREATE_FORCEEND}; // Ende erzwungen + +enum SdrDragMode +{ + SDRDRAG_MOVE, // Verschieben + SDRDRAG_RESIZE, // Groesse aendern + SDRDRAG_ROTATE, // Drehen + SDRDRAG_MIRROR, // Spiegeln + SDRDRAG_SHEAR, // Schraegstellen + SDRDRAG_CROOK, // Kreisfoermig verbiegen + SDRDRAG_DISTORT, // Freies verzerren (Rect in beliebiges Viereck transformieren) + + // new modes for interactive transparence and gradient tools + SDRDRAG_TRANSPARENCE, + SDRDRAG_GRADIENT, + + // new mode for interactive cropping of graphics + SDRDRAG_CROP +}; + + +// fuer SdrObject::ConvertToPoly() +enum SdrConvertType {SDRCONVERT_POLY, // reines Polygon erzeugen + SDRCONVERT_BEZIER, // alles Beziersegmente + SDRCONVERT_MIXED}; // Gemischtes Objekt (optimal) + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// @@ @@@@ @@ @@ @@@@@ @@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@@@@@ @@@@ @@@@ @@@@@ +// @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ +// @@@@@ @@ @@ @@ @@@@@ @@ @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Bei der Identifikation eines Layer kann es vorkommen, das dieser nicht +// vorhanden ist. SdrLayerAdmin::GetLayerID(const String&) liefert +// dann diesen Wert: +#define SDRLAYER_NOTFOUND 0xFF +// Man kann diesen Wert jodoch ohne Bedenken den Methoden des SdrLayerSet +// zuwerfen, bekommt dann jedoch immer FALSE, bzw. tut die Methode nix. +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Typdeklaration fuer Layer-IDs +typedef BYTE SdrLayerID; +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@@ @@ @@ @@@@ @@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@@@@ @@@@@@ @@ @@@ @@@@ @@@@ @@ @@ @@@@@ @@ @@ @@ @@@@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@@@@ @@@@@ @@@@ @@@@@ @@@@ @@@@@ @@ @@@@ @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +enum SdrObjListKind {SDROBJLIST_UNKNOWN =0x00, // Unbekannt + // reine Objektlisten: + SDROBJLIST_GROUPOBJ =0x01, // Objektliste eines Gruppenobjekts + SDROBJLIST_VIRTOBJECTS=0x02, // Liste ist die Liste der virtuellen Objekte + SDROBJLIST_SYMBOLTABLE=0x03, // Liste ist die Symboltabelle + // Hier haben zur Not noch 12 weitere Listentypen Platz + // Pages: + SDROBJLIST_DRAWPAGE =0x10, // Liste ist eine Zeichenseite + SDROBJLIST_MASTERPAGE =0x11 // Liste ist eine Masterpage + // Hier haben zur Not noch 8 weitere Pagetypen Platz +}; // fuer die Surrogate reserviert + +inline FASTBOOL SdrIsPageKind(SdrObjListKind eK) { return eK>=SDROBJLIST_DRAWPAGE && eK<=0x1A; } +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// @@@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@@@@ @@@@ @@@@@ @@@@ @@@@@@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@@@@ @@ @@@@@ @@ @@ @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// + +enum SdrRepeatFunc {SDRREPFUNC_OBJ_NONE, + // Mit Parameter + SDRREPFUNC_OBJ_MOVE, // Distanz + SDRREPFUNC_OBJ_RESIZE, // Faktor, Referenz(%) bezogen auf MarkRect + SDRREPFUNC_OBJ_SETSNAPRECT, // Rectangle + SDRREPFUNC_OBJ_SETLOGICRECT, // Rectangle + SDRREPFUNC_OBJ_ROTATE, // Drehwinkel, Referenz(%) bezogen auf MarkRect + SDRREPFUNC_OBJ_SHEAR, // Winkel,Faktor, Referenz(%) bezogen auf MarkRect + SDRREPFUNC_OBJ_CROOKROTATE, + SDRREPFUNC_OBJ_CROOKSLANT, + SDRREPFUNC_OBJ_CROOKSTRETCH, + SDRREPFUNC_OBJ_ALIGN, // Hor/Vert/bBound + SDRREPFUNC_OBJ_SETATTRIBUTES,// ItemSet + SDRREPFUNC_OBJ_SETSTYLESHEET,// StyleSheet* + // Ohne Parameter + SDRREPFUNC_OBJ_DELETE, + SDRREPFUNC_OBJ_COMBINE_POLYPOLY, + SDRREPFUNC_OBJ_COMBINE_ONEPOLY, + SDRREPFUNC_OBJ_DISMANTLE_POLYS, + SDRREPFUNC_OBJ_DISMANTLE_LINES, + SDRREPFUNC_OBJ_CONVERTTOPOLY, + SDRREPFUNC_OBJ_CONVERTTOPATH, + SDRREPFUNC_OBJ_GROUP, + SDRREPFUNC_OBJ_UNGROUP, + SDRREPFUNC_OBJ_PUTTOTOP, + SDRREPFUNC_OBJ_PUTTOBTM, + SDRREPFUNC_OBJ_MOVTOTOP, + SDRREPFUNC_OBJ_MOVTOBTM, + SDRREPFUNC_OBJ_REVORDER, + SDRREPFUNC_OBJ_IMPORTMTF, + SDRREPFUNC_PAGE_DELETE, + SDRREPFUNC_LAST}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDTYPES_HXX + diff --git a/svx/inc/svx/svdundo.hxx b/svx/inc/svx/svdundo.hxx new file mode 100644 index 000000000000..803b454a6f0c --- /dev/null +++ b/svx/inc/svx/svdundo.hxx @@ -0,0 +1,885 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdundo.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDUNDO_HXX +#define _SVDUNDO_HXX + +#ifndef _SOLAR_HRC +#include <svl/solar.hrc> +#endif +#include <svl/undo.hxx> +#include <tools/contnr.hxx> +#include <tools/gen.hxx> +#include <svx/svdtypes.hxx> // fuer enum RepeatFuncts +#include <svx/svdsob.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SfxItemSet; +class SfxStyleSheet; +class SdrView; +class SdrPageView; +class SdrModel; +class SdrObject; +class SdrPage; +class SdrObjList; +class SdrLayer; +class SdrLayerAdmin; +class SdrObjGeoData; +class OutlinerParaObject; + +//************************************************************ +// SdrUndoAction +// +// Abstrakte Basisklasse fuer alle UndoActions der DrawingEngine +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoAction : public SfxUndoAction +{ +protected: + SdrModel& rMod; + +protected: + SdrUndoAction(SdrModel& rNewMod) + : rMod(rNewMod) + {} + +public: + TYPEINFO(); + virtual BOOL CanRepeat(SfxRepeatTarget& rView) const; + virtual void Repeat(SfxRepeatTarget& rView); + + virtual String GetRepeatComment(SfxRepeatTarget& rView) const; + virtual String GetSdrRepeatComment(SdrView& rView) const; + + virtual bool CanSdrRepeat(SdrView& rView) const; + virtual void SdrRepeat(SdrView& rView); +}; + +//************************************************************ +// SdrUndoGroup +// +// Zusammenfassung beliebig vieler einzelner UndoActions zu einer einzigen +// UndoAction. Beim Undo() werden die Einzelactions rueckwaets aufgerufen +// (die zuletzt angehaengte zuerst...), beim Redo() dagegen entspricht die +// Aufrufreihenfolge der Einfuegereihenfolge. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoGroup : public SdrUndoAction +{ +protected: + Container aBuf; + + // Beschreibung der Action, nicht expandiert (beinhaltet %O) + String aComment; + String aObjDescription; + + SdrRepeatFunc eFunction; + +public: + SdrUndoGroup(SdrModel& rNewMod); + SdrUndoGroup(SdrModel& rNewMod,const String& rStr); + virtual ~SdrUndoGroup(); + + void Clear(); + ULONG GetActionCount() const { return aBuf.Count(); } + SdrUndoAction* GetAction(ULONG nNum) const { return (SdrUndoAction*)(aBuf.GetObject(nNum)); } + void AddAction(SdrUndoAction* pAct); + void push_front( SdrUndoAction* pAct ); + + void SetComment(const String& rStr) { aComment=rStr; } + void SetObjDescription(const String& rStr) { aObjDescription=rStr; } + virtual String GetComment() const; + virtual String GetSdrRepeatComment(SdrView& rView) const; + + virtual void Undo(); + virtual void Redo(); + + virtual bool CanSdrRepeat(SdrView& rView) const; + virtual void SdrRepeat(SdrView& rView); + void SetRepeatFunction(SdrRepeatFunc eFunc) { eFunction=eFunc; } + SdrRepeatFunc GetRepeatFunction() const { return eFunction; } +}; + +//************************************************************ +// SdrUndoObj +// +// Abstrakte Basisklasse fuer alle UndoActions die mit Objekten zu tun haben. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoObj : public SdrUndoAction +{ +protected: + SdrObject* pObj; + +protected: + SdrUndoObj(SdrObject& rNewObj); + + void ImpTakeDescriptionStr(USHORT nStrCacheID, String& rStr, FASTBOOL bRepeat=FALSE) const; + + static void GetDescriptionStringForObject( const SdrObject& _rForObject, USHORT nStrCacheID, String& rStr, FASTBOOL bRepeat = FALSE ); + + // #94278# new method for evtl. PageChange at UNDO/REDO + void ImpShowPageOfThisObject(); +}; + +//************************************************************ +// SdrUndoAttrObj +// +// Aenderung der Objektattribute. +// Action direkt vor dem Setzen der neuen Attribute konstruieren. +// Auch fuer StyleSheets +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoAttrObj : public SdrUndoObj +{ +protected: + SfxItemSet* pUndoSet; + SfxItemSet* pRedoSet; + SfxItemSet* pRepeatSet; + + // oder besser den StyleSheetNamen merken? + SfxStyleSheet* pUndoStyleSheet; + SfxStyleSheet* pRedoStyleSheet; + SfxStyleSheet* pRepeatStyleSheet; + FASTBOOL bStyleSheet; + FASTBOOL bHaveToTakeRedoSet; + + // Bei Zuweisung von TextItems auf ein Zeichenobjekt mit Text: + OutlinerParaObject* pTextUndo; + // #i8508# + // The text rescue mechanism needs also to be implemented for redo actions. + OutlinerParaObject* pTextRedo; + + // Wenn sich um ein Gruppenobjekt handelt: + SdrUndoGroup* pUndoGroup; + +public: + SdrUndoAttrObj(SdrObject& rNewObj, FASTBOOL bStyleSheet1=FALSE, FASTBOOL bSaveText=FALSE); + virtual ~SdrUndoAttrObj(); + void SetRepeatAttr(const SfxItemSet& rSet); + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; + virtual String GetSdrRepeatComment(SdrView& rView) const; + + virtual void SdrRepeat(SdrView& rView); + virtual bool CanSdrRepeat(SdrView& rView) const; +}; + +//************************************************************ +// SdrUndoMoveObj +// +// Blosses verschieben eines Objektes. +// Action direkt vor dem Verschieben konstruieren. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoMoveObj : public SdrUndoObj +{ +protected: + Size aDistance; // Entfernung, um die verschoben wird + +public: + SdrUndoMoveObj(SdrObject& rNewObj): SdrUndoObj(rNewObj) {} + SdrUndoMoveObj(SdrObject& rNewObj, const Size& rDist): SdrUndoObj(rNewObj),aDistance(rDist) {} + + void SetDistance(const Size& rDist) { aDistance=rDist; } + const Size& GetDistance() const { return aDistance; } + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; + virtual String GetSdrRepeatComment(SdrView& rView) const; + + virtual void SdrRepeat(SdrView& rView); + virtual bool CanSdrRepeat(SdrView& rView) const; +}; + +//************************************************************ +// SdrUndoGeoObj +// +// Aenderung der Geometrie eines Objektes. +// Action direkt vor der geometrischen Transformation konstruieren. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoGeoObj : public SdrUndoObj +{ +protected: + SdrObjGeoData* pUndoGeo; + SdrObjGeoData* pRedoGeo; + // Wenn sich um ein Gruppenobjekt handelt: + SdrUndoGroup* pUndoGroup; + +public: + SdrUndoGeoObj(SdrObject& rNewObj); + virtual ~SdrUndoGeoObj(); + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; + +//************************************************************ +// SdrUndoObjList +// +// Manipulationen an einer ObjList: Neues Obj, DeleteObj, SetObjZLevel, Grouping, ... +// Abstrakte Basisklasse. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoObjList : public SdrUndoObj { + bool bOwner; + +protected: + SdrObjList* pObjList; + SdrView* pView; // um bei ObjDel, Undo die + SdrPageView* pPageView; // Selektion widerherstellen zu koennen + UINT32 nOrdNum; + // Bei einem Undo/Redo findet moeglicherweise Uebereignung des Objektes + // statt. Im Dtor wird das Obj deleted, wenn bOwner==TRUE + +protected: + SdrUndoObjList(SdrObject& rNewObj, bool bOrdNumDirect = false); + virtual ~SdrUndoObjList(); + + void SetView(SdrView* pView1, SdrPageView* pPageView1) { pView=pView1; pPageView=pPageView1; } + bool IsOwner() { return bOwner; } + void SetOwner(bool bNew); +}; + +//************************************************************ +// SdrUndoRemoveObj +// +// Entfernen Objekts aus einer Objektliste. Innerhalb einer UndoGroup +// mit korrospondierenden Inserts zu verwenden. +// Action vor dem entfernen aus der ObjList konstruieren. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoRemoveObj : public SdrUndoObjList +{ +public: + SdrUndoRemoveObj(SdrObject& rNewObj, FASTBOOL bOrdNumDirect=FALSE) + : SdrUndoObjList(rNewObj,bOrdNumDirect) {} + + virtual void Undo(); + virtual void Redo(); +}; + +//************************************************************ +// SdrUndoInsertObj +// +// Einfuegen Objekts in eine Objektliste. Innerhalb einer UndoGroup +// mit korrospondierenden Removes zu verwenden. +// Action vor dem entfernen aus der ObjList konstruieren. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoInsertObj : public SdrUndoObjList +{ +public: + SdrUndoInsertObj(SdrObject& rNewObj, FASTBOOL bOrdNumDirect=FALSE) + : SdrUndoObjList(rNewObj,bOrdNumDirect) {} + + virtual void Undo(); + virtual void Redo(); +}; + +//************************************************************ +// SdrUndoDelObj +// +// Loeschen eines Objekts. +// Action vor dem entfernen aus der ObjList konstruieren. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoDelObj : public SdrUndoRemoveObj +{ +public: + SdrUndoDelObj(SdrObject& rNewObj, FASTBOOL bOrdNumDirect=FALSE) + : SdrUndoRemoveObj(rNewObj,bOrdNumDirect) { SetOwner(TRUE); } + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; + virtual String GetSdrRepeatComment(SdrView& rView) const; + + virtual void SdrRepeat(SdrView& rView); + virtual bool CanSdrRepeat(SdrView& rView) const; +}; + +//************************************************************ +// SdrUndoNewObj +// +// Einfuegen eines neuen Objektes. +// Action nach dem einfuegen in die ObjList konstruieren. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoNewObj : public SdrUndoInsertObj +{ +public: + SdrUndoNewObj(SdrObject& rNewObj, FASTBOOL bOrdNumDirect=FALSE) + : SdrUndoInsertObj(rNewObj,bOrdNumDirect) {} + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; + + static String GetComment( const SdrObject& _rForObject ); +}; + +//************************************************************ +// SdrUndoReplaceObj +// +// Austausch eines Objektes. +// Action vor dem Replace an der ObjList konstruieren. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoReplaceObj : public SdrUndoObj +{ + bool bOldOwner; + bool bNewOwner; + +protected: + SdrObjList* pObjList; + UINT32 nOrdNum; + SdrObject* pNewObj; + +public: + SdrUndoReplaceObj(SdrObject& rOldObj1, SdrObject& rNewObj1, bool bOrdNumDirect = false); + virtual ~SdrUndoReplaceObj(); + + virtual void Undo(); + virtual void Redo(); + + bool IsNewOwner() { return bNewOwner; } + void SetNewOwner(bool bNew); + + bool IsOldOwner() { return bOldOwner; } + void SetOldOwner(bool bNew); +}; + +//************************************************************ +// SdrUndoCopyObj +// +// Kopieren eines Objekts +// Action nach dem einfuegen in die ObjList konstruieren. +// +//************************************************************ + +class SdrUndoCopyObj : public SdrUndoNewObj +{ +public: + SdrUndoCopyObj(SdrObject& rNewObj, FASTBOOL bOrdNumDirect=FALSE) + : SdrUndoNewObj(rNewObj,bOrdNumDirect) {} + + virtual String GetComment() const; +}; + +//************************************************************ +// SdrUndoObjOrdNum +//************************************************************ + +class SdrUndoObjOrdNum : public SdrUndoObj +{ +protected: + UINT32 nOldOrdNum; + UINT32 nNewOrdNum; + +public: + SdrUndoObjOrdNum(SdrObject& rNewObj, UINT32 nOldOrdNum1, UINT32 nNewOrdNum1); + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; + +////////////////////////////////////////////////////////////////////////////// +// #i11702# + +class SVX_DLLPUBLIC SdrUndoObjectLayerChange : public SdrUndoObj +{ +protected: + SdrLayerID maOldLayer; + SdrLayerID maNewLayer; + +public: + SdrUndoObjectLayerChange(SdrObject& rObj, SdrLayerID aOldLayer, SdrLayerID aNewLayer); + + virtual void Undo(); + virtual void Redo(); +}; + +//************************************************************ +// SdrUndoObjSetText +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoObjSetText : public SdrUndoObj +{ +protected: + OutlinerParaObject* pOldText; + OutlinerParaObject* pNewText; + FASTBOOL bNewTextAvailable; + BOOL bEmptyPresObj; + sal_Int32 mnText; + +public: + SdrUndoObjSetText(SdrObject& rNewObj, sal_Int32 nText ); + virtual ~SdrUndoObjSetText(); + + FASTBOOL IsDifferent() const { return pOldText!=pNewText; } + void AfterSetText(); + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; + virtual String GetSdrRepeatComment(SdrView& rView) const; + + virtual void SdrRepeat(SdrView& rView); + virtual bool CanSdrRepeat(SdrView& rView) const; +}; + +// --> OD 2009-07-09 #i73249# +class SdrUndoObjStrAttr : public SdrUndoObj +{ +public: + enum ObjStrAttrType + { + OBJ_NAME, + OBJ_TITLE, + OBJ_DESCRIPTION + }; + +protected: + const ObjStrAttrType meObjStrAttr; + const String msOldStr; + const String msNewStr; + +public: + SdrUndoObjStrAttr( SdrObject& rNewObj, + const ObjStrAttrType eObjStrAttr, + const String& sOldStr, + const String& sNewStr); + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; +// <-- + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@ @@@@ @@ @@ @@@@@ @@@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@@@@@ @@@@ @@@@ @@@@@ +// @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ +// @@@@@ @@ @@ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//************************************************************ +// SdrUndoLayer +// +// Abstrakte Basisklasse fuer alle UndoActions die mit SdrLayer zu tun haben. +// +//************************************************************ + +class SdrUndoLayer : public SdrUndoAction +{ +protected: + SdrLayer* pLayer; + SdrLayerAdmin* pLayerAdmin; + USHORT nNum; + FASTBOOL bItsMine; + +protected: + SdrUndoLayer(USHORT nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel); + virtual ~SdrUndoLayer(); +}; + +//************************************************************ +// SdrUndoNewLayer +// +// Einfuegen eines neuen Layer. Action nach dem Einfuegen konstruieren. +// +//************************************************************ + +class SdrUndoNewLayer : public SdrUndoLayer +{ +public: + SdrUndoNewLayer(USHORT nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel) + : SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel) {} + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; + +//************************************************************ +// SdrUndoDelLayer +// +// Loeschen eines Layer. Action vor dem Remove konstruieren +// +//************************************************************ + +class SdrUndoDelLayer : public SdrUndoLayer +{ +public: + SdrUndoDelLayer(USHORT nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel) + : SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel) { bItsMine=TRUE; } + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; + +//************************************************************ +// SdrUndoMoveLayer +// +// Verschieben eines Layer. Action vor dem Verschieben konstruieren. +// +//************************************************************ + +class SdrUndoMoveLayer : public SdrUndoLayer +{ + USHORT nNeuPos; + +public: + SdrUndoMoveLayer(USHORT nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, USHORT nNeuPos1) + : SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel), nNeuPos(nNeuPos1) {} + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@@ @@@@ @@@@ @@@@@ @@@@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ +// @@@@@ @@@@@@ @@ @@@ @@@@ @@@@ +// @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@@@@ @@@@@ @@@@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//************************************************************ +// SdrUndoPage +// +// Abstrakte Basisklasse fuer alle UndoActions die mit SdrPages zu tun haben. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoPage : public SdrUndoAction +{ +protected: + SdrPage& mrPage; + +protected: + void ImpInsertPage(USHORT nNum); + void ImpRemovePage(USHORT nNum); + void ImpMovePage(USHORT nOldNum, USHORT nNewNum); + +protected: + SdrUndoPage(SdrPage& rNewPg); + + void ImpTakeDescriptionStr(USHORT nStrCacheID, String& rStr, USHORT n=0, FASTBOOL bRepeat=FALSE) const; +}; + +//************************************************************ +// SdrUndoPageList +// +// Manipulationen an einer PageList: Neue Page, DeletePage, MovePage(ChangePageNum) +// Abstrakte Basisklasse. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoPageList : public SdrUndoPage +{ +protected: + USHORT nPageNum; + + // Bei einem Undo/Redo findet moeglicherweise Uebereignung der Page + // statt. Im Dtor wird die Page deleted, wenn bItsMine==TRUE + FASTBOOL bItsMine; + +protected: + SdrUndoPageList(SdrPage& rNewPg); + virtual ~SdrUndoPageList(); +}; + +//************************************************************ +// SdrUndoDelPage +// +// Loeschen einer Page. +// Action vor dem entfernen aus der List konstruieren. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoDelPage : public SdrUndoPageList +{ + // Beim loeschen einer MasterPage merke ich mir in dieser UndoGroup + // alle Beziehungen der Zeichenseiten zu der geloeschten MasterPage + SdrUndoGroup* pUndoGroup; + +public: + SdrUndoDelPage(SdrPage& rNewPg); + virtual ~SdrUndoDelPage(); + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; + virtual String GetSdrRepeatComment(SdrView& rView) const; + + virtual void SdrRepeat(SdrView& rView); + virtual bool CanSdrRepeat(SdrView& rView) const; +}; + +//************************************************************ +// SdrUndoNewPage +// +// Einfuegen einer neuen Page. +// Action nach dem einfuegen in die Liste konstruieren. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoNewPage : public SdrUndoPageList +{ +public: + SdrUndoNewPage(SdrPage& rNewPg): SdrUndoPageList(rNewPg) {} + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; + +//************************************************************ +// SdrUndoCopyPage +// +// Kopieren einer Page +// Action nach dem einfuegen in die Liste konstruieren. +// +//************************************************************ + +class SdrUndoCopyPage : public SdrUndoNewPage +{ +public: + SdrUndoCopyPage(SdrPage& rNewPg): SdrUndoNewPage(rNewPg) {} + + virtual String GetComment() const; + virtual String GetSdrRepeatComment(SdrView& rView) const; + + virtual void SdrRepeat(SdrView& rView); + virtual bool CanSdrRepeat(SdrView& rView) const; +}; + +//************************************************************ +// SdrUndoSetPageNum +// +// Verschieben der Page innerhalb der Liste +// Action vor dem Verschieben der Page konstruieren. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoSetPageNum : public SdrUndoPage +{ +protected: + USHORT nOldPageNum; + USHORT nNewPageNum; + +public: + SdrUndoSetPageNum(SdrPage& rNewPg, USHORT nOldPageNum1, USHORT nNewPageNum1) + : SdrUndoPage(rNewPg),nOldPageNum(nOldPageNum1),nNewPageNum(nNewPageNum1) {} + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@ @@ @@@@ @@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ +// @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@@@@@@ @@@@@@ @@@@ @@ @@@@ @@@@@ @@@@@ @@@@@@ @@ @@@ @@@@ @@@@ +// @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@@@ @@ @@@@@ @@ @@ @@ @@ @@ @@@@@ @@@@@ @@@@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//************************************************************ +// SdrUndoPageMasterPage +// +// Abstrakte Basisklasse fuer alle UndoActions die mit +// MasterPage-Beziehungen zu tun haben. +// +//************************************************************ + +class SdrUndoPageMasterPage : public SdrUndoPage +{ +protected: + sal_Bool mbOldHadMasterPage; + SetOfByte maOldSet; + sal_uInt16 maOldMasterPageNumber; + +protected: + SdrUndoPageMasterPage(SdrPage& rChangedPage); + +public: + SVX_DLLPUBLIC virtual ~SdrUndoPageMasterPage(); +}; + +//************************************************************ +// SdrUndoPageRemoveMasterPage +// +// Entfernen einer MasterPage von einer Zeichenseite. +// Action vor dem Entfernen des MasterPageDescriptors erzeugen. +// +//************************************************************ + +class SdrUndoPageRemoveMasterPage : public SdrUndoPageMasterPage +{ +public: + SdrUndoPageRemoveMasterPage(SdrPage& rChangedPage); + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; + +//************************************************************ +// SdrUndoPageChangeMasterPage +// +// Aenderung des MasterPageDescriptors (z.B. Aendern der VisibleLayer). +// Action vor der Aenderung am MasterPageDescriptor erzeugen. +// +//************************************************************ + +class SVX_DLLPUBLIC SdrUndoPageChangeMasterPage : public SdrUndoPageMasterPage +{ +protected: + sal_Bool mbNewHadMasterPage; + SetOfByte maNewSet; + sal_uInt16 maNewMasterPageNumber; + +public: + SdrUndoPageChangeMasterPage(SdrPage& rChangedPage); + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; + +/////////////////////////////////////////////////////////////////////// + +/** the SdrUndoFactory can be set and retrieved from the SdrModel. + It is used by the drawing layer implementations to create undo actions. + It can be used by applications to create application specific undo actions. +*/ +class SVX_DLLPUBLIC SdrUndoFactory +{ +public: + // shapes + virtual ~SdrUndoFactory(); + virtual SdrUndoAction* CreateUndoMoveObject( SdrObject& rObject ); + virtual SdrUndoAction* CreateUndoMoveObject( SdrObject& rObject, const Size& rDist ); + virtual SdrUndoAction* CreateUndoGeoObject( SdrObject& rObject ); + virtual SdrUndoAction* CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1 = false, bool bSaveText = false ); + virtual SdrUndoAction* CreateUndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect = false); + virtual SdrUndoAction* CreateUndoInsertObject( SdrObject& rObject, bool bOrdNumDirect = false); + virtual SdrUndoAction* CreateUndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect = false); + virtual SdrUndoAction* CreateUndoNewObject( SdrObject& rObject, bool bOrdNumDirect = false); + virtual SdrUndoAction* CreateUndoCopyObject( SdrObject& rObject, bool bOrdNumDirect = false); + + virtual SdrUndoAction* CreateUndoObjectOrdNum( SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1); + + virtual SdrUndoAction* CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect = false ); + virtual SdrUndoAction* CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer ); + virtual SdrUndoAction* CreateUndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText ); + + // --> OD 2009-07-09 #i73249# + virtual SdrUndoAction* CreateUndoObjectStrAttr( SdrObject& rObject, + SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType, + String sOldStr, + String sNewStr ); + // <-- + + // layer + virtual SdrUndoAction* CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel); + virtual SdrUndoAction* CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel); + virtual SdrUndoAction* CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNeuPos1); + + // page + virtual SdrUndoAction* CreateUndoDeletePage(SdrPage& rPage); + virtual SdrUndoAction* CreateUndoNewPage(SdrPage& rPage); + virtual SdrUndoAction* CreateUndoCopyPage(SdrPage& rPage); + virtual SdrUndoAction* CreateUndoSetPageNum(SdrPage& rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1); + + // master page + virtual SdrUndoAction* CreateUndoPageRemoveMasterPage(SdrPage& rChangedPage); + virtual SdrUndoAction* CreateUndoPageChangeMasterPage(SdrPage& rChangedPage); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDUNDO_HXX + diff --git a/svx/inc/svx/svdview.hxx b/svx/inc/svx/svdview.hxx new file mode 100644 index 000000000000..1fe40e40df41 --- /dev/null +++ b/svx/inc/svx/svdview.hxx @@ -0,0 +1,342 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdview.hxx,v $ + * $Revision: 1.5.76.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDVIEW_HXX +#define _SVDVIEW_HXX + +// HACK to avoid too deep includes and to have some +// levels free in svdmark itself (MS compiler include depth limit) +#include <svx/svdhdl.hxx> +#include <tools/weakbase.hxx> +#include <svtools/accessibilityoptions.hxx> +#include "svx/svxdllapi.h" +#include <svx/svdcrtv.hxx> +#include <unotools/options.hxx> + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// Klassenhierarchie der View: +// SfxListener +// SdrPaintView PntV Action ModChg Attr Notify +// SdrSnapView SnpV Action +// +// SdrMarkView MrkV Action MrkChg ModChg Notify +// +// SdrEditView EdtV MrkChg ModChg Attr +// SdrPolyEditView PoEV +// SdrGlueEditView GlEV +// SdrObjEditView EdxV Action ModChg Attr Notify +// +// SdrExchangeView XcgV +// SdrDragView DrgV Action +// +// SdrCreateView CrtV Action +// SdrView View +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SvxURLField; + +//************************************************************ +// Defines +//************************************************************ + +enum SdrViewContext {SDRCONTEXT_STANDARD, + SDRCONTEXT_POINTEDIT, + SDRCONTEXT_GLUEPOINTEDIT, + SDRCONTEXT_GRAPHIC, + SDRCONTEXT_MEDIA, + SDRCONTEXT_TABLE}; + +enum SdrEventKind {SDREVENT_NONE, + SDREVENT_TEXTEDIT, + SDREVENT_MOVACTION, + SDREVENT_ENDACTION, + SDREVENT_BCKACTION, + SDREVENT_BRKACTION, + SDREVENT_ENDCREATE, + SDREVENT_ENDDRAG, + SDREVENT_MARKOBJ, + SDREVENT_MARKPOINT, + SDREVENT_MARKGLUEPOINT, + SDREVENT_BEGMARK, + SDREVENT_BEGINSOBJPOINT, + SDREVENT_ENDINSOBJPOINT, + SDREVENT_BEGINSGLUEPOINT, + SDREVENT_BEGDRAGHELPLINE, + SDREVENT_BEGDRAGOBJ, + SDREVENT_BEGCREATEOBJ, + SDREVENT_BEGMACROOBJ, + SDREVENT_BEGTEXTEDIT, + SDREVENT_ENDMARK, + SDREVENT_BRKMARK, + SDREVENT_EXECUTEURL}; + +#define SDRMOUSEBUTTONDOWN 1 +#define SDRMOUSEMOVE 2 +#define SDRMOUSEBUTTONUP 3 + +//************************************************************ +// Hilfsklasse SdrViewEvent +//************************************************************ + +struct SVX_DLLPUBLIC SdrViewEvent +{ + SdrHdl* pHdl; + SdrObject* pObj; + SdrObject* pRootObj; // Dieses Markieren bei SdrBeginTextEdit + SdrPageView* pPV; + const SvxURLField* pURLField; + + Point aLogicPos; + SdrHitKind eHit; + SdrEventKind eEvent; + SdrHdlKind eHdlKind; + SdrCreateCmd eEndCreateCmd; // auch fuer EndInsPoint + + UINT16 nMouseClicks; + UINT16 nMouseMode; + UINT16 nMouseCode; + UINT16 nHlplIdx; + UINT16 nGlueId; + + unsigned bMouseDown : 1; + unsigned bMouseUp : 1; + unsigned bDoubleHdlSize : 1; // Doppelte Handlegroesse wg. TextEdit + unsigned bIsAction : 1; // Action ist aktiv + unsigned bIsTextEdit : 1; // TextEdit laeuft zur Zeit + unsigned bTextEditHit : 1; // offene OutlinerView getroffen + unsigned bAddMark : 1; + unsigned bUnmark : 1; + unsigned bPrevNextMark : 1; + unsigned bMarkPrev : 1; + unsigned bInsPointNewObj : 1; + unsigned bDragWithCopy : 1; + unsigned bCaptureMouse : 1; + unsigned bReleaseMouse : 1; + +public: + SdrViewEvent(); + ~SdrViewEvent(); + + // nEventKind ist SDRMOUSEBUTTONDOWN, SDRMOUSEMOVE oder SDRMOUSEBUTTONUP + void SetMouseEvent(const MouseEvent& rMEvt, USHORT nEventKind); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// helper class for all D&D overlays + +class SVX_DLLPUBLIC SdrDropMarkerOverlay +{ + // The OverlayObjects + ::sdr::overlay::OverlayObjectList maObjects; + + void ImplCreateOverlays(const SdrView& rView, const basegfx::B2DPolyPolygon& rPolyPolygon); + +public: + SdrDropMarkerOverlay(const SdrView& rView, const SdrObject& rObject); + SdrDropMarkerOverlay(const SdrView& rView, const Rectangle& rRectangle); + SdrDropMarkerOverlay(const SdrView& rView, const Point& rStart, const Point& rEnd); + ~SdrDropMarkerOverlay(); +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@ @@ @@ @@@@@ @@ @@ +// @@ @@ @@ @@ @@ @@ +// @@ @@ @@ @@ @@ @ @@ +// @@@@@ @@ @@@@ @@@@@@@ +// @@@ @@ @@ @@@@@@@ +// @@@ @@ @@ @@@ @@@ +// @ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrView: public SdrCreateView, public tools::WeakBase< SdrView > +{ + friend class SdrPageView; + + unsigned bNoExtendedMouseDispatcher : 1; + unsigned bNoExtendedKeyDispatcher : 1; + unsigned bNoExtendedCommandDispatcher : 1; + unsigned bTextEditOnObjectsWithoutTextIfTextTool : 1; + unsigned mbMasterPagePaintCaching : 1; + +protected: + SvtAccessibilityOptions maAccessibilityOptions; + +public: + TYPEINFO(); + SdrView(SdrModel* pModel1, OutputDevice* pOut = 0L); + virtual ~SdrView(); + + // Default sind alle Dispatcher aktiviert. Will die App z.B. fuer + // Sonderbehandlungen im MouseDispatcher eingreifen, so muss sie + // den erweiterten MouseDispather mit unten stehender Methode deaktivieren + // und selbst nachimplementieren. Beispiel fuer MouseButtonDown: + // SdrViewEvent aVEvt; + // SdrHitKind eHit=pSdrView->PickAnything(rMEvt,SDRMOUSEBUTTONDOWN,aVEvt); + // ... hier Applikationsspezifischer Eingriff ... + // pSdrView->DoMouseEvent(aVEvt); + // SetPointer(GetPreferedPointer(...)) + // CaptureMouse(...) + void EnableExtendedMouseEventDispatcher(BOOL bOn) { bNoExtendedMouseDispatcher = !bOn; } + BOOL IsExtendedMouseEventDispatcherEnabled() const { return bNoExtendedMouseDispatcher; } + + void EnableExtendedKeyInputDispatcher(BOOL bOn) { bNoExtendedKeyDispatcher=!bOn; } + BOOL IsExtendedKeyInputDispatcherEnabled() const { return bNoExtendedKeyDispatcher; } + + void EnableExtendedCommandEventDispatcher(BOOL bOn) { bNoExtendedCommandDispatcher=!bOn; } + BOOL IsExtendedCommandEventDispatcherEnabled() const { return bNoExtendedCommandDispatcher; } + + void EnableTextEditOnObjectsWithoutTextIfTextTool(BOOL bOn) { bTextEditOnObjectsWithoutTextIfTextTool=bOn; } + BOOL IsEnableTextEditOnObjectsWithoutTextIfTextToolEnabled() const { return bTextEditOnObjectsWithoutTextIfTextTool; } + + void SetMasterPagePaintCaching(sal_Bool bOn); + sal_Bool IsMasterPagePaintCaching() const { return mbMasterPagePaintCaching; } + + BOOL KeyInput(const KeyEvent& rKEvt, Window* pWin); + virtual BOOL MouseButtonDown(const MouseEvent& rMEvt, Window* pWin); + virtual BOOL MouseButtonUp(const MouseEvent& rMEvt, Window* pWin); + virtual BOOL MouseMove(const MouseEvent& rMEvt, Window* pWin); + virtual BOOL Command(const CommandEvent& rCEvt, Window* pWin); + + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); + + BOOL SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll=FALSE) { return SdrCreateView::SetAttributes(rSet,bReplaceAll); } + BOOL SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr=FALSE) { return SdrCreateView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr); } + + /* new interface src537 */ + BOOL GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr=FALSE) const; + + SfxStyleSheet* GetStyleSheet() const; + + // unvollstaendige Implementation: + // Das OutputDevice ist notwendig, damit ich die HandleSize ermitteln kann. + // Bei NULL wird das 1. angemeldete Win verwendet. + Pointer GetPreferedPointer(const Point& rMousePos, const OutputDevice* pOut, USHORT nModifier=0, BOOL bLeftDown=FALSE) const; + SdrHitKind PickAnything(const MouseEvent& rMEvt, USHORT nMouseDownOrMoveOrUp, SdrViewEvent& rVEvt) const; + SdrHitKind PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) const; + BOOL DoMouseEvent(const SdrViewEvent& rVEvt); + virtual SdrViewContext GetContext() const; + + // Die Methoden beruecksichtigen den jeweiligen Kontex: + // - Einfaches Zeichnen + // - Punktbearbeitungs-Mode + // - Klebepunkt-Editmode + // - TextEdit + // - ... to be continued + BOOL IsMarkPossible() const; + void MarkAll(); + void UnmarkAll(); + BOOL IsAllMarked() const; + BOOL IsAllMarkPrevNextPossible() const; // das geht naemlich nicht bei TextEdit! + BOOL MarkNext(BOOL bPrev=FALSE); + BOOL MarkNext(const Point& rPnt, BOOL bPrev=FALSE); + + const Rectangle& GetMarkedRect() const; + void SetMarkedRect(const Rectangle& rRect); + + virtual void DeleteMarked(); + BOOL IsDeleteMarkedPossible() const; + BOOL IsDeletePossible() const { return IsDeleteMarkedPossible(); } + + // Markieren von Objekten, Polygonpunkten oder Klebepunkten (je nach View- + // Kontext) durch Aufziehen eines Selektionsrahmens. + // bAddMark=TRUE: zur bestehenden Selektion hinzumarkieren (->Shift) + // bUnmark=TRUE: Bereits selektierte Objekte/Punkte/Klebepunkte die innerhalb + // des aufgezogenen Rahmens liegen werden deselektiert. + BOOL BegMark(const Point& rPnt, BOOL bAddMark=FALSE, BOOL bUnmark=FALSE); + + // Folgende Actions sind moeglich: + // - ObjectCreating + // - ObjectMarking + // - Object-specific dragging + // - General dragging + // und mehr... + String GetStatusText(); + + SvtAccessibilityOptions& getAccessibilityOptions(); + + virtual void onAccessibilityOptionsChanged(); +}; + +#endif //_SVDVIEW_HXX + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// Die App macht sich zunaechst ein SdrModel. +// Anschliessend oeffnet sie ein Win und erzeugt dann eine SdrView. +// An der SdrView meldet sie dann mit der Methode ShowSdrPage() eine Seite an. +// Eine SdrView kann in beliebig vielen Fenstern gleichzeitig angezeigt werden. +// Intern: +// Eine SdrView kann beliebig viele Seiten gleichzeitig anzeigen. Seiten +// werden an- und abgemeldet mit ShowSdrPage()/HideSdrPage(). Fuer jede angemeldete +// Seite wird eine SdrPageView-Instanz im Container aPages angelegt. Bei +// gleichzeitiger Anzeige mehrerer Seiten ist darauf zu achten, dass der Offset- +// Parameter von ShowSdrPage() der Seitengroesse angepasst ist, da sich sonst die +// Seiten ueberlappen koennten. +// +// Elementare Methoden: +// ~~~~~~~~~~~~~~~~~~~~ +// Einfache Events: +// ~~~~~~~~~~~~~~~~ +// BOOL KeyInput(const KeyEvent& rKEvt, Window* pWin); +// BOOL MouseButtonDown(const MouseEvent& rMEvt, Window* pWin); +// BOOL MouseButtonUp(const MouseEvent& rMEvt, Window* pWin); +// BOOL MouseMove(const MouseEvent& rMEvt, Window* pWin); +// BOOL Command(const CommandEvent& rCEvt, Window* pWin); +// +// Exchange (Clipboard derzeit noch ohne SdrPrivateData): +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// BOOL Cut(ULONG nFormat=SDR_ANYFORMAT); +// BOOL Yank(ULONG nFormat=SDR_ANYFORMAT); +// BOOL Paste(Window* pWin=NULL, ULONG nFormat=SDR_ANYFORMAT); +// +// SfxItems: +// ~~~~~~~~~ +// BOOL GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr=FALSE) const; +// BOOL SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll); +// SfxStyleSheet* GetStyleSheet() const; +// BOOL SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr); +// +// Sonstiges: +// ~~~~~~~~~~ +// Pointer GetPreferedPointer(const Point& rMousePos, const OutputDevice* pOut, USHORT nTol=0) const; +// String GetStatusText(); +// +///////////////////////////////////////////////////////////////////////////////////////////////// */ + diff --git a/svx/inc/svx/svdxcgv.hxx b/svx/inc/svx/svdxcgv.hxx new file mode 100644 index 000000000000..ed15dfd70c77 --- /dev/null +++ b/svx/inc/svx/svdxcgv.hxx @@ -0,0 +1,165 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svdxcgv.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVDXCGV_HXX +#define _SVDXCGV_HXX + +#include <svx/svdedxv.hxx> + +#ifndef _GDIMTF_HXX //autogen +#include <vcl/gdimtf.hxx> +#endif +#include "svx/svxdllapi.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// @@@@@ @@ @@ @@@@ @@ @@ @@@@ @@ @@ @@@@ @@@@@ @@ @@ @@ @@@@@ @@ @@ +// @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ +// @@ @@@@@ @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@ @@ @@ @@ @@ @ @@ +// @@@@ @@@ @@ @@@@@@ @@@@@@ @@@@@@ @@ @@@ @@@@ @@@@@ @@ @@@@ @@@@@@@ +// @@ @@@@@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@@ @@ @@ @@@@@@@ +// @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@ +// @@@@@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@@@@ @@@@@ @ @@ @@@@@ @@ @@ +// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SdrExchangeView: public SdrObjEditView +{ + friend class SdrPageView; + +protected: + + void ImpGetPasteObjList(Point& rPos, SdrObjList*& rpLst); + void ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Point& rCenter, const Size& rSiz, const MapMode& rMap, UINT32 nOptions); + BOOL ImpGetPasteLayer(const SdrObjList* pObjList, SdrLayerID& rLayer) const; + Point GetPastePos(SdrObjList* pLst, OutputDevice* pOut=NULL); + + // liefert True, wenn rPt geaendert wurde + BOOL ImpLimitToWorkArea(Point& rPt) const; + +protected: + // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView + SdrExchangeView(SdrModel* pModel1, OutputDevice* pOut = 0L); + +public: + // Alle markierten Objekte auf dem angegebenen OutputDevice ausgeben. + virtual void DrawMarkedObj(OutputDevice& rOut) const; + + // Z.B. fuer's Clipboard, Drag&Drop, ... + // Alle markierten Objekte in ein Metafile stecken. Z.Zt. noch etwas + // buggee (Offset..., Fremdgrafikobjekte (SdrGrafObj), Virtuelle + // Objektkopien (SdrVirtObj) mit Ankerpos<>(0,0)). + virtual GDIMetaFile GetMarkedObjMetaFile(BOOL bNoVDevIfOneMtfMarked=FALSE) const; + + // Alle markierten Objekte auf eine Bitmap malen. Diese hat die Farbtiefe + // und Aufloesung des Bildschirms. + virtual Bitmap GetMarkedObjBitmap(BOOL bNoVDevIfOneBmpMarked=FALSE) const; + + // Alle markierten Objekte in ein neues Model kopieren. Dieses neue Model + // hat dann genau eine Page. Das Flag PageNotValid an diesem Model ist + // gesetzt. Daran ist zu erkennen, dass nur die Objekte der Page Gueltikeit + // haben, die Page sebst jedoch nicht (Seitengroesse, Raender). Das neue + // Model wird auf dem Heap erzeugt und wird an den Aufrufer dieser Methode + // uebergeben. Dieser hat es dann spaeter zu entsorgen. + // Beim einfuegen der markierten Objekte in die eine Page des neuen Model + // findet ein Merging der seitenlokalen Layer statt. Sollte kein Platz mehr + // fuer weitere seitenlokale Layer sein, wird den entsprechenden Objekten + // der Default-Layer zugewiesen (Layer 0, (dokumentglobaler Standardlayer). + virtual SdrModel* GetMarkedObjModel() const; + + GDIMetaFile GetAllMarkedMetaFile(BOOL bNoVDevIfOneMtfMarked=FALSE) const { return GetMarkedObjMetaFile(bNoVDevIfOneMtfMarked); } + Bitmap GetAllMarkedBitmap(BOOL bNoVDevIfOneBmpMarked=FALSE) const { return GetMarkedObjBitmap(bNoVDevIfOneBmpMarked); } + Graphic GetAllMarkedGraphic() const; + SdrModel* GetAllMarkedModel() const { return GetMarkedObjModel(); } + + /** Generate a Graphic for the given draw object in the given model + + @param pModel + Must not be NULL. Denotes the draw model the object is a part + of. + + @param pObj + The object (can also be a group object) to retrieve a Graphic + for. Must not be NULL. + + @return a graphical representation of the given object, as it + appears on screen (e.g. with rotation, if any, applied). + */ + static Graphic GetObjGraphic( const SdrModel* pModel, const SdrObject* pObj ); + + // Bestimmung des View-Mittelpunktes, z.B. zum Pasten + Point GetViewCenter(const OutputDevice* pOut=NULL) const; + + // Bei allen Paste-Methoden werden die neuen Draw-Objekte markiert. + // Wird der Parameter bAddMark auf TRUE gesetzt, so werden die neuen + // DrawObjekte zu einer bereits bestehenden Selektion "hinzumarkiert". + // Dieser Fall ist fuer Drag&Drop mit mehreren Items gedacht. + // Die Methoden mit Point-Parameter fuegen neue Objekte zentriert an + // dieser Position ein, die anderen zentriert am 1.OutputDevice der View. + // Ist der Parameter pPg gesetzt, werden die Objekte and dieser Seite + // eingefuegt. Die Positionierung (rPos bzw. Zentrierung) bezieht sich + // dann nichtmehr auf die View sondern auf die Page. + // Hinweis: SdrObjList ist Basisklasse von SdrPage. + // Die Methoden liefern TRUE, wenn die Objekte erfolgreich erzeugt und + // eingefuegt wurden. Bei pLst=FALSE und kein TextEdit aktiv kann man + // sich dann auch darauf verlassen, dass diese an der View markiert sind. + // Andernfalls erfolgt die Markierung nur, wenn pLst z.Zt. auch an der + // View angezeigt wird. + // Gueltige Werte fuer nOptions sind SDRINSERT_DONTMARK und + // SDRINSERT_ADDMARK (siehe svdedtv.hxx). + BOOL Paste(const GDIMetaFile& rMtf, SdrObjList* pLst=NULL, OutputDevice* pOut=NULL, UINT32 nOptions=0) { return Paste(rMtf,GetPastePos(pLst,pOut),pLst,nOptions); } + BOOL Paste(const GDIMetaFile& rMtf, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + BOOL Paste(const Bitmap& rBmp, SdrObjList* pLst=NULL, OutputDevice* pOut=NULL, UINT32 nOptions=0) { return Paste(rBmp,GetPastePos(pLst,pOut),pLst,nOptions); } + BOOL Paste(const Bitmap& rBmp, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + BOOL Paste(const SdrModel& rMod, SdrObjList* pLst=NULL, OutputDevice* pOut=NULL, UINT32 nOptions=0) { return Paste(rMod,GetPastePos(pLst,pOut),pLst,nOptions); } + virtual BOOL Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + BOOL Paste(const String& rStr, SdrObjList* pLst=NULL, OutputDevice* pOut=NULL, UINT32 nOptions=0) { return Paste(rStr,GetPastePos(pLst,pOut),pLst,nOptions); } + BOOL Paste(const String& rStr, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + // der USHORT eFormat nimmt Werte des enum EETextFormat entgegen + BOOL Paste(SvStream& rInput, const String& rBaseURL, USHORT eFormat, SdrObjList* pLst=NULL, OutputDevice* pOut=NULL, UINT32 nOptions=0) { return Paste(rInput,rBaseURL,eFormat,GetPastePos(pLst,pOut),pLst,nOptions); } + BOOL Paste(SvStream& rInput, const String& rBaseURL, USHORT eFormat, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + + // Feststellen, ob ein bestimmtes Format ueber Drag&Drop bzw. ueber's + // Clipboard angenommen werden kann. + BOOL IsExchangeFormatSupported(ULONG nFormat) const; + + BOOL Cut( ULONG nFormat = SDR_ANYFORMAT ); + void CutMarked( ULONG nFormat=SDR_ANYFORMAT ); + + BOOL Yank( ULONG nFormat = SDR_ANYFORMAT ); + void YankMarked( ULONG nFormat=SDR_ANYFORMAT ); + + BOOL Paste( Window* pWin = NULL, ULONG nFormat = SDR_ANYFORMAT ); + BOOL PasteClipboard( OutputDevice* pOut = NULL, ULONG nFormat = SDR_ANYFORMAT, UINT32 nOptions = 0 ); +}; + +#endif //_SVDXCGV_HXX diff --git a/svx/inc/svx/svx3ditems.hxx b/svx/inc/svx/svx3ditems.hxx new file mode 100644 index 000000000000..998b20a7a751 --- /dev/null +++ b/svx/inc/svx/svx3ditems.hxx @@ -0,0 +1,380 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svx3ditems.hxx,v $ + * $Revision: 1.4.226.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX3DITEMS_HXX +#define _SVX3DITEMS_HXX + +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> + + +#include <svx/colritem.hxx> +#include <svx/e3ditem.hxx> +#include <svx/viewpt3d.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +// Svx3D _3DOBJ_ Items +class SVX_DLLPUBLIC Svx3DPercentDiagonalItem : public SfxUInt16Item { +public: + Svx3DPercentDiagonalItem(sal_uInt16 nVal = 10); +}; + +class Svx3DBackscaleItem : public SfxUInt16Item { +public: + SVX_DLLPUBLIC Svx3DBackscaleItem(sal_uInt16 nVal = 100); +}; + +class Svx3DDepthItem : public SfxUInt32Item { +public: + SVX_DLLPUBLIC Svx3DDepthItem(sal_uInt32 nVal = 1000); +}; + +class SVX_DLLPUBLIC Svx3DHorizontalSegmentsItem : public SfxUInt32Item { +public: + Svx3DHorizontalSegmentsItem(sal_uInt32 nVal = 24); +}; + +class Svx3DVerticalSegmentsItem : public SfxUInt32Item { +public: + SVX_DLLPUBLIC Svx3DVerticalSegmentsItem(sal_uInt32 nVal = 24); +}; + +class Svx3DEndAngleItem : public SfxUInt32Item { +public: + SVX_DLLPUBLIC Svx3DEndAngleItem(sal_uInt32 nVal = 3600); +}; + +class SVX_DLLPUBLIC Svx3DDoubleSidedItem : public SfxBoolItem { +public: + Svx3DDoubleSidedItem(BOOL bVal = 0); +}; + +// #i28528# +// Added extra Item (Bool) for chart2 to be able to show reduced line geometry +class Svx3DReducedLineGeometryItem : public SfxBoolItem { +public: + Svx3DReducedLineGeometryItem(BOOL bVal = 0); + virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; +}; + +class SVX_DLLPUBLIC Svx3DNormalsKindItem : public SfxUInt16Item { +public: + Svx3DNormalsKindItem(sal_uInt16 nVal = 0); + + // use drawing::NormalsKind + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; +}; + +class Svx3DNormalsInvertItem : public SfxBoolItem { +public: + SVX_DLLPUBLIC Svx3DNormalsInvertItem(BOOL bVal = 0); +}; + +class SVX_DLLPUBLIC Svx3DTextureProjectionXItem : public SfxUInt16Item { +public: + Svx3DTextureProjectionXItem(sal_uInt16 nVal = 0); + + // use drawing::TextureProjectionMode + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; +}; + +class SVX_DLLPUBLIC Svx3DTextureProjectionYItem : public SfxUInt16Item { +public: + Svx3DTextureProjectionYItem(sal_uInt16 nVal = 0); + + // use drawing::TextureProjectionMode + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; +}; + +class Svx3DShadow3DItem : public SfxBoolItem { +public: + SVX_DLLPUBLIC Svx3DShadow3DItem(BOOL bVal = 0); +}; + +class Svx3DMaterialColorItem : public SvxColorItem { +public: + Svx3DMaterialColorItem(const Color& rCol = Color(0x0000b8ff)); +}; + +class Svx3DMaterialEmissionItem : public SvxColorItem { +public: + SVX_DLLPUBLIC Svx3DMaterialEmissionItem(const Color& rCol = Color(0x00000000)); +}; + +class Svx3DMaterialSpecularItem : public SvxColorItem { +public: + SVX_DLLPUBLIC Svx3DMaterialSpecularItem(const Color& rCol = Color(0x00ffffff)); +}; + +class Svx3DMaterialSpecularIntensityItem : public SfxUInt16Item { +public: + SVX_DLLPUBLIC Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal = 15); +}; + +class SVX_DLLPUBLIC Svx3DTextureKindItem : public SfxUInt16Item { +public: + Svx3DTextureKindItem(sal_uInt16 nVal = 3); + + // use drawing::TextureKind + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; +}; + +class SVX_DLLPUBLIC Svx3DTextureModeItem : public SfxUInt16Item { +public: + Svx3DTextureModeItem(sal_uInt16 nVal = 2); + + // use drawing:TextureMode + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; +}; + +class Svx3DTextureFilterItem : public SfxBoolItem { +public: + SVX_DLLPUBLIC Svx3DTextureFilterItem(BOOL bVal = 0); +}; + +// Svx3D _3DSCENE_ Items +class SVX_DLLPUBLIC Svx3DPerspectiveItem : public SfxUInt16Item { +public: + Svx3DPerspectiveItem(sal_uInt16 nVal = (sal_uInt16)PR_PERSPECTIVE); + + // use drawing::ProjectionMode + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; +}; + +class Svx3DDistanceItem : public SfxUInt32Item { +public: + SVX_DLLPUBLIC Svx3DDistanceItem(sal_uInt32 nVal = 100); +}; + +class Svx3DFocalLengthItem : public SfxUInt32Item { +public: + SVX_DLLPUBLIC Svx3DFocalLengthItem(sal_uInt32 nVal = 100); +}; + +class Svx3DTwoSidedLightingItem : public SfxBoolItem { +public: + SVX_DLLPUBLIC Svx3DTwoSidedLightingItem(BOOL bVal = 0); +}; + +class SVX_DLLPUBLIC Svx3DLightcolor1Item : public SvxColorItem { +public: + Svx3DLightcolor1Item(const Color& rCol = Color(0xffcccccc)); +}; + +class SVX_DLLPUBLIC Svx3DLightcolor2Item : public SvxColorItem { +public: + Svx3DLightcolor2Item(const Color& rCol = Color(0x00000000)); +}; + +class SVX_DLLPUBLIC Svx3DLightcolor3Item : public SvxColorItem { +public: + Svx3DLightcolor3Item(const Color& rCol = Color(0x00000000)); +}; + +class SVX_DLLPUBLIC Svx3DLightcolor4Item : public SvxColorItem { +public: + Svx3DLightcolor4Item(const Color& rCol = Color(0x00000000)); +}; + +class SVX_DLLPUBLIC Svx3DLightcolor5Item : public SvxColorItem { +public: + Svx3DLightcolor5Item(const Color& rCol = Color(0x00000000)); +}; + +class SVX_DLLPUBLIC Svx3DLightcolor6Item : public SvxColorItem { +public: + Svx3DLightcolor6Item(const Color& rCol = Color(0x00000000)); +}; + +class SVX_DLLPUBLIC Svx3DLightcolor7Item : public SvxColorItem { +public: + Svx3DLightcolor7Item(const Color& rCol = Color(0x00000000)); +}; + +class SVX_DLLPUBLIC Svx3DLightcolor8Item : public SvxColorItem { +public: + Svx3DLightcolor8Item(const Color& rCol = Color(0x00000000)); +}; + +class SVX_DLLPUBLIC Svx3DAmbientcolorItem : public SvxColorItem { +public: + Svx3DAmbientcolorItem(const Color& rCol = Color(0x00666666)); +}; + +class SVX_DLLPUBLIC Svx3DLightOnOff1Item : public SfxBoolItem { +public: + Svx3DLightOnOff1Item(BOOL bVal = 1); +}; + +class SVX_DLLPUBLIC Svx3DLightOnOff2Item : public SfxBoolItem { +public: + Svx3DLightOnOff2Item(BOOL bVal = 0); +}; + +class SVX_DLLPUBLIC Svx3DLightOnOff3Item : public SfxBoolItem { +public: + Svx3DLightOnOff3Item(BOOL bVal = 0); +}; + +class SVX_DLLPUBLIC Svx3DLightOnOff4Item : public SfxBoolItem { +public: + Svx3DLightOnOff4Item(BOOL bVal = 0); +}; + +class SVX_DLLPUBLIC Svx3DLightOnOff5Item : public SfxBoolItem { +public: + Svx3DLightOnOff5Item(BOOL bVal = 0); +}; + +class SVX_DLLPUBLIC Svx3DLightOnOff6Item : public SfxBoolItem { +public: + Svx3DLightOnOff6Item(BOOL bVal = 0); +}; + +class SVX_DLLPUBLIC Svx3DLightOnOff7Item : public SfxBoolItem { +public: + Svx3DLightOnOff7Item(BOOL bVal = 0); +}; + +class SVX_DLLPUBLIC Svx3DLightOnOff8Item : public SfxBoolItem { +public: + Svx3DLightOnOff8Item(BOOL bVal = 0); +}; + +class SVX_DLLPUBLIC Svx3DLightDirection1Item : public SvxB3DVectorItem { +public: + Svx3DLightDirection1Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.57735026918963, 0.57735026918963, 0.57735026918963)); +}; + +class SVX_DLLPUBLIC Svx3DLightDirection2Item : public SvxB3DVectorItem { +public: + Svx3DLightDirection2Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0)); +}; + +class SVX_DLLPUBLIC Svx3DLightDirection3Item : public SvxB3DVectorItem { +public: + Svx3DLightDirection3Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0)); +}; + +class SVX_DLLPUBLIC Svx3DLightDirection4Item : public SvxB3DVectorItem { +public: + Svx3DLightDirection4Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0)); +}; + +class SVX_DLLPUBLIC Svx3DLightDirection5Item : public SvxB3DVectorItem { +public: + Svx3DLightDirection5Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0)); +}; + +class SVX_DLLPUBLIC Svx3DLightDirection6Item : public SvxB3DVectorItem { +public: + Svx3DLightDirection6Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0)); +}; + +class SVX_DLLPUBLIC Svx3DLightDirection7Item : public SvxB3DVectorItem { +public: + Svx3DLightDirection7Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0)); +}; + +class SVX_DLLPUBLIC Svx3DLightDirection8Item : public SvxB3DVectorItem { +public: + Svx3DLightDirection8Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0)); +}; + +class Svx3DShadowSlantItem : public SfxUInt16Item { +public: + SVX_DLLPUBLIC Svx3DShadowSlantItem(sal_uInt16 nVal = 0); +}; + +class SVX_DLLPUBLIC Svx3DShadeModeItem : public SfxUInt16Item { +public: + Svx3DShadeModeItem(sal_uInt16 nVal = 2); + + // use drawing::ShadeMode + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; +}; + +////////////////////////////////////////////////////////////////////////////// +// #107245# Item to replace bExtrudeSmoothed and bLatheSmoothed +class Svx3DSmoothNormalsItem : public SfxBoolItem { +public: + Svx3DSmoothNormalsItem(BOOL bVal = 1); + virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; +}; + +// #107245# Item to replace bExtrudeSmoothFrontBack and bLatheSmoothFrontBack +class Svx3DSmoothLidsItem : public SfxBoolItem { +public: + Svx3DSmoothLidsItem(BOOL bVal = 0); + virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; +}; + +// #107245# Item to replace bExtrudeCharacterMode and bLatheCharacterMode +class Svx3DCharacterModeItem : public SfxBoolItem { +public: + Svx3DCharacterModeItem(BOOL bVal = 0); + virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; +}; + +// #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront +class SVX_DLLPUBLIC Svx3DCloseFrontItem : public SfxBoolItem { +public: + Svx3DCloseFrontItem(BOOL bVal = 1); + SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const; + SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; +}; + +// #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack +class SVX_DLLPUBLIC Svx3DCloseBackItem : public SfxBoolItem { +public: + Svx3DCloseBackItem(BOOL bVal = 1); + SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const; + SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; +}; + +#endif // _SVX3DITEMS_HXX diff --git a/svx/inc/svx/svxacorr.hxx b/svx/inc/svx/svxacorr.hxx new file mode 100644 index 000000000000..5d61f303972d --- /dev/null +++ b/svx/inc/svx/svxacorr.hxx @@ -0,0 +1,396 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxacorr.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _MySVXACORR_HXX +#define _MySVXACORR_HXX + +#include <com/sun/star/embed/XStorage.hpp> +#include <tools/rtti.hxx> +#include <svl/svarray.hxx> +#include <i18npool/lang.h> +#include <tools/time.hxx> +#include <tools/date.hxx> +#include <tools/string.hxx> +#include <svx/swafopt.hxx> +#include "svx/svxdllapi.h" + +class CharClass; +class SfxPoolItem; +class SvxAutoCorrect; +class SvStringsISortDtor; +class SfxObjectShell; +class SvxAutoCorrLanguageTable_Impl; +class SvxAutoCorrLastFileAskTable_Impl; +class SotStorageRef; +class SotStorage; + +// Flags fuer die AutoKorrekt-Flags +const long CptlSttSntnc = 0x00000001; // Gross-Buchstaben am SatzAnfang +const long CptlSttWrd = 0x00000002; // keine 2 Gr.-Buchst. am WordAnfang +const long ChgFractionSymbol= 0x00000004; // 1/2, 1/4, .. ersetzen +const long ChgOrdinalNumber = 0x00000008; // Ordinal-Number 1st, 2nd,.. +const long ChgToEnEmDash = 0x00000010; // - -> Endash/Emdash +const long ChgWeightUnderl = 0x00000020; // * -> Fett, _ -> unterstreichen +const long SetINetAttr = 0x00000040; // INetAttribut setzen +const long Autocorrect = 0x00000080; // Autokorrektur aufrufen +const long ChgQuotes = 0x00000100; // doppelte Quotes ersetzen +const long SaveWordCplSttLst= 0x00000200; // GrB. am SatzAnf. auto. aufnehmen +const long SaveWordWrdSttLst= 0x00000400; // 2 GrB. am WortAnf. auto. aufnehmen +const long IngnoreDoubleSpace= 0x00000800; // 2 Spaces ignorieren +const long ChgSglQuotes = 0x00001000; // einfache Quotes ersetzen + +const long ChgWordLstLoad = 0x20000000; // Ersetzungsliste geladen +const long CplSttLstLoad = 0x40000000; // Exceptionlist fuer CplStart geladen +const long WrdSttLstLoad = 0x80000000; // Exceptionlist fuer WordStart geladen + +// TODO: handle unicodes > U+FFFF and check users of this class + +// nur eine Mappingklasse +class SVX_DLLPUBLIC SvxAutoCorrDoc +{ +public: + SvxAutoCorrDoc() {} + virtual ~SvxAutoCorrDoc(); + + virtual BOOL Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0; + virtual BOOL Insert( xub_StrLen nPos, const String& rTxt ) = 0; + virtual BOOL Replace( xub_StrLen nPos, const String& rTxt ) = 0; + + virtual BOOL SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId, + SfxPoolItem& ) = 0; + + virtual BOOL SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL ) = 0; + + // returne den Text eines vorherigen Absatzes. + // Dieser darf nicht leer sein! + // Gibt es diesen nicht oder gibt es davor nur Leere, dann returne 0 + // Das Flag gibt an: + // TRUE: den, vor der normalen Einfuegeposition (TRUE) + // FALSE: den, in den das korrigierte Wort eingfuegt wurde. + // (Muss nicht der gleiche Absatz sein!!!!) + virtual const String* GetPrevPara( BOOL bAtNormalPos ) = 0; + + virtual BOOL ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos, + SvxAutoCorrect& rACorrect, + const String** ppPara ) = 0; + // wird nach dem austauschen der Zeichen von den Funktionen + // - FnCptlSttWrd + // - FnCptlSttSntnc + // gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten + // aufgenommen werden. + virtual void SaveCpltSttWord( ULONG nFlag, xub_StrLen nPos, + const String& rExceptWord, + sal_Unicode cChar ); + + // welche Sprache gilt an der Position? + virtual LanguageType GetLanguage( xub_StrLen nPos, BOOL bPrevPara = FALSE ) const; +}; + + +class SVX_DLLPUBLIC SvxAutocorrWord +{ + String sShort, sLong; + BOOL bIsTxtOnly; // ist reiner ASCII - Text +public: + SvxAutocorrWord( const String& rS, const String& rL, BOOL bFlag = TRUE ) + : sShort( rS ), sLong( rL ), bIsTxtOnly( bFlag ) + {} + + const String& GetShort() const { return sShort; } + const String& GetLong() const { return sLong; } + BOOL IsTextOnly() const { return bIsTxtOnly; } +}; + +typedef SvxAutocorrWord* SvxAutocorrWordPtr; +SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvxAutocorrWordList, SvxAutocorrWordPtr, 10, 10 , SVX_DLLPUBLIC) + +class SVX_DLLPUBLIC SvxAutoCorrectLanguageLists +{ + String sShareAutoCorrFile, sUserAutoCorrFile; + // falls die AutoCorr Datei neuer ist + Date aModifiedDate; + Time aModifiedTime, aLastCheckTime; + + LanguageType eLanguage; //LANGUAGE_DONTKNOW fuer alle Sprachen verwenden + SvStringsISortDtor* pCplStt_ExcptLst; + SvStringsISortDtor* pWrdStt_ExcptLst; + SvxAutocorrWordList* pAutocorr_List; + SvxAutoCorrect& rAutoCorrect; + + long nFlags; + + BOOL IsFileChanged_Imp(); + void LoadXMLExceptList_Imp( SvStringsISortDtor*& rpLst, + const sal_Char* pStrmName, + SotStorageRef& rStg); + void SaveExceptList_Imp( const SvStringsISortDtor& rLst, + const sal_Char* pStrmName, + SotStorageRef& rStg, + BOOL bConvert = FALSE); + + BOOL MakeBlocklist_Imp( SotStorage& rStg ); + void RemoveStream_Imp( const String& rName ); + void MakeUserStorage_Impl(); + +public: + SvxAutoCorrectLanguageLists( SvxAutoCorrect& rParent, + const String& rShareAutoCorrectFile, + const String& rUserAutoCorrectFile, + LanguageType eLang); + ~SvxAutoCorrectLanguageLists(); + + // Lade, Setze, Gebe - die Ersetzungsliste + SvxAutocorrWordList* LoadAutocorrWordList(); + void SetAutocorrWordList( SvxAutocorrWordList* pList ); + const SvxAutocorrWordList* GetAutocorrWordList(); + + // Lade, Setze, Gebe - die Ausnahmeliste fuer Grossbuchstabe am + // Satzanfang + SvStringsISortDtor* LoadCplSttExceptList(); + void SaveCplSttExceptList(); + void SetCplSttExceptList( SvStringsISortDtor* pList ); + SvStringsISortDtor* GetCplSttExceptList(); + BOOL AddToCplSttExceptList(const String& rNew); + + // Lade, Setze, Gebe die Ausnahmeliste fuer 2 Grossbuchstaben am + // Wortanfang + SvStringsISortDtor* LoadWrdSttExceptList(); + void SaveWrdSttExceptList(); + void SetWrdSttExceptList( SvStringsISortDtor* pList ); + SvStringsISortDtor* GetWrdSttExceptList(); + BOOL AddToWrdSttExceptList(const String& rNew); + + // Speichern von Wortersetzungen: + // Diese speichern direkt im Storage. Die Wortliste wird + // entsprechend aktualisiert! + // - purer Text + BOOL PutText( const String& rShort, const String& rLong ); + // - Text mit Attributierung (kann nur der SWG - SWG-Format!) + BOOL PutText( const String& rShort, SfxObjectShell& ); + // - loesche einen Eintrag + BOOL DeleteText( const String& rShort ); +}; + + +class SVX_DLLPUBLIC SvxAutoCorrect +{ + friend class SvxAutoCorrectLanguageLists; + + String sShareAutoCorrFile, sUserAutoCorrFile; + + SvxSwAutoFmtFlags aSwFlags; // StarWriter AutoFormat-Flags + + // alle Sprachen in einer Tabelle + SvxAutoCorrLanguageTable_Impl* pLangTable; + SvxAutoCorrLastFileAskTable_Impl* pLastFileTable; + CharClass* pCharClass; + + LanguageType eCharClassLang; + + long nFlags; + sal_Unicode cStartDQuote, cEndDQuote, cStartSQuote, cEndSQuote, + c1Div2, c1Div4, c3Div4, + cEmDash, cEnDash; + + + // private methods + SvxAutoCorrectLanguageLists& _GetLanguageList( LanguageType eLang ); + + void _GetCharClass( LanguageType eLang ); + +protected: + // - Text mit Attributierung (kann nur der SWG - SWG-Format!) + // rShort ist der Stream-Name - gecryptet! + virtual BOOL PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, SfxObjectShell& , + String& ); + + // geforderte Sprache in die Tabelle eintragen gfs. nur wenn das file existiert + BOOL CreateLanguageFile(LanguageType eLang, BOOL bNewFile = TRUE); + // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen + // koennen aus der Wortliste herausgeholt werden!) + // rShort ist der Stream-Name - gecryptet! +public: + //The method below is changed from private to public by BerryJia for Bug95846 Time:2002-8-13 15:50 + sal_Unicode GetQuote( sal_Unicode cInsChar, BOOL bSttQuote, + LanguageType eLang ) const; + virtual BOOL GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong ); + + TYPEINFO(); + + SvxAutoCorrect( const String& rShareAutocorrFile, + const String& rUserAutocorrFile ); + SvxAutoCorrect( const SvxAutoCorrect& ); + virtual ~SvxAutoCorrect(); + + // fuehre eine AutoKorrektur aus. + // returnt was ausgefuehrt wurde; entsprechend den obigen Flags + ULONG AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, + xub_StrLen nPos, sal_Unicode cInsChar, BOOL bInsert ); + + // return fuer die Autotext Expandierung das vorherige Wort, was dem + // AutoCorrect - Algorythmus entspricht. + BOOL GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt, + xub_StrLen nPos, String& rWord ) const; + + // suche das oder die Worte in der ErsetzungsTabelle. + // rText - ueberpruefe in diesem Text die Worte der Liste + // rStt - die gefundene Startposition + // nEnd - zu ueberpruefende Position - ab dieser Pos nach vorne + // rLang - Input: in welcher Sprache wird gesucht + // Output: in welcher "Sprach-Liste" wurde es gefunden + const SvxAutocorrWord* SearchWordsInList( const String& rTxt, + xub_StrLen& rStt, xub_StrLen nEndPos, + SvxAutoCorrDoc& rDoc, + LanguageType& rLang ); + + // erfrage / setze die Zeichen fuer die Quote-Ersetzung + sal_Unicode GetStartSingleQuote() const { return cStartSQuote; } + sal_Unicode GetEndSingleQuote() const { return cEndSQuote; } + sal_Unicode GetStartDoubleQuote() const { return cStartDQuote; } + sal_Unicode GetEndDoubleQuote() const { return cEndDQuote; } + + void SetStartSingleQuote( const sal_Unicode cStart ) { cStartSQuote = cStart; } + void SetEndSingleQuote( const sal_Unicode cEnd ) { cEndSQuote = cEnd; } + void SetStartDoubleQuote( const sal_Unicode cStart ) { cStartDQuote = cStart; } + void SetEndDoubleQuote( const sal_Unicode cEnd ) { cEndDQuote = cEnd; } + + String GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, + sal_Unicode cInsChar, BOOL bSttQuote ); + void InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, + sal_Unicode cInsChar, BOOL bSttQuote, BOOL bIns ); + + // erfrage / setze den Namen der AutoKorrektur-Datei + // defaultet auf "autocorr.dat" + String GetAutoCorrFileName( LanguageType eLang = LANGUAGE_SYSTEM, + BOOL bNewFile = FALSE, + BOOL bTstUserExist = FALSE ) const; + void SetUserAutoCorrFileName( const String& rNew ); + void SetShareAutoCorrFileName( const String& rNew ); + + // erfrage / setze die aktuellen Einstellungen der AutoKorrektur + long GetFlags() const { return nFlags; } + inline SvxSwAutoFmtFlags& GetSwFlags() { return aSwFlags;} + BOOL IsAutoCorrFlag( long nFlag ) const + { return nFlags & nFlag ? TRUE : FALSE; } + void SetAutoCorrFlag( long nFlag, BOOL bOn = TRUE ); + + // Lade, Setze, Gebe - die Ersetzungsliste + SvxAutocorrWordList* LoadAutocorrWordList( + LanguageType eLang = LANGUAGE_SYSTEM ) + { return _GetLanguageList( eLang ).LoadAutocorrWordList(); } + const SvxAutocorrWordList* GetAutocorrWordList( + LanguageType eLang = LANGUAGE_SYSTEM ) + { return _GetLanguageList( eLang ).GetAutocorrWordList(); } + + // Speichern von Wortersetzungen: + // Diese speichern direkt im Storage. Die Wortliste wird + // entsprechend aktualisiert! + // - purer Text + BOOL PutText( const String& rShort, const String& rLong, LanguageType eLang = LANGUAGE_SYSTEM ); + // - Text mit Attributierung (kann nur der SWG - SWG-Format!) + BOOL PutText( const String& rShort, SfxObjectShell& rShell, + LanguageType eLang = LANGUAGE_SYSTEM ) + { return _GetLanguageList( eLang ).PutText(rShort, rShell ); } + + // - loesche einen Eintrag + BOOL DeleteText( const String& rShort, LanguageType eLang = LANGUAGE_SYSTEM); + + // Lade, Setze, Gebe - die Ausnahmeliste fuer Grossbuchstabe am + // Satzanfang + void SaveCplSttExceptList( LanguageType eLang = LANGUAGE_SYSTEM ); + SvStringsISortDtor* LoadCplSttExceptList( + LanguageType eLang = LANGUAGE_SYSTEM) + { return _GetLanguageList( eLang ).LoadCplSttExceptList(); } + const SvStringsISortDtor* GetCplSttExceptList( + LanguageType eLang = LANGUAGE_SYSTEM ) + { return _GetLanguageList( eLang ).GetCplSttExceptList(); } + + // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort + // in die Datei geschrieben! + BOOL AddCplSttException( const String& rNew, + LanguageType eLang = LANGUAGE_SYSTEM ); + + // Lade, Setze, Gebe die Ausnahmeliste fuer 2 Grossbuchstaben am + // Wortanfang + void SaveWrdSttExceptList( LanguageType eLang = LANGUAGE_SYSTEM ); + SvStringsISortDtor* LoadWrdSttExceptList( + LanguageType eLang = LANGUAGE_SYSTEM ) + { return _GetLanguageList( eLang ).LoadWrdSttExceptList(); } + const SvStringsISortDtor* GetWrdSttExceptList( + LanguageType eLang = LANGUAGE_SYSTEM ) + { return _GetLanguageList( eLang ).GetWrdSttExceptList(); } + // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort + // in die Datei geschrieben! + BOOL AddWrtSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM); + + //ueber die Sprachen nach dem Eintrag suchen + BOOL FindInWrdSttExceptList( LanguageType eLang, const String& sWord ); + BOOL FindInCplSttExceptList( LanguageType eLang, const String& sWord, + BOOL bAbbreviation = FALSE); + + // die einzelnen Methoden fuer die Autokorrektur + BOOL FnCptlSttWrd( SvxAutoCorrDoc&, const String&, + xub_StrLen nSttPos, xub_StrLen nEndPos, + LanguageType eLang = LANGUAGE_SYSTEM ); + BOOL FnChgFractionSymbol( SvxAutoCorrDoc&, const String&, + xub_StrLen nSttPos, xub_StrLen nEndPos ); + BOOL FnChgOrdinalNumber( SvxAutoCorrDoc&, const String&, + xub_StrLen nSttPos, xub_StrLen nEndPos, + LanguageType eLang = LANGUAGE_SYSTEM ); + BOOL FnChgToEnEmDash( SvxAutoCorrDoc&, const String&, + xub_StrLen nSttPos, xub_StrLen nEndPos, + LanguageType eLang = LANGUAGE_SYSTEM ); + BOOL FnSetINetAttr( SvxAutoCorrDoc&, const String&, + xub_StrLen nSttPos, xub_StrLen nEndPos, + LanguageType eLang = LANGUAGE_SYSTEM ); + BOOL FnChgWeightUnderl( SvxAutoCorrDoc&, const String&, + xub_StrLen nSttPos, xub_StrLen nEndPos, + LanguageType eLang = LANGUAGE_SYSTEM ); + BOOL FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, BOOL bNormalPos, + xub_StrLen nSttPos, xub_StrLen nEndPos, + LanguageType eLang = LANGUAGE_SYSTEM); + + static long GetDefaultFlags(); + +// returns TRUE for charcters where the function +// 'SvxAutoCorrect::AutoCorrect' should be called. +// (used to avoid occasional 'collisions' with (Thai) input-sequence-checking) + static sal_Bool IsAutoCorrectChar( sal_Unicode cChar ); + + CharClass& GetCharClass( LanguageType eLang ) + { + if( !pCharClass || eLang != eCharClassLang ) + _GetCharClass( eLang ); + return *pCharClass; + } +}; + +#endif + diff --git a/svx/inc/svx/svxbox.hxx b/svx/inc/svx/svxbox.hxx new file mode 100644 index 000000000000..f5b1bd21c148 --- /dev/null +++ b/svx/inc/svx/svxbox.hxx @@ -0,0 +1,205 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxbox.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_BOX_HXX +#define _SVX_BOX_HXX + +// include --------------------------------------------------------------- + +#include <svl/svarray.hxx> +#include <tools/string.hxx> + +#ifndef _LSTBOX_HXX //autogen +#include <vcl/lstbox.hxx> +#endif + +#ifndef _COMBOBOX_HXX //autogen +#include <vcl/combobox.hxx> +#endif + +// forward --------------------------------------------------------------- + +class SvxBoxEntry; +class SvxListBase; + +//#if 0 // _SOLAR__PRIVATE +SV_DECL_PTRARR( SvxEntryLst, SvxBoxEntry*, 10, 10 ) +//#else +//typedef SvPtrarr SvxEntryLst; +//#endif + +// class SvxBoxEntry ----------------------------------------------------- + +class SvxBoxEntry +{ + friend class SvxListBox; + friend class SvxComboBox; + +public: + SvxBoxEntry( const String& aName, USHORT nId=0 ); + SvxBoxEntry( const SvxBoxEntry& rOrg ); + SvxBoxEntry(); + + String aName; + USHORT nId; + +private: + BOOL bModified; + BOOL bNew; +}; + +// class SvxListBox ------------------------------------------------------ + +class SvxListBox : public ListBox +{ + using ListBox::InsertEntry; + using ListBox::RemoveEntry; + using ListBox::GetEntryPos; + using ListBox::IsEntrySelected; + using ListBox::SelectEntry; + +public: + SvxListBox( Window* pParent, WinBits nBits = WB_BORDER ); + SvxListBox( Window* pParent, const ResId& rId ); + ~SvxListBox(); + + void InsertNewEntry( const SvxBoxEntry& rEntry ); + void InsertEntry( const SvxBoxEntry& rEntry, + USHORT nId = LISTBOX_ENTRY_NOTFOUND ); + + void RemoveEntry( USHORT nPos ); + void RemoveEntry( const SvxBoxEntry& rEntry ); + + void Clear(); + + USHORT GetEntryPos( const SvxBoxEntry& rEntry ) const; + const SvxBoxEntry& GetSvxBoxEntry( USHORT nIdx ) const; + + inline BOOL IsEntrySelected( const SvxBoxEntry& rEntry ) const; + const SvxBoxEntry& GetSelectSvxBoxEntry( USHORT nIdx = 0 ) const; + inline void SelectEntry( const SvxBoxEntry& rEntry, + BOOL bSelect = TRUE ); + + void ModifyEntry( USHORT nPos, const String& aName ); + USHORT GetModifiedCount() const; + const SvxBoxEntry& GetModifiedEntry( USHORT nPos ) const; + + USHORT GetRemovedCount() const; + const SvxBoxEntry& GetRemovedEntry( USHORT nPos ) const; + + USHORT GetNewCount() const; + const SvxBoxEntry& GetNewEntry( USHORT nPos ) const; + +private: + SvxEntryLst aEntryLst; + SvxEntryLst aDelEntryLst; + SvxBoxEntry aDefault; + + void InitListBox(); + void InsertSorted( SvxBoxEntry* pEntry ); +}; + +// inlines --------------------------------------------------------------- + +inline BOOL SvxListBox::IsEntrySelected( const SvxBoxEntry& aEntry ) const + { return ListBox::IsEntrySelected( aEntry.aName ); } + +inline void SvxListBox::SelectEntry( const SvxBoxEntry& aEntry, BOOL bSelect ) + { ListBox::SelectEntry( aEntry.aName, bSelect ); } + +// enum SvxComboBoxStyle ------------------------------------------------- + +enum SvxComboBoxStyle +{ + SVX_CBS_UPPER = 0x01, + SVX_CBS_LOWER = 0x02, + SVX_CBS_ALL = 0x04, + SVX_CBS_FILENAME = 0x08, +#ifdef WIN + SVX_CBS_SW_FILENAME = SVX_CBS_FILENAME | SVX_CBS_LOWER +#else + SVX_CBS_SW_FILENAME = SVX_CBS_FILENAME +#endif +}; + +// class SvxComboBox ----------------------------------------------------- + +class SvxComboBox : public ComboBox +{ + using ComboBox::InsertEntry; + using ComboBox::RemoveEntry; + using ComboBox::GetEntryPos; + using Window::SetStyle; + +public: + SvxComboBox( Window* pParent, + WinBits nBits = WB_BORDER, USHORT nStyleBits = SVX_CBS_ALL ); + SvxComboBox( Window* pParent, const ResId& rId, USHORT nStyleBits = SVX_CBS_ALL ); + ~SvxComboBox(); + + void InsertNewEntry( const SvxBoxEntry& ); + void InsertEntry( const SvxBoxEntry& ); + + void RemoveEntry( USHORT nPos ); + void RemoveEntry( const SvxBoxEntry& rEntry ); + + void Clear(); + + USHORT GetEntryPos( const SvxBoxEntry& rEntry ) const; + const SvxBoxEntry& GetEntry( USHORT nIdx ) const; + + void ModifyEntry( USHORT nPos, const String& aName ); + USHORT GetModifiedCount() const; + const SvxBoxEntry& GetModifiedEntry( USHORT nPos ) const; + + USHORT GetRemovedCount() const; + const SvxBoxEntry& GetRemovedEntry( USHORT nPos ) const; + + USHORT GetNewCount() const; + const SvxBoxEntry& GetNewEntry( USHORT nPos ) const; + + USHORT GetStyle() const { return nStyle; } + void SetStyle( const USHORT nSt ) { nStyle = nSt; } + + String GetText() const; + +private: + SvxEntryLst aEntryLst; + SvxEntryLst aDelEntryLst; + SvxBoxEntry aDefault; + USHORT nStyle; + + virtual void KeyInput( const KeyEvent& rKEvt ); + + void InitComboBox(); + void InsertSorted( SvxBoxEntry* pEntry ); +}; + +#endif + diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx new file mode 100644 index 000000000000..23db741f0991 --- /dev/null +++ b/svx/inc/svx/svxdlg.hxx @@ -0,0 +1,535 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxdlg.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_DIALOG_HXX +#define _SVX_DIALOG_HXX +// include --------------------------------------------------------------- + +#include <sfx2/sfxdlg.hxx> +#include <svx/hangulhanja.hxx> //add for HangulHanjaConversionDialog +class SdrModel; +class SdrView; +using namespace svx; +#include <svx/dstribut_enum.hxx> +#include <svx/rectenum.hxx> //add for enum RECT_POINT +#include <com/sun/star/container/XIndexContainer.hpp> //add for FmShowColsDialog +#include <com/sun/star/container/XNameReplace.hpp> //add for SvxMacroAssignDlg +#include "svx/svxdllapi.h" + +namespace com{namespace sun{namespace star{ +namespace linguistic2{ + class XDictionary; + class XSpellChecker1; + class XSpellChecker; +}}}} +class SvxSpellWrapper; //add for SvxSpellCheckDialog +typedef SfxTabPage* (*CreateSvxDistributePage)(Window *pParent, const SfxItemSet &rAttrSet, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer); +typedef USHORT* (*DialogGetRanges)(); + +struct ExchangeData; +class INetURLObject; +class GalleryTheme; +class TargetList; +class SvxHyperlinkTabPageBase; +class SearchAttrItemList; +class FmFormShell; +class Graphic; +class SdrObject; +namespace svx{ class SpellDialogChildWindow;} + +#define EMPTY_FRAME_REF com::sun::star::uno::Reference < com::sun::star::frame::XFrame >() + +//#define SVX_DIALOGFACTORY_CLASSID 0xf8e5fd97, 0x49e2, 0x4ae5, 0xac, 0x31, 0x4, 0xcb, 0xf7, 0xf3, 0xcf, 0x69 +class AbstractSvxDistributeDialog :public VclAbstractDialog //add for SvxDistributeDialog +{ +public: + virtual SvxDistributeHorizontal GetDistributeHor() const = 0; + virtual SvxDistributeVertical GetDistributeVer() const = 0; +}; + +class AbstractHangulHanjaConversionDialog : public VclAbstractTerminatedDialog //add for HangulHanjaConversionDialog +{ + public: + virtual void EnableRubySupport( sal_Bool _bVal ) = 0; + virtual void SetByCharacter( sal_Bool _bByCharacter ) = 0; + virtual void SetConversionDirectionState( sal_Bool _bTryBothDirections, HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) = 0; + virtual void SetConversionFormat( HangulHanjaConversion::ConversionFormat _eType ) = 0; + virtual void SetOptionsChangedHdl( const Link& _rHdl ) = 0; + virtual void SetIgnoreHdl( const Link& _rHdl ) = 0; + virtual void SetIgnoreAllHdl( const Link& _rHdl ) = 0; + virtual void SetChangeHdl( const Link& _rHdl ) = 0; + virtual void SetChangeAllHdl( const Link& _rHdl ) = 0; + virtual void SetClickByCharacterHdl( const Link& _rHdl ) = 0; + virtual void SetConversionFormatChangedHdl( const Link& _rHdl ) = 0; + virtual void SetFindHdl( const Link& _rHdl ) = 0; + virtual sal_Bool GetUseBothDirections( ) const= 0; + virtual HangulHanjaConversion::ConversionDirection GetDirection( HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const = 0; + virtual void SetCurrentString( + const String& _rNewString, + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rSuggestions, + bool _bOriginatesFromDocument = true )=0; + virtual String GetCurrentString( ) const =0; + virtual HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const =0; + virtual void FocusSuggestion( )= 0; + virtual String GetCurrentSuggestion( ) const =0; +}; + +class AbstractFmShowColsDialog : public VclAbstractDialog //add for FmShowColsDialog +{ + public: + virtual void SetColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& xCols)= 0; +}; + +class AbstractSvxZoomDialog : public VclAbstractDialog //add for SvxZoomDialog +{ + public: + virtual void SetLimits( USHORT nMin, USHORT nMax ) = 0; + virtual void HideButton( USHORT nBtnId )= 0; + virtual const SfxItemSet* GetOutputItemSet() const = 0 ; +}; + +class AbstractSpellDialog : public VclAbstractDialog // +{ + public: + virtual void SetLanguage( sal_uInt16 nLang ) = 0; + virtual sal_Bool Close() = 0; + virtual void Invalidate() = 0; + virtual Window* GetWindow() = 0; + virtual SfxBindings& GetBindings() = 0; +}; + +typedef long (*PLinkStub)( void*, void* ); + +class AbstractSearchProgress :public VclAbstractRefreshableDialog //add for SearchProgress +{ +public: + virtual void SetFileType( const String& rType ) = 0; + virtual void SetDirectory( const INetURLObject& rURL ) = 0; + virtual PLinkStub GetLinkStubCleanUpHdl() = 0; +}; + +class AbstractTakeProgress :public VclAbstractRefreshableDialog //add for TakeProgress +{ +public: + virtual void SetFile( const INetURLObject& rURL ) = 0; + virtual PLinkStub GetLinkStubCleanUpHdl() = 0; +}; + +class AbstractTitleDialog :public VclAbstractDialog //add for TitleDialog +{ +public: + virtual String GetTitle() const =0; +}; + +class AbstractGalleryIdDialog :public VclAbstractDialog //add for GalleryIdDialog +{ +public: + virtual ULONG GetId() const =0; +}; + +class AbstractURLDlg :public VclAbstractDialog //add for URLDlg +{ +public: + virtual String GetURL() const = 0; + virtual String GetAltText() const = 0; + virtual String GetDesc() const = 0; + virtual String GetTarget() const = 0; + virtual String GetName() const = 0; +}; + +class AbstractSvxHlinkDlgMarkWnd :public VclAbstractDialog //add for SvxHlinkDlgMarkWnd +{ +public: + virtual BOOL MoveTo ( Point aNewPos )const = 0; + virtual BOOL ConnectToDialog( BOOL bDoit = TRUE )const = 0; + virtual void RefreshTree ( String aStrURL ) = 0; + virtual void SelectEntry ( String aStrMark ) = 0; + virtual USHORT SetError( USHORT nError) = 0; + // in class Window + virtual void SetSizePixel( const Size& rNewSize ) = 0; + virtual Size GetSizePixel() const = 0; + virtual void Hide( USHORT nFlags = 0 ) = 0; + virtual BOOL IsVisible() const = 0; + virtual void Invalidate( USHORT nFlags = 0 ) = 0; +}; + +class AbstractSvxSearchFormatDialog : public SfxAbstractTabDialog //for SvxSearchFormatDialog +{ +public: + //From class Window. + virtual void SetText( const XubString& rStr ) =0 ; + virtual String GetText() const =0 ; +}; + +class AbstractSvxSearchSimilarityDialog :public VclAbstractDialog //add for SvxSearchSimilarityDialog +{ +public: + virtual USHORT GetOther() =0 ; + virtual USHORT GetShorter() =0 ; + virtual USHORT GetLonger() =0 ; + virtual BOOL IsRelaxed() =0 ; +}; + +class AbstractSvxJSearchOptionsDialog :public VclAbstractDialog //add for SvxJSearchOptionsDialog +{ +public: + virtual INT32 GetTransliterationFlags() const = 0; +}; + +class AbstractFmInputRecordNoDialog :public VclAbstractDialog //add for FmInputRecordNoDialog +{ +public: + virtual void SetValue(long dNew) = 0; + virtual long GetValue() const = 0; +}; + +class AbstractSvxNewDictionaryDialog :public VclAbstractDialog //add for SvxNewDictionaryDialog +{ +public: + virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > GetNewDictionary() = 0; +}; + +class AbstractSvxNameDialog :public VclAbstractDialog //add for SvxNameDialog +{ +public: + virtual void GetName( String& rName ) = 0; + virtual void SetCheckNameHdl( const Link& rLink, bool bCheckImmediately = false ) = 0; + virtual void SetEditHelpId(ULONG nHelpId) = 0; + //from class Window + virtual void SetHelpId( ULONG nHelpId ) = 0; + virtual void SetText( const XubString& rStr ) = 0; +}; + +/////////////////////////////////////////////////////////////////////////////////////////////// +// #i68101# + +class AbstractSvxObjectNameDialog :public VclAbstractDialog +{ +public: + virtual void GetName(String& rName) = 0; + virtual void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately = false) = 0; +}; + +class AbstractSvxObjectTitleDescDialog :public VclAbstractDialog +{ +public: + virtual void GetTitle(String& rTitle) = 0; + virtual void GetDescription(String& rDescription) = 0; +}; + +/////////////////////////////////////////////////////////////////////////////////////////////// + +class AbstractSvxMessDialog :public VclAbstractDialog //add for SvxMessDialog +{ +public: + virtual void SetButtonText( USHORT nBtnId, const String& rNewTxt ) = 0; +}; + +class AbstractSvxMultiPathDialog :public VclAbstractDialog //add for SvxMultiPathDialog +{ +public: + virtual String GetPath() const = 0; + virtual void SetPath( const String& rPath ) = 0; + virtual void EnableRadioButtonMode() = 0; + virtual void SetTitle( const String& rNewTitle ) = 0; +}; + +class AbstractSvxMultiFileDialog :public AbstractSvxMultiPathDialog //add for SvxMultiFileDialog +{ +public: + virtual String GetFiles() const = 0; + virtual void SetFiles( const String& rPath ) = 0; + //from SvxMultiPathDialog + virtual void SetClassPathMode() = 0; + //From Class Window + virtual void SetHelpId( ULONG nHelpId ) = 0; +}; + +class AbstractSvxHpLinkDlg : public VclAbstractDialog //add for SvxHpLinkDlg +{ +public: + virtual Window* GetWindow() = 0; + virtual sal_Bool QueryClose() = 0; +}; + +class AbstractFmSearchDialog :public VclAbstractDialog //add for FmSearchDialog +{ +public: + virtual void SetFoundHandler(const Link& lnk) = 0; + virtual void SetCanceledNotFoundHdl(const Link& lnk)=0; + virtual void SetActiveField(const String& strField)=0; +}; +class AbstractGraphicFilterDialog :public VclAbstractDialog //add for GraphicFilterDialog +{ +public: + virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0; +}; + +class AbstractSvxAreaTabDialog :public SfxAbstractTabDialog //add for SvxAreaTabDialog +{ +public: + virtual void DontDeleteColorTable() = 0; +}; + +class AbstractSvxTransformTabDialog : public SfxAbstractTabDialog +{ +public: + virtual void SetValidateFramePosLink( const Link& rLink ) = 0; +}; +class AbstractSvxCaptionDialog : public SfxAbstractTabDialog +{ +public: + virtual void SetValidateFramePosLink( const Link& rLink ) = 0; +}; + +//------------------------------------------------------------- + +class AbstractSvxPostItDialog :public VclAbstractDialog //add for SvxPostItDialog +{ +public: + virtual void SetText( const XubString& rStr ) = 0; //From class Window + virtual const SfxItemSet* GetOutputItemSet() const = 0; + virtual void SetPrevHdl( const Link& rLink ) = 0; + virtual void SetNextHdl( const Link& rLink ) = 0; + virtual void EnableTravel(BOOL bNext, BOOL bPrev) = 0; + virtual String GetNote() = 0; + virtual void SetNote(const String& rTxt) = 0; + virtual void ShowLastAuthor(const String& rAuthor, const String& rDate) = 0; + virtual void DontChangeAuthor() = 0; + virtual void HideAuthor() = 0; + virtual void SetReadonlyPostIt(BOOL bDisable) = 0; + virtual BOOL IsOkEnabled() const = 0; + virtual Window * GetWindow() = 0; +}; + +//------------------------------------------------------------- + +class SvxAbstractSplittTableDialog : public VclAbstractDialog +{ +public: + virtual bool IsHorizontal() const = 0; + virtual bool IsProportional() const = 0; + virtual long GetCount() const = 0; +}; + +//------------------------------------------------------------- + +class SvxAbstractNewTableDialog : public VclAbstractDialog +{ +public: + virtual sal_Int32 getRows() const = 0; + virtual sal_Int32 getColumns() const = 0; +}; + +class SvxAbstractInsRowColDlg : public VclAbstractDialog +{ +public: + virtual bool isInsertBefore() const = 0; + virtual sal_uInt16 getInsertCount() const = 0; +}; + +//------------------------------------------------------------- + +class SVX_DLLPUBLIC SvxAbstractDialogFactory : public SfxAbstractDialogFactory +{ +public: + static SvxAbstractDialogFactory* Create(); + + // define dtor as this will create typeinfo in svx library + virtual ~SvxAbstractDialogFactory(); + + virtual SfxAbstractTabDialog* CreateTextTabDialog( Window* pParent, + const SfxItemSet* pAttrSet, + SdrView* pView, + SdrModel* pModel=0 ) = 0 ; //add for SvxTextTabDialog + + virtual AbstractSvxCaptionDialog* CreateCaptionDialog( Window* pParent, + const SdrView* pView, + USHORT nAnchorTypes = 0 ) = 0; //add for SvxCaptionTabDialog CHINA001 + + virtual AbstractSvxDistributeDialog* CreateSvxDistributeDialog(Window* pParent, + const SfxItemSet& rAttr, + SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone, + SvxDistributeVertical eVer = SvxDistributeVerticalNone)= 0; + + virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( Window* _pParent, //add for HangulHanjaConversionDialog CHINA001 + HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) = 0; + + virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( Window* pParent ) = 0; + + virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( Window* pParent, //add for SvxZoomDialog + const SfxItemSet& rCoreSet )=0; + + virtual AbstractSpellDialog * CreateSvxSpellDialog(Window* pParent, + SfxBindings* pBindings, + svx::SpellDialogChildWindow* pSpellChildWindow )=0; + + virtual VclAbstractRefreshableDialog * CreateActualizeProgressDialog( Window* pParent, //add for ActualizeProgress + GalleryTheme* pThm ) = 0; + virtual AbstractSearchProgress * CreateSearchProgressDialog( Window* pParent, //add for SearchProgress + const INetURLObject& rStartURL ) = 0; + virtual AbstractTakeProgress * CreateTakeProgressDialog( Window* pParent ) = 0; + virtual AbstractTitleDialog * CreateTitleDialog( Window* pParent, //add for TitleDialog + const String& rOldText ) = 0; + virtual AbstractGalleryIdDialog * CreateGalleryIdDialog( Window* pParent, //add for SvxZoomDialog + GalleryTheme* pThm ) = 0; + virtual VclAbstractDialog2 * CreateGalleryThemePropertiesDialog( Window* pParent, //add for GalleryThemeProperties + ExchangeData* pData, + SfxItemSet* pItemSet ) = 0; + virtual AbstractURLDlg * CreateURLDialog( Window* pParent, + const String& rURL, const String& rAltText, const String& rDescription, + const String& rTarget, const String& rName, + TargetList& rTargetList ) = 0; + virtual AbstractSvxHlinkDlgMarkWnd* CreateSvxHlinkDlgMarkWndDialog( SvxHyperlinkTabPageBase* pParent, sal_uInt32 nResId ) =0; //add for SvxHlinkDlgMarkWnd + + virtual SfxAbstractTabDialog* CreateTabItemDialog( Window* pParent, //add for SvxSearchFormatDialog + const SfxItemSet& rSet, + sal_uInt32 nResId) = 0; + virtual VclAbstractDialog* CreateSvxSearchAttributeDialog( Window* pParent, //add for SvxSearchAttributeDialog + SearchAttrItemList& rLst, + const USHORT* pWhRanges)=0; + virtual AbstractSvxSearchSimilarityDialog * CreateSvxSearchSimilarityDialog( Window* pParent, //add for SvxSearchSimilarityDialog + BOOL bRelax, + USHORT nOther, + USHORT nShorter, + USHORT nLonger ) = 0; + virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( Window* pParent, //add for SvxBorderBackgroundDlg + const SfxItemSet& rCoreSet, + BOOL bEnableSelector = FALSE) = 0; + virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( Window* pParent, //add for SvxTransformTabDialog + const SfxItemSet* pAttr, + const SdrView* pView, + USHORT nAnchorTypes = 0) = 0; + virtual SfxAbstractTabDialog* CreateSchTransformTabDialog( Window* pParent, //add for SchTransformTabDialog + const SfxItemSet* pAttr, + const SdrView* pSdrView, + sal_uInt32 nResId, + bool bSizeTabPage = false + )=0; + virtual AbstractSvxJSearchOptionsDialog * CreateSvxJSearchOptionsDialog( Window* pParent, + const SfxItemSet& rOptionsSet, + INT32 nInitialFlags )=0; + virtual AbstractFmInputRecordNoDialog * CreateFmInputRecordNoDialog( Window* pParent ) = 0; + virtual AbstractSvxNewDictionaryDialog* CreateSvxNewDictionaryDialog( Window* pParent, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl, + sal_uInt32 nResId ) = 0; //add for SvxNewDictionaryDialog + virtual VclAbstractDialog * CreateSvxEditDictionaryDialog( Window* pParent, + const String& rName, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl, + sal_uInt32 nResId) = 0;//add for SvxEditDictionaryDialog + virtual AbstractSvxNameDialog * CreateSvxNameDialog( Window* pParent, + const String& rName, const String& rDesc ) = 0; //add for SvxNameDialog + + // #i68101# + virtual AbstractSvxObjectNameDialog* CreateSvxObjectNameDialog(Window* pParent, const String& rName ) = 0; + virtual AbstractSvxObjectTitleDescDialog* CreateSvxObjectTitleDescDialog(Window* pParent, const String& rTitle, const String& rDescription) = 0; + + virtual AbstractSvxMessDialog * CreateSvxMessDialog( Window* pParent, sal_uInt32 nResId, + const String& rText, const String& rDesc, + Image* pImg = NULL ) = 0; //add for SvxMessDialog + + virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog( Window* pParent, BOOL bEmptyAllowed = FALSE ) = 0 ; //add for SvxMultiPathDialog + virtual AbstractSvxMultiFileDialog * CreateSvxMultiFileDialog( Window* pParent, BOOL bEmptyAllowed = FALSE ) = 0 ; //add for SvxMultiFileDialog + virtual AbstractSvxHpLinkDlg * CreateSvxHpLinkDlg (Window* pParent, //add for SvxMultiFileDialog + SfxBindings* pBindings, + sal_uInt32 nResId)=0; + virtual AbstractFmSearchDialog* CreateFmSearchDialog(Window* pParent, //add for FmSearchDialog + const String& strInitialText, + const ::std::vector< String >& _rContexts, + sal_Int16 nInitialContext, + const Link& lnkContextSupplier)=0; + virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss (Window* pParent, //add for GraphicFilterEmboss + const Graphic& rGraphic, + RECT_POINT eLightSource, sal_uInt32 nResId )=0; + virtual AbstractGraphicFilterDialog * CreateGraphicFilterPosterSepia (Window* pParent, //add for GraphicFilterPoster & GraphicFilterSepia + const Graphic& rGraphic, + USHORT nCount, + sal_uInt32 nResId)=0; + virtual AbstractGraphicFilterDialog * CreateGraphicFilterSolarize (Window* pParent, //add for GraphicFilterSolarize + const Graphic& rGraphic, + BYTE nGreyThreshold, BOOL bInvert, sal_uInt32 nResId)=0; + virtual AbstractGraphicFilterDialog * CreateGraphicFilterMosaic (Window* pParent, //add for GraphicFilterMosaic + const Graphic& rGraphic, + USHORT nTileWidth, USHORT nTileHeight, BOOL bEnhanceEdges, sal_uInt32 nResId)=0; + virtual AbstractSvxAreaTabDialog* CreateSvxAreaTabDialog( Window* pParent,//add for SvxAreaTabDialog + const SfxItemSet* pAttr, + SdrModel* pModel, + const SdrView* pSdrView = NULL ) = 0 ; + virtual SfxAbstractTabDialog* CreateSvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog + SdrModel* pModel, + const SdrObject* pObj = NULL, + BOOL bHasObj = TRUE )=0; + virtual VclAbstractDialog* CreateSfxDialog( Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId ) = 0; + virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent, //add for SvxMeasureDialog & SvxConnectionDialog + const SfxItemSet& rAttr, + const SdrView* pView, + sal_uInt32 nResId + )=0; + virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent, //add for SvxMeasureDialog & SvxConnectionDialog + const SfxItemSet& rAttr, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame, + sal_uInt32 nResId + )=0; + virtual AbstractSvxPostItDialog* CreateSvxPostItDialog( Window* pParent, //add for SvxPostItDialog + const SfxItemSet& rCoreSet, + BOOL bPrevNext = FALSE, BOOL bRedline = FALSE )=0; + virtual VclAbstractDialog* CreateSvxScriptOrgDialog( Window* pParent, const String& rLanguage ) = 0; + + virtual CreateSvxDistributePage GetSvxDistributePageCreatorFunc() = 0; // add for SvxDistributePage + virtual DialogGetRanges GetDialogGetRangesFunc( USHORT nId ) = 0; //add for SvxPostItDialog + + virtual AbstractScriptSelectorDialog* + CreateScriptSelectorDialog( + Window* pParent, + BOOL bShowSlots, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame + ) = 0; + + virtual VclAbstractDialog* CreateScriptErrorDialog( + Window* pParent, com::sun::star::uno::Any aException) = 0; + + virtual VclAbstractDialog* CreateSvxMacroAssignDlg( + Window* _pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxDocumentFrame, + const bool _bUnoDialogMode, + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace >& _rxEvents, + const sal_uInt16 _nInitiallySelectedEvent + ) = 0; + + virtual SfxAbstractTabDialog* CreateSvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj = NULL )=0; + + virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )=0; + + virtual SvxAbstractNewTableDialog* CreateSvxNewTableDialog( Window* pParent ) = 0; + + virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId ) = 0; +}; + +#endif + diff --git a/svx/inc/svx/svxdllapi.h b/svx/inc/svx/svxdllapi.h new file mode 100644 index 000000000000..bb3fd5619e9d --- /dev/null +++ b/svx/inc/svx/svxdllapi.h @@ -0,0 +1,43 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxdllapi.h,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SVXDLLAPI_H +#define INCLUDED_SVXDLLAPI_H + +#include "sal/types.h" + +#if defined(SVX_DLLIMPLEMENTATION) +#define SVX_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define SVX_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif +#define SVX_DLLPRIVATE SAL_DLLPRIVATE + +#endif /* INCLUDED_SVXDLLAPI_H */ diff --git a/svx/inc/svx/svxenum.hxx b/svx/inc/svx/svxenum.hxx new file mode 100644 index 000000000000..01a7d80d1351 --- /dev/null +++ b/svx/inc/svx/svxenum.hxx @@ -0,0 +1,221 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxenum.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SVXENUM_HXX +#define _SVX_SVXENUM_HXX + +// ----------------------------------------------------------------------- + +enum SvxCaseMap +{ + SVX_CASEMAP_NOT_MAPPED, + SVX_CASEMAP_VERSALIEN, + SVX_CASEMAP_GEMEINE, + SVX_CASEMAP_TITEL, + SVX_CASEMAP_KAPITAELCHEN, + SVX_CASEMAP_END +}; + +enum SvxEscapement +{ + SVX_ESCAPEMENT_OFF, + SVX_ESCAPEMENT_SUPERSCRIPT, + SVX_ESCAPEMENT_SUBSCRIPT, + SVX_ESCAPEMENT_END +}; + +enum SvxShadowLocation +{ + SVX_SHADOW_NONE, + SVX_SHADOW_TOPLEFT, + SVX_SHADOW_TOPRIGHT, + SVX_SHADOW_BOTTOMLEFT, + SVX_SHADOW_BOTTOMRIGHT, + SVX_SHADOW_END +}; + +enum SvxTabAdjust +{ + SVX_TAB_ADJUST_LEFT = 0, + SVX_TAB_ADJUST_RIGHT, + SVX_TAB_ADJUST_DECIMAL, + SVX_TAB_ADJUST_CENTER, + SVX_TAB_ADJUST_DEFAULT, + SVX_TAB_ADJUST_END +}; + +enum SvxLineSpace +{ + SVX_LINE_SPACE_AUTO, + SVX_LINE_SPACE_FIX, + SVX_LINE_SPACE_MIN, + SVX_LINE_SPACE_END +}; + +enum SvxInterLineSpace +{ + SVX_INTER_LINE_SPACE_OFF, + SVX_INTER_LINE_SPACE_PROP, + SVX_INTER_LINE_SPACE_FIX, + SVX_INTER_LINE_SPACE_END +}; + +enum SvxAdjust +{ + SVX_ADJUST_LEFT, + SVX_ADJUST_RIGHT, + SVX_ADJUST_BLOCK, + SVX_ADJUST_CENTER, + SVX_ADJUST_BLOCKLINE, + SVX_ADJUST_END +}; + +enum SvxSpecialLineSpace +{ + SVX_LINESPACE_USER, + SVX_LINESPACE_ONE_LINE, + SVX_LINESPACE_ONE_POINT_FIVE_LINES, + SVX_LINESPACE_TWO_LINES, + SVX_LINESPACE_END +}; + +enum SvxBreak +{ + SVX_BREAK_NONE, + SVX_BREAK_COLUMN_BEFORE, + SVX_BREAK_COLUMN_AFTER, + SVX_BREAK_COLUMN_BOTH, + SVX_BREAK_PAGE_BEFORE, + SVX_BREAK_PAGE_AFTER, + SVX_BREAK_PAGE_BOTH, + SVX_BREAK_END +}; + +enum SvxCellHorJustify +{ + SVX_HOR_JUSTIFY_STANDARD, + SVX_HOR_JUSTIFY_LEFT, + SVX_HOR_JUSTIFY_CENTER, + SVX_HOR_JUSTIFY_RIGHT, + SVX_HOR_JUSTIFY_BLOCK, + SVX_HOR_JUSTIFY_REPEAT +}; + +enum SvxCellVerJustify +{ + SVX_VER_JUSTIFY_STANDARD, + SVX_VER_JUSTIFY_TOP, + SVX_VER_JUSTIFY_CENTER, + SVX_VER_JUSTIFY_BOTTOM +}; + +enum SvxCellOrientation +{ + SVX_ORIENTATION_STANDARD, + SVX_ORIENTATION_TOPBOTTOM, + SVX_ORIENTATION_BOTTOMTOP, + SVX_ORIENTATION_STACKED +}; + +enum SvxDrawToolEnum +{ + SVX_SNAP_DRAW_SELECT, + // + SVX_SNAP_DRAW_LINE, + SVX_SNAP_DRAW_RECT, + SVX_SNAP_DRAW_ELLIPSE, + SVX_SNAP_DRAW_POLYGON_NOFILL, + SVX_SNAP_DRAW_BEZIER_NOFILL, + SVX_SNAP_DRAW_FREELINE_NOFILL, + SVX_SNAP_DRAW_ARC, + SVX_SNAP_DRAW_PIE, + SVX_SNAP_DRAW_CIRCLECUT, + SVX_SNAP_DRAW_TEXT, + SVX_SNAP_DRAW_TEXT_VERTICAL, + SVX_SNAP_DRAW_TEXT_MARQUEE, + SVX_SNAP_DRAW_CAPTION, + SVX_SNAP_DRAW_CAPTION_VERTICAL +}; + +enum SvxDrawAlignEnum +{ + SVX_OBJECT_ALIGN_LEFT, + SVX_OBJECT_ALIGN_CENTER, + SVX_OBJECT_ALIGN_RIGHT, + SVX_OBJECT_ALIGN_UP, + SVX_OBJECT_ALIGN_MIDDLE, + SVX_OBJECT_ALIGN_DOWN +}; + +enum SvxDrawBezierEnum +{ + SVX_BEZIER_MOVE, + SVX_BEZIER_INSERT, + SVX_BEZIER_DELETE, + SVX_BEZIER_CUTLINE, + SVX_BEZIER_CONVERT, + SVX_BEZIER_EDGE, + SVX_BEZIER_SMOOTH, + SVX_BEZIER_SYMMTR, + SVX_BEZIER_CLOSE, + SVX_BEZIER_ELIMINATE_POINTS +}; + +enum SvxSpellArea +{ + SVX_SPELL_BODY = 0, + SVX_SPELL_BODY_END, + SVX_SPELL_BODY_START, + SVX_SPELL_OTHER +}; + +enum SvxFrameAnchor +{ + SVX_FLY_AT_CNTNT, //Absatzgebundener Rahmen + SVX_FLY_IN_CNTNT, //Zeichengebundener Rahmen + SVX_FLY_PAGE //Seitengebundener Rahmen +}; + +enum SvxExtNumType +{ + SVX_NUM_CHARS_UPPER_LETTER, // zaehlt von a-z, aa - az, ba - bz, ... + SVX_NUM_CHARS_LOWER_LETTER, + SVX_NUM_ROMAN_UPPER, + SVX_NUM_ROMAN_LOWER, + SVX_NUM_ARABIC, + SVX_NUM_NUMBER_NONE, + SVX_NUM_CHAR_SPECIAL, //Bullet + SVX_NUM_PAGEDESC, // Numerierung aus der Seitenvorlage + SVX_NUM_BITMAP, + SVX_NUM_CHARS_UPPER_LETTER_N, // zaehlt von a-z, aa-zz, aaa-zzz + SVX_NUM_CHARS_LOWER_LETTER_N +}; + + +#endif diff --git a/svx/inc/svx/svxfont.hxx b/svx/inc/svx/svxfont.hxx new file mode 100644 index 000000000000..cab43c06628c --- /dev/null +++ b/svx/inc/svx/svxfont.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxfont.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SVXFONT_HXX +#define _SVX_SVXFONT_HXX + +#include <limits.h> // USHRT_MAX +#include <svx/svxenum.hxx> +#include <i18npool/lang.h> +#include <vcl/font.hxx> +#include "svx/svxdllapi.h" + +class SvxDoCapitals; +class OutputDevice; +class Printer; + +class SVX_DLLPUBLIC SvxFont : public Font +{ + LanguageType eLang; // Language + SvxCaseMap eCaseMap; // Textauszeichnung + short nEsc; // Grad der Hoch-/Tiefstellung + BYTE nPropr; // Grad der Verkleinerung der Fonthoehe + short nKern; // Kerning in Pt + +public: + SvxFont(); + SvxFont( const Font &rFont ); + SvxFont( const SvxFont &rFont ); + + // Methoden fuer die Hoch-/Tiefstellung + inline short GetEscapement() const { return nEsc; } + inline void SetEscapement( const short nNewEsc ) { nEsc = nNewEsc; } + + inline BYTE GetPropr() const { return nPropr; } + inline void SetPropr( const BYTE nNewPropr ) { nPropr = nNewPropr; } + inline void SetProprRel( const BYTE nNewPropr ) + { SetPropr( (BYTE)( (long)nNewPropr * (long)nPropr / 100L ) ); } + + // Kerning + inline short GetFixKerning() const { return nKern; } + inline void SetFixKerning( const short nNewKern ) { nKern = nNewKern; } + + inline SvxCaseMap GetCaseMap() const { return eCaseMap; } + inline void SetCaseMap( const SvxCaseMap eNew ) { eCaseMap = eNew; } + + inline LanguageType GetLanguage() const { return eLang; } + inline void SetLanguage( const LanguageType eNewLan ) + { eLang = eNewLan; Font::SetLanguage(eNewLan); } + + // Is-Methoden: + inline BOOL IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; } + inline BOOL IsCapital() const { return SVX_CASEMAP_KAPITAELCHEN == eCaseMap; } + inline BOOL IsKern() const { return 0 != nKern; } + inline BOOL IsEsc() const { return 0 != nEsc; } + + // Versalien, Gemeine etc. beruecksichtigen + String CalcCaseMap( const String &rTxt ) const; + +// Der folgende Bereich wird nicht von jedem benoetigt, er kann deshalb +// ausgeklammert werden. +#ifndef REDUCEDSVXFONT + // Kapitaelchenbearbeitung + void DoOnCapitals( SvxDoCapitals &rDo, + const USHORT nPartLen = USHRT_MAX ) const; + + void SetPhysFont( OutputDevice *pOut ) const; + Font ChgPhysFont( OutputDevice *pOut ) const; + + Size GetCapitalSize( const OutputDevice *pOut, const String &rTxt, + const USHORT nIdx, const USHORT nLen) const; + void DrawCapital( OutputDevice *pOut, const Point &rPos, const String &rTxt, + const USHORT nIdx, const USHORT nLen ) const; + + Size GetPhysTxtSize( const OutputDevice *pOut, const String &rTxt, + const USHORT nIdx, const USHORT nLen ) const; + + Size GetPhysTxtSize( const OutputDevice *pOut, const String &rTxt ); + + Size GetTxtSize( const OutputDevice *pOut, const String &rTxt, + const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ); + + void DrawText( OutputDevice *pOut, const Point &rPos, const String &rTxt, + const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ) const; + + void QuickDrawText( OutputDevice *pOut, const Point &rPos, const String &rTxt, + const USHORT nIdx = 0, const USHORT nLen = STRING_LEN, const sal_Int32* pDXArray = NULL ) const; + + Size QuickGetTextSize( const OutputDevice *pOut, const String &rTxt, + const USHORT nIdx, const USHORT nLen, sal_Int32* pDXArray = NULL ) const; + + void DrawPrev( OutputDevice* pOut, Printer* pPrinter, + const Point &rPos, const String &rTxt, + const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ) const; + +#endif // !REDUCEDSVXFONT + static void DrawArrow( OutputDevice &rOut, const Rectangle& rRect, + const Size& rSize, const Color& rCol, BOOL bLeft ); + SvxFont& operator=( const SvxFont& rFont ); + SvxFont& operator=( const Font& rFont ); +}; + +#endif // #ifndef _SVX_SVXFONT_HXX + diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc new file mode 100644 index 000000000000..5c541b3b24dd --- /dev/null +++ b/svx/inc/svx/svxids.hrc @@ -0,0 +1,1427 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxids.hrc,v $ + * $Revision: 1.10.132.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_SVXIDS_HRC +#define _SVX_SVXIDS_HRC +// include ------------------------------------------------------------------ + +#include <svl/memberid.hrc> +#include <svl/solar.hrc> +#include <sfx2/sfx.hrc> +#include <sfx2/sfxsids.hrc> + +#include <svx/unomid.hxx> + +// solange noch im sfxids.hrc definiert ------------------------------------- + +#ifdef SID_INSERT_FRAME +#undef SID_INSERT_FRAME +#endif + +// ID-Bereiche -------------------------------------------------------------- + +// Slot-Id's +#define SID_SVX_END (SID_LIB_START + 1199) + +// -------------------------------------------------------------------------- +// Member-Id's +// -------------------------------------------------------------------------- + +#define MID_APPFLAG 0x20 +#define MID_AUTOBREAK 0x21 +#define MID_BG_COLOR 0x22 +#define MID_BREAKxxx 0x22 +#define MID_BRUSHSTYLE 0x23 +#define MID_CELLTYPE 0x24 +#define MID_CHARSET 0x25 +#define MID_COMMAND 0x26 +#define MID_CONTENT 0x27 +#define MID_DESCNAMExxx 0x28 +#define MID_DISTANCE 0x29 +#define MID_ESCAPEMENT 0x2a +#define MID_FAMILY 0x2b +#define MID_FG_COLOR 0x2c +#define MID_FIRSTLINE_OFFSET 0x2d +#define MID_FLAGS 0x2e +#define MID_FONTFAMILY 0x2f +#define MID_FONTFAMILYNAME 0x30 +#define MID_FONTPITCH 0x31 +#define MID_FONTSTYLE 0x32 +#define MID_PERCENT 0x33 +#define MID_HYPHEN 0x34 +#define MID_INNER_WIDTH 0x35 +#define MID_INTER_LINESPACE 0x36 +#define MID_INTER_SPACE 0x37 +#define MID_LANDSCAPE 0x38 + +#define MID_LEFT_MARGIN 0x3a +#define MID_LINESPACE 0x3b +#define MID_LOCATION 0x3c +#define MID_LOWER 0x3d +#define MID_MAXHYPHENS 0x3e +#define MID_MINLEAD 0x3f +#define MID_MINTRAIL 0x40 +#define MID_NUMTYPExxx 0x41 +#define MID_OUTER_WIDTH 0x41 +#define MID_PAGEEND 0x42 +#define MID_POS 0x43 +#define MID_PROPORTIONAL 0x44 +#define MID_REPLACE_STRING 0x45 +#define MID_RIGHT 0x46 +#define MID_RIGHT_MARGIN 0x47 +#define MID_ROW_DIRECTION 0x48 +#define MID_SIZE 0x4a +#define MID_TRANSPARENT 0x4b +#define MID_TYPE 0x4c +#define MID_UPPER 0x4d +#define MID_USExxx 0x4e +#define MID_VALUESET 0x4f + +#define MID_ADR_CITY 0x50 +#define MID_ADR_COMPANY 0x51 +#define MID_ADR_COUNTRY 0x52 +#define MID_ADR_EMAIL 0x53 +#define MID_ADR_FAX 0x54 +#define MID_ADR_FIRSTNAME 0x55 +#define MID_ADR_ID 0x56 +#define MID_ADR_LASTNAME 0x57 +#define MID_ADR_PHONE 0x58 +#define MID_ADR_PHONEPRIVATE 0x59 +#define MID_ADR_POSITION 0x5a +#define MID_ADR_STREET 0x5b +#define MID_ADR_TITLE 0x5c +#define MID_ADR_ZIPCODE 0x5d +#define MID_ADR_STATE 0x5e + +#define MID_FILENAME 0x6c +#define MID_FILTERNAME 0x6d +#define MID_POSITION 0x6e + +#define MID_HLINK_NAME 0x6f +#define MID_HLINK_URL 0x70 +#define MID_HLINK_TARGET 0x71 +#define MID_HLINK_TYPE 0x72 +#define MID_HLINK_TEXT 0x73 + +#define MID_COUNT 0x74 +#define MID_READONLY 0x76 + +#define MID_VIEWLAYOUT_COLUMNS 0x77 +#define MID_VIEWLAYOUT_BOOKMODE 0x78 + +#define MID_ZOOMSLIDER_CURRENTZOOM 0x79 +#define MID_ZOOMSLIDER_SNAPPINGPOINTS 0x7a +#define MID_ZOOMSLIDER_MINZOOM 0x7b +#define MID_ZOOMSLIDER_MAXZOOM 0x7c + +#define MID_ADR_FATHERSNAME 0x80 +#define MID_ADR_APARTMENT 0x81 + + +// -------------------------------------------------------------------------- +// Resource-Id's ? (obsolete??? at least the one beginning with SID???) +// -------------------------------------------------------------------------- +/* +#define RID_SW_TP_OPTCOMPATIBILITY_PAGE (RID_OFA_START + 255) +#define RID_SW_TP_CONTENT_OPT (RID_OFA_START + 206) +#define RID_SW_TP_LAYOUT_OPT (RID_OFA_START + 207) +#define RID_SW_TP_STD_FONT (RID_OFA_START + 208) +#define RID_SW_TP_OPTPRINT_PAGE (RID_OFA_START + 209) +#define RID_SW_TP_OPTTABLE_PAGE (RID_OFA_START + 210) +#define RID_SW_TP_OPTSHDWCRSR (RID_OFA_START + 211) +#define RID_SW_TP_REDLINE_OPT (RID_OFA_START + 212) +#define RID_SW_TP_OPTINSERT_PAGE (RID_OFA_START + 213) +#define RID_SW_TP_OPTLOAD_PAGE (RID_OFA_START + 214) +#define RID_SW_TP_OPTTEST_PAGE (RID_OFA_START + 215) +#define RID_SW_TP_OPTSRCVIEW (RID_OFA_START + 216) +#define RID_SW_TP_BACKGROUND (RID_OFA_START + 217) +#define SID_SC_TP_LAYOUT (RID_OFA_START + 218) +#define SID_SC_TP_CONTENT (RID_OFA_START + 219) +#define SID_SC_TP_INPUT (RID_OFA_START + 220) +#define SID_SC_TP_GRID (RID_OFA_START + 221) +#define SID_SC_TP_USERLISTS (RID_OFA_START + 222) +#define SID_SC_TP_CALC (RID_OFA_START + 223) +#define SID_SC_TP_CHANGES (RID_OFA_START + 224) +#define SID_SC_TP_CHANGES (RID_OFA_START + 224) +#define SID_SD_TP_CONTENTS (RID_OFA_START + 225) +#define SID_SD_TP_LAYOUT (RID_OFA_START + 226) +#define SID_SD_TP_SNAP (RID_OFA_START + 227) +#define SID_SD_TP_SCALE (RID_OFA_START + 228) +#define SID_SD_TP_GRID (RID_OFA_START + 229) +#define SID_SD_TP_PRINT (RID_OFA_START + 220) +#define SID_SD_TP_MISC (RID_OFA_START + 231) +#define SID_SI_TP_CONTENTS (RID_OFA_START + 232) +#define SID_SI_TP_LAYOUT (RID_OFA_START + 233) +#define SID_SI_TP_SNAP (RID_OFA_START + 234) +#define SID_SI_TP_GRID (RID_OFA_START + 235) +#define SID_SI_TP_PRINT (RID_OFA_START + 236) +#define SID_SI_TP_MISC (RID_OFA_START + 237) +#define RID_SW_TP_OPTINSERT_HTML_PAGE (RID_OFA_START + 238) +#define SID_SC_TP_MISC (RID_OFA_START + 239) +#define RID_SW_TP_HTML_CONTENT_OPT (RID_OFA_START + 240) +#define RID_SW_TP_HTML_LAYOUT_OPT (RID_OFA_START + 241) +#define RID_SW_TP_HTML_OPTPRINT_PAGE (RID_OFA_START + 242) +#define RID_SW_TP_HTML_OPTTABLE_PAGE (RID_OFA_START + 243) +#define RID_SW_TP_HTML_OPTGRID_PAGE (RID_OFA_START + 244) +#define RID_SW_TP_HTML_OPTSHDWCRSR (RID_OFA_START + 246) +#define RID_SW_TP_STD_FONT_CJK (RID_OFA_START + 247) +#define RID_SC_TP_PRINT (RID_OFA_START + 248) +#define RID_SW_TP_STD_FONT_CTL (RID_OFA_START + 251) +#define RID_OFA_TP_INTERNATIONAL (RID_OFA_START + 252) // 4 SC & ID 4 resource +#define RID_OFA_TP_INTERNATIONAL_SD (RID_OFA_START + 253) // 4 SD +#define RID_OFA_TP_INTERNATIONAL_IMPR (RID_OFA_START + 254) // 4 impress +*/ + +#define SID_ATTR_PARENTWINDOW (RID_OFA_START + 255) + +// -------------------------------------------------------------------------- +// Event-Id's Block 1 +// -------------------------------------------------------------------------- + +#define SVX_EVENT_COLUM_WINDOW_EXECUTE (EVENT_SVX_START) + +// -------------------------------------------------------------------------- +// Event-Id's Block 2 +// -------------------------------------------------------------------------- + +#define SVX_EVENT_IMAGE_LOAD (SID_LIB_START) +#define SVX_EVENT_IMAGE_ABORT (SID_LIB_START + 1) +#define SVX_EVENT_IMAGE_ERROR (SID_LIB_START + 2) + +// -------------------------------------------------------------------------- +// Function-Id's +// -------------------------------------------------------------------------- + +// Function-Id's +#define FID_SVX_START (SID_LIB_START + 500) +#define FID_SVX_END (SID_LIB_START + 509) + +#define FID_SEARCH_ON (FID_SVX_START + 0) +#define FID_SEARCH_OFF (FID_SVX_START + 1) +#define FID_SEARCH_NOW (FID_SVX_START + 2) + +#define SID_CHARMAP (FID_SVX_START + 3) + +#define FID_SEARCH_SEARCHSET (FID_SVX_START + 4) +#define FID_SEARCH_REPLACESET (FID_SVX_START + 5) + +// -------------------------------------------------------------------------- +// SFX-Id's +// -------------------------------------------------------------------------- + +#define SID_POLY_MERGE (SID_SFX_START + 679) +#define SID_POLY_SUBSTRACT (SID_SFX_START + 680) +#define SID_POLY_INTERSECT (SID_SFX_START + 681) +#define SID_POLY_FORMEN (SID_SFX_START + 682) +#define SID_DISTRIBUTE_DLG (SID_SFX_START + 683) + +// -------------------------------------------------------------------------- +// Basic IDE-Id's +// -------------------------------------------------------------------------- + +#define SID_BASICIDE_TOGGLEBRKPNT ( SID_BASICIDE_START + 0 ) +#define SID_BASICIDE_ADDWATCH ( SID_BASICIDE_START + 1 ) +#define SID_BASICIDE_CHOOSEMACRO ( SID_BASICIDE_START + 2 ) +#define SID_BASICIDE_EDITMACRO ( SID_BASICIDE_START + 3 ) +#define SID_BASICIDE_CREATEMACRO ( SID_BASICIDE_START + 4 ) +#define SID_BASICIDE_MODULEDLG ( SID_BASICIDE_START + 5 ) +#define SID_BASICIDE_OBJCAT ( SID_BASICIDE_START + 6 ) +#define SID_BASICIDE_REMOVEWATCH ( SID_BASICIDE_START + 7 ) +#define SID_BASICIDE_GOTOCALL ( SID_BASICIDE_START + 8 ) +#define SID_BASICIDE_SHOWSBX ( SID_BASICIDE_START + 9 ) +#define SID_BASICIDE_HIDECURPAGE ( SID_BASICIDE_START + 10 ) +#define SID_BASICIDE_NAMECHANGEDONTAB ( SID_BASICIDE_START + 11 ) +#define SID_BASICIDE_UPDATEMODULESOURCE ( SID_BASICIDE_START + 12 ) +#define SID_BASICIDE_STOREMODULESOURCE ( SID_BASICIDE_START + 13 ) +#define SID_BASICIDE_MATCHGROUP ( SID_BASICIDE_START + 14 ) +#define SID_BASICIDE_APPEAR ( SID_BASICIDE_START + 15 ) +#define SID_BASICIDE_STOREALLMODULESOURCES ( SID_BASICIDE_START + 16 ) +#define SID_BASICIDE_UPDATEALLMODULESOURCES ( SID_BASICIDE_START + 17 ) +#define SID_BASICIDE_LIBSELECTED ( SID_BASICIDE_START + 18 ) +#define SID_BASICIDE_LIBSELECTOR ( SID_BASICIDE_START + 19 ) +#define SID_BASICIDE_NEWDIALOG ( SID_BASICIDE_START + 20 ) +#define SID_BASICIDE_NEWMODULE ( SID_BASICIDE_START + 21 ) +#define SID_BASICIDE_DELETECURRENT ( SID_BASICIDE_START + 22 ) +#define SID_BASICIDE_RENAMECURRENT ( SID_BASICIDE_START + 23 ) +#define SID_BASICIDE_SBXDELETED ( SID_BASICIDE_START + 24 ) +#define SID_BASICIDE_SBXINSERTED ( SID_BASICIDE_START + 25 ) +#define SID_BASICIDE_SBXRENAMED ( SID_BASICIDE_START + 26 ) +#define SID_BASICIDE_LIBLOADED ( SID_BASICIDE_START + 27 ) +#define SID_BASICIDE_LIBREMOVED ( SID_BASICIDE_START + 28 ) +#define SID_BASICIDE_ARG_TABID ( SID_BASICIDE_START + 30 ) +#define SID_BASICIDE_ARG_SBX ( SID_BASICIDE_START + 31 ) +#define SID_BASICIDE_ARG_MACROINFO ( SID_BASICIDE_START + 32 ) +#define SID_BASICIDE_ARG_SEARCHOPTIONS ( SID_BASICIDE_START + 33 ) +#define SID_BASICIDE_ARG_LIBNAME ( SID_BASICIDE_START + 34 ) +#define SID_BASICIDE_ARG_MODULENAME ( SID_BASICIDE_START + 35 ) +#define SID_BASICIDE_BRKPNTSCHANGED ( SID_BASICIDE_START + 36 ) +#define SID_BASICIDE_STATUSBAR ( SID_BASICIDE_START + 37 ) +#define SID_BASICIDE_STAT_POS ( SID_BASICIDE_START + 38 ) +#define SID_BASICIDE_STAT_DATE ( SID_BASICIDE_START + 39 ) +#define SID_BASICIDE_STAT_TITLE ( SID_BASICIDE_START + 40 ) +#define SID_BASICIDE_NEWJAVAMODULE ( SID_BASICIDE_START + 41 ) +#define SID_BASICIDE_IMAGESTART ( SID_BASICIDE_START + 50 ) +#define SID_OPTIONS_TREEDIALOG ( SID_BASICIDE_START + 862) + +// -------------------------------------------------------------------------- +// StarBase-Id's +// -------------------------------------------------------------------------- + +#define SID_SBA_BRW_UPDATE (SID_SBA_START+100) // Daten in Felder +#define SID_SBA_BRW_INSERT (SID_SBA_START+101) // Daten in Text +#define SID_SBA_BRW_MERGE (SID_SBA_START+102) // Serienbrief +#define SID_SBA_CLEAR_QUERY (SID_SBA_START+130) +#define SID_SBA_ADD_RELATION (SID_SBA_START+131) // im Relationenentwurf neue Relation +#define SID_SBA_QUERY_VIEW_FUNCTIONS (SID_SBA_START+134) +#define SID_SBA_QUERY_VIEW_TABLES (SID_SBA_START+135) +#define SID_SBA_QUERY_VIEW_ALIASES (SID_SBA_START+136) +#define SID_SBA_QUERY_DISTINCT_VALUES (SID_SBA_START+137) +#define SID_SBA_QRY_DESIGN (SID_SBA_START+120) + +// -------------------------------------------------------------------------- +// SD-Id's +// -------------------------------------------------------------------------- + +#define SID_RULER (SID_SD_START+40) +#define SID_BEZIER_CONVERT (SID_SD_START+65) +#define SID_BEZIER_ELIMINATE_POINTS (SID_SD_START+30) +#define SID_BEZIER_EDGE (SID_SD_START+66) +#define SID_BEZIER_SYMMTR (SID_SD_START+67) +#define SID_TEXTEDIT (SID_SD_START+76) +#define SID_ENTER_GROUP (SID_SD_START+96) +#define SID_LEAVE_GROUP (SID_SD_START+97) +#define SID_SIZE_PAGE_WIDTH (SID_SD_START+98) +#define SID_INSERT_IMAGE (SID_SD_START+105) +#define SID_INSERT_MATH (SID_SD_START+106) +#define SID_SIZE_VISAREA (SID_SD_START+114) +#define SID_ATTR_SYMBOLTYPE (SID_SD_START+115) //wird vom Chart und von SvxLineTabPage genutzt +#define SID_ATTR_SYMBOLSIZE (SID_SD_START+116) +#define SID_HELPLINES_MOVE (SID_SD_START+153) +#define SID_GRID_USE (SID_SD_START+154) +#define ID_VAL_MOUSESTART_X (SID_SD_START+200) +#define ID_VAL_MOUSESTART_Y (SID_SD_START+201) +#define ID_VAL_LENGTH_X (SID_SD_START+202) +#define ID_VAL_LENGTH_Y (SID_SD_START+203) +#define ID_VAL_MOUSEEND_X (SID_SD_START+204) +#define ID_VAL_MOUSEEND_Y (SID_SD_START+205) +#define ID_VAL_AXIS_X (SID_SD_START+206) +#define ID_VAL_AXIS_Y (SID_SD_START+207) +#define ID_VAL_ANGLESTART (SID_SD_START+208) +#define ID_VAL_ANGLEEND (SID_SD_START+209) +#define ID_VAL_CENTER_X (SID_SD_START+210) +#define ID_VAL_CENTER_Y (SID_SD_START+211) +#define ID_VAL_STYLE (SID_SD_START+240) +#define ID_VAL_DOTS (SID_SD_START+241) +#define ID_VAL_DOTLEN (SID_SD_START+242) +#define ID_VAL_DASHES (SID_SD_START+243) +#define ID_VAL_DASHLEN (SID_SD_START+244) +#define ID_VAL_DISTANCE (SID_SD_START+245) +#define ID_VAL_INDEX (SID_SD_START+246) +#define SID_BEZIERTO (SID_SD_START+252) +#define SID_DASH (SID_SD_START+267) +#define SID_TEXT_FITTOSIZE_VERTICAL (SID_SD_START+286) +#define SID_GRID_VISIBLE (SID_SD_START+322) +#define ID_VAL_USEFIRSTROWSTYLE (SID_SD_START+323) +#define ID_VAL_USELASTROWSTYLE (SID_SD_START+324) +#define ID_VAL_USEBANDINGROWSTYLE (SID_SD_START+325) +#define ID_VAL_USEFIRSTCOLUMNSTYLE (SID_SD_START+326) +#define ID_VAL_USELASTCOLUMNSTYLE (SID_SD_START+327) +#define ID_VAL_USEBANDINGCOLUMNSTYLE (SID_SD_START+328) + +// -------------------------------------------------------------------------- +// Calc-Id's +// -------------------------------------------------------------------------- + +#ifndef SC_FUNCTION_START +#define SC_FUNCTION_START (SID_SC_START + 200) +#endif +#ifndef FILE_MENU_END +#define FILE_MENU_END (SC_FUNCTION_START + 20) +#endif +#ifndef EDIT_MENU_START +#define EDIT_MENU_START (FILE_MENU_END) +#endif +#ifndef SC_VIEW_START +#define SC_VIEW_START (SID_SC_START) +#endif + +#define SID_OUTLINE_HIDE (SID_SC_START + 329) +#define SID_OUTLINE_SHOW (SID_SC_START + 330) +#define SID_OUTLINE_MAKE (SID_SC_START + 331) +#define SID_OUTLINE_REMOVE (SID_SC_START + 332) +#define SID_FRAME_UP (SID_SC_START + 407) +#define SID_FRAME_DOWN (SID_SC_START + 408) +#define SID_ENTER_STRING (SID_SC_START + 476) +#define SID_ATTR_SECIALCHAR (SID_SC_START + 581) +#define SID_ATTR_SPECIALCHAR (SID_SC_START + 581) + +#define FID_CHG_RECORD (EDIT_MENU_START + 18) +#define SID_CHG_PROTECT (SC_VIEW_START + 84) + +// -------------------------------------------------------------------------- +// Writer-Id's +// -------------------------------------------------------------------------- +#define FN_EDIT (SID_SW_START + 100) +#define FN_NUM_BULLET_OFF (FN_EDIT + 37) /* Numerierung aus */ +#define FN_NUM_BULLET_ON (FN_EDIT + 38) /* Numerierung mit Bullets an */ +#define FN_NUM_NUMBERING_ON (FN_EDIT + 44) /* Numerierung an */ + +#define FN_INSERT (SID_SW_START + 300) +#define FN_DELETE_BOOKMARK (FN_INSERT + 1) +#define FN_INSERT_BREAK (FN_INSERT + 3) +#define FN_INSERT_SOFT_HYPHEN (FN_INSERT + 43) /* optional hyphen */ +#define FN_INSERT_HARD_SPACE (FN_INSERT + 44) /* hard space */ +#define FN_INSERT_HARDHYPHEN (FN_INSERT + 85) /* hyphen withou break*/ + +#define FN_FORMAT (SID_SW_START + 400) +#define FN_SET_JUSTIFY_PARA (FN_FORMAT + 21) +#define FN_FORMAT_RESET (FN_FORMAT + 69) + +#define FN_EXTRA (SID_SW_START + 600) + +#define FN_SELECTION (SID_SW_START + 900) +#define FN_END_OF_DOCUMENT (FN_SELECTION + 8) +#define FN_START_DOC_DIRECT (FN_SELECTION + 78) +#define FN_END_DOC_DIRECT (FN_SELECTION + 79) + +#define FN_PARAM (SID_SW_START + 1100) +#define FN_PARAM_FILTER (FN_PARAM + 30) +#define FN_PARAM_FIELD_CONTENT (FN_PARAM + 55) + +#define FN_PGPREVIEW (SID_SW_START + 1250) +#define FN_SHOW_MULTIPLE_PAGES (FN_PGPREVIEW + 2) + +#define FN_EDIT2 (SID_SW_START + 1800) +#define FN_REDLINE_PROTECT (FN_EDIT2 + 23) +#define FN_REDLINE_ON (FN_EDIT2 + 25) + +// -------------------------------------------------------------------------- +// Svx-Id's +// -------------------------------------------------------------------------- + +#define SID_ATTR_ZOOM ( SID_SVX_START + 0 ) +#define SID_ATTR_BRUSH ( SID_SVX_START + 1 ) +#define SID_ATTR_TABSTOP ( SID_SVX_START + 2 ) +#define SID_ATTR_TABSTOP_DEFAULTS ( SID_SVX_START + 3 ) +#define SID_ATTR_TABSTOP_POS ( SID_SVX_START + 4 ) +#define SID_ATTR_TABSTOP_OFFSET ( SID_SVX_START + 5 ) +//#define SID_ATTR_CHAR ( SID_SVX_START + 6 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_FONT ( SID_SVX_START + 7 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_POSTURE ( SID_SVX_START + 8 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_WEIGHT ( SID_SVX_START + 9 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_SHADOWED ( SID_SVX_START + 10 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_WORDLINEMODE ( SID_SVX_START + 11 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_CONTOUR ( SID_SVX_START + 12 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_STRIKEOUT ( SID_SVX_START + 13 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_UNDERLINE ( SID_SVX_START + 14 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_FONTHEIGHT ( SID_SVX_START + 15 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_PROPSIZE ( SID_SVX_START + 16 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_COLOR ( SID_SVX_START + 17 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_KERNING ( SID_SVX_START + 18 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_CASEMAP ( SID_SVX_START + 19 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_LANGUAGE ( SID_SVX_START + 20 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_ESCAPEMENT ( SID_SVX_START + 21 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_FONTLIST ( SID_SVX_START + 22 ) -> sfxsids.hrc +#define SID_ATTR_BORDER_INNER ( SID_SVX_START + 23 ) +#define SID_ATTR_BORDER_OUTER ( SID_SVX_START + 24 ) +#define SID_ATTR_BORDER_SHADOW ( SID_SVX_START + 25 ) +#define SID_ATTR_PARA ( SID_SVX_START + 26 ) +#define SID_ATTR_PARA_ADJUST ( SID_SVX_START + 27 ) +#define SID_ATTR_PARA_ADJUST_LEFT ( SID_SVX_START + 28 ) +#define SID_TEXT_ALIGNLEFT SID_ATTR_PARA_ADJUST_LEFT +#define SID_ATTR_PARA_ADJUST_RIGHT ( SID_SVX_START + 29 ) +#define SID_TEXT_ALIGNRIGHT SID_ATTR_PARA_ADJUST_RIGHT +#define SID_ATTR_PARA_ADJUST_CENTER ( SID_SVX_START + 30 ) +#define SID_TEXT_ALIGNCENTER SID_ATTR_PARA_ADJUST_CENTER +#define SID_ATTR_PARA_ADJUST_BLOCK ( SID_SVX_START + 31 ) +#define SID_TEXT_ALIGNBLOCK SID_ATTR_PARA_ADJUST_BLOCK +#define SID_ATTR_PARA_ADJUST_BLOCKLINE ( SID_SVX_START + 32 ) +#define SID_ATTR_PARA_LINESPACE ( SID_SVX_START + 33 ) +#define SID_ATTR_PARA_LINESPACE_10 ( SID_SVX_START + 34 ) +#define SID_ATTR_PARA_LINESPACE_15 ( SID_SVX_START + 35 ) +#define SID_ATTR_PARA_LINESPACE_20 ( SID_SVX_START + 36 ) +#define SID_ATTR_PARA_PAGEBREAK ( SID_SVX_START + 37 ) +#define SID_ATTR_PARA_HYPHENZONE ( SID_SVX_START + 38 ) +#define SID_ATTR_PARA_SPLIT ( SID_SVX_START + 39 ) +#define SID_ATTR_PARA_ORPHANS ( SID_SVX_START + 40 ) +#define SID_ATTR_PARA_WIDOWS ( SID_SVX_START + 41 ) +#define SID_ATTR_PARA_ULSPACE ( SID_SVX_START + 42 ) +#define SID_ATTR_PARA_LRSPACE ( SID_SVX_START + 43 ) +#define SID_ATTR_POSTIT_AUTHOR ( SID_SVX_START + 44 ) +#define SID_ATTR_POSTIT_DATE ( SID_SVX_START + 45 ) +#define SID_ATTR_POSTIT_TEXT ( SID_SVX_START + 46 ) +#define SID_ATTR_SEARCH ( SID_SVX_START + 47 ) +#define SID_ATTR_LRSPACE ( SID_SVX_START + 48 ) +#define SID_ATTR_ULSPACE ( SID_SVX_START + 49 ) +#define SID_ATTR_PAGE ( SID_SVX_START + 50 ) +#define SID_ATTR_PAGE_SIZE ( SID_SVX_START + 51 ) +#define SID_ATTR_PAGE_MAXSIZE ( SID_SVX_START + 52 ) +#define SID_ATTR_PAGE_PAPERBIN ( SID_SVX_START + 54 ) +#define SID_ATTR_PAGE_APP ( SID_SVX_START + 55 ) +#define SID_ATTR_PAGE_EXT1 ( SID_SVX_START + 56 ) +#define SID_ATTR_PAGE_EXT2 ( SID_SVX_START + 57 ) +#define SID_ATTR_PAGE_HEADERSET ( SID_SVX_START + 58 ) +#define SID_ATTR_PAGE_FOOTERSET ( SID_SVX_START + 59 ) +#define SID_ATTR_PAGE_ON ( SID_SVX_START + 60 ) +#define SID_ATTR_PAGE_DYNAMIC ( SID_SVX_START + 61 ) +#define SID_ATTR_PAGE_SHARED ( SID_SVX_START + 62 ) +#define SID_ATTR_PAGE_BSP ( SID_SVX_START + 63 ) +//#define SID_ATTR_CHAR_MAPTYPE ( SID_SVX_START + 64 ) -> sfxsids.hrc +#define SID_ATTR_PARA_MODEL ( SID_SVX_START + 65 ) +#define SID_ATTR_PARA_KEEP ( SID_SVX_START + 66 ) +//#define SID_ATTR_CHAR_AUTOKERN ( SID_SVX_START + 67 ) -> sfxsids.hrc +#define SID_ATTR_DBSESS_SERVERTYPE ( SID_SVX_START + 70 ) +#define SID_ATTR_DBSESS_SERVEROPTS ( SID_SVX_START + 71 ) +#define SID_ATTR_DBSESS_USERNAME ( SID_SVX_START + 72 ) +#define SID_ATTR_DBSESS_PASSWORD ( SID_SVX_START + 73 ) +#define SID_ATTR_DBSESS_SAVESESS ( SID_SVX_START + 74 ) +#define SID_ATTR_DBSESS_SAVEUSER ( SID_SVX_START + 75 ) +#define SID_ATTR_DBSESS_SERVERNAME ( SID_SVX_START + 76 ) +#define SID_ATTR_DBSESS_ENABLETYPE ( SID_SVX_START + 77 ) +#define SID_RULER_NULL_OFFSET ( SID_SVX_START + 79 ) +#define SID_RULER_BORDERS ( SID_SVX_START + 80 ) +#define SID_RULER_OBJECT ( SID_SVX_START + 81 ) +#define SID_RULER_PAGE_POS ( SID_SVX_START + 82 ) +#define SID_RULER_ACT_LINE_ONLY ( SID_SVX_START + 83 ) +#define SID_RULER_LR_MIN_MAX ( SID_SVX_START + 84 ) +#define SID_ATTR_NUMBERFORMAT_VALUE ( SID_SVX_START + 85 ) +#define SID_ATTR_NUMBERFORMAT_INFO ( SID_SVX_START + 86 ) +#define SID_ATTR_TRANSFORM ( SID_SVX_START + 87 ) +#define SID_ATTR_TRANSFORM_POS_X ( SID_SVX_START + 88 ) +#define SID_ATTR_TRANSFORM_POS_Y ( SID_SVX_START + 89 ) +#define SID_ATTR_TRANSFORM_WIDTH ( SID_SVX_START + 90 ) +#define SID_ATTR_TRANSFORM_HEIGHT ( SID_SVX_START + 91 ) +#define SID_ATTR_TRANSFORM_SIZE_POINT ( SID_SVX_START + 92 ) +#define SID_ATTR_TRANSFORM_ROT_X ( SID_SVX_START + 93 ) +#define SID_ATTR_TRANSFORM_ROT_Y ( SID_SVX_START + 94 ) +#define SID_ATTR_TRANSFORM_ANGLE ( SID_SVX_START + 95 ) +//#define SID_ZOOM_TOOLBOX ( SID_SVX_START + 96 ) -> sfxsids.hrc +//#define SID_ZOOM_OUT ( SID_SVX_START + 97 ) -> sfxsids.hrc +//#define SID_ZOOM_IN ( SID_SVX_START + 98 ) -> sfxsids.hrc +//#define SID_SIZE_REAL ( SID_SVX_START + 99 ) -> sfxsids.hrc +//#define SID_SIZE_PAGE ( SID_SVX_START + 100 ) -> sfxsids.hrc +#define SID_SIZE_ALL ( SID_SVX_START + 101 ) +#define SID_DRAW_LINE ( SID_SVX_START + 102 ) +#define SID_DRAW_XLINE ( SID_SVX_START + 103 ) +#define SID_DRAW_RECT ( SID_SVX_START + 104 ) +#define SID_DRAW_RECT_ROUND ( SID_SVX_START + 105 ) +#define SID_DRAW_RECT_MOREROUND ( SID_SVX_START + 106 ) +#define SID_DRAW_FULLRECT ( SID_SVX_START + 107 ) +#define SID_DRAW_FULLRECT_ROUND ( SID_SVX_START + 108 ) +#define SID_DRAW_FULLRECT_MOREROUND ( SID_SVX_START + 109 ) +#define SID_DRAW_ELLIPSE ( SID_SVX_START + 110 ) +#define SID_DRAW_FULLELLIPSE ( SID_SVX_START + 111 ) +#define SID_DRAW_PIE ( SID_SVX_START + 112 ) +#define SID_DRAW_FULLPIE ( SID_SVX_START + 113 ) +#define SID_DRAW_ARC ( SID_SVX_START + 114 ) +#define SID_DRAW_CIRCLECUT ( SID_SVX_START + 115 ) +#define SID_DRAW_FULLCIRCLECUT ( SID_SVX_START + 116 ) +#define SID_DRAW_POLYGON ( SID_SVX_START + 117 ) +#define SID_DRAW_BEZIER_FILL ( SID_SVX_START + 118 ) +#define SID_BEZIER_INSERT ( SID_SVX_START + 119 ) +#define SID_BEZIER_DELETE ( SID_SVX_START + 120 ) +#define SID_BEZIER_MOVE ( SID_SVX_START + 121 ) +#define SID_BEZIER_CLOSE ( SID_SVX_START + 122 ) +#define SID_BEZIER_SMOOTH ( SID_SVX_START + 123 ) +#define SID_BEZIER_APPEND ( SID_SVX_START + 124 ) +#define SID_BEZIER_OPEN ( SID_SVX_START + 125 ) +#define SID_BEZIER_EDIT ( SID_SVX_START + 126 ) +#define SID_BEZIER_CUTLINE ( SID_SVX_START + 127 ) +#define SID_OBJECT_SELECT ( SID_SVX_START + 128 ) +#define SID_OBJECT_ROTATE ( SID_SVX_START + 129 ) +#define SID_OBJECT_ALIGN ( SID_SVX_START + 130 ) +#define SID_OBJECT_ALIGN_LEFT ( SID_SVX_START + 131 ) +#define SID_OBJECT_ALIGN_CENTER ( SID_SVX_START + 132 ) +#define SID_OBJECT_ALIGN_RIGHT ( SID_SVX_START + 133 ) +#define SID_OBJECT_ALIGN_UP ( SID_SVX_START + 134 ) +#define SID_OBJECT_ALIGN_MIDDLE ( SID_SVX_START + 135 ) +#define SID_OBJECT_ALIGN_DOWN ( SID_SVX_START + 136 ) +#define SID_COPY_FORMAT ( SID_SVX_START + 137 ) +#define SID_PASTE_FORMAT ( SID_SVX_START + 138 ) +#define SID_INSERT_ORGANIGRAM ( SID_SVX_START + 139 ) +#define SID_INSERT_DIAGRAM ( SID_SVX_START + 140 ) +#define SID_DRAW_CHART SID_INSERT_DIAGRAM +#define SID_INSERT_TABLE ( SID_SVX_START + 141 ) +#define SID_ATTRIBUTES_AREA ( SID_SVX_START + 142 ) +#define SID_ATTRIBUTES_LINE ( SID_SVX_START + 143 ) +#define SID_CHOOSE_CONTROLS ( SID_SVX_START + 144 ) +#define SID_ACTIVATE_CONTROLS ( SID_SVX_START + 145 ) +#define SID_INSERT_PUSHBUTTON ( SID_SVX_START + 146 ) +#define SID_INSERT_RADIOBUTTON ( SID_SVX_START + 147 ) +#define SID_INSERT_CHECKBOX ( SID_SVX_START + 148 ) +#define SID_OUTLINE ( SID_SVX_START + 149 ) +#define SID_OUTLINE_UP ( SID_SVX_START + 150 ) +#define SID_OUTLINE_DOWN ( SID_SVX_START + 151 ) +#define SID_OUTLINE_LEFT ( SID_SVX_START + 152 ) +#define SID_OUTLINE_RIGHT ( SID_SVX_START + 153 ) +#define SID_OUTLINE_FORMAT ( SID_SVX_START + 154 ) +#define SID_OUTLINE_COLLAPSE_ALL ( SID_SVX_START + 155 ) +#define SID_OUTLINE_BULLET ( SID_SVX_START + 156 ) +#define SID_PRESENTATION ( SID_SVX_START + 157 ) +#define SID_TIMER ( SID_SVX_START + 158 ) +#define SID_REHEARSE_TIMINGS ( SID_SVX_START + 159 ) +#define SID_DIA ( SID_SVX_START + 160 ) +#define SID_HIDE_SLIDE ( SID_SVX_START + 161 ) +#define SID_CHOOSE_POLYGON ( SID_SVX_START + 162 ) +//#define SID_SHOW_BROWSER ( SID_SVX_START + 163 ) -> sfxsids.hrc +#define SID_ATTR_FILL_STYLE ( SID_SVX_START + 164 ) +#define SID_ATTR_FILL_COLOR ( SID_SVX_START + 165 ) +#define SID_ATTR_FILL_GRADIENT ( SID_SVX_START + 166 ) +#define SID_ATTR_FILL_HATCH ( SID_SVX_START + 167 ) +#define SID_ATTR_FILL_BITMAP ( SID_SVX_START + 168 ) +#define SID_ATTR_LINE_STYLE ( SID_SVX_START + 169 ) +#define SID_ATTR_LINE_DASH ( SID_SVX_START + 170 ) +#define SID_ATTR_LINE_WIDTH ( SID_SVX_START + 171 ) +#define SID_ATTR_LINE_COLOR ( SID_SVX_START + 172 ) +#define SID_ATTR_LINE_START ( SID_SVX_START + 173 ) +#define SID_ATTR_LINE_END ( SID_SVX_START + 174 ) +#define SID_ATTR_LINE_STARTWIDTH ( SID_SVX_START + 175 ) +#define SID_ATTR_LINE_ENDWIDTH ( SID_SVX_START + 176 ) +#define SID_ATTR_LINE_STARTCENTER ( SID_SVX_START + 177 ) +#define SID_ATTR_LINE_ENDCENTER ( SID_SVX_START + 178 ) +#define SID_COLOR_TABLE ( SID_SVX_START + 179 ) +#define SID_GRADIENT_LIST ( SID_SVX_START + 180 ) +#define SID_HATCH_LIST ( SID_SVX_START + 181 ) +#define SID_BITMAP_LIST ( SID_SVX_START + 182 ) +#define SID_DASH_LIST ( SID_SVX_START + 183 ) +#define SID_LINEEND_LIST ( SID_SVX_START + 184 ) +#define SID_BACKGROUND_COLOR ( SID_SVX_START + 185 ) +#define SID_BACKGROUND_PATTERN ( SID_SVX_START + 186 ) +#define SID_ATTR_BORDER ( SID_SVX_START + 187 ) +#define SID_INSERT_FIXEDTEXT ( SID_SVX_START + 188 ) +#define SID_INSERT_GROUPBOX ( SID_SVX_START + 189 ) +#define SID_INSERT_EDIT ( SID_SVX_START + 190 ) +#define SID_INSERT_LISTBOX ( SID_SVX_START + 191 ) +#define SID_INSERT_COMBOBOX ( SID_SVX_START + 192 ) +#define SID_INSERT_SPINBUTTON ( SID_SVX_START + 193 ) +#define SID_INSERT_HSCROLLBAR ( SID_SVX_START + 194 ) +#define SID_INSERT_VSCROLLBAR ( SID_SVX_START + 195 ) +#define SID_INSERT_PREVIEW ( SID_SVX_START + 196 ) +#define SID_INSERT_URLBUTTON ( SID_SVX_START + 197 ) +#define SID_INSERT_SELECT ( SID_SVX_START + 198 ) +#define SID_DIALOG_TESTMODE ( SID_SVX_START + 199 ) +#define SID_FRAME_LINESTYLE ( SID_SVX_START + 200 ) +#define SID_FRAME_LINECOLOR ( SID_SVX_START + 201 ) +#define SID_ATTR_GRID_USE ( SID_SVX_START + 202 ) +#define SID_ATTR_GRID_VISIBLE ( SID_SVX_START + 203 ) +#define SID_ATTR_GRID_DRAW_X ( SID_SVX_START + 204 ) +#define SID_ATTR_GRID_DRAW_Y ( SID_SVX_START + 205 ) +#define SID_ATTR_GRID_DIVISION_X ( SID_SVX_START + 206 ) +#define SID_ATTR_GRID_DIVISION_Y ( SID_SVX_START + 207 ) +#define SID_ATTR_GRID_SNAP_X ( SID_SVX_START + 208 ) +#define SID_ATTR_GRID_SNAP_Y ( SID_SVX_START + 209 ) +#define SID_ATTR_GRID_ORIGIN_X ( SID_SVX_START + 210 ) +#define SID_ATTR_GRID_ORIGIN_Y ( SID_SVX_START + 211 ) +#define SID_IMPORT_GRAPH_PREVIEW ( SID_SVX_START + 212 ) +#define SID_IMPORT_GRAPH_LASTPATH ( SID_SVX_START + 213 ) +#define SID_IMPORT_GRAPH_LASTFILTER ( SID_SVX_START + 214 ) +#define SID_SEARCHDLG_SEARCHSTRINGS ( SID_SVX_START + 215 ) +#define SID_SEARCHDLG_REPLACESTRINGS ( SID_SVX_START + 216 ) +#define SID_ATTR_TABLE ( SID_SVX_START + 217 ) +#define SID_ATTR_TABLE_COLUMN ( SID_SVX_START + 218 ) +#define SID_ATTR_TABLE_ROW ( SID_SVX_START + 219 ) +#define SID_ATTR_COLUMNS ( SID_SVX_START + 220 ) +#define SID_ATTR_INSERT ( SID_SVX_START + 221 ) +#define SID_ATTR_ZOOM_USER ( SID_SVX_START + 222 ) +#define SID_ATTR_POSITION ( SID_SVX_START + 223 ) +#define SID_ATTR_SIZE ( SID_SVX_START + 224 ) +#define SID_TABLE_CELL ( SID_SVX_START + 225 ) +#define SID_ATTR_ALIGN_HOR_JUSTIFY ( SID_SVX_START + 226 ) +#define SID_ATTR_ALIGN_VER_JUSTIFY ( SID_SVX_START + 227 ) +#define SID_ATTR_ALIGN_MARGIN ( SID_SVX_START + 228 ) +#define SID_ATTR_ALIGN_STACKED ( SID_SVX_START + 229 ) +#define SID_ATTR_ALIGN_LINEBREAK ( SID_SVX_START + 230 ) +#define SID_OUTLINE_COLLAPSE ( SID_SVX_START + 231 ) +#define SID_OUTLINE_EXPAND_ALL ( SID_SVX_START + 232 ) +#define SID_OUTLINE_EXPAND ( SID_SVX_START + 233 ) +#define SID_OUTLINE_DELETEALL ( SID_SVX_START + 234 ) +#define SID_ATTR_TRANSFORM_PROTECT_POS ( SID_SVX_START + 236 ) +#define SID_ATTR_TRANSFORM_PROTECT_SIZE ( SID_SVX_START + 237 ) +#define SID_ATTR_TRANSFORM_AUTOSIZE ( SID_SVX_START + 238 ) // !!! +#define SID_ATTR_TRANSFORM_INTERN ( SID_SVX_START + 239 ) +#define SID_INSERT_FRAME ( SID_SVX_START + 240 ) +#define SID_INSERT_GRAPHIC ( SID_SVX_START + 241 ) +#define SID_AUTOFORMAT ( SID_SVX_START + 242 ) +#define SID_SPELL_DIALOG ( SID_SVX_START + 243 ) +#define SID_INSERT_DRAW ( SID_SVX_START + 244 ) +#define SID_THESAURUS ( SID_SVX_START + 245 ) +#define SID_ATTR_PARA_BULLET ( SID_SVX_START + 250 ) +#define SID_AUTOCOMPLETEWORD ( SID_SVX_START + 251 ) +#define SID_DRAW_TEXT ( SID_SVX_START + 253 ) +#define SID_DRAW_CAPTION ( SID_SVX_START + 254 ) +#define SID_INSERT_LEGEND SID_DRAW_CAPTION +#define SID_DRAW_SELECT ( SID_SVX_START + 255 ) +#define SID_FONTWORK ( SID_SVX_START + 256 ) +#define SID_FORMTEXT_STYLE ( SID_SVX_START + 257 ) +#define SID_FORMTEXT_ADJUST ( SID_SVX_START + 258 ) +#define SID_FORMTEXT_DISTANCE ( SID_SVX_START + 259 ) +#define SID_FORMTEXT_START ( SID_SVX_START + 260 ) +#define SID_FORMTEXT_MIRROR ( SID_SVX_START + 261 ) +#define SID_FORMTEXT_OUTLINE ( SID_SVX_START + 262 ) +#define SID_FORMTEXT_SHADOW ( SID_SVX_START + 263 ) +#define SID_FORMTEXT_SHDWCOLOR ( SID_SVX_START + 264 ) +#define SID_FORMTEXT_SHDWXVAL ( SID_SVX_START + 265 ) +#define SID_FORMTEXT_SHDWYVAL ( SID_SVX_START + 266 ) +#define SID_FORMTEXT_STDFORM ( SID_SVX_START + 267 ) +#define SID_FORMTEXT_HIDEFORM ( SID_SVX_START + 268 ) +#define SID_FORMTEXT_RESERVED1 ( SID_SVX_START + 269 ) +#define SID_FORMTEXT_RESERVED2 ( SID_SVX_START + 270 ) +#define SID_FORMTEXT_RESERVED3 ( SID_SVX_START + 271 ) +#define SID_FORMTEXT_RESERVED4 ( SID_SVX_START + 272 ) +#define SID_FORMTEXT_RESERVED5 ( SID_SVX_START + 273 ) +#define SID_FORMTEXT_RESERVED_LAST ( SID_SVX_START + 274 ) +#define SID_GALLERY_ENABLE_ADDCOPY ( SID_SVX_START + 276 ) +#define SID_GALLERY_IMPORTTHEME ( SID_SVX_START + 277 ) +#define SID_GALLERY_BG_POS ( SID_SVX_START + 278 ) +//#define SID_GALLERY_BG_BRUSH ( SID_SVX_START + 279 ) -> sfxsids.hrc +#define SID_GALLERY_FORMATS ( SID_SVX_START + 280 ) +//#define SID_SEARCH_OPTIONS ( SID_SVX_START + 281 ) -> sfxsids.hrc +#define SID_OBJECT_HELL ( SID_SVX_START + 282 ) +#define SID_OBJECT_HEAVEN ( SID_SVX_START + 283 ) +#define SID_ATTR_LONG_ULSPACE ( SID_SVX_START + 284 ) +#define SID_ATTR_LONG_LRSPACE ( SID_SVX_START + 285 ) +#define SID_FRAME_TO_TOP ( SID_SVX_START + 286 ) +#define SID_FRAME_TO_BOTTOM ( SID_SVX_START + 287 ) +#define SID_POSTIT ( SID_SVX_START + 288 ) +//#define SID_ZOOM ( SID_SVX_START + 289 ) -> sfxsids.hrc +#define SID_GRID ( SID_SVX_START + 290 ) +//#define SID_SEARCH_ITEM ( SID_SVX_START + 291 ) -> sfxsids.hrc +#define SID_SEARCH_SEARCHSET ( SID_SVX_START + 292 ) +#define SID_SEARCH_REPLACESET ( SID_SVX_START + 293 ) +#define SID_SET_SUPER_SCRIPT ( SID_SVX_START + 294 ) +#define SID_SET_SUB_SCRIPT ( SID_SVX_START + 295 ) +#define SID_CHAR_DLG ( SID_SVX_START + 296 ) +#define SID_PARA_DLG ( SID_SVX_START + 297 ) +#define SID_ATTR_GRID_OPTIONS ( SID_SVX_START + 298 ) +#define SID_ATTR_FILL_SHADOW ( SID_SVX_START + 299 ) +#define SID_ATTR_PARA_OUTLLEVEL ( SID_SVX_START + 300 ) +#define SID_ATTR_LINEEND_STYLE ( SID_SVX_START + 301 ) +#define SID_ATTR_TRANSFORM_SLANT ( SID_SVX_START + 302 ) // !!! +//#define SID_ATTR_CHAR_FONTWIDTH ( SID_SVX_START + 303 ) -> sfxsids.hrc +#define SID_ATTR_TRANSFORM_SHEAR ( SID_SVX_START + 304 ) +#define SID_ATTR_TRANSFORM_SHEAR_X ( SID_SVX_START + 305 ) +#define SID_ATTR_TRANSFORM_SHEAR_Y ( SID_SVX_START + 306 ) +#define SID_ATTR_TRANSFORM_SHEAR_VERTICAL ( SID_SVX_START + 307 ) +#define SID_ATTR_TRANSFORM_RESIZE_REF_X ( SID_SVX_START + 308 ) +#define SID_ATTR_TRANSFORM_RESIZE_REF_Y ( SID_SVX_START + 309 ) +#define SID_ATTR_TRANSFORM_AUTOWIDTH ( SID_SVX_START + 310 ) +#define SID_ATTR_TRANSFORM_AUTOHEIGHT ( SID_SVX_START + 311 ) +#define SID_ATTR_TRANSFORM_HORI_RELATION ( SID_SVX_START + 312 ) +#define SID_ATTR_TRANSFORM_VERT_RELATION ( SID_SVX_START + 313 ) +#define SID_ATTR_TRANSFORM_HORI_ORIENT ( SID_SVX_START + 314 ) +#define SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT ( SID_SVX_START + 315 ) +#define SID_ATTR_TRANSFORM_IN_RTL_TEXT ( SID_SVX_START + 316 ) +#define SID_ATTR_TRANSFORM_HORI_MIRROR ( SID_SVX_START + 317 ) +#define SID_ATTR_TRANSFORM_ANCHOR ( SID_SVX_START + 318 ) +#define SID_ATTR_TRANSFORM_VERT_ORIENT ( SID_SVX_START + 319 ) +#define SID_TAB_INSERT ( SID_SVX_START + 320 ) +#define SID_TAB_COUNT ( SID_SVX_START + 321 ) +#define SID_TAB_POSITION ( SID_SVX_START + 322 ) +#define SID_TAB_ADJUST ( SID_SVX_START + 323 ) +#define SID_TAB_DECIMAL ( SID_SVX_START + 324 ) +#define SID_TAB_FILLCHAR ( SID_SVX_START + 325 ) +#define SID_SCAN ( SID_SVX_START + 330 ) +#define SID_TWAIN_SELECT ( SID_SVX_START + 331 ) +#define SID_TWAIN_TRANSFER ( SID_SVX_START + 332 ) +#define SID_CONTOUR_DLG ( SID_SVX_START + 334 ) +#define SID_CONTOUR_EXEC ( SID_SVX_START + 335 ) +#define SID_BORDER_OBJECT ( SID_SVX_START + 340 ) +#define SID_BORDER_LEFTLINE ( SID_SVX_START + 341 ) +#define SID_BORDER_RIGHTLINE ( SID_SVX_START + 342 ) +#define SID_BORDER_TOPLINE ( SID_SVX_START + 343 ) +#define SID_BORDER_BOTTOMLINE ( SID_SVX_START + 344 ) +#define SID_BORDER_HORIZONTALLINE ( SID_SVX_START + 345 ) +#define SID_BORDER_VERTICALLINE ( SID_SVX_START + 346 ) +#define SID_BORDER_DISTANCE ( SID_SVX_START + 347 ) +#define SID_SB_CONNECTIONPOOLING ( SID_SVX_START + 348 ) +#define SID_SB_DBREGISTEROPTIONS ( SID_SVX_START + 349 ) +#define SID_BMPMASK ( SID_SVX_START + 350 ) +#define SID_BMPMASK_PIPETTE ( SID_SVX_START + 351 ) +#define SID_BMPMASK_BMPSELECT ( SID_SVX_START + 352 ) +#define SID_BMPMASK_EXEC ( SID_SVX_START + 353 ) +//#define SID_HYPERLINK_INSERT ( SID_SVX_START + 360 ) -> sfxsids.hrc +//#define SID_HYPERLINK_GETLINK ( SID_SVX_START + 361 ) -> sfxsids.hrc +//#define SID_HYPERLINK_SETLINK ( SID_SVX_START + 362 ) -> sfxsids.hrc +#define SID_FIELD ( SID_SVX_START + 363 ) +#define SID_NO_GRAPHICS ( SID_SVX_START + 364 ) +#define SID_IMPORT_GRAPH_LASTURL ( SID_SVX_START + 365 ) +//#define SID_NAVIGATOR ( SID_SVX_START + 366 ) -> sfxsids.hrc +#define SID_ATTR_TEXT_FITTOSIZE ( SID_SVX_START + 367 ) +#define SID_ATTR_BRUSH_ROW ( SID_SVX_START + 368 ) +#define SID_OPTFILTER_MSOFFICE ( SID_SVX_START + 369 ) +#define SID_IMAP ( SID_SVX_START + 371 ) +#define SID_IMAP_DLG ( SID_SVX_START + 372 ) +#define SID_IMAP_SELECT ( SID_SVX_START + 373 ) +#define SID_IMAP_EXEC ( SID_SVX_START + 374 ) +#define SID_SHOW_HIDDEN ( SID_SVX_START + 375 ) +#define SID_SHOW_FORMS ( SID_SVX_START + 376 ) +#define SID_DRAW_RECT_NOFILL ( SID_SVX_START + 378 ) +#define SID_DRAW_RECT_ROUND_NOFILL ( SID_SVX_START + 379 ) +#define SID_DRAW_SQUARE ( SID_SVX_START + 380 ) +#define SID_DRAW_SQUARE_ROUND ( SID_SVX_START + 381 ) +#define SID_DRAW_SQUARE_NOFILL ( SID_SVX_START + 382 ) +#define SID_DRAW_SQUARE_ROUND_NOFILL ( SID_SVX_START + 383 ) +#define SID_DRAW_ELLIPSE_NOFILL ( SID_SVX_START + 384 ) +#define SID_DRAW_CIRCLE ( SID_SVX_START + 385 ) +#define SID_DRAW_CIRCLE_NOFILL ( SID_SVX_START + 386 ) +#define SID_DRAW_PIE_NOFILL ( SID_SVX_START + 387 ) +#define SID_DRAW_CIRCLEPIE ( SID_SVX_START + 388 ) +#define SID_DRAW_CIRCLEPIE_NOFILL ( SID_SVX_START + 389 ) +#define SID_DRAW_CIRCLEARC ( SID_SVX_START + 390 ) +#define SID_DRAW_CIRCLECUT_NOFILL ( SID_SVX_START + 391 ) +#define SID_DRAW_ELLIPSECUT ( SID_SVX_START + 392 ) +#define SID_DRAW_ELLIPSECUT_NOFILL ( SID_SVX_START + 393 ) +#define SID_DRAW_XPOLYGON ( SID_SVX_START + 394 ) +#define SID_DRAW_POLYGON_NOFILL ( SID_SVX_START + 395 ) +#define SID_DRAW_XPOLYGON_NOFILL ( SID_SVX_START + 396 ) +#define SID_DRAW_BEZIER_NOFILL ( SID_SVX_START + 397 ) +#define SID_DRAWTBX_TEXT ( SID_SVX_START + 398 ) +#define SID_DRAWTBX_RECTANGLES ( SID_SVX_START + 399 ) +#define SID_DRAWTBX_ELLIPSES ( SID_SVX_START + 400 ) +#define SID_DRAWTBX_LINES ( SID_SVX_START + 401 ) +//#define SID_ZOOM_NEXT ( SID_SVX_START + 402 ) -> sfxsids.hrc +//#define SID_ZOOM_PREV ( SID_SVX_START + 403 ) -> sfxsids.hrc +#define SID_BACKGRND_DESTINATION ( SID_SVX_START + 404 ) +#define SID_ATTR_FLASH ( SID_SVX_START + 406 ) +#define SID_ATTR_3D_LIGHT ( SID_SVX_START + 407 ) /* --> Slots mit --> koennen demnaechst entfallen ( heute 12.03.1998 ) */ +#define SID_ATTR_3D_START SID_ATTR_3D_LIGHT +#define SID_ATTR_3D_LIGHTINTENSITY ( SID_SVX_START + 408 ) /* --> Slots mit --> koennen demnaechst entfallen ( heute 12.03.1998 ) */ +#define SID_ATTR_3D_LIGHTCOLOR ( SID_SVX_START + 409 ) /* --> Slots mit --> koennen demnaechst entfallen ( heute 12.03.1998 ) */ +#define SID_ATTR_3D_AMBIENTINTENSITY ( SID_SVX_START + 410 ) /* --> Slots mit --> koennen demnaechst entfallen ( heute 12.03.1998 ) */ +#define SID_ATTR_3D_AMBIENTCOLOR ( SID_SVX_START + 411 ) +#define SID_IMPORT_GRAPH_LINK ( SID_SVX_START + 412 ) +#define SID_ATTR_PARA_REGISTER ( SID_SVX_START + 413 ) +#define SID_HTML_MODE ( SID_SVX_START + 414 ) +#define SID_RULER_PROTECT ( SID_SVX_START + 415 ) +//#define SID_INET_DLG ( SID_SVX_START + 416 ) -> sfxsids.hrc +#define SID_COLOR_CONTROL ( SID_SVX_START + 417 ) +#define SID_ATTR_3D_PERSPECTIVE ( SID_SVX_START + 418 ) +#define SID_ATTR_3D_DEPTH ( SID_SVX_START + 419 ) +#define SID_ATTR_3D_DISTANCE ( SID_SVX_START + 420 ) +#define SID_ATTR_3D_FOCAL_LENGTH ( SID_SVX_START + 421 ) +#define SID_ATTR_3D_INTERN ( SID_SVX_START + 422 ) +#define SID_PSZ_FUNCTION ( SID_SVX_START + 423 ) +//#define SID_AUTO_CORRECT_DLG ( SID_SVX_START + 424 ) -> sfxsids.hrc +#define SID_OFASLOTS_START ( SID_SVX_START + 425 ) +//#define SID_SD_AUTOPILOT ( SID_SVX_START + 425 ) -> sfxsids.hrc +#define SID_AUTOPILOT SID_SD_AUTOPILOT + +#define SID_TABLE_INSERT_COL_DLG ( SID_SVX_START + 426 ) +#define SID_TABLE_INSERT_ROW_DLG ( SID_SVX_START + 427 ) +#define SID_TABLE_PARAM_INSERT_AFTER ( SID_SVX_START + 428 ) + +#define SID_TABLEDESIGN ( SID_SVX_START + 429 ) +#define SID_MN_AUTOPILOT ( SID_SVX_START + 430 ) +#define SID_GENERAL_OPTIONS ( SID_SVX_START + 432 ) +#define SID_SW_EDITOPTIONS ( SID_SVX_START + 433 ) +#define SID_SD_EDITOPTIONS ( SID_SVX_START + 434 ) +#define SID_SC_EDITOPTIONS ( SID_SVX_START + 435 ) +#define SID_SM_EDITOPTIONS ( SID_SVX_START + 436 ) +#define SID_SCH_EDITOPTIONS ( SID_SVX_START + 437 ) +#define SID_SIM_EDITOPTIONS ( SID_SVX_START + 438 ) +#define SID_SW_ONLINEOPTIONS ( SID_SVX_START + 439 ) +#define SID_MN_OPTIONS ( SID_SVX_START + 440 ) +#define SID_GET_COLORTABLE ( SID_SVX_START + 441 ) +#define SID_MN_INSERT_OBJECT_DLGS ( SID_SVX_START + 442 ) +#define SID_OUTLINE_TO_IMPRESS ( SID_SVX_START + 443 ) +#define SID_SIM_TP_COLOR ( SID_SVX_START + 444 ) +#define SID_SIM_TP_EFFECTS ( SID_SVX_START + 445 ) +#define SID_SPELLCHECKER_CHANGED ( SID_SVX_START + 446 ) +#define SID_SD_GRAPHIC_OPTIONS ( SID_SVX_START + 447 ) +#define SID_SM_TP_PRINTOPTIONS ( SID_SVX_START + 448 ) +#define SID_OFASLOTS_END ( SID_SVX_START + 449 ) +#define SID_SB_STARBASEOPTIONS ( SID_SVX_START + 450 ) +#define SID_SWREGISTER_COLLECTION ( SID_SVX_START + 451 ) +#define SID_FILTER_DLG ( SID_SVX_START + 452 ) +#define SID_ATTR_BRUSH_TABLE ( SID_SVX_START + 453 ) +#define SID_GROUP ( SID_SVX_START + 454 ) +#define SID_UNGROUP ( SID_SVX_START + 455 ) +#define SID_SET_DEFAULT ( SID_SVX_START + 456 ) +#define SID_ATTR_PARA_PAGENUM ( SID_SVX_START + 457 ) +#define SID_BEZIER ( SID_SVX_START + 458 ) +#define SID_ATTR_3D_DOUBLE_SIDED ( SID_SVX_START + 459 ) +#define SID_ATTR_ALIGN_INDENT ( SID_SVX_START + 460 ) +#define SID_DEC_INDENT ( SID_SVX_START + 461 ) +#define SID_INC_INDENT ( SID_SVX_START + 462 ) +#define SID_DRAW_FREELINE ( SID_SVX_START + 463 ) +#define SID_DRAW_FREELINE_NOFILL ( SID_SVX_START + 464 ) +#define SID_DRAW_TEXT_MARQUEE ( SID_SVX_START + 465 ) +#define SID_SCH_TP_DEFCOLORS ( SID_SVX_START + 466 ) +#define SID_SWREGISTER_MODE ( SID_SVX_START + 467 ) +#define SID_OPTBASE_DATABASENAMES ( SID_SVX_START + 468 ) +#define SID_GRFFILTER ( SID_SVX_START + 469 ) +#define SID_GRFFILTER_INVERT ( SID_SVX_START + 470 ) +#define SID_GRFFILTER_SMOOTH ( SID_SVX_START + 471 ) +#define SID_GRFFILTER_SHARPEN ( SID_SVX_START + 472 ) +#define SID_GRFFILTER_REMOVENOISE ( SID_SVX_START + 473 ) +#define SID_GRFFILTER_SOBEL ( SID_SVX_START + 474 ) +#define SID_GRFFILTER_MOSAIC ( SID_SVX_START + 475 ) +#define SID_GRFFILTER_EMBOSS ( SID_SVX_START + 476 ) +#define SID_GRFFILTER_POSTER ( SID_SVX_START + 477 ) +#define SID_GRFFILTER_POPART ( SID_SVX_START + 478 ) +#define SID_GRFFILTER_SEPIA ( SID_SVX_START + 479 ) +#define SID_GRFFILTER_SOLARIZE ( SID_SVX_START + 480 ) +//#define SID_ATTR_CHAR_COLOR_EXT ( SID_SVX_START + 488 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_COLOR_BACKGROUND ( SID_SVX_START + 489 ) -> sfxsids.hrc +//#define SID_ATTR_CHAR_COLOR_BACKGROUND_EXT ( SID_SVX_START + 490 ) -> sfxsids.hrc +#define SID_COLL_CLEAR ( SID_SVX_START + 536 ) +//#define SID_ATTR_CHAR_COLOR2 ( SID_SVX_START + 537 ) -> sfxsids.hrc +#define SID_SHOW_ADDRESS ( SID_SVX_START + 538 ) +#define SID_APP_ENTERWAIT ( SID_SVX_START + 550 ) +#define SID_APP_LEAVEWAIT ( SID_SVX_START + 551 ) +#define SID_APP_ISWAIT ( SID_SVX_START + 552 ) +#define SID_OFA_TBL_DESIGNVIEW ( SID_SVX_START + 554 ) +#define SID_OFA_TBL_ADRESSBOOK ( SID_SVX_START + 555 ) +#define SID_OFA_QRY_DESIGNVIEW ( SID_SVX_START + 556 ) +#define SID_OFA_QRY_SQLVIEW ( SID_SVX_START + 557 ) +#define SID_OFA_FRM_DESIGNVIEW ( SID_SVX_START + 558 ) +#define SID_OFA_RPT_DESIGNVIEW ( SID_SVX_START + 559 ) +#define SID_OFA_TBL_CREATE ( SID_SVX_START + 560 ) +#define SID_OFA_QRY_CREATE ( SID_SVX_START + 561 ) +#define SID_OFA_FRM_CREATE ( SID_SVX_START + 562 ) +#define SID_OFA_RPT_CREATE ( SID_SVX_START + 563 ) +#define SID_FIELD_GRABFOCUS ( SID_SVX_START + 567 ) +#define SID_ATTR_3D_HORZ_SEGS ( SID_SVX_START + 568 ) +#define SID_ATTR_3D_VERT_SEGS ( SID_SVX_START + 569 ) +#define SID_ATTR_3D_DUMMY_1 ( SID_SVX_START + 570 ) +#define SID_ATTR_3D_DUMMY_2 ( SID_SVX_START + 571 ) +#define SID_BROWSER_DLG ( SID_SVX_START + 572 ) +#define SID_OFA_TBL_COMPRESS ( SID_SVX_START + 576 ) +#define SID_ATTR_ALIGN_DEGREES ( SID_SVX_START + 577 ) +#define SID_ATTR_ALIGN_LOCKPOS ( SID_SVX_START + 578 ) +#define SID_ATTR_LINEEND_WIDTH_DEFAULT ( SID_SVX_START + 579 ) +#define SID_ATTR_NUMBERFORMAT_ONE_AREA ( SID_SVX_START + 580 ) +#define SID_FUNCTION_CONTROL ( SID_SVX_START + 581 ) +#define SID_TAB_REMOVE ( SID_SVX_START + 582 ) +#define SID_TAB_REMOVE_ALL ( SID_SVX_START + 583 ) +#define SID_TAB_REMOVE_BY_INDEX ( SID_SVX_START + 584 ) +#define SID_OFA_VW_CREATE ( SID_SVX_START + 585 ) +#define SID_ATTR_PARA_NUMRULE ( SID_SVX_START + 587 ) +#define SID_OFA_REL_DESIGNVIEW ( SID_SVX_START + 588 ) +#define SID_OFA_MANUAL_SQL ( SID_SVX_START + 589 ) +#define SID_PARA_BACKGRND_DESTINATION ( SID_SVX_START + 590 ) +#define SID_ATTR_BRUSH_CHAR ( SID_SVX_START + 591 ) +#define SID_FMSLOTS_START ( SID_SVX_START + 592 ) +#define SID_FM_CONFIG ( SID_SVX_START + 593 ) +#define SID_FM_PUSHBUTTON ( SID_SVX_START + 594 ) +#define SID_FM_RADIOBUTTON ( SID_SVX_START + 595 ) +#define SID_FM_CHECKBOX ( SID_SVX_START + 596 ) +#define SID_FM_FIXEDTEXT ( SID_SVX_START + 597 ) +#define SID_FM_GROUPBOX ( SID_SVX_START + 598 ) +#define SID_FM_EDIT ( SID_SVX_START + 599 ) +#define SID_FM_LISTBOX ( SID_SVX_START + 600 ) +#define SID_FM_COMBOBOX ( SID_SVX_START + 601 ) +#define SID_FM_DBGRID ( SID_SVX_START + 603 ) +#define SID_FM_IMAGEBUTTON ( SID_SVX_START + 604 ) +#define SID_FM_FILECONTROL ( SID_SVX_START + 605 ) +#define SID_FM_CHANGECOL ( SID_SVX_START + 606 ) +#define SID_FM_NAVIGATIONBAR ( SID_SVX_START + 607 ) +#define SID_FM_NEW_HIDDEN ( SID_SVX_START + 608 ) +#define SID_FM_RENAME_OBJECT ( SID_SVX_START + 609 ) +#define SID_FM_DELETEROWS ( SID_SVX_START + 610 ) +#define SID_FM_INSERTCOL ( SID_SVX_START + 611 ) +#define SID_FM_DELETECOL ( SID_SVX_START + 612 ) +#define SID_FM_CTL_PROPERTIES ( SID_SVX_START + 613 ) +#define SID_FM_PROPERTIES ( SID_SVX_START + 614 ) +#define SID_FM_TAB_DIALOG ( SID_SVX_START + 615 ) +#define SID_FM_RECORD_FIRST ( SID_SVX_START + 616 ) +#define SID_FM_RECORD_NEXT ( SID_SVX_START + 617 ) +#define SID_FM_RECORD_PREV ( SID_SVX_START + 618 ) +#define SID_FM_RECORD_LAST ( SID_SVX_START + 619 ) +#define SID_FM_RECORD_NEW ( SID_SVX_START + 620 ) +#define SID_FM_RECORD_DELETE ( SID_SVX_START + 621 ) +#define SID_FM_RECORD_ABSOLUTE ( SID_SVX_START + 622 ) +#define SID_FM_ADD_FIELD ( SID_SVX_START + 623 ) +#define SID_FM_RECORD_TEXT ( SID_SVX_START + 624 ) +#define SID_FM_RECORD_FROM_TEXT ( SID_SVX_START + 625 ) +#define SID_FM_RECORD_TOTAL ( SID_SVX_START + 626 ) +#define SID_FM_RECORD_SAVE ( SID_SVX_START + 627 ) +#define SID_FM_CREATE_CONTROL ( SID_SVX_START + 628 ) +#define SID_FM_DESIGN_MODE ( SID_SVX_START + 629 ) +#define SID_FM_RECORD_UNDO ( SID_SVX_START + 630 ) +#define SID_FM_CONTROL_IDENTIFIER ( SID_SVX_START + 631 ) +#define SID_FM_CONTROL_INVENTOR ( SID_SVX_START + 632 ) +#define SID_FM_SHOW_FMEXPLORER ( SID_SVX_START + 633 ) +#define SID_FM_FIELDS_CONTROL ( SID_SVX_START + 634 ) +#define SID_FM_SHOW_PROPERTIES ( SID_SVX_START + 635 ) +#define SID_FM_PROPERTY_CONTROL ( SID_SVX_START + 636 ) +#define SID_FM_FMEXPLORER_CONTROL ( SID_SVX_START + 637 ) +#define SID_FM_NEW ( SID_SVX_START + 638 ) +#define SID_FM_DELETE ( SID_SVX_START + 639 ) +#define SID_FM_NEW_FORM ( SID_SVX_START + 640 ) +#define SID_FMSLOTS_END ( SID_SVX_START + 641 ) +#define SID_REDLIN_FILTER_PAGE ( SID_SVX_START + 642 ) +#define SID_REDLIN_VIEW_PAGE ( SID_SVX_START + 643 ) +#define SID_3D_WIN ( SID_SVX_START + 644 ) +#define SID_3D_STATE ( SID_SVX_START + 645 ) +#define SID_3D_INIT ( SID_SVX_START + 646 ) +#define SID_3D_ASSIGN ( SID_SVX_START + 647 ) +#define SID_CONVERT_TO_3D ( SID_SVX_START + 648 ) +#define SID_CONVERT_TO_3D_LATHE_FAST ( SID_SVX_START + 649 ) +#define SID_ATTR_3D_PERCENT_DIAGONAL ( SID_SVX_START + 650 ) +#define SID_ATTR_3D_BACKSCALE ( SID_SVX_START + 651 ) +#define SID_ATTR_3D_END_ANGLE ( SID_SVX_START + 652 ) +#define SID_ATTR_3D_NORMALS_KIND ( SID_SVX_START + 653 ) +#define SID_ATTR_3D_NORMALS_INVERT ( SID_SVX_START + 654 ) +#define SID_ATTR_3D_TWO_SIDED_LIGHTING ( SID_SVX_START + 655 ) +#define SID_ATTR_3D_TEXTURE_KIND ( SID_SVX_START + 656 ) +#define SID_ATTR_3D_TEXTURE_MODE ( SID_SVX_START + 657 ) +#define SID_ATTR_3D_TEXTURE_PROJ_X ( SID_SVX_START + 658 ) +#define SID_ATTR_3D_TEXTURE_PROJ_Y ( SID_SVX_START + 659 ) +#define SID_ATTR_3D_TEXTURE_FILTER ( SID_SVX_START + 660 ) +#define SID_ATTR_3D_MAT_COLOR ( SID_SVX_START + 661 ) +#define SID_ATTR_3D_MAT_EMISSION ( SID_SVX_START + 662 ) +#define SID_ATTR_3D_MAT_SPECULAR ( SID_SVX_START + 663 ) +#define SID_ATTR_3D_MAT_SPECULAR_INTENSITY ( SID_SVX_START + 664 ) +#define SID_ATTR_3D_SHADE_MODE ( SID_SVX_START + 665 ) +#define SID_ATTR_3D_SHADOW_3D ( SID_SVX_START + 666 ) +#define SID_ATTR_3D_SHADOW_SLANT ( SID_SVX_START + 667 ) +#define SID_ATTR_3D_LIGHTCOLOR_1 ( SID_SVX_START + 668 ) +#define SID_ATTR_3D_LIGHTCOLOR_2 ( SID_SVX_START + 669 ) +#define SID_ATTR_3D_LIGHTCOLOR_3 ( SID_SVX_START + 670 ) +#define SID_ATTR_3D_LIGHTCOLOR_4 ( SID_SVX_START + 671 ) +#define SID_ATTR_3D_LIGHTCOLOR_5 ( SID_SVX_START + 672 ) +#define SID_ATTR_3D_LIGHTCOLOR_6 ( SID_SVX_START + 673 ) +#define SID_ATTR_3D_LIGHTCOLOR_7 ( SID_SVX_START + 674 ) +#define SID_ATTR_3D_LIGHTCOLOR_8 ( SID_SVX_START + 675 ) +#define SID_ATTR_3D_LIGHTON_1 ( SID_SVX_START + 676 ) +#define SID_ATTR_3D_LIGHTON_2 ( SID_SVX_START + 677 ) +#define SID_ATTR_3D_LIGHTON_3 ( SID_SVX_START + 678 ) +#define SID_ATTR_3D_LIGHTON_4 ( SID_SVX_START + 679 ) +#define SID_ATTR_3D_LIGHTON_5 ( SID_SVX_START + 680 ) +#define SID_ATTR_3D_LIGHTON_6 ( SID_SVX_START + 681 ) +#define SID_ATTR_3D_LIGHTON_7 ( SID_SVX_START + 682 ) +#define SID_ATTR_3D_LIGHTON_8 ( SID_SVX_START + 683 ) +#define SID_ATTR_3D_LIGHTDIRECTION_1 ( SID_SVX_START + 684 ) +#define SID_ATTR_3D_LIGHTDIRECTION_2 ( SID_SVX_START + 685 ) +#define SID_ATTR_3D_LIGHTDIRECTION_3 ( SID_SVX_START + 686 ) +#define SID_ATTR_3D_LIGHTDIRECTION_4 ( SID_SVX_START + 687 ) +#define SID_ATTR_3D_LIGHTDIRECTION_5 ( SID_SVX_START + 688 ) +#define SID_ATTR_3D_LIGHTDIRECTION_6 ( SID_SVX_START + 689 ) +#define SID_ATTR_3D_LIGHTDIRECTION_7 ( SID_SVX_START + 690 ) +#define SID_ATTR_3D_LIGHTDIRECTION_8 ( SID_SVX_START + 691 ) +#define SID_ATTR_3D_END SID_ATTR_3D_LIGHTDIRECTION_8 +#define SID_ATTR_3D_DUMMY_3 ( SID_SVX_START + 692 ) +#define SID_ATTR_3D_DUMMY_4 ( SID_SVX_START + 693 ) +#define SID_ATTR_3D_DUMMY_5 ( SID_SVX_START + 694 ) +#define SID_ATTR_3D_DUMMY_6 ( SID_SVX_START + 695 ) +#define SID_ATTR_3D_DUMMY_7 ( SID_SVX_START + 696 ) +#define SID_ATTR_3D_DUMMY_8 ( SID_SVX_START + 697 ) +#define SID_ATTR_3D_DUMMY_9 ( SID_SVX_START + 698 ) +#define SID_ATTR_3D_DUMMY_10 ( SID_SVX_START + 699 ) +#define SID_ATTR_NUMBERFORMAT_NOLANGUAGE ( SID_SVX_START + 700 ) +#define SID_MN_GROUP ( SID_SVX_START + 701 ) +#define SID_FM_AUTO_ORDER ( SID_SVX_START + 702 ) + +#define SID_MORE_FMSLOTS_START ( SID_SVX_START + 702 ) +#define SID_FM_SHOW_PROPERTY_BROWSER ( SID_SVX_START + 703 ) +#define SID_FM_DATEFIELD ( SID_SVX_START + 704 ) +#define SID_FM_TIMEFIELD ( SID_SVX_START + 705 ) +#define SID_FM_NUMERICFIELD ( SID_SVX_START + 706 ) +#define SID_FM_CURRENCYFIELD ( SID_SVX_START + 707 ) +#define SID_FM_PATTERNFIELD ( SID_SVX_START + 708 ) +#define SID_FM_OPEN_READONLY ( SID_SVX_START + 709 ) +#define SID_FM_IMAGECONTROL ( SID_SVX_START + 710 ) +#define SID_FM_REMOVE_FILTER_SORT ( SID_SVX_START + 711 ) +#define SID_FM_SORTUP ( SID_SVX_START + 712 ) +#define SID_FM_SORTDOWN ( SID_SVX_START + 713 ) +#define SID_FM_ORDERCRIT ( SID_SVX_START + 714 ) +#define SID_FM_FILTERCRIT ( SID_SVX_START + 715 ) +#define SID_FM_AUTOFILTER ( SID_SVX_START + 716 ) +#define SID_FM_COUNTALL ( SID_SVX_START + 717 ) +#define SID_FM_NATIVESQL ( SID_SVX_START + 720 ) +#define SID_FM_EXECUTE ( SID_SVX_START + 721 ) +#define SID_SBA_QRY_EXECUTE SID_FM_EXECUTE +#define SID_FM_ADDTABLE ( SID_SVX_START + 722 ) +#define SID_FM_FORM_FILTERED ( SID_SVX_START + 723 ) +#define SID_FM_REFRESH ( SID_SVX_START + 724 ) +#define SID_FM_SEARCH ( SID_SVX_START + 725 ) +#define SID_FM_LEAVE_CREATE ( SID_SVX_START + 726 ) // Formcontroller-Button rauspoppen +#define SID_FM_USE_WIZARDS ( SID_SVX_START + 727 ) +#define SID_FM_FORMATTEDFIELD ( SID_SVX_START + 728 ) +#define SID_FM_FILTER_START ( SID_SVX_START + 729 ) +#define SID_FM_FILTER_EXIT ( SID_SVX_START + 730 ) +#define SID_FM_FILTER_EXECUTE ( SID_SVX_START + 731 ) +#define SID_FM_FILTER_NAVIGATOR ( SID_SVX_START + 732 ) +#define SID_FM_CHANGECONTROLTYPE ( SID_SVX_START + 733 ) +#define SID_FM_CONVERTTO_EDIT ( SID_SVX_START + 734 ) +#define SID_FM_CONVERTTO_BUTTON ( SID_SVX_START + 735 ) +#define SID_FM_CONVERTTO_FIXEDTEXT ( SID_SVX_START + 736 ) +#define SID_FM_CONVERTTO_LISTBOX ( SID_SVX_START + 737 ) +#define SID_FM_CONVERTTO_CHECKBOX ( SID_SVX_START + 738 ) +#define SID_FM_CONVERTTO_RADIOBUTTON ( SID_SVX_START + 739 ) +#define SID_FM_CONVERTTO_GROUPBOX ( SID_SVX_START + 740 ) +#define SID_FM_CONVERTTO_COMBOBOX ( SID_SVX_START + 741 ) +#define SID_FM_CONVERTTO_IMAGEBUTTON ( SID_SVX_START + 743 ) +#define SID_FM_CONVERTTO_FILECONTROL ( SID_SVX_START + 744 ) +#define SID_FM_CONVERTTO_DATE ( SID_SVX_START + 745 ) +#define SID_FM_CONVERTTO_TIME ( SID_SVX_START + 746 ) +#define SID_FM_CONVERTTO_NUMERIC ( SID_SVX_START + 747 ) +#define SID_FM_CONVERTTO_CURRENCY ( SID_SVX_START + 748 ) +#define SID_FM_CONVERTTO_PATTERN ( SID_SVX_START + 749 ) +#define SID_FM_CONVERTTO_IMAGECONTROL ( SID_SVX_START + 750 ) +#define SID_FM_CONVERTTO_FORMATTED ( SID_SVX_START + 751 ) +#define SID_FM_FILTER_NAVIGATOR_CONTROL ( SID_SVX_START + 752 ) +#define SID_FM_HIDECOL ( SID_SVX_START + 753 ) +#define SID_FM_SHOWCOLS ( SID_SVX_START + 754 ) +#define SID_FM_SHOWCOLS_MORE ( SID_SVX_START + 755 ) +#define SID_FM_SHOWALLCOLS ( SID_SVX_START + 756 ) +#define SID_FM_TWOFIELDS_DATE_N_TIME ( SID_SVX_START + 757 ) +#define SID_FM_FILTER_EDIT ( SID_SVX_START + 758 ) +#define SID_FM_FILTER_IS_NULL ( SID_SVX_START + 759 ) +#define SID_FM_FILTER_IS_NOT_NULL ( SID_SVX_START + 760 ) +#define SID_FM_VIEW_AS_GRID ( SID_SVX_START + 761 ) +#define SID_FM_FILTER_REMOVE ( SID_SVX_START + 762 ) +#define SID_FM_AUTOCONTROLFOCUS ( SID_SVX_START + 763 ) +#define SID_DSBROWSER_EXPLORER ( SID_SVX_START + 764 ) +#define SID_FM_CREATE_FIELDCONTROL ( SID_SVX_START + 765 ) +#define SID_FM_DATACCESS_DESCRIPTOR ( SID_SVX_START + 766 ) +#define SID_FM_GRABCONTROLFOCUS ( SID_SVX_START + 767 ) +#define SID_FM_SCROLLBAR ( SID_SVX_START + 768 ) +#define SID_FM_SPINBUTTON ( SID_SVX_START + 769 ) +#define SID_FM_CONVERTTO_SCROLLBAR ( SID_SVX_START + 770 ) +#define SID_FM_CONVERTTO_SPINBUTTON ( SID_SVX_START + 771 ) +#define SID_FM_CONVERTTO_NAVIGATIONBAR ( SID_SVX_START + 772 ) +#define SID_FM_SHOW_DATANAVIGATOR ( SID_SVX_START + 773 ) +#define SID_FM_DATANAVIGATOR_CONTROL ( SID_SVX_START + 774 ) +#define SID_FM_REFRESH_FORM_CONTROL ( SID_SVX_START + 775 ) +#define SID_MORE_FMSLOTS_END ( SID_SVX_START + 850 ) + +#define SID_HLINKBAR_LINK ( SID_SVX_START + 851 ) +#define SID_HLINKBAR_BOOKMARK ( SID_SVX_START + 852 ) +#define SID_HLINKBAR_SEARCH ( SID_SVX_START + 853 ) +#define SID_HLINKBAR_TARGET ( SID_SVX_START + 854 ) +#define SID_ATTR_NUMBERING_RULE ( SID_SVX_START + 855 ) +#define SID_PARAM_NUM_PRESET ( SID_SVX_START + 856 ) +#define SID_PARAM_CUR_NUMBER ( SID_SVX_START + 857 ) +#define SID_PARAM_CHILD_LEVELS ( SID_SVX_START + 858 ) +#define SID_PARAM_CUR_NUM_LEVEL ( SID_SVX_START + 859 ) +#define SID_CREATE_SW_DRAWVIEW ( SID_SVX_START + 860 ) +#define SID_ATTR_GRAF_LUMINANCE ( SID_SVX_START + 863 ) +#define SID_ATTR_GRAF_CONTRAST ( SID_SVX_START + 864 ) +#define SID_ATTR_GRAF_RED ( SID_SVX_START + 865 ) +#define SID_ATTR_GRAF_GREEN ( SID_SVX_START + 866 ) +#define SID_ATTR_GRAF_BLUE ( SID_SVX_START + 867 ) +#define SID_ATTR_GRAF_GAMMA ( SID_SVX_START + 868 ) +#define SID_ATTR_GRAF_TRANSPARENCE ( SID_SVX_START + 869 ) +#define SID_ATTR_GRAF_INVERT ( SID_SVX_START + 870 ) +#define SID_ATTR_GRAF_MODE ( SID_SVX_START + 871 ) +#define SID_ATTR_GRAF_RESERVE2 ( SID_SVX_START + 872 ) +#define SID_ATTR_GRAF_RESERVE3 ( SID_SVX_START + 873 ) +#define SID_ATTR_GRAF_RESERVE4 ( SID_SVX_START + 874 ) +#define SID_ATTR_GRAF_RESERVE5 ( SID_SVX_START + 875 ) +#define SID_ATTR_CHAR_CHARSETCOLOR ( SID_SVX_START + 877 ) +//#define SID_COMP_BIBLIOGRAPHY ( SID_SVX_START + 880 ) -> sfxsids.hrc +#define SID_ATTR_GRAF_KEEP_ZOOM ( SID_SVX_START + 882 ) +#define SID_ATTR_GRAF_CROP ( SID_SVX_START + 883 ) +#define SID_ATTR_GRAF_FRMSIZE ( SID_SVX_START + 884 ) +#define SID_ATTR_GRAF_FRMSIZE_PERCENT ( SID_SVX_START + 885 ) +#define SID_ATTR_GRAF_GRAPHIC ( SID_SVX_START + 886 ) +#define SID_ATTR_CHAR_CJK_FONT ( SID_SVX_START + 887 ) +#define SID_ATTR_CHAR_CJK_FONTHEIGHT ( SID_SVX_START + 888 ) +#define SID_ATTR_CHAR_CJK_LANGUAGE ( SID_SVX_START + 889 ) +#define SID_ATTR_CHAR_CJK_POSTURE ( SID_SVX_START + 890 ) +#define SID_ATTR_CHAR_CJK_WEIGHT ( SID_SVX_START + 891 ) +#define SID_ATTR_CHAR_CTL_FONT ( SID_SVX_START + 892 ) +#define SID_ATTR_CHAR_CTL_FONTHEIGHT ( SID_SVX_START + 893 ) +#define SID_ATTR_CHAR_CTL_LANGUAGE ( SID_SVX_START + 894 ) +#define SID_ATTR_CHAR_CTL_POSTURE ( SID_SVX_START + 895 ) +#define SID_ATTR_CHAR_CTL_WEIGHT ( SID_SVX_START + 896 ) +#define SID_ATTR_CHAR_TWO_LINES ( SID_SVX_START + 897 ) +#define SID_ATTR_CHAR_CJK_RUBY ( SID_SVX_START + 898 ) +#define SID_ATTR_CHAR_EMPHASISMARK ( SID_SVX_START + 899 ) +#define SID_ATTR_CHAR_SCRIPTTYPE ( SID_SVX_START + 900 ) +#define SID_ATTR_PARA_SCRIPTSPACE ( SID_SVX_START + 901 ) +#define SID_ATTR_PARA_HANGPUNCTUATION ( SID_SVX_START + 902 ) +#define SID_ATTR_PARA_FORBIDDEN_RULES ( SID_SVX_START + 903 ) +#define SID_ASIAN_DLG ( SID_SVX_START + 904 ) +#define SID_DRAW_TEXT_VERTICAL ( SID_SVX_START + 905 ) +#define SID_ATTR_CHAR_VERTICAL SID_DRAW_TEXT_VERTICAL +#define SID_DRAW_CAPTION_VERTICAL ( SID_SVX_START + 906 ) +#define SID_TEXTDIRECTION_LEFT_TO_RIGHT ( SID_SVX_START + 907 ) +#define SID_TEXTDIRECTION_TOP_TO_BOTTOM ( SID_SVX_START + 908 ) +#define SID_ATTR_CHAR_ROTATED ( SID_SVX_START + 910 ) +#define SID_ATTR_CHAR_SCALEWIDTH ( SID_SVX_START + 911 ) +#define SID_TRANSLITERATE_UPPER ( SID_SVX_START + 912 ) +#define SID_TRANSLITERATE_LOWER ( SID_SVX_START + 913 ) +#define SID_TRANSLITERATE_HALFWIDTH ( SID_SVX_START + 914 ) +#define SID_TRANSLITERATE_FULLWIDTH ( SID_SVX_START + 915 ) +#define SID_TRANSLITERATE_HIRAGANA ( SID_SVX_START + 916 ) +#define SID_TRANSLITERATE_KATAGANA ( SID_SVX_START + 917 ) +#define SID_MN_SUB_TRANSLITERATE ( SID_SVX_START + 918 ) +#define SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ( SID_SVX_START + 919 ) +#define SID_ATTR_CHAR_RELIEF ( SID_SVX_START + 920 ) +#define SID_LANGUAGE_OPTIONS ( SID_SVX_START + 921 ) +#define SID_GETUNDOSTRINGS ( SID_SVX_START + 923 ) +#define SID_GETREDOSTRINGS ( SID_SVX_START + 924 ) +#define SID_PARA_VERTALIGN ( SID_SVX_START + 925 ) +#define SID_INSERT_IMAGECONTROL ( SID_SVX_START + 926 ) +#define SID_INSERT_PROGRESSBAR ( SID_SVX_START + 927 ) +#define SID_INSERT_HFIXEDLINE ( SID_SVX_START + 928 ) +#define SID_INSERT_VFIXEDLINE ( SID_SVX_START + 929 ) +#define SID_READONLY_MODE ( SID_SVX_START + 930 ) +#define SID_ATTR_ALIGN_HYPHENATION ( SID_SVX_START + 931 ) +#define SID_ATTR_NUMBERFORMAT_SOURCE ( SID_SVX_START + 932 ) +#define SID_ATTR_AUTO_COLOR_INVALID ( SID_SVX_START + 933 ) +//#define SID_ADDRESS_DATA_SOURCE ( SID_SVX_START + 934 ) -> sfxsids.hrc +#define SID_RULER_BORDER_DISTANCE ( SID_SVX_START + 935 ) +#define SID_INSERT_DATEFIELD ( SID_SVX_START + 936 ) +#define SID_INSERT_TIMEFIELD ( SID_SVX_START + 937 ) +#define SID_INSERT_NUMERICFIELD ( SID_SVX_START + 938 ) +#define SID_INSERT_CURRENCYFIELD ( SID_SVX_START + 939 ) +#define SID_INSERT_FORMATTEDFIELD ( SID_SVX_START + 940 ) +#define SID_INSERT_PATTERNFIELD ( SID_SVX_START + 941 ) +#define SID_INSERT_FILECONTROL ( SID_SVX_START + 942 ) +#define SID_SHOW_PROPERTYBROWSER ( SID_SVX_START + 943 ) +#define SID_ATTR_FRAMEDIRECTION ( SID_SVX_START + 944 ) +#define SID_ATTR_PARA_SNAPTOGRID ( SID_SVX_START + 945 ) +#define SID_ATTR_TABSTOP_VERTICAL ( SID_SVX_START + 946 ) +#define SID_ATTR_PARA_LRSPACE_VERTICAL ( SID_SVX_START + 947 ) +#define SID_RULER_BORDERS_VERTICAL ( SID_SVX_START + 948 ) +#define SID_ATTR_ALIGN_ASIANVERTICAL ( SID_SVX_START + 949 ) +#define SID_ATTR_PARA_LEFT_TO_RIGHT ( SID_SVX_START + 950 ) +#define SID_ATTR_PARA_RIGHT_TO_LEFT ( SID_SVX_START + 951 ) +#define SID_RULER_TEXT_RIGHT_TO_LEFT ( SID_SVX_START + 952 ) +#define SID_ATTR_HDFT_DYNAMIC_SPACING ( SID_SVX_START + 953 ) +#define SID_ATTR_NUMBERFORMAT_ADD_AUTO ( SID_SVX_START + 954 ) +#define SID_OPEN_HYPERLINK ( SID_SVX_START + 955 ) +#define SID_CTLFONT_STATE ( SID_SVX_START + 956 ) +#define SID_VERTICALTEXT_STATE ( SID_SVX_START + 957 ) +#define SID_OPEN_XML_FILTERSETTINGS ( SID_SVX_START + 958 ) +#define SID_HANGUL_HANJA_CONVERSION ( SID_SVX_START + 959 ) +#define SID_EXTRUSION_TOOGLE ( SID_SVX_START + 960 ) +#define SID_EXTRUSION_TILT_DOWN ( SID_SVX_START + 961 ) +#define SID_EXTRUSION_TILT_UP ( SID_SVX_START + 962 ) +#define SID_EXTRUSION_TILT_LEFT ( SID_SVX_START + 963 ) +#define SID_EXTRUSION_TILT_RIGHT ( SID_SVX_START + 964 ) +#define SID_EXTRUSION_DEPTH_FLOATER ( SID_SVX_START + 965 ) +#define SID_EXTRUSION_DIRECTION_FLOATER ( SID_SVX_START + 966 ) +#define SID_EXTRUSION_LIGHTING_FLOATER ( SID_SVX_START + 967 ) +#define SID_EXTRUSION_SURFACE_FLOATER ( SID_SVX_START + 968 ) +#define SID_EXTRUSION_3D_COLOR ( SID_SVX_START + 969 ) +#define SID_EXTRUSION_DEPTH ( SID_SVX_START + 970 ) +#define SID_EXTRUSION_DIRECTION ( SID_SVX_START + 971 ) +#define SID_EXTRUSION_PROJECTION ( SID_SVX_START + 972 ) +#define SID_EXTRUSION_LIGHTING_DIRECTION ( SID_SVX_START + 973 ) +#define SID_EXTRUSION_LIGHTING_INTENSITY ( SID_SVX_START + 974 ) +#define SID_EXTRUSION_SURFACE ( SID_SVX_START + 975 ) +#define SID_EXTRUSION_DEPTH_DIALOG ( SID_SVX_START + 976 ) +#define SID_FONTWORK_GALLERY_FLOATER ( SID_SVX_START + 977 ) +// free ( SID_SVX_START + 978 ) +#define SID_FONTWORK_SHAPE_TYPE ( SID_SVX_START + 979 ) +#define SID_FONTWORK_SAME_LETTER_HEIGHTS ( SID_SVX_START + 980 ) +#define SID_FONTWORK_ALIGNMENT_FLOATER ( SID_SVX_START + 981 ) +#define SID_FONTWORK_CHARACTER_SPACING_FLOATER ( SID_SVX_START + 982 ) +#define SID_FONTWORK_SHAPE ( SID_SVX_START + 983 ) +#define SID_FONTWORK_ALIGNMENT ( SID_SVX_START + 984 ) +#define SID_FONTWORK_CHARACTER_SPACING ( SID_SVX_START + 985 ) +#define SID_FONTWORK_KERN_CHARACTER_PAIRS ( SID_SVX_START + 986 ) +#define SID_DRAW_FONTWORK ( SID_SVX_START + 987 ) +#define SID_DRAW_FONTWORK_VERTICAL ( SID_SVX_START + 988 ) +#define SID_ATTR_CHAR_HIDDEN ( SID_SVX_START + 989 ) +#define SID_ATTR_BORDER_CONNECT ( SID_SVX_START + 990 ) +#define SID_SW_FOLLOW_TEXT_FLOW ( SID_SVX_START + 991 ) /* #i18732# - slot-id for new option IsFollowingTextFlow' */ +#define SID_RULER_ROWS ( SID_SVX_START + 992 ) +#define SID_RULER_ROWS_VERTICAL ( SID_SVX_START + 993 ) +#define SID_ATTR_CHAR_LATIN_FONT ( SID_SVX_START + 994 ) +#define SID_ATTR_CHAR_LATIN_FONTHEIGHT ( SID_SVX_START + 995 ) +#define SID_ATTR_CHAR_LATIN_LANGUAGE ( SID_SVX_START + 996 ) +#define SID_ATTR_CHAR_LATIN_POSTURE ( SID_SVX_START + 997 ) +#define SID_ATTR_CHAR_LATIN_WEIGHT ( SID_SVX_START + 998 ) +#define SID_ATTR_TRANSFORM_HORI_POSITION ( SID_SVX_START + 999 ) +#define SID_ATTR_TRANSFORM_VERT_POSITION ( SID_SVX_START + 1000 ) +#define SID_SHOW_ITEMBROWSER ( SID_SVX_START + 1001 ) +#define SID_ALIGN_ANY_LEFT ( SID_SVX_START + 1002 ) +#define SID_ALIGN_ANY_HCENTER ( SID_SVX_START + 1003 ) +#define SID_ALIGN_ANY_RIGHT ( SID_SVX_START + 1004 ) +#define SID_ALIGN_ANY_JUSTIFIED ( SID_SVX_START + 1005 ) +#define SID_ALIGN_ANY_TOP ( SID_SVX_START + 1006 ) +#define SID_ALIGN_ANY_VCENTER ( SID_SVX_START + 1007 ) +#define SID_ALIGN_ANY_BOTTOM ( SID_SVX_START + 1008 ) +#define SID_ALIGN_ANY_HDEFAULT ( SID_SVX_START + 1009 ) +#define SID_ALIGN_ANY_VDEFAULT ( SID_SVX_START + 1010 ) +#define SID_SW_COLLAPSING_BORDERS ( SID_SVX_START + 1011 ) +#define SID_SW_WRAP_INFLUENCE_ON_OBJPOS ( SID_SVX_START + 1012 ) /* #i28701# - slot-id for new attribute WrapInfluenceOnObjPos' */ +#define SID_ATTR_BORDER_DIAG_TLBR ( SID_SVX_START + 1013 ) +#define SID_ATTR_BORDER_DIAG_BLTR ( SID_SVX_START + 1014 ) +#define SID_ATTR_ALIGN_SHRINKTOFIT ( SID_SVX_START + 1015 ) +#define SID_CHINESE_CONVERSION ( SID_SVX_START + 1016 ) +#define SID_PAGE_TYPE ( SID_SVX_START + 1017 ) +#define SID_DLG_TYPE ( SID_SVX_START + 1018 ) +#define SID_TABPAGE_POS ( SID_SVX_START + 1019 ) +#define SID_GRAPHIC ( SID_SVX_START + 1020 ) +#define SID_OBJECT_LIST ( SID_SVX_START + 1021 ) +#define SID_ATTR_SET ( SID_SVX_START + 1022 ) +#define SID_CHAR_FMT_LIST_BOX ( SID_SVX_START + 1023 ) +#define SID_METRIC_ITEM ( SID_SVX_START + 1024 ) +#define SID_NUM_CHAR_FMT ( SID_SVX_START + 1025 ) +#define SID_BULLET_CHAR_FMT ( SID_SVX_START + 1026 ) +#define SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK ( SID_SVX_START + 1027 ) +#define SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT ( SID_SVX_START + 1028 ) +#define SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH ( SID_SVX_START + 1029 ) +#define SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET ( SID_SVX_START + 1030 ) +#define SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST ( SID_SVX_START + 1031 ) +#define SID_SVXTABULATORTABPAGE_CONTROLFLAGS ( SID_SVX_START + 1032 ) +#define SID_SVXTEXTATTRPAGE_VIEW ( SID_SVX_START + 1033 ) +#define SID_FLAG_TYPE ( SID_SVX_START + 1034 ) +#define SID_SWMODE_TYPE ( SID_SVX_START + 1035 ) +#define SID_DISABLE_CTL ( SID_SVX_START + 1036 ) +#define SID_LINK_TYPE ( SID_SVX_START + 1037 ) +#define SID_ENUM_PAGE_MODE ( SID_SVX_START + 1038 ) +#define SID_PAPER_START ( SID_SVX_START + 1039 ) +#define SID_PAPER_END ( SID_SVX_START + 1040 ) +#define SID_COLLECT_LIST ( SID_SVX_START + 1041 ) +#define SID_GROW_FONT_SIZE ( SID_SVX_START + 1042 ) +#define SID_SHRINK_FONT_SIZE ( SID_SVX_START + 1043 ) +// color subtoolbar on graphictoolbar +#define SID_COLOR_SETTINGS ( SID_SVX_START + 1044 ) +#define SID_FM_MORE_CONTROLS ( SID_SVX_START + 1045 ) +#define SID_FM_FORM_DESIGN_TOOLS ( SID_SVX_START + 1046 ) +#define SID_DRAWTBX_CS_BASIC ( SID_SVX_START + 1047 ) +#define SID_DRAWTBX_CS_SYMBOL ( SID_SVX_START + 1048 ) +#define SID_DRAWTBX_CS_ARROW ( SID_SVX_START + 1049 ) +#define SID_DRAWTBX_CS_FLOWCHART ( SID_SVX_START + 1050 ) +#define SID_DRAWTBX_CS_CALLOUT ( SID_SVX_START + 1051 ) +#define SID_DRAWTBX_CS_STAR ( SID_SVX_START + 1052 ) +#define SID_DRAW_CS_ID ( SID_SVX_START + 1053 ) +#define SID_FONTWORK_CHARACTER_SPACING_DIALOG ( SID_SVX_START + 1054 ) +#define SID_BORDER_REDUCED_MODE ( SID_SVX_START + 1055 ) +#define SID_INSERT_RLM ( SID_SVX_START + 1056 ) /* insert RLM - right to left mark */ +#define SID_INSERT_LRM ( SID_SVX_START + 1057 ) /* insert LRM - left to right mark */ +#define SID_INSERT_ZWSP ( SID_SVX_START + 1058 ) /* insert ZWJ - invisible space, keep words together*/ +#define SID_INSERT_ZWNBSP ( SID_SVX_START + 1059 ) /* insert ZWNJ - invisible space, forces linebreak*/ +#define SID_OPTIONS_DATABASES ( SID_SVX_START + 1060 ) +#define SID_OPEN_SMARTTAGMENU ( SID_SVX_START + 1061 ) +#define SID_OPEN_SMARTTAGOPTIONS ( SID_SVX_START + 1062 ) +#define SID_INSERT_TREECONTROL ( SID_SVX_START + 1063 ) +#define SID_ATTR_VIEWLAYOUT ( SID_SVX_START + 1064 ) +#define SID_ATTR_ZOOMSLIDER ( SID_SVX_START + 1065 ) +#define SID_FONTNAMELIST ( SID_SVX_START + 1066 ) +#define SID_LANGUAGE_STATUS ( SID_SVX_START + 1067 ) +#define SID_CHAR_DLG_FOR_PARAGRAPH ( SID_SVX_START + 1068 ) +#define SID_SET_DOCUMENT_LANGUAGE ( SID_SVX_START + 1069 ) + +#define SID_TABLE_MERGE_CELLS (SID_SVX_START+1070) +#define SID_TABLE_SPLIT_CELLS (SID_SVX_START+1071) +#define SID_OPTIMIZE_TABLE (SID_SVX_START+1072) +#define SID_TABLE_VERT_BOTTOM (SID_SVX_START+1073) +#define SID_TABLE_VERT_CENTER (SID_SVX_START+1074) +#define SID_TABLE_VERT_NONE (SID_SVX_START+1075) +#define SID_TABLE_INSERT_ROW (SID_SVX_START+1076) +#define SID_TABLE_INSERT_COL (SID_SVX_START+1077) +#define SID_TABLE_DELETE_ROW (SID_SVX_START+1078) +#define SID_TABLE_DELETE_COL (SID_SVX_START+1079) +#define SID_TABLE_SELECT_ALL (SID_SVX_START+1080) +#define SID_TABLE_SELECT_COL (SID_SVX_START+1081) +#define SID_TABLE_SELECT_ROW (SID_SVX_START+1082) +#define SID_FORMAT_TABLE_DLG (SID_SVX_START+1083) +#define SID_TABLE_SORT_DIALOG (SID_SVX_START+1084) +#define SID_TABLE_AUTOSUM (SID_SVX_START+1085) +#define SID_TABLE_DISTRIBUTE_COLUMNS (SID_SVX_START+1086) +#define SID_TABLE_DISTRIBUTE_ROWS (SID_SVX_START+1087) +#define SID_TABLE_STYLE (SID_SVX_START+1088) +#define SID_TABLE_STYLE_SETTINGS (SID_SVX_START+1089) +#define SID_CHAR_DLG_PREVIEW_STRING (SID_SVX_START+1090) +#define SID_RECHECK_DOCUMENT (SID_SVX_START+1091) +#define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092) +#define SID_OBJECT_MIRROR (SID_SVX_START+1093) + +#define SID_DELETE_POSTIT (SID_SVX_START+1094) +#define SID_NEXT_POSTIT (SID_SVX_START+1095) +#define SID_PREVIOUS_POSTIT (SID_SVX_START+1096) +#define SID_DELETEALL_POSTIT (SID_SVX_START+1097) +#define SID_SHOW_POSTIT (SID_SVX_START+1098) +#define SID_REPLYTO_POSTIT (SID_SVX_START+1099) +#define SID_DELETEALLBYAUTHOR_POSTIT (SID_SVX_START+1100) +#define SID_INSERT_POSTIT (SID_SVX_START+1101) + +// IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id +#define SID_SVX_FIRSTFREE SID_INSERT_POSTIT + 1 + +// -------------------------------------------------------------------------- +// Overflow check for slot IDs +// -------------------------------------------------------------------------- + +#if SID_SVX_FIRSTFREE > SID_SVX_END +#error Resource-Ueberlauf in #line, #file +#endif + +// -------------------------------------------------------------------------- +// Ranges, um ItemSets fuer bestimmte 3D-Objekte erstellen zu koennen +// -------------------------------------------------------------------------- + +// +// SceneObject: +#define SID_ATTR_3D_RANGE_SCENE \ +SID_ATTR_3D_AMBIENTCOLOR, SID_ATTR_3D_PERSPECTIVE, \ +SID_ATTR_3D_DISTANCE, SID_ATTR_3D_FOCAL_LENGTH, \ +SID_ATTR_3D_TWO_SIDED_LIGHTING, SID_ATTR_3D_TWO_SIDED_LIGHTING, \ +SID_ATTR_3D_SHADE_MODE, SID_ATTR_3D_SHADE_MODE, \ +SID_ATTR_3D_SHADOW_SLANT, SID_ATTR_3D_LIGHTDIRECTION_8 \ + +// +// CompoundObject: +#define SID_ATTR_3D_RANGE_COMPOUND \ +SID_ATTR_3D_DOUBLE_SIDED, SID_ATTR_3D_DOUBLE_SIDED, \ +SID_ATTR_3D_NORMALS_KIND, SID_ATTR_3D_NORMALS_INVERT, \ +SID_ATTR_3D_TEXTURE_KIND, SID_ATTR_3D_MAT_SPECULAR_INTENSITY, \ +SID_ATTR_3D_SHADOW_3D, SID_ATTR_3D_SHADOW_3D \ + +// +// ExtrudeObject: +#define SID_ATTR_3D_RANGE_EXTRUDE \ +SID_ATTR_3D_RANGE_COMPOUND, \ +SID_ATTR_3D_DEPTH, SID_ATTR_3D_DEPTH, \ +SID_ATTR_3D_PERCENT_DIAGONAL, SID_ATTR_3D_BACKSCALE \ + +// +// LatheObject: +#define SID_ATTR_3D_RANGE_LATHE \ +SID_ATTR_3D_RANGE_COMPOUND, \ +SID_ATTR_3D_HORZ_SEGS, SID_ATTR_3D_VERT_SEGS, \ +SID_ATTR_3D_PERCENT_DIAGONAL, SID_ATTR_3D_END_ANGLE \ + +// +// SphereObject: +#define SID_ATTR_3D_RANGE_SPHERE \ +SID_ATTR_3D_RANGE_COMPOUND, \ +SID_ATTR_3D_HORZ_SEGS, SID_ATTR_3D_VERT_SEGS \ + +// +// Spezieller Range fuer alle 3D-Objekte +#define SID_ATTR_3D_RANGE_OBJECT \ +SID_ATTR_3D_RANGE_COMPOUND, \ +SID_ATTR_3D_DEPTH, SID_ATTR_3D_DEPTH, \ +SID_ATTR_3D_HORZ_SEGS, SID_ATTR_3D_VERT_SEGS, \ +SID_ATTR_3D_PERCENT_DIAGONAL, SID_ATTR_3D_END_ANGLE \ + +#endif // #ifndef _SVX_SVXIDS_HRC + +// ******************************************************************* EOF + diff --git a/svx/inc/svx/svxitems.hrc b/svx/inc/svx/svxitems.hrc new file mode 100644 index 000000000000..5d554cf67ebf --- /dev/null +++ b/svx/inc/svx/svxitems.hrc @@ -0,0 +1,582 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxitems.hrc,v $ + * $Revision: 1.3.212.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVXITEMS_HRC +#define _SVXITEMS_HRC + +// include ------------------------------------------------------------------ + +#ifndef _SOLAR_HRC +#include <svl/solar.hrc> +#endif + +// BOOL --------------------------------------------------------------------- +#define RID_SVXITEMS_TRUE (RID_SVXITEMS_START + 0) +#define RID_SVXITEMS_FALSE (RID_SVXITEMS_START + 1) + +// Extras ------------------------------------------------------------------- +#define RID_SVXITEMS_EXTRAS_CHARCOLOR (RID_SVXITEMS_START + 2) + +// SvxSearchItem ------------------------------------------------------------ +// Kommando +#define RID_SVXITEMS_SEARCHCMD_BEGIN (RID_SVXITEMS_START + 10) +#define RID_SVXITEMS_SEARCHCMD_FIND (RID_SVXITEMS_START + 10) +#define RID_SVXITEMS_SEARCHCMD_FIND_ALL (RID_SVXITEMS_START + 11) +#define RID_SVXITEMS_SEARCHCMD_REPLACE (RID_SVXITEMS_START + 12) +#define RID_SVXITEMS_SEARCHCMD_REPLACE_ALL (RID_SVXITEMS_START + 13) +// Vorlagen +#define RID_SVXITEMS_SEARCHSTYLE_BEGIN (RID_SVXITEMS_START + 14) +#define RID_SVXITEMS_SEARCHSTYL_CHAR (RID_SVXITEMS_START + 14) +#define RID_SVXITEMS_SEARCHSTYL_PARA (RID_SVXITEMS_START + 15) +#define RID_SVXITEMS_SEARCHSTYL_FRAME (RID_SVXITEMS_START + 16) +#define RID_SVXITEMS_SEARCHSTYL_PAGE (RID_SVXITEMS_START + 17) +// Zellen-Typ +#define RID_SVXITEMS_SEARCHIN_BEGIN (RID_SVXITEMS_START + 20) +#define RID_SVXITEMS_SEARCHIN_FORMULA (RID_SVXITEMS_START + 20) +#define RID_SVXITEMS_SEARCHIN_VALUE (RID_SVXITEMS_START + 21) +#define RID_SVXITEMS_SEARCHIN_NOTE (RID_SVXITEMS_START + 22) +// Applikation +#define RID_SVXITEMS_SEARCHAPP_BEGIN (RID_SVXITEMS_START + 25) +#define RID_SVXITEMS_SEARCHAPP_WRITER (RID_SVXITEMS_START + 25) +#define RID_SVXITEMS_SEARCHAPP_CALC (RID_SVXITEMS_START + 26) +#define RID_SVXITEMS_SEARCHAPP_DRAW (RID_SVXITEMS_START + 27) +#define RID_SVXITEMS_SEARCHAPP_BASE (RID_SVXITEMS_START + 28) + +// enum SvxBreak ------------------------------------------------------------ +#define RID_SVXITEMS_BREAK_BEGIN (RID_SVXITEMS_START + 30) +#define RID_SVXITEMS_BREAK_NONE (RID_SVXITEMS_START + 30) +#define RID_SVXITEMS_BREAK_COLUMN_BEFORE (RID_SVXITEMS_START + 31) +#define RID_SVXITEMS_BREAK_COLUMN_AFTER (RID_SVXITEMS_START + 32) +#define RID_SVXITEMS_BREAK_COLUMN_BOTH (RID_SVXITEMS_START + 33) +#define RID_SVXITEMS_BREAK_PAGE_BEFORE (RID_SVXITEMS_START + 34) +#define RID_SVXITEMS_BREAK_PAGE_AFTER (RID_SVXITEMS_START + 35) +#define RID_SVXITEMS_BREAK_PAGE_BOTH (RID_SVXITEMS_START + 36) + +// enum SvxShadowLocation --------------------------------------------------- +#define RID_SVXITEMS_SHADOW_BEGIN (RID_SVXITEMS_START + 40) +#define RID_SVXITEMS_SHADOW_NONE (RID_SVXITEMS_START + 40) +#define RID_SVXITEMS_SHADOW_TOPLEFT (RID_SVXITEMS_START + 41) +#define RID_SVXITEMS_SHADOW_TOPRIGHT (RID_SVXITEMS_START + 42) +#define RID_SVXITEMS_SHADOW_BOTTOMLEFT (RID_SVXITEMS_START + 43) +#define RID_SVXITEMS_SHADOW_BOTTOMRIGHT (RID_SVXITEMS_START + 44) + +// enum BrushStyle ---------------------------------------------------------- +#define RID_SVXITEMS_BRUSHSTYLE_BEGIN (RID_SVXITEMS_START + 45) +#define RID_SVXITEMS_BRUSHSTYLE_NULL (RID_SVXITEMS_START + 45) +#define RID_SVXITEMS_BRUSHSTYLE_SOLID (RID_SVXITEMS_START + 46) +#define RID_SVXITEMS_BRUSHSTYLE_HORZ (RID_SVXITEMS_START + 47) +#define RID_SVXITEMS_BRUSHSTYLE_VERT (RID_SVXITEMS_START + 48) +#define RID_SVXITEMS_BRUSHSTYLE_CROSS (RID_SVXITEMS_START + 49) +#define RID_SVXITEMS_BRUSHSTYLE_DIAGCROSS (RID_SVXITEMS_START + 50) +#define RID_SVXITEMS_BRUSHSTYLE_UPDIAG (RID_SVXITEMS_START + 51) +#define RID_SVXITEMS_BRUSHSTYLE_DOWNDIAG (RID_SVXITEMS_START + 52) +#define RID_SVXITEMS_BRUSHSTYLE_25 (RID_SVXITEMS_START + 53) +#define RID_SVXITEMS_BRUSHSTYLE_50 (RID_SVXITEMS_START + 54) +#define RID_SVXITEMS_BRUSHSTYLE_75 (RID_SVXITEMS_START + 55) +#define RID_SVXITEMS_BRUSHSTYLE_BITMAP (RID_SVXITEMS_START + 56) + +// enum ColorName ----------------------------------------------------------- +#define RID_SVXITEMS_COLOR_BEGIN (RID_SVXITEMS_START + 60) +#define RID_SVXITEMS_COLOR (RID_SVXITEMS_START + 60) +#define RID_SVXITEMS_COLOR_BLACK (RID_SVXITEMS_START + 61) +#define RID_SVXITEMS_COLOR_BLUE (RID_SVXITEMS_START + 62) +#define RID_SVXITEMS_COLOR_GREEN (RID_SVXITEMS_START + 63) +#define RID_SVXITEMS_COLOR_CYAN (RID_SVXITEMS_START + 64) +#define RID_SVXITEMS_COLOR_RED (RID_SVXITEMS_START + 65) +#define RID_SVXITEMS_COLOR_MAGENTA (RID_SVXITEMS_START + 66) +#define RID_SVXITEMS_COLOR_BROWN (RID_SVXITEMS_START + 67) +#define RID_SVXITEMS_COLOR_GRAY (RID_SVXITEMS_START + 68) +#define RID_SVXITEMS_COLOR_LIGHTGRAY (RID_SVXITEMS_START + 69) +#define RID_SVXITEMS_COLOR_LIGHTBLUE (RID_SVXITEMS_START + 70) +#define RID_SVXITEMS_COLOR_LIGHTGREEN (RID_SVXITEMS_START + 71) +#define RID_SVXITEMS_COLOR_LIGHTCYAN (RID_SVXITEMS_START + 72) +#define RID_SVXITEMS_COLOR_LIGHTRED (RID_SVXITEMS_START + 73) +#define RID_SVXITEMS_COLOR_LIGHTMAGENTA (RID_SVXITEMS_START + 74) +#define RID_SVXITEMS_COLOR_YELLOW (RID_SVXITEMS_START + 75) +#define RID_SVXITEMS_COLOR_WHITE (RID_SVXITEMS_START + 76) +#define RID_SVXITEMS_COLOR_MENUBAR (RID_SVXITEMS_START + 77) +#define RID_SVXITEMS_COLOR_MENUBARTEXT (RID_SVXITEMS_START + 78) +#define RID_SVXITEMS_COLOR_POPUPMENU (RID_SVXITEMS_START + 79) +#define RID_SVXITEMS_COLOR_POPUPMENUTEXT (RID_SVXITEMS_START + 80) +#define RID_SVXITEMS_COLOR_WINDOWTEXT (RID_SVXITEMS_START + 81) +#define RID_SVXITEMS_COLOR_WINDOWWORKSPACE (RID_SVXITEMS_START + 82) +#define RID_SVXITEMS_COLOR_HIGHLIGHT (RID_SVXITEMS_START + 83) +#define RID_SVXITEMS_COLOR_HIGHLIGHTTEXT (RID_SVXITEMS_START + 84) +#define RID_SVXITEMS_COLOR_3DTEXT (RID_SVXITEMS_START + 85) +#define RID_SVXITEMS_COLOR_3DFACE (RID_SVXITEMS_START + 86) +#define RID_SVXITEMS_COLOR_3DLIGHT (RID_SVXITEMS_START + 87) +#define RID_SVXITEMS_COLOR_3DSHADOW (RID_SVXITEMS_START + 88) +#define RID_SVXITEMS_COLOR_SCROLLBAR (RID_SVXITEMS_START + 89) +#define RID_SVXITEMS_COLOR_FIELD (RID_SVXITEMS_START + 90) +#define RID_SVXITEMS_COLOR_FIELDTEXT (RID_SVXITEMS_START + 91) + +// enum FontFamily ------------------------------------------------------- +#define RID_SVXITEMS_FONTFAMILY_BEGIN (RID_SVXITEMS_START + 100) +#define RID_SVXITEMS_FONTFAMILY_DONTKNOW (RID_SVXITEMS_START + 100) +#define RID_SVXITEMS_FONTFAMILY_DECORATIVE (RID_SVXITEMS_START + 101) +#define RID_SVXITEMS_FONTFAMILY_MODERN (RID_SVXITEMS_START + 102) +#define RID_SVXITEMS_FONTFAMILY_ROMAN (RID_SVXITEMS_START + 103) +#define RID_SVXITEMS_FONTFAMILY_SCRIPT (RID_SVXITEMS_START + 104) +#define RID_SVXITEMS_FONTFAMILY_SWISS (RID_SVXITEMS_START + 105) +#define RID_SVXITEMS_FONTFAMILY_SYSTEM (RID_SVXITEMS_START + 106) + +// enum FontPitch -------------------------------------------------------- +#define RID_SVXITEMS_FONTPITCH_BEGIN (RID_SVXITEMS_START + 110) +#define RID_SVXITEMS_FONTPITCH_DONTKNOW (RID_SVXITEMS_START + 110) +#define RID_SVXITEMS_FONTPITCH_FIXED (RID_SVXITEMS_START + 111) +#define RID_SVXITEMS_FONTPITCH_VARIABLE (RID_SVXITEMS_START + 112) + +// enum FontItalic ------------------------------------------------------- +#define RID_SVXITEMS_ITALIC_BEGIN (RID_SVXITEMS_START + 115) +#define RID_SVXITEMS_ITALIC_NONE (RID_SVXITEMS_START + 115) +#define RID_SVXITEMS_ITALIC_OBLIQUE (RID_SVXITEMS_START + 116) +#define RID_SVXITEMS_ITALIC_NORMAL (RID_SVXITEMS_START + 117) + +// enum FontWeight ------------------------------------------------------- +#define RID_SVXITEMS_WEIGHT_BEGIN (RID_SVXITEMS_START + 120) +#define RID_SVXITEMS_WEIGHT_DONTKNOW (RID_SVXITEMS_START + 120) +#define RID_SVXITEMS_WEIGHT_THIN (RID_SVXITEMS_START + 121) +#define RID_SVXITEMS_WEIGHT_ULTRALIGHT (RID_SVXITEMS_START + 122) +#define RID_SVXITEMS_WEIGHT_LIGHT (RID_SVXITEMS_START + 123) +#define RID_SVXITEMS_WEIGHT_SEMILIGHT (RID_SVXITEMS_START + 124) +#define RID_SVXITEMS_WEIGHT_NORMAL (RID_SVXITEMS_START + 125) +#define RID_SVXITEMS_WEIGHT_MEDIUM (RID_SVXITEMS_START + 126) +#define RID_SVXITEMS_WEIGHT_SEMIBOLD (RID_SVXITEMS_START + 127) +#define RID_SVXITEMS_WEIGHT_BOLD (RID_SVXITEMS_START + 128) +#define RID_SVXITEMS_WEIGHT_ULTRABOLD (RID_SVXITEMS_START + 129) +#define RID_SVXITEMS_WEIGHT_BLACK (RID_SVXITEMS_START + 130) + +// enum FontStrikeout ---------------------------------------------------- +#define RID_SVXITEMS_STRIKEOUT_BEGIN (RID_SVXITEMS_START + 135) +#define RID_SVXITEMS_STRIKEOUT_NONE (RID_SVXITEMS_START + 135) +#define RID_SVXITEMS_STRIKEOUT_SINGLE (RID_SVXITEMS_START + 136) +#define RID_SVXITEMS_STRIKEOUT_DOUBLE (RID_SVXITEMS_START + 137) +#define RID_SVXITEMS_STRIKEOUT_DONTKNOW (RID_SVXITEMS_START + 138) +#define RID_SVXITEMS_STRIKEOUT_BOLD (RID_SVXITEMS_START + 139) +#define RID_SVXITEMS_STRIKEOUT_SLASH (RID_SVXITEMS_START + 140) +#define RID_SVXITEMS_STRIKEOUT_X (RID_SVXITEMS_START + 141) + +// enum CharSet ---------------------------------------------------------- +#define RID_SVXITEMS_CHARSET_BEGIN (RID_SVXITEMS_START + 145) +#define RID_SVXITEMS_CHARSET_DONTKNOW (RID_SVXITEMS_START + 145) +#define RID_SVXITEMS_CHARSET_ANSI (RID_SVXITEMS_START + 146) +#define RID_SVXITEMS_CHARSET_MAC (RID_SVXITEMS_START + 147) +#define RID_SVXITEMS_CHARSET_IBMPC_437 (RID_SVXITEMS_START + 148) +#define RID_SVXITEMS_CHARSET_IBMPC_850 (RID_SVXITEMS_START + 149) +#define RID_SVXITEMS_CHARSET_IBMPC_860 (RID_SVXITEMS_START + 150) +#define RID_SVXITEMS_CHARSET_IBMPC_861 (RID_SVXITEMS_START + 151) +#define RID_SVXITEMS_CHARSET_IBMPC_863 (RID_SVXITEMS_START + 152) +#define RID_SVXITEMS_CHARSET_IBMPC_865 (RID_SVXITEMS_START + 153) +#define RID_SVXITEMS_CHARSET_SYSTEM (RID_SVXITEMS_START + 154) +#define RID_SVXITEMS_CHARSET_SYMBOL (RID_SVXITEMS_START + 155) + +// enum CASEMAP ---------------------------------------------------------- +#define RID_SVXITEMS_CASEMAP_BEGIN (RID_SVXITEMS_START + 160) +#define RID_SVXITEMS_CASEMAP_NONE (RID_SVXITEMS_START + 160) +#define RID_SVXITEMS_CASEMAP_VERSALIEN (RID_SVXITEMS_START + 161) +#define RID_SVXITEMS_CASEMAP_GEMEINE (RID_SVXITEMS_START + 162) +#define RID_SVXITEMS_CASEMAP_TITEL (RID_SVXITEMS_START + 163) +#define RID_SVXITEMS_CASEMAP_KAPITAELCHEN (RID_SVXITEMS_START + 164) + +// enum ESCAPEMENT ------------------------------------------------------- +#define RID_SVXITEMS_ESCAPEMENT_BEGIN (RID_SVXITEMS_START + 166) +#define RID_SVXITEMS_ESCAPEMENT_OFF (RID_SVXITEMS_START + 166) +#define RID_SVXITEMS_ESCAPEMENT_SUPER (RID_SVXITEMS_START + 167) +#define RID_SVXITEMS_ESCAPEMENT_SUB (RID_SVXITEMS_START + 168) +#define RID_SVXITEMS_ESCAPEMENT_AUTO (RID_SVXITEMS_START + 169) + +// enum FontUnderline - used for underline ------------------------------- +#define RID_SVXITEMS_UL_BEGIN (RID_SVXITEMS_START + 170) +#define RID_SVXITEMS_UL_NONE (RID_SVXITEMS_START + 170) +#define RID_SVXITEMS_UL_SINGLE (RID_SVXITEMS_START + 171) +#define RID_SVXITEMS_UL_DOUBLE (RID_SVXITEMS_START + 172) +#define RID_SVXITEMS_UL_DOTTED (RID_SVXITEMS_START + 173) +#define RID_SVXITEMS_UL_DONTKNOW (RID_SVXITEMS_START + 174) +#define RID_SVXITEMS_UL_DASH (RID_SVXITEMS_START + 175) +#define RID_SVXITEMS_UL_LONGDASH (RID_SVXITEMS_START + 176) +#define RID_SVXITEMS_UL_DASHDOT (RID_SVXITEMS_START + 177) +#define RID_SVXITEMS_UL_DASHDOTDOT (RID_SVXITEMS_START + 178) +#define RID_SVXITEMS_UL_SMALLWAVE (RID_SVXITEMS_START + 179) +#define RID_SVXITEMS_UL_WAVE (RID_SVXITEMS_START + 180) +#define RID_SVXITEMS_UL_DOUBLEWAVE (RID_SVXITEMS_START + 181) +#define RID_SVXITEMS_UL_BOLD (RID_SVXITEMS_START + 182) +#define RID_SVXITEMS_UL_BOLDDOTTED (RID_SVXITEMS_START + 183) +#define RID_SVXITEMS_UL_BOLDDASH (RID_SVXITEMS_START + 184) +#define RID_SVXITEMS_UL_BOLDLONGDASH (RID_SVXITEMS_START + 185) +#define RID_SVXITEMS_UL_BOLDDASHDOT (RID_SVXITEMS_START + 186) +#define RID_SVXITEMS_UL_BOLDDASHDOTDOT (RID_SVXITEMS_START + 187) +#define RID_SVXITEMS_UL_BOLDWAVE (RID_SVXITEMS_START + 188) + +// enum FontUnderline - used for overline -------------------------------- +#define RID_SVXITEMS_OL_BEGIN (RID_SVXITEMS_START + 200) +#define RID_SVXITEMS_OL_NONE (RID_SVXITEMS_START + 200) +#define RID_SVXITEMS_OL_SINGLE (RID_SVXITEMS_START + 201) +#define RID_SVXITEMS_OL_DOUBLE (RID_SVXITEMS_START + 202) +#define RID_SVXITEMS_OL_DOTTED (RID_SVXITEMS_START + 203) +#define RID_SVXITEMS_OL_DONTKNOW (RID_SVXITEMS_START + 204) +#define RID_SVXITEMS_OL_DASH (RID_SVXITEMS_START + 205) +#define RID_SVXITEMS_OL_LONGDASH (RID_SVXITEMS_START + 206) +#define RID_SVXITEMS_OL_DASHDOT (RID_SVXITEMS_START + 207) +#define RID_SVXITEMS_OL_DASHDOTDOT (RID_SVXITEMS_START + 208) +#define RID_SVXITEMS_OL_SMALLWAVE (RID_SVXITEMS_START + 209) +#define RID_SVXITEMS_OL_WAVE (RID_SVXITEMS_START + 210) +#define RID_SVXITEMS_OL_DOUBLEWAVE (RID_SVXITEMS_START + 211) +#define RID_SVXITEMS_OL_BOLD (RID_SVXITEMS_START + 212) +#define RID_SVXITEMS_OL_BOLDDOTTED (RID_SVXITEMS_START + 213) +#define RID_SVXITEMS_OL_BOLDDASH (RID_SVXITEMS_START + 214) +#define RID_SVXITEMS_OL_BOLDLONGDASH (RID_SVXITEMS_START + 215) +#define RID_SVXITEMS_OL_BOLDDASHDOT (RID_SVXITEMS_START + 216) +#define RID_SVXITEMS_OL_BOLDDASHDOTDOT (RID_SVXITEMS_START + 217) +#define RID_SVXITEMS_OL_BOLDWAVE (RID_SVXITEMS_START + 218) + +// enum SvxAdjust ----------------------------------------------------------- +#define RID_SVXITEMS_ADJUST_BEGIN (RID_SVXITEMS_START + 230) +#define RID_SVXITEMS_ADJUST_LEFT (RID_SVXITEMS_START + 230) +#define RID_SVXITEMS_ADJUST_RIGHT (RID_SVXITEMS_START + 231) +#define RID_SVXITEMS_ADJUST_BLOCK (RID_SVXITEMS_START + 232) +#define RID_SVXITEMS_ADJUST_CENTER (RID_SVXITEMS_START + 233) +#define RID_SVXITEMS_ADJUST_BLOCKLINE (RID_SVXITEMS_START + 234) + +// enum SvxAdjust ----------------------------------------------------------- +#define RID_SVXITEMS_TAB_DECIMAL_CHAR (RID_SVXITEMS_START + 243) +#define RID_SVXITEMS_TAB_FILL_CHAR (RID_SVXITEMS_START + 244) +#define RID_SVXITEMS_TAB_ADJUST_BEGIN (RID_SVXITEMS_START + 245) +#define RID_SVXITEMS_TAB_ADJUST_LEFT (RID_SVXITEMS_START + 245) +#define RID_SVXITEMS_TAB_ADJUST_RIGHT (RID_SVXITEMS_START + 246) +#define RID_SVXITEMS_TAB_ADJUST_DECIMAL (RID_SVXITEMS_START + 247) +#define RID_SVXITEMS_TAB_ADJUST_CENTER (RID_SVXITEMS_START + 248) +#define RID_SVXITEMS_TAB_ADJUST_DEFAULT (RID_SVXITEMS_START + 249) + +// type names of slots; needed for attribute list on search & replace dialogue +#define RID_ATTR_BEGIN (RID_SVXITEMS_START + 250) +#define RID_ATTR_ZOOM (RID_ATTR_BEGIN + 0) +#define RID_ATTR_BRUSH (RID_ATTR_BEGIN + 1) +#define RID_ATTR_TABSTOP (RID_ATTR_BEGIN + 2) +#define RID_ATTR_TABSTOP_DEFAULTS (RID_ATTR_BEGIN + 3) +#define RID_ATTR_TABSTOP_POS (RID_ATTR_BEGIN + 4) +#define RID_ATTR_TABSTOP_OFFSET (RID_ATTR_BEGIN + 5) +#define RID_ATTR_CHAR (RID_ATTR_BEGIN + 6) +#define RID_ATTR_CHAR_FONT (RID_ATTR_BEGIN + 7) +#define RID_ATTR_CHAR_POSTURE (RID_ATTR_BEGIN + 8) +#define RID_ATTR_CHAR_WEIGHT (RID_ATTR_BEGIN + 9) +#define RID_ATTR_CHAR_SHADOWED (RID_ATTR_BEGIN + 10) +#define RID_ATTR_CHAR_WORDLINEMODE (RID_ATTR_BEGIN + 11) +#define RID_ATTR_CHAR_CONTOUR (RID_ATTR_BEGIN + 12) +#define RID_ATTR_CHAR_STRIKEOUT (RID_ATTR_BEGIN + 13) +#define RID_ATTR_CHAR_UNDERLINE (RID_ATTR_BEGIN + 14) +#define RID_ATTR_CHAR_FONTHEIGHT (RID_ATTR_BEGIN + 15) +#define RID_ATTR_CHAR_PROPSIZE (RID_ATTR_BEGIN + 16) +#define RID_ATTR_CHAR_COLOR (RID_ATTR_BEGIN + 17) +#define RID_ATTR_CHAR_KERNING (RID_ATTR_BEGIN + 18) +#define RID_ATTR_CHAR_CASEMAP (RID_ATTR_BEGIN + 19) +#define RID_ATTR_CHAR_LANGUAGE (RID_ATTR_BEGIN + 20) +#define RID_ATTR_CHAR_ESCAPEMENT (RID_ATTR_BEGIN + 21) +#define RID_ATTR_CHAR_FONTLIST (RID_ATTR_BEGIN + 22) +#define RID_ATTR_BORDER_INNER (RID_ATTR_BEGIN + 23) +#define RID_ATTR_BORDER_OUTER (RID_ATTR_BEGIN + 24) +#define RID_ATTR_BORDER_SHADOW (RID_ATTR_BEGIN + 25) +#define RID_ATTR_PARA (RID_ATTR_BEGIN + 26) +#define RID_ATTR_PARA_ADJUST (RID_ATTR_BEGIN + 27) +#define RID_ATTR_PARA_ADJUST_LEFT (RID_ATTR_BEGIN + 28) +#define RID_ATTR_PARA_ADJUST_RIGHT (RID_ATTR_BEGIN + 29) +#define RID_ATTR_PARA_ADJUST_CENTER (RID_ATTR_BEGIN + 30) +#define RID_ATTR_PARA_ADJUST_BLOCK (RID_ATTR_BEGIN + 31) +#define RID_ATTR_PARA_ADJUST_BLOCKLINE (RID_ATTR_BEGIN + 32) +#define RID_ATTR_PARA_LINESPACE (RID_ATTR_BEGIN + 33) +#define RID_ATTR_PARA_LINESPACE_10 (RID_ATTR_BEGIN + 34) +#define RID_ATTR_PARA_LINESPACE_15 (RID_ATTR_BEGIN + 35) +#define RID_ATTR_PARA_LINESPACE_20 (RID_ATTR_BEGIN + 36) +#define RID_ATTR_PARA_PAGEBREAK (RID_ATTR_BEGIN + 37) +#define RID_ATTR_PARA_HYPHENZONE (RID_ATTR_BEGIN + 38) +#define RID_ATTR_PARA_SPLIT (RID_ATTR_BEGIN + 39) +#define RID_ATTR_PARA_WIDOWS (RID_ATTR_BEGIN + 40) +#define RID_ATTR_PARA_ORPHANS (RID_ATTR_BEGIN + 41) +#define RID_ATTR_PARA_ULSPACE (RID_ATTR_BEGIN + 42) +#define RID_ATTR_PARA_LRSPACE (RID_ATTR_BEGIN + 43) +#define RID_ATTR_POSTIT_AUTHOR (RID_ATTR_BEGIN + 44) +#define RID_ATTR_POSTIT_DATE (RID_ATTR_BEGIN + 45) +#define RID_ATTR_POSTIT_TEXT (RID_ATTR_BEGIN + 46) +#define RID_ATTR_SEARCH (RID_ATTR_BEGIN + 47) +#define RID_ATTR_LRSPACE (RID_ATTR_BEGIN + 48) +#define RID_ATTR_ULSPACE (RID_ATTR_BEGIN + 49) +#define RID_ATTR_PAGE (RID_ATTR_BEGIN + 50) +#define RID_ATTR_PAGE_SIZE (RID_ATTR_BEGIN + 51) +#define RID_ATTR_PAGE_MAXSIZE (RID_ATTR_BEGIN + 52) +#define RID_ATTR_PAGE_PAPERTRAY (RID_ATTR_BEGIN + 53) +#define RID_ATTR_PAGE_PAPERBIN (RID_ATTR_BEGIN + 54) +#define RID_ATTR_PAGE_APP (RID_ATTR_BEGIN + 55) +#define RID_ATTR_PAGE_EXT1 (RID_ATTR_BEGIN + 56) +#define RID_ATTR_PAGE_EXT2 (RID_ATTR_BEGIN + 57) +#define RID_ATTR_PAGE_HEADERSET (RID_ATTR_BEGIN + 58) +#define RID_ATTR_PAGE_FOOTERSET (RID_ATTR_BEGIN + 59) +#define RID_ATTR_PAGE_ON (RID_ATTR_BEGIN + 60) +#define RID_ATTR_PAGE_DYNAMIC (RID_ATTR_BEGIN + 61) +#define RID_ATTR_PAGE_SHARED (RID_ATTR_BEGIN + 62) +#define RID_ATTR_PAGE_BSP (RID_ATTR_BEGIN + 63) +#define RID_ATTR_CHAR_MAPTYPE (RID_ATTR_BEGIN + 64) +#define RID_ATTR_PARA_MODEL (RID_ATTR_BEGIN + 65) +#define RID_ATTR_PARA_KEEP (RID_ATTR_BEGIN + 66) +#define RID_ATTR_CHAR_BLINK (RID_ATTR_BEGIN + 67) +#define RID_ATTR_CHAR_CHARSETCOLOR (RID_ATTR_BEGIN + 68) +#define RID_ATTR_CHAR_OVERLINE (RID_ATTR_BEGIN + 69) + +#define RID_ATTR_FLASH (RID_ATTR_BEGIN + 406) +#define RID_ATTR_PARA_REGISTER (RID_ATTR_BEGIN + 413) +#define RID_ATTR_BRUSH_CHAR (RID_ATTR_BEGIN + 591) + +#define RID_ATTR_CHAR_CJK_FONT (RID_ATTR_BEGIN + 887) +#define RID_ATTR_CHAR_CJK_FONTHEIGHT (RID_ATTR_BEGIN + 888) +#define RID_ATTR_CHAR_CJK_LANGUAGE (RID_ATTR_BEGIN + 889) +#define RID_ATTR_CHAR_CJK_POSTURE (RID_ATTR_BEGIN + 890) +#define RID_ATTR_CHAR_CJK_WEIGHT (RID_ATTR_BEGIN + 891) +#define RID_ATTR_CHAR_CTL_FONT (RID_ATTR_BEGIN + 892) +#define RID_ATTR_CHAR_CTL_FONTHEIGHT (RID_ATTR_BEGIN + 893) +#define RID_ATTR_CHAR_CTL_LANGUAGE (RID_ATTR_BEGIN + 894) +#define RID_ATTR_CHAR_CTL_POSTURE (RID_ATTR_BEGIN + 895) +#define RID_ATTR_CHAR_CTL_WEIGHT (RID_ATTR_BEGIN + 896) +#define RID_ATTR_CHAR_TWO_LINES (RID_ATTR_BEGIN + 897) +#define RID_ATTR_CHAR_EMPHASISMARK (RID_ATTR_BEGIN + 899) + +#define RID_ATTR_PARA_SCRIPTSPACE (RID_ATTR_BEGIN + 901) +#define RID_ATTR_PARA_HANGPUNCTUATION (RID_ATTR_BEGIN + 902) +#define RID_ATTR_PARA_FORBIDDEN_RULES (RID_ATTR_BEGIN + 903) +#define RID_ATTR_CHAR_ROTATED (RID_ATTR_BEGIN + 910) +#define RID_ATTR_CHAR_SCALEWIDTH (RID_ATTR_BEGIN + 911) +#define RID_ATTR_CHAR_RELIEF (RID_ATTR_BEGIN + 920) +#define RID_PARA_VERTALIGN (RID_ATTR_BEGIN + 925) + + +// Umrandungslinien +#define RID_SINGLE_LINE0 (RID_SVXITEMS_START + 360) +#define RID_SINGLE_LINE1 (RID_SVXITEMS_START + 361) +#define RID_SINGLE_LINE2 (RID_SVXITEMS_START + 362) +#define RID_SINGLE_LINE3 (RID_SVXITEMS_START + 363) +#define RID_SINGLE_LINE4 (RID_SVXITEMS_START + 364) +#define RID_DOUBLE_LINE0 (RID_SVXITEMS_START + 365) +#define RID_DOUBLE_LINE1 (RID_SVXITEMS_START + 366) +#define RID_DOUBLE_LINE2 (RID_SVXITEMS_START + 367) +#define RID_DOUBLE_LINE3 (RID_SVXITEMS_START + 368) +#define RID_DOUBLE_LINE4 (RID_SVXITEMS_START + 369) +#define RID_DOUBLE_LINE5 (RID_SVXITEMS_START + 370) +#define RID_DOUBLE_LINE6 (RID_SVXITEMS_START + 371) +#define RID_DOUBLE_LINE7 (RID_SVXITEMS_START + 372) +#define RID_DOUBLE_LINE8 (RID_SVXITEMS_START + 373) +#define RID_DOUBLE_LINE9 (RID_SVXITEMS_START + 374) +#define RID_DOUBLE_LINE10 (RID_SVXITEMS_START + 375) + +// Metric-Texte +#define RID_SVXITEMS_METRIC_MM (RID_SVXITEMS_START + 380) +#define RID_SVXITEMS_METRIC_CM (RID_SVXITEMS_START + 381) +#define RID_SVXITEMS_METRIC_INCH (RID_SVXITEMS_START + 382) +#define RID_SVXITEMS_METRIC_POINT (RID_SVXITEMS_START + 383) +#define RID_SVXITEMS_METRIC_TWIP (RID_SVXITEMS_START + 384) +#define RID_SVXITEMS_METRIC_PIXEL (RID_SVXITEMS_START + 385) + +// enum SvxCellHorJustify +#define RID_SVXITEMS_HORJUST_STANDARD (RID_SVXITEMS_START + 400) +#define RID_SVXITEMS_HORJUST_LEFT (RID_SVXITEMS_START + 401) +#define RID_SVXITEMS_HORJUST_CENTER (RID_SVXITEMS_START + 402) +#define RID_SVXITEMS_HORJUST_RIGHT (RID_SVXITEMS_START + 403) +#define RID_SVXITEMS_HORJUST_BLOCK (RID_SVXITEMS_START + 404) +#define RID_SVXITEMS_HORJUST_REPEAT (RID_SVXITEMS_START + 405) + +// enum SvxCellVerJustify +#define RID_SVXITEMS_VERJUST_STANDARD (RID_SVXITEMS_START + 406) +#define RID_SVXITEMS_VERJUST_TOP (RID_SVXITEMS_START + 407) +#define RID_SVXITEMS_VERJUST_CENTER (RID_SVXITEMS_START + 408) +#define RID_SVXITEMS_VERJUST_BOTTOM (RID_SVXITEMS_START + 409) + +// enum SvxCellOrientation +#define RID_SVXITEMS_ORI_STANDARD (RID_SVXITEMS_START + 410) +#define RID_SVXITEMS_ORI_TOPBOTTOM (RID_SVXITEMS_START + 411) +#define RID_SVXITEMS_ORI_BOTTOMTOP (RID_SVXITEMS_START + 412) +#define RID_SVXITEMS_ORI_STACKED (RID_SVXITEMS_START + 413) + +// Id's fuer BoolItems +#define RID_SVXITEMS_SHADOWED_TRUE (RID_SVXITEMS_START + 415) +#define RID_SVXITEMS_SHADOWED_FALSE (RID_SVXITEMS_START + 416) +#define RID_SVXITEMS_AUTOKERN_TRUE (RID_SVXITEMS_START + 417) +#define RID_SVXITEMS_AUTOKERN_FALSE (RID_SVXITEMS_START + 418) +#define RID_SVXITEMS_WORDLINE_TRUE (RID_SVXITEMS_START + 419) +#define RID_SVXITEMS_WORDLINE_FALSE (RID_SVXITEMS_START + 420) +#define RID_SVXITEMS_CONTOUR_TRUE (RID_SVXITEMS_START + 421) +#define RID_SVXITEMS_CONTOUR_FALSE (RID_SVXITEMS_START + 422) +#define RID_SVXITEMS_NOLINEBREAK_TRUE (RID_SVXITEMS_START + 423) +#define RID_SVXITEMS_NOLINEBREAK_FALSE (RID_SVXITEMS_START + 424) +#define RID_SVXITEMS_NOHYPHEN_TRUE (RID_SVXITEMS_START + 425) +#define RID_SVXITEMS_NOHYPHEN_FALSE (RID_SVXITEMS_START + 426) +#define RID_SVXITEMS_PRINT_TRUE (RID_SVXITEMS_START + 427) +#define RID_SVXITEMS_PRINT_FALSE (RID_SVXITEMS_START + 428) +#define RID_SVXITEMS_OPAQUE_TRUE (RID_SVXITEMS_START + 429) +#define RID_SVXITEMS_OPAQUE_FALSE (RID_SVXITEMS_START + 430) +#define RID_SVXITEMS_FMTKEEP_TRUE (RID_SVXITEMS_START + 431) +#define RID_SVXITEMS_FMTKEEP_FALSE (RID_SVXITEMS_START + 432) +#define RID_SVXITEMS_FMTSPLIT_TRUE (RID_SVXITEMS_START + 433) +#define RID_SVXITEMS_FMTSPLIT_FALSE (RID_SVXITEMS_START + 434) +#define RID_SVXITEMS_PROT_CONTENT_TRUE (RID_SVXITEMS_START + 435) +#define RID_SVXITEMS_PROT_CONTENT_FALSE (RID_SVXITEMS_START + 436) +#define RID_SVXITEMS_PROT_SIZE_TRUE (RID_SVXITEMS_START + 437) +#define RID_SVXITEMS_PROT_SIZE_FALSE (RID_SVXITEMS_START + 438) +#define RID_SVXITEMS_PROT_POS_TRUE (RID_SVXITEMS_START + 439) +#define RID_SVXITEMS_PROT_POS_FALSE (RID_SVXITEMS_START + 440) +#define RID_SVXITEMS_TRANSPARENT_TRUE (RID_SVXITEMS_START + 441) +#define RID_SVXITEMS_TRANSPARENT_FALSE (RID_SVXITEMS_START + 442) +#define RID_SVXITEMS_BOXINF_TABLE_TRUE (RID_SVXITEMS_START + 443) +#define RID_SVXITEMS_BOXINF_TABLE_FALSE (RID_SVXITEMS_START + 444) +#define RID_SVXITEMS_BOXINF_DIST_TRUE (RID_SVXITEMS_START + 445) +#define RID_SVXITEMS_BOXINF_DIST_FALSE (RID_SVXITEMS_START + 446) +#define RID_SVXITEMS_BOXINF_MDIST_TRUE (RID_SVXITEMS_START + 447) +#define RID_SVXITEMS_BOXINF_MDIST_FALSE (RID_SVXITEMS_START + 448) +#define RID_SVXITEMS_HYPHEN_TRUE (RID_SVXITEMS_START + 449) +#define RID_SVXITEMS_HYPHEN_FALSE (RID_SVXITEMS_START + 450) +#define RID_SVXITEMS_PAGE_END_TRUE (RID_SVXITEMS_START + 451) +#define RID_SVXITEMS_PAGE_END_FALSE (RID_SVXITEMS_START + 452) +#define RID_SVXITEMS_BLINK_TRUE (RID_SVXITEMS_START + 453) +#define RID_SVXITEMS_BLINK_FALSE (RID_SVXITEMS_START + 454) + +// Complete-Texte ----------------------------------------------------------- + +#define RID_SVXITEMS_MARGIN_LEFT (RID_SVXITEMS_START + 480) +#define RID_SVXITEMS_MARGIN_TOP (RID_SVXITEMS_START + 481) +#define RID_SVXITEMS_MARGIN_RIGHT (RID_SVXITEMS_START + 482) +#define RID_SVXITEMS_MARGIN_BOTTOM (RID_SVXITEMS_START + 483) +#define RID_SVXITEMS_SIZE_WIDTH (RID_SVXITEMS_START + 484) +#define RID_SVXITEMS_SIZE_HEIGHT (RID_SVXITEMS_START + 485) +#define RID_SVXITEMS_LRSPACE_LEFT (RID_SVXITEMS_START + 486) +#define RID_SVXITEMS_LRSPACE_FLINE (RID_SVXITEMS_START + 487) +#define RID_SVXITEMS_LRSPACE_RIGHT (RID_SVXITEMS_START + 488) +#define RID_SVXITEMS_SHADOW_COMPLETE (RID_SVXITEMS_START + 489) +#define RID_SVXITEMS_BORDER_COMPLETE (RID_SVXITEMS_START + 490) +#define RID_SVXITEMS_BORDER_TOP (RID_SVXITEMS_START + 491) +#define RID_SVXITEMS_BORDER_BOTTOM (RID_SVXITEMS_START + 492) +#define RID_SVXITEMS_BORDER_LEFT (RID_SVXITEMS_START + 493) +#define RID_SVXITEMS_BORDER_RIGHT (RID_SVXITEMS_START + 494) +#define RID_SVXITEMS_BORDER_DISTANCE (RID_SVXITEMS_START + 495) +#define RID_SVXITEMS_ULSPACE_UPPER (RID_SVXITEMS_START + 496) +#define RID_SVXITEMS_ULSPACE_LOWER (RID_SVXITEMS_START + 497) +#define RID_SVXITEMS_PAGE_COMPLETE (RID_SVXITEMS_START + 498) +#define RID_SVXITEMS_PAGE_NUM_BEGIN (RID_SVXITEMS_START + 499) +#define RID_SVXITEMS_PAGE_NUM_CHR_UPPER (RID_SVXITEMS_START + 499) +#define RID_SVXITEMS_PAGE_NUM_CHR_LOWER (RID_SVXITEMS_START + 500) +#define RID_SVXITEMS_PAGE_NUM_ROM_UPPER (RID_SVXITEMS_START + 501) +#define RID_SVXITEMS_PAGE_NUM_ROM_LOWER (RID_SVXITEMS_START + 502) +#define RID_SVXITEMS_PAGE_NUM_ARABIC (RID_SVXITEMS_START + 503) +#define RID_SVXITEMS_PAGE_NUM_NONE (RID_SVXITEMS_START + 504) +#define RID_SVXITEMS_PAGE_LAND_TRUE (RID_SVXITEMS_START + 505) +#define RID_SVXITEMS_PAGE_LAND_FALSE (RID_SVXITEMS_START + 506) +#define RID_SVXITEMS_PAGE_USAGE_LEFT (RID_SVXITEMS_START + 507) +#define RID_SVXITEMS_PAGE_USAGE_RIGHT (RID_SVXITEMS_START + 508) +#define RID_SVXITEMS_PAGE_USAGE_ALL (RID_SVXITEMS_START + 509) +#define RID_SVXITEMS_PAGE_USAGE_MIRROR (RID_SVXITEMS_START + 510) +#define RID_SVXITEMS_LINES (RID_SVXITEMS_START + 511) +#define RID_SVXITEMS_WIDOWS_COMPLETE (RID_SVXITEMS_START + 512) +#define RID_SVXITEMS_ORPHANS_COMPLETE (RID_SVXITEMS_START + 513) +#define RID_SVXITEMS_HYPHEN_MINLEAD (RID_SVXITEMS_START + 514) +#define RID_SVXITEMS_HYPHEN_MINTRAIL (RID_SVXITEMS_START + 515) +#define RID_SVXITEMS_HYPHEN_MAX (RID_SVXITEMS_START + 516) +#define RID_SVXITEMS_PAGEMODEL_COMPLETE (RID_SVXITEMS_START + 517) +#define RID_SVXITEMS_KERNING_COMPLETE (RID_SVXITEMS_START + 518) +#define RID_SVXITEMS_KERNING_EXPANDED (RID_SVXITEMS_START + 519) +#define RID_SVXITEMS_KERNING_CONDENSED (RID_SVXITEMS_START + 520) +#define RID_SVXITEMS_AUTHOR_COMPLETE (RID_SVXITEMS_START + 521) +#define RID_SVXITEMS_DATE_COMPLETE (RID_SVXITEMS_START + 522) +#define RID_SVXITEMS_TEXT_COMPLETE (RID_SVXITEMS_START + 523) +#define RID_SVXITEMS_BACKGROUND_COLOR (RID_SVXITEMS_START + 524) +#define RID_SVXITEMS_PATTERN_COLOR (RID_SVXITEMS_START + 525) + +#define RID_SVXITEMS_GRAPHIC (RID_SVXITEMS_START + 526) +#define RID_SVXITEMS_BRUSH_CHAR (RID_SVXITEMS_START + 527) +#define RID_SVXITEMS_BORDER_NONE (RID_SVXITEMS_START + 528) + +// enum FontEmphasisMark --------------------------------------------------- +#define RID_SVXITEMS_EMPHASIS_BEGIN_STYLE (RID_SVXITEMS_START + 530) +#define RID_SVXITEMS_EMPHASIS_NONE_STYLE (RID_SVXITEMS_START + 530) +#define RID_SVXITEMS_EMPHASIS_DOT_STYLE (RID_SVXITEMS_START + 531) +#define RID_SVXITEMS_EMPHASIS_CIRCLE_STYLE (RID_SVXITEMS_START + 532) +#define RID_SVXITEMS_EMPHASIS_DISC_STYLE (RID_SVXITEMS_START + 533) +#define RID_SVXITEMS_EMPHASIS_ACCENT_STYLE (RID_SVXITEMS_START + 534) + +#define RID_SVXITEMS_EMPHASIS_ABOVE_POS (RID_SVXITEMS_START + 540) +#define RID_SVXITEMS_EMPHASIS_BELOW_POS (RID_SVXITEMS_START + 541) + +#define RID_SVXITEMS_TWOLINES_OFF (RID_SVXITEMS_START + 545) +#define RID_SVXITEMS_TWOLINES (RID_SVXITEMS_START + 546) + +#define RID_SVXITEMS_SCRPTSPC_OFF (RID_SVXITEMS_START + 550) +#define RID_SVXITEMS_SCRPTSPC_ON (RID_SVXITEMS_START + 551) +#define RID_SVXITEMS_HNGPNCT_OFF (RID_SVXITEMS_START + 552) +#define RID_SVXITEMS_HNGPNCT_ON (RID_SVXITEMS_START + 553) + +#define RID_SVXITEMS_FORBIDDEN_RULE_OFF (RID_SVXITEMS_START + 554) +#define RID_SVXITEMS_FORBIDDEN_RULE_ON (RID_SVXITEMS_START + 555) + +#define RID_SVXITEMS_CHARROTATE_OFF (RID_SVXITEMS_START + 556) +#define RID_SVXITEMS_CHARROTATE (RID_SVXITEMS_START + 557) +#define RID_SVXITEMS_CHARROTATE_FITLINE (RID_SVXITEMS_START + 558) + +#define RID_SVXITEMS_CHARSCALE_OFF (RID_SVXITEMS_START + 559) +#define RID_SVXITEMS_CHARSCALE (RID_SVXITEMS_START + 560) + +#define RID_SVXITEMS_RELIEF_BEGIN (RID_SVXITEMS_START + 561) +#define RID_SVXITEMS_RELIEF_NONE (RID_SVXITEMS_START + 561) +#define RID_SVXITEMS_RELIEF_EMBOSSED (RID_SVXITEMS_START + 562) +#define RID_SVXITEMS_RELIEF_ENGRAVED (RID_SVXITEMS_START + 563) +#define RID_SVXITEMS_RELIEF_END (RID_SVXITEMS_START + 564) + +#define RID_SVXITEMS_PARAVERTALIGN_AUTO (RID_SVXITEMS_START + 565) +#define RID_SVXITEMS_PARAVERTALIGN_BASELINE (RID_SVXITEMS_START + 566) +#define RID_SVXITEMS_PARAVERTALIGN_TOP (RID_SVXITEMS_START + 567) +#define RID_SVXITEMS_PARAVERTALIGN_CENTER (RID_SVXITEMS_START + 568) +#define RID_SVXITEMS_PARAVERTALIGN_BOTTOM (RID_SVXITEMS_START + 569) + +#define RID_SVXITEMS_FRMDIR_BEGIN (RID_SVXITEMS_START + 570) +#define RID_SVXITEMS_FRMDIR_HORI_LEFT_TOP (RID_SVXITEMS_START + 570) +#define RID_SVXITEMS_FRMDIR_HORI_RIGHT_TOP (RID_SVXITEMS_START + 571) +#define RID_SVXITEMS_FRMDIR_VERT_TOP_RIGHT (RID_SVXITEMS_START + 572) +#define RID_SVXITEMS_FRMDIR_VERT_TOP_LEFT (RID_SVXITEMS_START + 573) +#define RID_SVXITEMS_FRMDIR_ENVIRONMENT (RID_SVXITEMS_START + 574) +#define RID_SVXITEMS_FRMDIR_END (RID_SVXITEMS_START + 574) + +#define RID_SVXITEMS_PARASNAPTOGRID_ON (RID_SVXITEMS_START + 575) +#define RID_SVXITEMS_PARASNAPTOGRID_OFF (RID_SVXITEMS_START + 576) + +#define RID_SVXITEMS_CHARHIDDEN_FALSE (RID_SVXITEMS_START + 577) +#define RID_SVXITEMS_CHARHIDDEN_TRUE (RID_SVXITEMS_START + 578) + +// Ueberlaufpruefung -------------------------------------------------------- + +// Resource-Id's +#define ACT_RID_SVXITEMS_END RID_SVXITEMS_CHARHIDDEN_TRUE +#if ACT_RID_SVXITEMS_END > RID_SVXITEMS_END +#error Resource-Ueberlauf in #line, #file +#endif + + +#endif + diff --git a/svx/inc/svx/swafopt.hxx b/svx/inc/svx/swafopt.hxx new file mode 100644 index 000000000000..86f569e46221 --- /dev/null +++ b/svx/inc/svx/swafopt.hxx @@ -0,0 +1,109 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: swafopt.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVXSWAFOPT_HXX +#define _SVXSWAFOPT_HXX + +#include <vcl/font.hxx> +#include "svx/svxdllapi.h" + +class SvStringsISortDtor; +class SmartTagMgr; + +// Klasse fuer Optionen vom Autoformat +struct SVX_DLLPUBLIC SvxSwAutoFmtFlags +{ + Font aBulletFont; + Font aByInputBulletFont; + const SvStringsISortDtor* pAutoCmpltList; // only valid inside the Dialog!!! + SmartTagMgr* pSmartTagMgr; + + sal_Unicode cBullet; + sal_Unicode cByInputBullet; + + USHORT nAutoCmpltWordLen, nAutoCmpltListLen; + USHORT nAutoCmpltExpandKey; + + BYTE nRightMargin; + + BOOL bReplaceQuote : 1; + BOOL bAutoCorrect : 1; + BOOL bCptlSttSntnc : 1; + BOOL bCptlSttWrd : 1; + BOOL bChkFontAttr : 1; + + BOOL bChgUserColl : 1; + BOOL bChgEnumNum : 1; + + BOOL bAFmtByInput : 1; + BOOL bDelEmptyNode : 1; + BOOL bSetNumRule : 1; + + BOOL bChgFracionSymbol : 1; + BOOL bChgOrdinalNumber : 1; + BOOL bChgToEnEmDash : 1; + BOOL bChgWeightUnderl : 1; + BOOL bSetINetAttr : 1; + + BOOL bSetBorder : 1; + BOOL bCreateTable : 1; + BOOL bReplaceStyles : 1; + BOOL bDummy : 1; + + BOOL bWithRedlining : 1; + + BOOL bRightMargin : 1; + + BOOL bAutoCompleteWords : 1; + BOOL bAutoCmpltCollectWords : 1; + BOOL bAutoCmpltEndless : 1; +// -- under NT hier starts a new long + BOOL bAutoCmpltAppendBlanc : 1; + BOOL bAutoCmpltShowAsTip : 1; + + BOOL bAFmtDelSpacesAtSttEnd : 1; + BOOL bAFmtDelSpacesBetweenLines : 1; + BOOL bAFmtByInpDelSpacesAtSttEnd : 1; + BOOL bAFmtByInpDelSpacesBetweenLines : 1; + + BOOL bAutoCmpltKeepList : 1; + + // some dummies for any new options + BOOL bDummy6 : 1, + bDummy7 : 1, + bDummy8 : 1 + ; + + SvxSwAutoFmtFlags(); + SvxSwAutoFmtFlags( const SvxSwAutoFmtFlags& rAFFlags ) { *this = rAFFlags; } + SvxSwAutoFmtFlags& operator=( const SvxSwAutoFmtFlags& ); +}; + +#endif + diff --git a/svx/inc/svx/sxallitm.hxx b/svx/inc/svx/sxallitm.hxx new file mode 100644 index 000000000000..ea86f273b062 --- /dev/null +++ b/svx/inc/svx/sxallitm.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxallitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXALLITM_HXX +#define _SXALLITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +//------------------------------ +// class SdrAllPositionXItem +//------------------------------ +class SdrAllPositionXItem: public SdrMetricItem { +public: + SdrAllPositionXItem(long nPosX=0): SdrMetricItem(SDRATTR_ALLPOSITIONX,nPosX) {} + SdrAllPositionXItem(SvStream& rIn): SdrMetricItem(SDRATTR_ALLPOSITIONX,rIn) {} +}; + +//------------------------------ +// class SdrAllPositionYItem +//------------------------------ +class SdrAllPositionYItem: public SdrMetricItem { +public: + SdrAllPositionYItem(long nPosY=0): SdrMetricItem(SDRATTR_ALLPOSITIONY,nPosY) {} + SdrAllPositionYItem(SvStream& rIn): SdrMetricItem(SDRATTR_ALLPOSITIONY,rIn) {} +}; + +//------------------------------ +// class SdrAllSizeWidthItem +//------------------------------ +class SdrAllSizeWidthItem: public SdrMetricItem { +public: + SdrAllSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_ALLSIZEWIDTH,nWdt) {} + SdrAllSizeWidthItem(SvStream& rIn): SdrMetricItem(SDRATTR_ALLSIZEWIDTH,rIn) {} +}; + +//------------------------------ +// class SdrAllSizeWidthItem +//------------------------------ +class SdrAllSizeHeightItem: public SdrMetricItem { +public: + SdrAllSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_ALLSIZEHEIGHT,nHgt) {} + SdrAllSizeHeightItem(SvStream& rIn): SdrMetricItem(SDRATTR_ALLSIZEHEIGHT,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxcaitm.hxx b/svx/inc/svx/sxcaitm.hxx new file mode 100644 index 000000000000..91af4754956f --- /dev/null +++ b/svx/inc/svx/sxcaitm.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxcaitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXCAITM_HXX +#define _SXCAITM_HXX + +#include <svx/svddef.hxx> + +#ifndef _SDRANGITM_HXX +#include <svx/sdangitm.hxx> +#endif +#include <svx/sdooitm.hxx> + +//------------------------------------ +// class SdrCaptionFixedAngleItem +// TRUE=Winkel durch SdrCaptionAngleItem vorgegeben +// FALSE=Freier Winkel +//------------------------------------ +class SdrCaptionFixedAngleItem: public SdrOnOffItem { +public: + SdrCaptionFixedAngleItem(BOOL bFix=TRUE): SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE,bFix) {} + SdrCaptionFixedAngleItem(SvStream& rIn) : SdrOnOffItem(SDRATTR_CAPTIONFIXEDANGLE,rIn) {} +}; + +//------------------------------ +// class SdrCaptionAngleItem +// Winkelangabe in 1/100 Degree +// Nur bei Type2, Type3 und Type4 +// und nur wenn SdrCaptionIsFixedAngleItem=TRUE +//------------------------------ +class SdrCaptionAngleItem: public SdrAngleItem { +public: + SdrCaptionAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_CAPTIONANGLE,nAngle) {} + SdrCaptionAngleItem(SvStream& rIn): SdrAngleItem(SDRATTR_CAPTIONANGLE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxcecitm.hxx b/svx/inc/svx/sxcecitm.hxx new file mode 100644 index 000000000000..229f80394ce7 --- /dev/null +++ b/svx/inc/svx/sxcecitm.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxcecitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXCECITM_HXX +#define _SXCECITM_HXX + +#include <svl/eitem.hxx> +#include <svx/svddef.hxx> +#include <svx/sdynitm.hxx> +#include <svx/sdmetitm.hxx> +#include "svx/svxdllapi.h" + +enum SdrCaptionEscDir {SDRCAPT_ESCHORIZONTAL,SDRCAPT_ESCVERTICAL,SDRCAPT_ESCBESTFIT}; + +//------------------------------ +// class SdrCaptionEscDirItem +//------------------------------ +class SVX_DLLPUBLIC SdrCaptionEscDirItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrCaptionEscDirItem(SdrCaptionEscDir eDir=SDRCAPT_ESCHORIZONTAL): SfxEnumItem(SDRATTR_CAPTIONESCDIR,sal::static_int_cast< USHORT >(eDir)) {} + SdrCaptionEscDirItem(SvStream& rIn) : SfxEnumItem(SDRATTR_CAPTIONESCDIR,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 3; } + SdrCaptionEscDir GetValue() const { return (SdrCaptionEscDir)SfxEnumItem::GetValue(); } + + virtual String GetValueTextByPos(USHORT nPos) const; + + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +//------------------------------------ +// class SdrCaptionEscIsRelItem +// TRUE=Linienaustrittsposition relativ +// FALSE=Linienaustrittsposition absolut +//------------------------------------ +class SdrCaptionEscIsRelItem: public SdrYesNoItem { +public: + SdrCaptionEscIsRelItem(BOOL bRel=TRUE): SdrYesNoItem(SDRATTR_CAPTIONESCISREL,bRel) {} + SdrCaptionEscIsRelItem(SvStream& rIn) : SdrYesNoItem(SDRATTR_CAPTIONESCISREL,rIn) {} +}; + +//------------------------------------ +// class SdrCaptionEscRelItem +// Relativer Linienaustritt +// 0 = 0.00% = oben bzw. links, +// 10000 = 100.00% = rechts bzw. unten +// nur wenn SdrCaptionEscIsRelItem=TRUE +//------------------------------------ +class SdrCaptionEscRelItem: public SfxInt32Item { +public: + SdrCaptionEscRelItem(long nEscRel=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL,nEscRel) {} + SdrCaptionEscRelItem(SvStream& rIn) : SfxInt32Item(SDRATTR_CAPTIONESCREL,rIn) {} +}; + +//------------------------------------ +// class SdrCaptionEscAbsItem +// Absoluter Linienaustritt +// 0 = oben bzw. links, +// >0 = in Richtung rechts bzw. unten +// nur wenn SdrCaptionEscIsRelItem=FALSE +//------------------------------------ +class SdrCaptionEscAbsItem: public SdrMetricItem { +public: + SdrCaptionEscAbsItem(long nEscAbs=0): SdrMetricItem(SDRATTR_CAPTIONESCABS,nEscAbs) {} + SdrCaptionEscAbsItem(SvStream& rIn) : SdrMetricItem(SDRATTR_CAPTIONESCABS,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxcgitm.hxx b/svx/inc/svx/sxcgitm.hxx new file mode 100644 index 000000000000..2999265cdc2b --- /dev/null +++ b/svx/inc/svx/sxcgitm.hxx @@ -0,0 +1,46 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxcgitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXCGITM_HXX +#define _SXCGITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +//------------------------------------ +// class SdrCaptionGapItem +// Abstand des Linienanfangs vom Rect +//------------------------------------ +class SdrCaptionGapItem: public SdrMetricItem { +public: + SdrCaptionGapItem(long nGap=0) : SdrMetricItem(SDRATTR_CAPTIONGAP,nGap) {} + SdrCaptionGapItem(SvStream& rIn): SdrMetricItem(SDRATTR_CAPTIONGAP,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxciaitm.hxx b/svx/inc/svx/sxciaitm.hxx new file mode 100644 index 000000000000..3a338ab15b27 --- /dev/null +++ b/svx/inc/svx/sxciaitm.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxciaitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXCIAITM_HXX +#define _SXCIAITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +//------------------------------ +// class SdrCircStartAngleItem +//------------------------------ +class SdrCircStartAngleItem: public SdrAngleItem { +public: + SdrCircStartAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_CIRCSTARTANGLE,nAngle) {} + SdrCircStartAngleItem(SvStream& rIn): SdrAngleItem(SDRATTR_CIRCSTARTANGLE,rIn) {} +}; + +//------------------------------ +// class SdrCircEndAngleItem +//------------------------------ +class SdrCircEndAngleItem: public SdrAngleItem { +public: + SdrCircEndAngleItem(long nAngle=36000): SdrAngleItem(SDRATTR_CIRCENDANGLE,nAngle) {} + SdrCircEndAngleItem(SvStream& rIn): SdrAngleItem(SDRATTR_CIRCENDANGLE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxcikitm.hxx b/svx/inc/svx/sxcikitm.hxx new file mode 100644 index 000000000000..c94263e55d17 --- /dev/null +++ b/svx/inc/svx/sxcikitm.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxcikitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXCIKITM_HXX +#define _SXCIKITM_HXX + +#include <svx/svddef.hxx> +#include <svl/eitem.hxx> + +enum SdrCircKind {SDRCIRC_FULL, + SDRCIRC_SECT, + SDRCIRC_CUT, + SDRCIRC_ARC}; + +class SdrCircKindItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrCircKindItem(SdrCircKind eKind=SDRCIRC_FULL): SfxEnumItem(SDRATTR_CIRCKIND,sal::static_int_cast< USHORT >(eKind)) {} + SdrCircKindItem(SvStream& rIn) : SfxEnumItem(SDRATTR_CIRCKIND,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 4; } + SdrCircKind GetValue() const { return (SdrCircKind)SfxEnumItem::GetValue(); } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sxcllitm.hxx b/svx/inc/svx/sxcllitm.hxx new file mode 100644 index 000000000000..583b9255cffa --- /dev/null +++ b/svx/inc/svx/sxcllitm.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxcllitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXCLLITM_HXX +#define _SXCLLITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdynitm.hxx> +#include <svx/sdmetitm.hxx> + +//------------------------------------ +// class SdrCaptionLineLenItem +// Laenge der ersten Austrittslinie +// Nur bei Type3 und Type4 +// Nur relevant, wenn SdrCaptionFitLineLenItem=FALSE +//------------------------------------ +class SdrCaptionLineLenItem: public SdrMetricItem { +public: + SdrCaptionLineLenItem(long nLineLen=0): SdrMetricItem(SDRATTR_CAPTIONLINELEN,nLineLen) {} + SdrCaptionLineLenItem(SvStream& rIn) : SdrMetricItem(SDRATTR_CAPTIONLINELEN,rIn) {} +}; + +//------------------------------------ +// class SdrCaptionFitLineLenItem +// Laenge der ersten Austrittslinie automatisch berechnen oder +// Vorgabe (SdrCaptionLineLenItem) verwenden. +// Nur bei Type3 und Type4 +//------------------------------------ +class SdrCaptionFitLineLenItem: public SdrYesNoItem { +public: + SdrCaptionFitLineLenItem(BOOL bBestFit=TRUE): SdrYesNoItem(SDRATTR_CAPTIONFITLINELEN,bBestFit) {} + SdrCaptionFitLineLenItem(SvStream& rIn) : SdrYesNoItem(SDRATTR_CAPTIONFITLINELEN,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxctitm.hxx b/svx/inc/svx/sxctitm.hxx new file mode 100644 index 000000000000..35d496179e2a --- /dev/null +++ b/svx/inc/svx/sxctitm.hxx @@ -0,0 +1,55 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxctitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXCTITM_HXX +#define _SXCTITM_HXX + +#include <svl/eitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +enum SdrCaptionType {SDRCAPT_TYPE1,SDRCAPT_TYPE2,SDRCAPT_TYPE3,SDRCAPT_TYPE4}; + +//------------------------------ +// class SdrCaptionTypeItem +//------------------------------ +class SVX_DLLPUBLIC SdrCaptionTypeItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrCaptionTypeItem(SdrCaptionType eStyle=SDRCAPT_TYPE3): SfxEnumItem(SDRATTR_CAPTIONTYPE,sal::static_int_cast< USHORT >(eStyle)) {} + SdrCaptionTypeItem(SvStream& rIn) : SfxEnumItem(SDRATTR_CAPTIONTYPE,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 4; } + SdrCaptionType GetValue() const { return (SdrCaptionType)SfxEnumItem::GetValue(); } + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sxekitm.hxx b/svx/inc/svx/sxekitm.hxx new file mode 100644 index 000000000000..a763a90e4b1f --- /dev/null +++ b/svx/inc/svx/sxekitm.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxekitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXEKITM_HXX +#define _SXEKITM_HXX + +#include <svl/eitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +enum SdrEdgeKind {SDREDGE_ORTHOLINES, + SDREDGE_THREELINES, + SDREDGE_ONELINE, + SDREDGE_BEZIER, + SDREDGE_ARC}; + +//------------------------------ +// class SdrEdgeKindItem +//------------------------------ +class SVX_DLLPUBLIC SdrEdgeKindItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrEdgeKindItem(SdrEdgeKind eStyle=SDREDGE_ORTHOLINES): SfxEnumItem(SDRATTR_EDGEKIND,sal::static_int_cast< USHORT >(eStyle)) {} + SdrEdgeKindItem(SvStream& rIn) : SfxEnumItem(SDRATTR_EDGEKIND,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 5; } + SdrEdgeKind GetValue() const { return (SdrEdgeKind)SfxEnumItem::GetValue(); } + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sxelditm.hxx b/svx/inc/svx/sxelditm.hxx new file mode 100644 index 000000000000..e2f0750da65f --- /dev/null +++ b/svx/inc/svx/sxelditm.hxx @@ -0,0 +1,67 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxelditm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXELDITM_HXX +#define _SXELDITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> +#include "svx/svxdllapi.h" + +class SdrEdgeLineDeltaAnzItem: public SfxUInt16Item { +public: + SdrEdgeLineDeltaAnzItem(UINT16 nVal=0): SfxUInt16Item(SDRATTR_EDGELINEDELTAANZ,nVal) {} + SdrEdgeLineDeltaAnzItem(SvStream& rIn): SfxUInt16Item(SDRATTR_EDGELINEDELTAANZ,rIn) {} +}; + +class SVX_DLLPUBLIC SdrEdgeLine1DeltaItem: public SdrMetricItem { +public: + SdrEdgeLine1DeltaItem(long nVal=0): SdrMetricItem(SDRATTR_EDGELINE1DELTA,nVal) {} + SdrEdgeLine1DeltaItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGELINE1DELTA,rIn) {} + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +class SVX_DLLPUBLIC SdrEdgeLine2DeltaItem: public SdrMetricItem { +public: + SdrEdgeLine2DeltaItem(long nVal=0): SdrMetricItem(SDRATTR_EDGELINE2DELTA,nVal) {} + SdrEdgeLine2DeltaItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGELINE2DELTA,rIn) {} + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +class SVX_DLLPUBLIC SdrEdgeLine3DeltaItem: public SdrMetricItem { +public: + SdrEdgeLine3DeltaItem(long nVal=0): SdrMetricItem(SDRATTR_EDGELINE3DELTA,nVal) {} + SdrEdgeLine3DeltaItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGELINE3DELTA,rIn) {} + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +#endif diff --git a/svx/inc/svx/sxenditm.hxx b/svx/inc/svx/sxenditm.hxx new file mode 100644 index 000000000000..3bf449c1c260 --- /dev/null +++ b/svx/inc/svx/sxenditm.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxenditm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXENDITM_HXX +#define _SXENDITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC SdrEdgeNode1HorzDistItem: public SdrMetricItem { +public: + SdrEdgeNode1HorzDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE1HORZDIST,nVal) {} + SdrEdgeNode1HorzDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE1HORZDIST,rIn) {} + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +class SVX_DLLPUBLIC SdrEdgeNode1VertDistItem: public SdrMetricItem { +public: + SdrEdgeNode1VertDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE1VERTDIST,nVal) {} + SdrEdgeNode1VertDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE1VERTDIST,rIn) {} + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +class SVX_DLLPUBLIC SdrEdgeNode2HorzDistItem: public SdrMetricItem { +public: + SdrEdgeNode2HorzDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE2HORZDIST,nVal) {} + SdrEdgeNode2HorzDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE2HORZDIST,rIn) {} + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +class SVX_DLLPUBLIC SdrEdgeNode2VertDistItem: public SdrMetricItem { +public: + SdrEdgeNode2VertDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE2VERTDIST,nVal) {} + SdrEdgeNode2VertDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE2VERTDIST,rIn) {} + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +class SdrEdgeNode1GlueDistItem: public SdrMetricItem { +public: + SdrEdgeNode1GlueDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,nVal) {} + SdrEdgeNode1GlueDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,rIn) {} +}; + +class SdrEdgeNode2GlueDistItem: public SdrMetricItem { +public: + SdrEdgeNode2GlueDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,nVal) {} + SdrEdgeNode2GlueDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxfiitm.hxx b/svx/inc/svx/sxfiitm.hxx new file mode 100644 index 000000000000..72a258d2fa70 --- /dev/null +++ b/svx/inc/svx/sxfiitm.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxfiitm.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SFXIITM_HXX +#define _SFXIITM_HXX + +#include <svl/poolitem.hxx> +#include <tools/fract.hxx> + +/*************************************************************************/ +/* FractionItem */ +/*************************************************************************/ + +class SdrFractionItem: public SfxPoolItem { + Fraction nValue; +public: + TYPEINFO_VISIBILITY( SVX_DLLPUBLIC ); + SdrFractionItem(USHORT nId=0): SfxPoolItem(nId) {} + SdrFractionItem(USHORT nId, const Fraction& rVal): SfxPoolItem(nId), nValue(rVal) {} + SdrFractionItem(USHORT nId, SvStream& rIn); + virtual int operator==(const SfxPoolItem&) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation, SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric, String &rText, const IntlWrapper * = 0) const; + virtual SfxPoolItem* Create(SvStream&, USHORT nVer) const; + virtual SvStream& Store(SvStream&, USHORT nItemVers) const; + virtual SfxPoolItem* Clone(SfxItemPool *pPool=NULL) const; + const Fraction& GetValue() const { return nValue; } + void SetValue(const Fraction& rVal) { nValue = rVal; } +#ifdef SDR_ISPOOLABLE + virtual int IsPoolable() const; +#endif +}; + + +#endif diff --git a/svx/inc/svx/sxlayitm.hxx b/svx/inc/svx/sxlayitm.hxx new file mode 100644 index 000000000000..972bed84e8de --- /dev/null +++ b/svx/inc/svx/sxlayitm.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxlayitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SYLAYITM_HXX +#define _SYLAYITM_HXX + +#include <svx/svddef.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svx/svdtypes.hxx> + +//------------------------------ +// class SdrLayerIdItem +//------------------------------ +class SdrLayerIdItem: public SfxUInt16Item { +public: + SdrLayerIdItem(USHORT nId=0): SfxUInt16Item(SDRATTR_LAYERID,nId) {} + SdrLayerIdItem(SvStream& rIn): SfxUInt16Item(SDRATTR_LAYERID,rIn) {} + SdrLayerID GetValue() const { return (SdrLayerID)SfxUInt16Item::GetValue(); } +}; + +//------------------------------ +// class SdrLayerNameItem +//------------------------------ + +class SdrLayerNameItem: public SfxStringItem { +public: + SdrLayerNameItem() : SfxStringItem() { SetWhich(SDRATTR_LAYERNAME); } + SdrLayerNameItem(const String& rStr) : SfxStringItem(SDRATTR_LAYERNAME,rStr) {} + SdrLayerNameItem(SvStream& rIn) : SfxStringItem(SDRATTR_LAYERNAME,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxlogitm.hxx b/svx/inc/svx/sxlogitm.hxx new file mode 100644 index 000000000000..f7e1c2b1ab1f --- /dev/null +++ b/svx/inc/svx/sxlogitm.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxlogitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXLOGITM_HXX +#define _SXLOGITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +//------------------------------ +// class SdrLogicSizeWidthItem +//------------------------------ +class SdrLogicSizeWidthItem: public SdrMetricItem { +public: + SdrLogicSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_LOGICSIZEWIDTH,nWdt) {} + SdrLogicSizeWidthItem(SvStream& rIn): SdrMetricItem(SDRATTR_LOGICSIZEWIDTH,rIn) {} +}; + +//------------------------------ +// class SdrLogicSizeWidthItem +//------------------------------ +class SdrLogicSizeHeightItem: public SdrMetricItem { +public: + SdrLogicSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_LOGICSIZEHEIGHT,nHgt) {} + SdrLogicSizeHeightItem(SvStream& rIn): SdrMetricItem(SDRATTR_LOGICSIZEHEIGHT,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmbritm.hxx b/svx/inc/svx/sxmbritm.hxx new file mode 100644 index 000000000000..cc129c485bc6 --- /dev/null +++ b/svx/inc/svx/sxmbritm.hxx @@ -0,0 +1,51 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmbritm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMBRITM_HXX +#define _SXMBRITM_HXX + +#include <svx/svddef.hxx> + +#ifndef SXMBRITM_HXX +#include <svx/sdynitm.hxx> +#endif + +// Die Masslinie unterhalb der Bezugskante +// Zur Bemassung einer Objektunterkante +// (Redundant zum drehen der Bezugskante um 180deg + +// TextUpsideDown, jedoch besser bedienbar) +// laesst sich auch draggen, indem man den Masslinienabstand +// (SdrMeasureLineDistItem) ueber die Bezugskante hinwegdraggt +class SdrMeasureBelowRefEdgeItem: public SdrYesNoItem { +public: + SdrMeasureBelowRefEdgeItem(bool bOn=false): SdrYesNoItem(SDRATTR_MEASUREBELOWREFEDGE,bOn) {} + SdrMeasureBelowRefEdgeItem(SvStream& rIn): SdrYesNoItem(SDRATTR_MEASUREBELOWREFEDGE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmfsitm.hxx b/svx/inc/svx/sxmfsitm.hxx new file mode 100644 index 000000000000..4d9f245e54b1 --- /dev/null +++ b/svx/inc/svx/sxmfsitm.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmfsitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMFSITM_HXX +#define _SXMFSITM_HXX + +#include <svx/svddef.hxx> +#include <svl/stritem.hxx> + +// Formatstring (aehnl. Calc), z.B. "#.###,00km" +// ueberschreibt SdrMeasureUnitItem und SdrMeasureShowUnitItem (n.i.) +class SdrMeasureFormatStringItem: public SfxStringItem { +public: + SdrMeasureFormatStringItem() : SfxStringItem() { SetWhich(SDRATTR_MEASUREFORMATSTRING); } + SdrMeasureFormatStringItem(const String& rStr) : SfxStringItem(SDRATTR_MEASUREFORMATSTRING,rStr) {} + SdrMeasureFormatStringItem(SvStream& rIn) : SfxStringItem(SDRATTR_MEASUREFORMATSTRING,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmkitm.hxx b/svx/inc/svx/sxmkitm.hxx new file mode 100644 index 000000000000..ae537a976e25 --- /dev/null +++ b/svx/inc/svx/sxmkitm.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmkitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMKITM_HXX +#define _SXMKITM_HXX + +#include <svx/svddef.hxx> +#include <svl/eitem.hxx> + +enum SdrMeasureKind {SDRMEASURE_STD,SDRMEASURE_RADIUS}; // n.i. + +//------------------------------ +// class SdrMeasureKindItem (n.i.) +//------------------------------ +class SdrMeasureKindItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrMeasureKindItem(SdrMeasureKind eKind=SDRMEASURE_STD): SfxEnumItem(SDRATTR_MEASUREKIND,sal::static_int_cast< USHORT >(eKind)) {} + SdrMeasureKindItem(SvStream& rIn) : SfxEnumItem(SDRATTR_MEASUREKIND,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 2; } + SdrMeasureKind GetValue() const { return (SdrMeasureKind)SfxEnumItem::GetValue(); } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sxmlhitm.hxx b/svx/inc/svx/sxmlhitm.hxx new file mode 100644 index 000000000000..3d7057bc7215 --- /dev/null +++ b/svx/inc/svx/sxmlhitm.hxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmlhitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMLHITM_HXX +#define _SXMLHITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +/*************************************************************************/ +/* Measure */ +/*************************************************************************/ +// ___ +// | 100,00km | 2mm = SdrMeasureHelplineOverhangItem +// |<--------------------->|--- +// | | 8mm = SdrMeasureLineDistItem +// | | +// #=============# |--- +// # # | SdrMeasureHelpline1/2LenItem +// # #=========#--- +// # Zu bemassendes Objekt # +// #=======================# + +// Abstand der Masslinie zur Bezugskante (Norm=8mm) +// laesst sich auch draggen an den beiden Handles +// die auf den Pfeilspitzen liegen +class SdrMeasureLineDistItem: public SdrMetricItem { +public: + SdrMeasureLineDistItem(long nVal=0): SdrMetricItem(SDRATTR_MEASURELINEDIST,nVal) {} + SdrMeasureLineDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASURELINEDIST,rIn) {} +}; + +// Ueberhang der Masshilfslinien an der Masslinie (Norm=2mm) +class SdrMeasureHelplineOverhangItem: public SdrMetricItem { +public: + SdrMeasureHelplineOverhangItem(long nVal=0): SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG,nVal) {} + SdrMeasureHelplineOverhangItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG,rIn) {} +}; + +// Abstand der der Masshilfslinienenden zur Bezugskante +// Damit die Masshilfslinien nicht das Objekt beruehren +class SdrMeasureHelplineDistItem: public SdrMetricItem { +public: + SdrMeasureHelplineDistItem(long nVal=0): SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST,nVal) {} + SdrMeasureHelplineDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST,rIn) {} +}; + +// Ueberlaenge der Hilfslinien ueber die Bezugskante +// laesst sich auch draggen an den beiden runden Handles, +// die sich default unter den beiden Referenzpunkten befinden +class SdrMeasureHelpline1LenItem: public SdrMetricItem { +public: + SdrMeasureHelpline1LenItem(long nVal=0): SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN,nVal) {} + SdrMeasureHelpline1LenItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN,rIn) {} +}; +class SdrMeasureHelpline2LenItem: public SdrMetricItem { +public: + SdrMeasureHelpline2LenItem(long nVal=0): SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN,nVal) {} + SdrMeasureHelpline2LenItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmoitm.hxx b/svx/inc/svx/sxmoitm.hxx new file mode 100644 index 000000000000..d9b888045b13 --- /dev/null +++ b/svx/inc/svx/sxmoitm.hxx @@ -0,0 +1,44 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmoitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMOITM_HXX +#define _SXMOITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +// Ueberstand der Masslinie ueber die Masshilfslinien +// Nur wenn die Masspfeile aussen sind (n.i.) +class SdrMeasureOverhangItem: public SdrMetricItem { +public: + SdrMeasureOverhangItem(long nVal=0): SdrMetricItem(SDRATTR_MEASUREOVERHANG,nVal) {} + SdrMeasureOverhangItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASUREOVERHANG,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmovitm.hxx b/svx/inc/svx/sxmovitm.hxx new file mode 100644 index 000000000000..c32def94fc79 --- /dev/null +++ b/svx/inc/svx/sxmovitm.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmovitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMOVITM_HXX +#define _SXMOVITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +//------------------------------ +// class SdrMoveXItem +//------------------------------ +class SdrMoveXItem: public SdrMetricItem { +public: + SdrMoveXItem(long n=0): SdrMetricItem(SDRATTR_MOVEX,n) {} + SdrMoveXItem(SvStream& rIn): SdrMetricItem(SDRATTR_MOVEX,rIn) {} +}; + +//------------------------------ +// class SdrMoveYItem +//------------------------------ +class SdrMoveYItem: public SdrMetricItem { +public: + SdrMoveYItem(long n=0): SdrMetricItem(SDRATTR_MOVEY,n) {} + SdrMoveYItem(SvStream& rIn): SdrMetricItem(SDRATTR_MOVEY,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmsitm.hxx b/svx/inc/svx/sxmsitm.hxx new file mode 100644 index 000000000000..96f2ffd8b84c --- /dev/null +++ b/svx/inc/svx/sxmsitm.hxx @@ -0,0 +1,46 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmsitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMSITM_HXX +#define _SXMSITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sxsiitm.hxx> + +// Massstabsvorgabe. Wenn bereits am Model ein Massstab (UIScale) gesetzt +// ist wird dieser nicht ueberschrieben. Stattdessen werden beide Massstaebe +// miteinander multipliziert. +class SdrMeasureScaleItem: public SdrScaleItem { +public: + SdrMeasureScaleItem() : SdrScaleItem(SDRATTR_MEASURESCALE,Fraction(1,1)) {} + SdrMeasureScaleItem(const Fraction& rFr): SdrScaleItem(SDRATTR_MEASURESCALE,rFr) {} + SdrMeasureScaleItem(SvStream& rIn) : SdrScaleItem(SDRATTR_MEASURESCALE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmspitm.hxx b/svx/inc/svx/sxmspitm.hxx new file mode 100644 index 000000000000..6590ba33ab0b --- /dev/null +++ b/svx/inc/svx/sxmspitm.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmspitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMSPITM_HXX +#define _SXMSPITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdynitm.hxx> + +//------------------------------ +// class SdrMoveProtectItem +//------------------------------ +class SdrObjMoveProtectItem: public SdrYesNoItem { +public: + SdrObjMoveProtectItem(bool bOn=false): SdrYesNoItem(SDRATTR_OBJMOVEPROTECT,bOn) {} + SdrObjMoveProtectItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJMOVEPROTECT,rIn) {} +}; + +//------------------------------ +// class SdrSizeProtectItem +//------------------------------ +class SdrObjSizeProtectItem: public SdrYesNoItem { +public: + SdrObjSizeProtectItem(bool bOn=false): SdrYesNoItem(SDRATTR_OBJSIZEPROTECT,bOn) {} + SdrObjSizeProtectItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJSIZEPROTECT,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmsuitm.hxx b/svx/inc/svx/sxmsuitm.hxx new file mode 100644 index 000000000000..1bcacf2dea47 --- /dev/null +++ b/svx/inc/svx/sxmsuitm.hxx @@ -0,0 +1,43 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmsuitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMSUITM_HXX +#define _SXMSUITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdynitm.hxx> + +// Die Masseinheit mit anzeigen +class SdrMeasureShowUnitItem: public SdrYesNoItem { +public: + SdrMeasureShowUnitItem(bool bOn=false): SdrYesNoItem(SDRATTR_MEASURESHOWUNIT,bOn) {} + SdrMeasureShowUnitItem(SvStream& rIn): SdrYesNoItem(SDRATTR_MEASURESHOWUNIT,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmtaitm.hxx b/svx/inc/svx/sxmtaitm.hxx new file mode 100644 index 000000000000..33d5e14ad8ea --- /dev/null +++ b/svx/inc/svx/sxmtaitm.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmtaitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMTAITM_HXX +#define _SXMTAITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdynitm.hxx> +#include <svx/sdangitm.hxx> + +// Den Text automatisch zurechtdrehen (Automatisches UpsideDown). +// TextUpsideDown bleibt trotzdem weiterhin wirksam und dreht +// den Text bei TRUE nochmal. +class SdrMeasureTextAutoAngleItem: public SdrYesNoItem { +public: + SdrMeasureTextAutoAngleItem(bool bOn=true): SdrYesNoItem(SDRATTR_MEASURETEXTAUTOANGLE,bOn) {} + SdrMeasureTextAutoAngleItem(SvStream& rIn): SdrYesNoItem(SDRATTR_MEASURETEXTAUTOANGLE,rIn) {} +}; + +// Der bevorzugte Blickwinkel zum lesen des Textes. Wird nur ausgewertet, wenn +// TextAutoAngle=TRUE. Winkel in 1/100deg aus der Zeichnung zum Betrachter. +class SdrMeasureTextAutoAngleViewItem: public SdrAngleItem { +public: + SdrMeasureTextAutoAngleViewItem(long nVal=31500): SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,nVal) {} + SdrMeasureTextAutoAngleViewItem(SvStream& rIn): SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmtfitm.hxx b/svx/inc/svx/sxmtfitm.hxx new file mode 100644 index 000000000000..ce859e00a460 --- /dev/null +++ b/svx/inc/svx/sxmtfitm.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmtfitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMTFITM_HXX +#define _SXMTFITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdynitm.hxx> +#include <svx/sdangitm.hxx> + +// die 2 folgenden sind noch nicht implementiert! +// Text auf einen wirklich fixen Winkel festnageln. +// Der Textwinkel ist dann auch unabhaengig vom Winkel der Masslinie. +// Setzt TextUpsideDown, TextRota90 sowie TextAutoAngle ausser Kraft. (n.i.) +class SdrMeasureTextIsFixedAngleItem: public SdrYesNoItem { +public: + SdrMeasureTextIsFixedAngleItem(bool bOn=false): SdrYesNoItem(SDRATTR_MEASURETEXTISFIXEDANGLE,bOn) {} + SdrMeasureTextIsFixedAngleItem(SvStream& rIn): SdrYesNoItem(SDRATTR_MEASURETEXTISFIXEDANGLE,rIn) {} +}; + +// Der Winkel des Textes in 1/100deg. 0=Horizontal von links nach rechts zu lesen. (n.i.) +class SdrMeasureTextFixedAngleItem: public SdrAngleItem { +public: + SdrMeasureTextFixedAngleItem(long nVal=0): SdrAngleItem(SDRATTR_MEASURETEXTFIXEDANGLE,nVal) {} + SdrMeasureTextFixedAngleItem(SvStream& rIn): SdrAngleItem(SDRATTR_MEASURETEXTFIXEDANGLE,rIn) {} +}; + +// The decimal places used for the measure value +class SdrMeasureDecimalPlacesItem: public SfxInt16Item { +public: + SdrMeasureDecimalPlacesItem(INT16 nVal=2): SfxInt16Item(SDRATTR_MEASUREDECIMALPLACES,nVal) {} + SdrMeasureDecimalPlacesItem(SvStream& rIn): SfxInt16Item(SDRATTR_MEASUREDECIMALPLACES,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmtpitm.hxx b/svx/inc/svx/sxmtpitm.hxx new file mode 100644 index 000000000000..a708c9429678 --- /dev/null +++ b/svx/inc/svx/sxmtpitm.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmtpitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMTPITM_HXX +#define _SXMTPITM_HXX + +#include <svx/svddef.hxx> +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +enum SdrMeasureTextHPos {SDRMEASURE_TEXTHAUTO,SDRMEASURE_TEXTLEFTOUTSIDE,SDRMEASURE_TEXTINSIDE,SDRMEASURE_TEXTRIGHTOUTSIDE}; +enum SdrMeasureTextVPos {SDRMEASURE_TEXTVAUTO,SDRMEASURE_ABOVE,SDRMEASURETEXT_BREAKEDLINE,SDRMEASURE_BELOW,SDRMEASURETEXT_VERTICALCENTERED}; + +//------------------------------ +// class SdrMeasureTextHPosItem +//------------------------------ +class SVX_DLLPUBLIC SdrMeasureTextHPosItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrMeasureTextHPosItem(SdrMeasureTextHPos ePos=SDRMEASURE_TEXTHAUTO): SfxEnumItem(SDRATTR_MEASURETEXTHPOS,sal::static_int_cast< USHORT >(ePos)) {} + SdrMeasureTextHPosItem(SvStream& rIn) : SfxEnumItem(SDRATTR_MEASURETEXTHPOS,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 4; } + SdrMeasureTextHPos GetValue() const { return (SdrMeasureTextHPos)SfxEnumItem::GetValue(); } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +//------------------------------ +// class SdrMeasureTextVPosItem +//------------------------------ +class SVX_DLLPUBLIC SdrMeasureTextVPosItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrMeasureTextVPosItem(SdrMeasureTextVPos ePos=SDRMEASURE_TEXTVAUTO): SfxEnumItem(SDRATTR_MEASURETEXTVPOS,sal::static_int_cast< USHORT >(ePos)) {} + SdrMeasureTextVPosItem(SvStream& rIn) : SfxEnumItem(SDRATTR_MEASURETEXTVPOS,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 5; } + SdrMeasureTextVPos GetValue() const { return (SdrMeasureTextVPos)SfxEnumItem::GetValue(); } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sxmtritm.hxx b/svx/inc/svx/sxmtritm.hxx new file mode 100644 index 000000000000..970c0f79adf6 --- /dev/null +++ b/svx/inc/svx/sxmtritm.hxx @@ -0,0 +1,52 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmtritm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMTRITM_HXX +#define _SXMTRITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdynitm.hxx> + +// Den Text quer zur Masslinie (90deg Drehung nach links) +class SdrMeasureTextRota90Item: public SdrYesNoItem { +public: + SdrMeasureTextRota90Item(bool bOn=false): SdrYesNoItem(SDRATTR_MEASURETEXTROTA90,bOn) {} + SdrMeasureTextRota90Item(SvStream& rIn): SdrYesNoItem(SDRATTR_MEASURETEXTROTA90,rIn) {} +}; + +// Das von mir berechnete TextRect um 180 deg drehen +// Der Text wird dann aber auch auf die andere Seite der +// Masslinie gebracht (wenn nicht Rota90) +class SdrMeasureTextUpsideDownItem: public SdrYesNoItem { +public: + SdrMeasureTextUpsideDownItem(bool bOn=false): SdrYesNoItem(SDRATTR_MEASURETEXTUPSIDEDOWN,bOn) {} + SdrMeasureTextUpsideDownItem(SvStream& rIn): SdrYesNoItem(SDRATTR_MEASURETEXTUPSIDEDOWN,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxmuitm.hxx b/svx/inc/svx/sxmuitm.hxx new file mode 100644 index 000000000000..9f721f67fef2 --- /dev/null +++ b/svx/inc/svx/sxmuitm.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxmuitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXMUITM_HXX +#define _SXMUITM_HXX + +#include <vcl/field.hxx> +#include <svx/svddef.hxx> +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +// Vorgabe einer Masseinheit. Der Zahlenwert wird in diese Einheit umgerechnet +// (ausgehend von der MapUnit des Models). Diese Einheit wird dann ggf. auch angezeigt. +class SVX_DLLPUBLIC SdrMeasureUnitItem: public SfxEnumItem { +public: + TYPEINFO(); + SdrMeasureUnitItem(FieldUnit eUnit=FUNIT_NONE): SfxEnumItem(SDRATTR_MEASUREUNIT,sal::static_int_cast< USHORT >(eUnit)) {} + SdrMeasureUnitItem(SvStream& rIn) : SfxEnumItem(SDRATTR_MEASUREUNIT,rIn) {} + virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; // { return 14; } + FieldUnit GetValue() const { return (FieldUnit)SfxEnumItem::GetValue(); } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual String GetValueTextByPos(USHORT nPos) const; + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; +}; + +#endif diff --git a/svx/inc/svx/sxoneitm.hxx b/svx/inc/svx/sxoneitm.hxx new file mode 100644 index 000000000000..d6d960d34636 --- /dev/null +++ b/svx/inc/svx/sxoneitm.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxoneitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXONEITM_HXX +#define _SXONEITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +//------------------------------ +// class SdrOnePositionXItem +//------------------------------ +class SdrOnePositionXItem: public SdrMetricItem { +public: + SdrOnePositionXItem(long nPosX=0): SdrMetricItem(SDRATTR_ONEPOSITIONX,nPosX) {} + SdrOnePositionXItem(SvStream& rIn): SdrMetricItem(SDRATTR_ONEPOSITIONX,rIn) {} +}; + +//------------------------------ +// class SdrOnePositionYItem +//------------------------------ +class SdrOnePositionYItem: public SdrMetricItem { +public: + SdrOnePositionYItem(long nPosY=0): SdrMetricItem(SDRATTR_ONEPOSITIONY,nPosY) {} + SdrOnePositionYItem(SvStream& rIn): SdrMetricItem(SDRATTR_ONEPOSITIONY,rIn) {} +}; + +//------------------------------ +// class SdrOneSizeWidthItem +//------------------------------ +class SdrOneSizeWidthItem: public SdrMetricItem { +public: + SdrOneSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_ONESIZEWIDTH,nWdt) {} + SdrOneSizeWidthItem(SvStream& rIn): SdrMetricItem(SDRATTR_ONESIZEWIDTH,rIn) {} +}; + +//------------------------------ +// class SdrOneSizeWidthItem +//------------------------------ +class SdrOneSizeHeightItem: public SdrMetricItem { +public: + SdrOneSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_ONESIZEHEIGHT,nHgt) {} + SdrOneSizeHeightItem(SvStream& rIn): SdrMetricItem(SDRATTR_ONESIZEHEIGHT,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxonitm.hxx b/svx/inc/svx/sxonitm.hxx new file mode 100644 index 000000000000..ce5c5e72cfd1 --- /dev/null +++ b/svx/inc/svx/sxonitm.hxx @@ -0,0 +1,47 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxonitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXONITM_HXX +#define _SXONITM_HXX + +#include <svx/svddef.hxx> +#include <svl/stritem.hxx> + +//------------------------------ +// class SdrObjectNameItem +//------------------------------ + +class SdrObjectNameItem: public SfxStringItem { +public: + SdrObjectNameItem() : SfxStringItem() { SetWhich(SDRATTR_OBJECTNAME); } + SdrObjectNameItem(const String& rStr) : SfxStringItem(SDRATTR_OBJECTNAME,rStr) {} + SdrObjectNameItem(SvStream& rIn) : SfxStringItem(SDRATTR_OBJECTNAME,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxopitm.hxx b/svx/inc/svx/sxopitm.hxx new file mode 100644 index 000000000000..7c88482c8b71 --- /dev/null +++ b/svx/inc/svx/sxopitm.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxopitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXOPITM_HXX +#define _SXOPITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdynitm.hxx> + +//------------------------------ +// class SdrObjPrintableItem +//------------------------------ +class SdrObjPrintableItem: public SdrYesNoItem { +public: + SdrObjPrintableItem(bool bOn=false): SdrYesNoItem(SDRATTR_OBJPRINTABLE,bOn) {} + SdrObjPrintableItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJPRINTABLE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxraitm.hxx b/svx/inc/svx/sxraitm.hxx new file mode 100644 index 000000000000..46a22da5c421 --- /dev/null +++ b/svx/inc/svx/sxraitm.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxraitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXRAITM_HXX +#define _SXRAITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +//------------------------------ +// class SdrRotateAngleItem +//------------------------------ +class SdrRotateAngleItem: public SdrAngleItem { +public: + SdrRotateAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_ROTATEANGLE,nAngle) {} + SdrRotateAngleItem(SvStream& rIn): SdrAngleItem(SDRATTR_ROTATEANGLE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxreaitm.hxx b/svx/inc/svx/sxreaitm.hxx new file mode 100644 index 000000000000..f7f7f27fc7cf --- /dev/null +++ b/svx/inc/svx/sxreaitm.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxreaitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXREAITM_HXX +#define _SXREAITM_HXX + +#include <svx/svddef.hxx> + +#ifndef _SXFIITM_HXX +#include <svx/sxfiitm.hxx> +#endif + +//------------------------------ +// class SdrResizeXAllItem +//------------------------------ +class SdrResizeXAllItem: public SdrFractionItem { +public: + SdrResizeXAllItem(): SdrFractionItem(SDRATTR_RESIZEXALL,Fraction(1,1)) {} + SdrResizeXAllItem(const Fraction& rFact): SdrFractionItem(SDRATTR_RESIZEXALL,rFact) {} + SdrResizeXAllItem(SvStream& rIn): SdrFractionItem(SDRATTR_RESIZEXALL,rIn) {} +}; + +//------------------------------ +// class SdrResizeYAllItem +//------------------------------ +class SdrResizeYAllItem: public SdrFractionItem { +public: + SdrResizeYAllItem(): SdrFractionItem(SDRATTR_RESIZEYALL,Fraction(1,1)) {} + SdrResizeYAllItem(const Fraction& rFact): SdrFractionItem(SDRATTR_RESIZEYALL,rFact) {} + SdrResizeYAllItem(SvStream& rIn): SdrFractionItem(SDRATTR_RESIZEYALL,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxreoitm.hxx b/svx/inc/svx/sxreoitm.hxx new file mode 100644 index 000000000000..d6f5fd7f6deb --- /dev/null +++ b/svx/inc/svx/sxreoitm.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxreoitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXREOITM_HXX +#define _SXREOITM_HXX + +#include <svx/svddef.hxx> + +#ifndef _SXFIITM_HXX +#include <svx/sxfiitm.hxx> +#endif + +//------------------------------ +// class SdrResizeXOneItem +//------------------------------ +class SdrResizeXOneItem: public SdrFractionItem { +public: + SdrResizeXOneItem(): SdrFractionItem(SDRATTR_RESIZEXONE,Fraction(1,1)) {} + SdrResizeXOneItem(const Fraction& rFact): SdrFractionItem(SDRATTR_RESIZEXONE,rFact) {} + SdrResizeXOneItem(SvStream& rIn): SdrFractionItem(SDRATTR_RESIZEXONE,rIn) {} +}; + +//------------------------------ +// class SdrResizeYOneItem +//------------------------------ +class SdrResizeYOneItem: public SdrFractionItem { +public: + SdrResizeYOneItem(): SdrFractionItem(SDRATTR_RESIZEYONE,Fraction(1,1)) {} + SdrResizeYOneItem(const Fraction& rFact): SdrFractionItem(SDRATTR_RESIZEYONE,rFact) {} + SdrResizeYOneItem(SvStream& rIn): SdrFractionItem(SDRATTR_RESIZEYONE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxroaitm.hxx b/svx/inc/svx/sxroaitm.hxx new file mode 100644 index 000000000000..e093c80b4ab2 --- /dev/null +++ b/svx/inc/svx/sxroaitm.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxroaitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXROAITM_HXX +#define _SXROAITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +//------------------------------ +// class SdrRotateAllItem +//------------------------------ +class SdrRotateAllItem: public SdrAngleItem { +public: + SdrRotateAllItem(long nAngle=0): SdrAngleItem(SDRATTR_ROTATEALL,nAngle) {} + SdrRotateAllItem(SvStream& rIn): SdrAngleItem(SDRATTR_ROTATEALL,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxrooitm.hxx b/svx/inc/svx/sxrooitm.hxx new file mode 100644 index 000000000000..d5e44da7a11c --- /dev/null +++ b/svx/inc/svx/sxrooitm.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxrooitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXROOITM_HXX +#define _SXROOITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +//------------------------------ +// class SdrRotateOneItem +//------------------------------ +class SdrRotateOneItem: public SdrAngleItem { +public: + SdrRotateOneItem(long nAngle=0): SdrAngleItem(SDRATTR_ROTATEONE,nAngle) {} + SdrRotateOneItem(SvStream& rIn): SdrAngleItem(SDRATTR_ROTATEONE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxsaitm.hxx b/svx/inc/svx/sxsaitm.hxx new file mode 100644 index 000000000000..2897b7699aae --- /dev/null +++ b/svx/inc/svx/sxsaitm.hxx @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxsaitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXSAITM_HXX +#define _SXSAITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +//------------------------------ +// class SdrShearAngleItem +//------------------------------ +class SdrShearAngleItem: public SdrAngleItem { +public: + SdrShearAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_SHEARANGLE,nAngle) {} + SdrShearAngleItem(SvStream& rIn): SdrAngleItem(SDRATTR_SHEARANGLE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxsalitm.hxx b/svx/inc/svx/sxsalitm.hxx new file mode 100644 index 000000000000..05a8f6a411d0 --- /dev/null +++ b/svx/inc/svx/sxsalitm.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxsalitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXSALITM_HXX +#define _SXSALITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +//------------------------------ +// class SdrHorzShearAllItem +//------------------------------ +class SdrHorzShearAllItem: public SdrAngleItem { +public: + SdrHorzShearAllItem(long nAngle=0): SdrAngleItem(SDRATTR_HORZSHEARALL,nAngle) {} + SdrHorzShearAllItem(SvStream& rIn): SdrAngleItem(SDRATTR_HORZSHEARALL,rIn) {} +}; + +//------------------------------ +// class SdrVertShearAllItem +//------------------------------ +class SdrVertShearAllItem: public SdrAngleItem { +public: + SdrVertShearAllItem(long nAngle=0): SdrAngleItem(SDRATTR_VERTSHEARALL,nAngle) {} + SdrVertShearAllItem(SvStream& rIn): SdrAngleItem(SDRATTR_VERTSHEARALL,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxsiitm.hxx b/svx/inc/svx/sxsiitm.hxx new file mode 100644 index 000000000000..6eb6ab03cd55 --- /dev/null +++ b/svx/inc/svx/sxsiitm.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxsiitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXSIITM_HXX +#define _SXSIITM_HXX + +#ifndef _SXFIITM_HXX +#include <svx/sxfiitm.hxx> +#endif + +class SdrScaleItem: public SdrFractionItem { +public: + TYPEINFO(); + SdrScaleItem(USHORT nId=0): SdrFractionItem(nId,Fraction(1,1)) {} + SdrScaleItem(USHORT nId, const Fraction& rVal): SdrFractionItem(nId,rVal) {} + SdrScaleItem(USHORT nId, SvStream& rIn): SdrFractionItem(nId,rIn) {} + virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation, SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric, String &rText, const IntlWrapper * = 0) const; + virtual SfxPoolItem* Create(SvStream&, USHORT nVer) const; + virtual SfxPoolItem* Clone(SfxItemPool *pPool=NULL) const; +}; + +#endif diff --git a/svx/inc/svx/sxsoitm.hxx b/svx/inc/svx/sxsoitm.hxx new file mode 100644 index 000000000000..4b26efff7bbc --- /dev/null +++ b/svx/inc/svx/sxsoitm.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxsoitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXSOITM_HXX +#define _SXSOITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +//------------------------------ +// class SdrHorzShearOneItem +//------------------------------ +class SdrHorzShearOneItem: public SdrAngleItem { +public: + SdrHorzShearOneItem(long nAngle=0): SdrAngleItem(SDRATTR_HORZSHEARONE,nAngle) {} + SdrHorzShearOneItem(SvStream& rIn): SdrAngleItem(SDRATTR_HORZSHEARONE,rIn) {} +}; + +//------------------------------ +// class SdrVertShearOneItem +//------------------------------ +class SdrVertShearOneItem: public SdrAngleItem { +public: + SdrVertShearOneItem(long nAngle=0): SdrAngleItem(SDRATTR_VERTSHEARONE,nAngle) {} + SdrVertShearOneItem(SvStream& rIn): SdrAngleItem(SDRATTR_VERTSHEARONE,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/sxtraitm.hxx b/svx/inc/svx/sxtraitm.hxx new file mode 100644 index 000000000000..8575d29e4c91 --- /dev/null +++ b/svx/inc/svx/sxtraitm.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sxtraitm.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SXTRAITM_HXX +#define _SXTRAITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +//------------------------------ +// class SdrTransformRef1XItem +//------------------------------ +class SdrTransformRef1XItem: public SdrMetricItem { +public: + SdrTransformRef1XItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1X,nHgt) {} + SdrTransformRef1XItem(SvStream& rIn): SdrMetricItem(SDRATTR_TRANSFORMREF1X,rIn) {} +}; + +//------------------------------ +// class SdrTransformRef1YItem +//------------------------------ +class SdrTransformRef1YItem: public SdrMetricItem { +public: + SdrTransformRef1YItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1Y,nHgt) {} + SdrTransformRef1YItem(SvStream& rIn): SdrMetricItem(SDRATTR_TRANSFORMREF1Y,rIn) {} +}; + +//------------------------------ +// class SdrTransformRef2XItem +//------------------------------ +class SdrTransformRef2XItem: public SdrMetricItem { +public: + SdrTransformRef2XItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2X,nHgt) {} + SdrTransformRef2XItem(SvStream& rIn): SdrMetricItem(SDRATTR_TRANSFORMREF2X,rIn) {} +}; + +//------------------------------ +// class SdrTransformRef2YItem +//------------------------------ +class SdrTransformRef2YItem: public SdrMetricItem { +public: + SdrTransformRef2YItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2Y,nHgt) {} + SdrTransformRef2YItem(SvStream& rIn): SdrMetricItem(SDRATTR_TRANSFORMREF2Y,rIn) {} +}; + +#endif diff --git a/svx/inc/svx/tabarea.hxx b/svx/inc/svx/tabarea.hxx new file mode 100644 index 000000000000..712866d53c3b --- /dev/null +++ b/svx/inc/svx/tabarea.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tabarea.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TAB_AREA_HXX +#define _SVX_TAB_AREA_HXX + +// include --------------------------------------------------------------- + +#include <svtools/valueset.hxx> +#ifndef _IMAGEBTN_HXX //autogen +#include <vcl/imagebtn.hxx> +#endif +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#include <svx/dlgctrl.hxx> +#include <svx/xsetit.hxx> +#include <svx/xfillit0.hxx> +#include <svx/xfillit.hxx> + +// enum ------------------------------------------------------------------ + +enum ColorModel +{ + CM_RGB, + CM_CMYK // kann um weitere Modelle, z.B. HSV erweitert werden +}; + +enum PageType +{ + PT_AREA, + PT_GRADIENT, + PT_HATCH, + PT_BITMAP, + PT_COLOR, + PT_SHADOW, + PT_TRANSPARENCE +}; + +// define ---------------------------------------------------------------- + +typedef USHORT ChangeType; // auch in tab_line.hxx (mitpflegen !!!) + +#define CT_NONE ( (ChangeType) 0x0000 ) +#define CT_MODIFIED ( (ChangeType) 0x0001 ) +#define CT_CHANGED ( (ChangeType) 0x0002 ) +#define CT_SAVED ( (ChangeType) 0x0004 ) + +class SdrModel; +class SdrView; + +#endif // _SVX_TAB_AREA_HXX + diff --git a/svx/inc/svx/tabline.hxx b/svx/inc/svx/tabline.hxx new file mode 100644 index 000000000000..09b579c541c0 --- /dev/null +++ b/svx/inc/svx/tabline.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tabline.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TAB_LINE_HXX +#define _SVX_TAB_LINE_HXX + +// include --------------------------------------------------------------- + +#ifndef _IMAGEBTN_HXX //autogen +#include <vcl/imagebtn.hxx> +#endif +#ifndef _GROUP_HXX //autogen +#include <vcl/group.hxx> +#endif +#include <svtools/stdctrl.hxx> +#include <svx/svdpage.hxx> +#include <svx/xlineit0.hxx> +#include <svx/xlineit.hxx> +#include <svx/xsetit.hxx> +#include <svx/dlgctrl.hxx> +#include <vcl/menubtn.hxx> +class SvxBrushItem; +// define ---------------------------------------------------------------- + +typedef USHORT ChangeType; // auch in tab_area.hxx (mitpflegen !!!) + +#define CT_NONE ( (ChangeType) 0x0000 ) +#define CT_MODIFIED ( (ChangeType) 0x0001 ) +#define CT_CHANGED ( (ChangeType) 0x0002 ) +#define CT_SAVED ( (ChangeType) 0x0004 ) + +class SdrModel; +class SdrObject; + +//defines fuer die Symbolauswahl auf der Page +//Positive Werte (0,...n) gibt den Indes in pSymbollist an, sonst : +#define SVX_SYMBOLTYPE_NONE (-3) //Symbol unsichtbar +#define SVX_SYMBOLTYPE_AUTO (-2) //Symbol automatisch erzeugen +#define SVX_SYMBOLTYPE_BRUSHITEM (-1) //Symbol ist als Graphic im Item enthalten: +#define SVX_SYMBOLTYPE_UNKNOWN (-100) //unbekannt/nicht initialisiert + +#endif // _SVX_TAB_LINE_HXX + diff --git a/svx/inc/svx/tbcontrl.hxx b/svx/inc/svx/tbcontrl.hxx new file mode 100644 index 000000000000..e531ebfad54b --- /dev/null +++ b/svx/inc/svx/tbcontrl.hxx @@ -0,0 +1,450 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tbcontrl.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TBCONTRL_HXX +#define _SVX_TBCONTRL_HXX + +/*--------------------------------------------------------------*\ + + Beschreibung: + ------------- + ToolBox-Controler fuer: + Font-Name, Font-Hoehe, Font-Farbe + Vorder-/Hintergrundfarbe /-Muster + Rahmen, Linien + (Absatz-)Vorlagen + + Bedienung: + ---------- + SvxFontNameToolBoxControl + ------------------------- + Item-Typ: SvxFontItem + Execute-Id: SID_ATTR_CHAR_FONT + -> SvxFontItem + Zusatzdaten + aus DocShell: SvxFontListItem (SID_ATTR_CHAR_FONTLIST) + + SvxFontHeightToolBoxControl + --------------------------- + Item-Typ: SvxFontHeightItem + Execute-Id: SID_ATTR_CHAR_FONTHEIGHT + -> SvxFontHeightItem + Zusatzdaten + aus DocShell: SvxFontListItem (SID_ATTR_CHAR_FONTLIST) + + SvxFontColorToolBoxControl + -------------------------- + Item-Typ: SvxFontColorItem + Execute-Id: SID_ATTR_CHAR_COLOR + -> SvxFontColorItem + Zusatzdaten + aus DocShell: z.Zt. keine + in Zukunft: Farbpalette + + class SvxFontColorExtToolBoxControl + ----------------------------------- + fuer die Zeichenfarbe + Item-Typ SvxColorItem + und SfxBoolItem + Execute-Id SID_ATTR_CHAR_COLOR + und SID_ATTR_CHAR_COLOR_EXT + + fuer den Zeichenhintergrund + Item-Typ SvxColorItem + und SfxBoolItem + Execute-Id SID_ATTR_CHAR_COLOR_BACKGROUND + und SID_ATTR_CHAR_COLOR_BACKGROUND_EXT + + SvxColorToolBoxControl + -------------------------------- + Item-Typ: SvxBrushItem + Execute-Id: SID_BACKGROUND_COLOR + -> SvxColorItem + Zusatzdaten + aus DocShell: z.Zt. keine + in Zukunft: Farbpalette + + SvxPatternToolBoxControl + ------------------------ + Item-Typ: SvxBrushItem + Execute-Id: SID_BACKGROUND_PATTERN + -> SvxBrushItem + Zusatzdaten + aus DocShell: z.Zt. keine + in Zukunft: Farbpalette + Bemerkung: Auswertung des BrushItems: + Die Brush-FillColor() wird als Schalter + missbraucht, um zu unterscheiden, ob ein + neuer Style oder eine neue Farbe + gesetzt wurde: + + GetFillColor() == COL_BLACK -> GetStyle() auswerten, + GetFillColor() == COL_WHITE -> GetColor() auswerten + + SvxFrameToolBoxControl + ---------------------- + Item-Typ: SvxBoxItem + Execute-Id: SID_ATTR_BORDER + -> SvxBoxItem & SvxBoxInfoItem + Zusatzdaten + aus DocShell: keine + Bemerkung: liefert je nach gewaehltem ValueSet-Item + nur SvxBoxItem oder zusaetzlich SvxBoxInfoItem + Wird dem Controller ein SfxUInt16Item mit einem + Wert != 0 geschickt, so wird der Paragraph-Mode + eingeschaltet, d.h. die letzte Zeile wird + ausgeblendet. Ein Wert == 0 schaltet wieder in + den Tabellenmodus. + + SvxFrameLineStyleToolBoxControl + ------------------------------- + Item-Typ: SvxLineItem + Execute-Id: SID_FRAME_LINESTYLE + -> SvxLineItem + Zusatzdaten + aus DocShell: keine + Bemerkung: liefert ein SvxLineItem, welches eine SvxBorderLine + ohne Farbinformation liefert. + + SvxFrameLineColorToolBoxControl + ------------------------------- + Item-Typ: SvxColorItem + Execute-Id: SID_FRAME_LINECOLOR + -> SvxColorItem + Zusatzdaten + aus DocShell: keine + + SvxStyleToolBoxControl + ---------------------- + Item-Typ: SfxTemplateItem + Execute-Id: SID_TEMPLATE_APPLY + -> StyleName (SfxStringItem) + -> eStyleFamily (SfxUInt16Item) + Zusatzdaten + aus DocShell: keine + Bemerkung: Umschalten der Familie ueber Invalidate + an den Bindings (->SfxStyleControllerItem) + +\*--------------------------------------------------------------*/ + +// include --------------------------------------------------------------- + +// ITEMID_...-Defines im *.cxx + +#include <rsc/rscsfx.hxx> +#include <svl/lstner.hxx> +#include <sfx2/tbxctrl.hxx> +#include <svx/strarray.hxx> +#include "svx/svxdllapi.h" + +#include <com/sun/star/awt/FontDescriptor.hpp> + +// wichtig im mit HeDaBu erzeugtem tbxctrls.hxx!!! +class SvxLineItem; +class SvxBoxInfoItem; +class SvxFontItem; +class SvxFontHeightItem; +class SfxStyleControllerItem_Impl; +class SfxStyleSheetBasePool; +class SfxTemplateItem; + +namespace svx +{ + class ToolboxButtonColorUpdater; +} +//######################################################################## + +//======================================================================== +// class SvxStyleToolBoxControl ------------------------------------------ +//======================================================================== +class SVX_DLLPUBLIC SvxStyleToolBoxControl : public SfxToolBoxControl +{ + struct Impl; +public: + SFX_DECL_TOOLBOX_CONTROL(); + + SvxStyleToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxStyleToolBoxControl(); + + virtual Window* CreateItemWindow( Window *pParent ); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + + DECL_LINK( VisibilityNotification, void* ); +protected: + // XInitialization + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + + // XUpdatable + virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); + +private: + +#define MAX_FAMILIES 5 + + SfxStyleSheetBasePool* pStyleSheetPool; + SfxStyleControllerItem_Impl* pBoundItems [MAX_FAMILIES]; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xBoundItems[MAX_FAMILIES]; + SfxTemplateItem* pFamilyState[MAX_FAMILIES]; + USHORT nActFamily; // Id in der ToolBox = Position - 1 + USHORT nActFilter; // FilterIdx + USHORT nAppFilter; // Filter, den die App gesetzt hat + String aCurSel; + BOOL bListening; + Impl* pImpl; + + SVX_DLLPRIVATE void Update(); + SVX_DLLPRIVATE void FillStyleBox(); + SVX_DLLPRIVATE void SelectStyle( const String& rStyleName ); + +friend class SfxStyleControllerItem_Impl; + + SVX_DLLPRIVATE void SetFamilyState ( USHORT nIdx, const SfxTemplateItem* pItem ); + SVX_DLLPRIVATE SfxStyleFamily GetActFamily (); +}; + +//======================================================================== +// class SvxFontNameToolBoxControl --------------------------------------- +//======================================================================== + + +class SVX_DLLPUBLIC SvxFontNameToolBoxControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxFontNameToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + + virtual void StateChanged ( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual Window* CreateItemWindow ( Window *pParent ); +}; + + + +//======================================================================== +// class SvxFontHeightToolBoxControl ------------------------------------- +//======================================================================== + +/* +class SvxFontSizeItem; +class SvxFontItem; +class SvxFontSizeBox_Impl; + +class SVX_DLLPUBLIC SvxFontHeightToolBoxControl : public SfxToolBoxControl +{ + SvxFontSizeBox_Impl* pBox; // ItemWindow f"ur quick-access + ::com::sun::star::awt::FontDescriptor aCurrentFont; // Kopie des aktuellen Fonts + +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxFontHeightToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxFontHeightToolBoxControl(); + + // new controller API + // XStatusListener + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) + throw ( ::com::sun::star::uno::RuntimeException ); + + virtual Window* CreateItemWindow( Window *pParent ); +}; +*/ + + +//======================================================================== +// class SvxFontColorToolBoxControl -------------------------------------- +//======================================================================== + + + +class SVX_DLLPUBLIC SvxFontColorToolBoxControl : public SfxToolBoxControl +{ + ::svx::ToolboxButtonColorUpdater* pBtnUpdater; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxFontColorToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxFontColorToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + + + +//======================================================================== +// class SvxFontColorExtToolBoxControl -------------------------------------- +//======================================================================== + + + +class SVX_DLLPUBLIC SvxFontColorExtToolBoxControl : public SfxToolBoxControl +{ + using SfxToolBoxControl::StateChanged; + using SfxToolBoxControl::Select; + + // SfxStatusForwarder aForward; + ::svx::ToolboxButtonColorUpdater* pBtnUpdater; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxFontColorExtToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxFontColorExtToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); + virtual void Select( BOOL bMod1 = FALSE ); + +}; + + + +//======================================================================== +// class SvxColorToolBoxControl ------------------------------------------ +//======================================================================== + + +class SVX_DLLPUBLIC SvxColorToolBoxControl : public SfxToolBoxControl +{ + ::svx::ToolboxButtonColorUpdater* pBtnUpdater; +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxColorToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxColorToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + + + +//======================================================================== +// class SvxFrameToolBoxControl ------------------------------------------ +//======================================================================== + + +class SVX_DLLPUBLIC SvxFrameToolBoxControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxFrameToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + +}; + + + +//======================================================================== +// class SvxLineStyleToolBoxControl -------------------------------------- +//======================================================================== + + +class SVX_DLLPUBLIC SvxFrameLineStyleToolBoxControl : public SfxToolBoxControl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxFrameLineStyleToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); +}; + + + +//======================================================================== +// class SvxFrameLineColorToolBoxControl --------------------------------- +//======================================================================== + + +class SVX_DLLPUBLIC SvxFrameLineColorToolBoxControl : public SfxToolBoxControl +{ + ::svx::ToolboxButtonColorUpdater* pBtnUpdater; +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxFrameLineColorToolBoxControl( USHORT nSlotId, + USHORT nId, + ToolBox& rTbx ); + ~SvxFrameLineColorToolBoxControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + + + +class SvxReloadControllerItem_Impl; +class SvxReloadControllerItem : public SfxToolBoxControl +{ +private: + SvxReloadControllerItem_Impl* pImpl; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxReloadControllerItem( USHORT nSlotId, + USHORT nId, + ToolBox& rTbx ); + ~SvxReloadControllerItem(); + +protected: + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); +}; + +class SVX_DLLPUBLIC SvxSimpleUndoRedoController : public SfxToolBoxControl +{ +private: + ::rtl::OUString aDefaultText; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxSimpleUndoRedoController( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxSimpleUndoRedoController(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); +}; + +#endif // #ifndef _SVX_TBCONTRL_HXX diff --git a/svx/inc/svx/tbxcolorupdate.hxx b/svx/inc/svx/tbxcolorupdate.hxx new file mode 100644 index 000000000000..9281366c0ef7 --- /dev/null +++ b/svx/inc/svx/tbxcolorupdate.hxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tbxcolorupdate.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_TBXCOLORUPDATE_HXX +#define SVX_TBXCOLORUPDATE_HXX + +#include <svx/svxdllapi.h> + +#include <tools/gen.hxx> +#include <tools/color.hxx> + +class ToolBox; +class VirtualDevice; + +//........................................................................ +namespace svx +{ +//........................................................................ + +#define TBX_UPDATER_MODE_NONE 0x00 +#define TBX_UPDATER_MODE_CHAR_COLOR 0x01 +#define TBX_UPDATER_MODE_CHAR_BACKGROUND 0x02 +#define TBX_UPDATER_MODE_CHAR_COLOR_NEW 0x03 + + //==================================================================== + //= ToolboxButtonColorUpdater + //==================================================================== + /** helper class to update a color in a toolbox button image + + formerly known as SvxTbxButtonColorUpdater_Impl, residing in svx/source/tbxctrls/colorwindow.hxx. + */ + class SVX_DLLPUBLIC ToolboxButtonColorUpdater + { + public: + ToolboxButtonColorUpdater( USHORT nSlotId, + USHORT nTbxBtnId, + ToolBox* ptrTbx, + USHORT nMode = 0 ); + ~ToolboxButtonColorUpdater(); + + void Update( const Color& rColor ); + + protected: + void DrawChar(VirtualDevice&, const Color&); + + private: + USHORT mnDrawMode; + USHORT mnBtnId; + USHORT mnSlotId; + ToolBox* mpTbx; + Color maCurColor; + Rectangle maUpdRect; + Size maBmpSize; + BOOL mbWasHiContrastMode; + }; + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // SVX_TBXCOLORUPDATE_HXX diff --git a/svx/inc/svx/thesdlg.hxx b/svx/inc/svx/thesdlg.hxx new file mode 100644 index 000000000000..4ca5376ad8a7 --- /dev/null +++ b/svx/inc/svx/thesdlg.hxx @@ -0,0 +1,137 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thesdlg.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_THESDLG_HXX +#define _SVX_THESDLG_HXX +// include --------------------------------------------------------------- + +#ifndef _EDIT_HXX //autogen +#include <vcl/edit.hxx> +#endif +#ifndef _BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#ifndef _LSTBOX_HXX //autogen +#include <vcl/lstbox.hxx> +#endif +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#include <svx/stddlg.hxx> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/beans/PropertyValues.hpp> +#include "svx/svxdllapi.h" + +// forward --------------------------------------------------------------- + +struct ThesDlg_Impl; + +class SvxThesaurusLanguageDlg_Impl; + +namespace com { namespace sun { namespace star { + namespace linguistic2 { + class XThesaurus; + class XMeaning; + } + namespace lang { + struct Locale; + } +}}} + +// class SvxThesaurusDialog ---------------------------------------------- + +class SVX_DLLPUBLIC SvxThesaurusDialog : public SvxStandardDialog +{ +public: + friend class SvxThesaurusLanguageDlg_Impl; + + SvxThesaurusDialog( Window* pParent, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XThesaurus > xThesaurus, + const String &rWord, sal_Int16 nLanguage ); + ~SvxThesaurusDialog(); + + String GetWord() { return aReplaceEdit.GetText(); } + + sal_uInt16 GetLanguage() const; + +private: + FixedText aWordText; + ListBox aWordLB; + FixedText aReplaceText; + Edit aReplaceEdit; + FixedText aMeanText; + ListBox aMeanLB; + FixedText aSynonymText; + ListBox aSynonymLB; + FixedLine aVarFL; + + OKButton aOkBtn; + CancelButton aCancelBtn; + PushButton aLookUpBtn; + PushButton aLangBtn; + HelpButton aHelpBtn; + + String aErrStr; + + ThesDlg_Impl* pImpl; // always != NULL + + SVX_DLLPRIVATE virtual void Apply(); + +#ifdef _SVX_THESDLG_CXX + SVX_DLLPRIVATE void UpdateSynonymBox_Impl(); + SVX_DLLPRIVATE void UpdateMeaningBox_Impl( + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XMeaning > > *pMeaningSeq = NULL ); + SVX_DLLPRIVATE void Init_Impl(sal_Int16 nLanguage); + + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XMeaning > > SAL_CALL + queryMeanings_Impl( + ::rtl::OUString& rTerm, + const ::com::sun::star::lang::Locale& rLocale, + const ::com::sun::star::beans::PropertyValues& rProperties ) + throw(::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // Handler + DECL_LINK( SelectHdl_Impl, ListBox * ); + DECL_LINK( SynonymHdl_Impl, ListBox * ); + DECL_LINK( LookUpHdl_Impl, Button * ); + DECL_LINK( LanguageHdl_Impl, Button * ); + DECL_LINK( EntryHdl_Impl, ListBox * ); + DECL_LINK( SpellErrorHdl_Impl, void * ); +#endif +}; + +#endif + diff --git a/svx/inc/svx/tstpitem.hxx b/svx/inc/svx/tstpitem.hxx new file mode 100644 index 000000000000..b910b1b1e704 --- /dev/null +++ b/svx/inc/svx/tstpitem.hxx @@ -0,0 +1,191 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tstpitem.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TSPTITEM_HXX +#define _SVX_TSPTITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#include <svx/svxenum.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +// class SvxTabStop ------------------------------------------------------ + +#define SVX_TAB_DEFCOUNT 10 +#define SVX_TAB_DEFDIST 1134 // 2cm in twips +#define SVX_TAB_NOTFOUND USHRT_MAX +#define cDfltDecimalChar (sal_Unicode(0x00)) // aus IntlWrapper besorgen +#define cDfltFillChar (sal_Unicode(' ')) + +class SVX_DLLPUBLIC SvxTabStop +{ +private: + long nTabPos; + + SvxTabAdjust eAdjustment; + mutable sal_Unicode m_cDecimal; + sal_Unicode cFill; + + SVX_DLLPRIVATE friend SvStream& operator<<( SvStream&, SvxTabStop& ); + + void fillDecimal() const; + +public: + SvxTabStop(); +#if (_MSC_VER < 1300) + SvxTabStop( const long nPos, + const SvxTabAdjust eAdjst = SVX_TAB_ADJUST_LEFT, + const sal_Unicode cDec = cDfltDecimalChar, + const sal_Unicode cFil = cDfltFillChar ); +#else + SvxTabStop::SvxTabStop( const long nPos, + const SvxTabAdjust eAdjst = SVX_TAB_ADJUST_LEFT, + const sal_Unicode cDec = cDfltDecimalChar, + const sal_Unicode cFil = cDfltFillChar ); +#endif + + long& GetTabPos() { return nTabPos; } + long GetTabPos() const { return nTabPos; } + + SvxTabAdjust& GetAdjustment() { return eAdjustment; } + SvxTabAdjust GetAdjustment() const { return eAdjustment; } + + sal_Unicode& GetDecimal() { fillDecimal(); return m_cDecimal; } + sal_Unicode GetDecimal() const { fillDecimal(); return m_cDecimal; } + + sal_Unicode& GetFill() { return cFill; } + sal_Unicode GetFill() const { return cFill; } + + String GetValueString() const; + + // das "alte" operator==() + BOOL IsEqual( const SvxTabStop& rTS ) const + { + return ( nTabPos == rTS.nTabPos && + eAdjustment == rTS.eAdjustment && + m_cDecimal == rTS.m_cDecimal && + cFill == rTS.cFill ); + } + + // Fuer das SortedArray: + BOOL operator==( const SvxTabStop& rTS ) const + { return nTabPos == rTS.nTabPos; } + BOOL operator <( const SvxTabStop& rTS ) const + { return nTabPos < rTS.nTabPos; } + + SvxTabStop& operator=( const SvxTabStop& rTS ) + { + nTabPos = rTS.nTabPos; + eAdjustment = rTS.eAdjustment; + m_cDecimal = rTS.m_cDecimal; + cFill = rTS.cFill; + return *this; + } +}; + +// class SvxTabStopItem -------------------------------------------------- + +SV_DECL_VARARR_SORT_VISIBILITY( SvxTabStopArr, SvxTabStop, SVX_TAB_DEFCOUNT, 1, SVX_DLLPUBLIC ) + +/* +[Beschreibung] +Dieses Item beschreibt eine Liste von TabStops. +*/ + +class SVX_DLLPUBLIC SvxTabStopItem : public SfxPoolItem, private SvxTabStopArr +{ +//friend class SvxTabStopObject_Impl; + +public: + TYPEINFO(); + + SvxTabStopItem( USHORT nWhich ); + SvxTabStopItem( const USHORT nTabs, + const USHORT nDist, + const SvxTabAdjust eAdjst /*= SVX_TAB_ADJUST_DEFAULT*/, + USHORT nWhich ); + SvxTabStopItem( const SvxTabStopItem& rTSI ); + + // Liefert Index-Position des Tabs zurueck oder TAB_NOTFOUND + USHORT GetPos( const SvxTabStop& rTab ) const; + + // Liefert Index-Position des Tabs an nPos zurueck oder TAB_NOTFOUND + USHORT GetPos( const long nPos ) const; + + // entprivatisiert: + USHORT Count() const { return SvxTabStopArr::Count(); } + BOOL Insert( const SvxTabStop& rTab ); + void Insert( const SvxTabStopItem* pTabs, USHORT nStart = 0, + USHORT nEnd = USHRT_MAX ); + void Remove( SvxTabStop& rTab ) + { SvxTabStopArr::Remove( rTab ); } + void Remove( const USHORT nPos, const USHORT nLen = 1 ) + { SvxTabStopArr::Remove( nPos, nLen ); } + + // Zuweisungsoperator, Gleichheitsoperator (vorsicht: teuer!) + SvxTabStopItem& operator=( const SvxTabStopItem& rTSI ); + + // this is already included in SfxPoolItem declaration + //int operator!=( const SvxTabStopItem& rTSI ) const + // { return !( operator==( rTSI ) ); } + + // SortedArrays liefern nur Stackobjekte zurueck! + const SvxTabStop& operator[]( const USHORT nPos ) const + { + DBG_ASSERT( GetStart() && + nPos < Count(), "op[]" ); + return *( GetStart() + nPos ); + } + const SvxTabStop* GetStart() const + { return SvxTabStopArr::GetData(); } + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream&, USHORT ) const; + virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + + using SvxTabStopArr::Insert; + using SvxTabStopArr::Remove; +}; + +#endif + diff --git a/svx/inc/svx/twolinesitem.hxx b/svx/inc/svx/twolinesitem.hxx new file mode 100644 index 000000000000..5c0094db0f42 --- /dev/null +++ b/svx/inc/svx/twolinesitem.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: twolinesitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TWOLINESITEM_HXX +#define _SVX_TWOLINESITEM_HXX + +#include <sal/types.h> +#include <svl/poolitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +class SVX_DLLPUBLIC SvxTwoLinesItem : public SfxPoolItem +{ + sal_Unicode cStartBracket, cEndBracket; + sal_Bool bOn; +public: + TYPEINFO(); + SvxTwoLinesItem( sal_Bool bOn /*= TRUE*/, + sal_Unicode nStartBracket /*= 0*/, + sal_Unicode nEndBracket /*= 0*/, + sal_uInt16 nId ); + SvxTwoLinesItem( const SvxTwoLinesItem& rAttr ); + virtual ~SvxTwoLinesItem(); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const; + virtual SvStream& Store(SvStream &, USHORT nIVer) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper* pIntl = 0 ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId = 0 ); + + virtual USHORT GetVersion( USHORT nFFVer ) const; + + SvxTwoLinesItem& operator=( const SvxTwoLinesItem& rCpy ) + { + SetValue( rCpy.GetValue() ); + SetStartBracket( rCpy.GetStartBracket() ); + SetEndBracket( rCpy.GetEndBracket() ); + return *this; + } + + sal_Bool GetValue() const { return bOn; } + void SetValue( sal_Bool bFlag ) { bOn = bFlag; } + + sal_Unicode GetStartBracket() const { return cStartBracket; } + void SetStartBracket( sal_Unicode c ) { cStartBracket = c; } + + sal_Unicode GetEndBracket() const { return cEndBracket; } + void SetEndBracket( sal_Unicode c ) { cEndBracket = c; } +}; + +#endif + diff --git a/svx/inc/svx/ucsubset.hrc b/svx/inc/svx/ucsubset.hrc new file mode 100644 index 000000000000..a201ecf9fbb3 --- /dev/null +++ b/svx/inc/svx/ucsubset.hrc @@ -0,0 +1,158 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ucsubset.hrc,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <svx/dialogs.hrc> + +// strings for unicode range descriptions (used e.g. by Charmap dialog) +// (see the Unicode spec and TrueType::OS2.ulUnicodeRange description) +#define RID_SUBSETMAP 1243 +#define RID_SUBSET_START (RID_SVX_START + 901) +#define RID_SUBSET_COUNT 95 + +#define RID_SUBSETSTR_BASIC_LATIN (RID_SUBSET_START + 0) +#define RID_SUBSETSTR_LATIN_1 (RID_SUBSET_START + 1) +#define RID_SUBSETSTR_LATIN_EXTENDED_A (RID_SUBSET_START + 2) +#define RID_SUBSETSTR_LATIN_EXTENDED_B (RID_SUBSET_START + 3) +#define RID_SUBSETSTR_IPA_EXTENSIONS (RID_SUBSET_START + 4) +#define RID_SUBSETSTR_SPACING_MODIFIERS (RID_SUBSET_START + 5) +#define RID_SUBSETSTR_COMB_DIACRITICAL (RID_SUBSET_START + 6) +#define RID_SUBSETSTR_BASIC_GREEK (RID_SUBSET_START + 7) +#define RID_SUBSETSTR_GREEK_SYMS_COPTIC (RID_SUBSET_START + 8) +#define RID_SUBSETSTR_CYRILLIC (RID_SUBSET_START + 9) +#define RID_SUBSETSTR_CYRILLIC_SUPPL (RID_SUBSET_START + 200) +#define RID_SUBSETSTR_ARMENIAN (RID_SUBSET_START + 10) +#define RID_SUBSETSTR_HEBREW_EXTENDED (RID_SUBSET_START + 11) +#define RID_SUBSETSTR_BASIC_HEBREW (RID_SUBSET_START + 12) +#define RID_SUBSETSTR_BASIC_ARABIC (RID_SUBSET_START + 13) +#define RID_SUBSETSTR_ARABIC_EXTENDED (RID_SUBSET_START + 14) +#define RID_SUBSETSTR_DEVANAGARI (RID_SUBSET_START + 15) +#define RID_SUBSETSTR_BENGALI (RID_SUBSET_START + 16) +#define RID_SUBSETSTR_GURMUKHI (RID_SUBSET_START + 17) +#define RID_SUBSETSTR_GUJARATI (RID_SUBSET_START + 18) +#define RID_SUBSETSTR_ORIYA (RID_SUBSET_START + 19) +#define RID_SUBSETSTR_TAMIL (RID_SUBSET_START + 20) +#define RID_SUBSETSTR_TELUGU (RID_SUBSET_START + 21) +#define RID_SUBSETSTR_KANNADA (RID_SUBSET_START + 22) +#define RID_SUBSETSTR_MALAYALAM (RID_SUBSET_START + 23) +#define RID_SUBSETSTR_THAI (RID_SUBSET_START + 24) +#define RID_SUBSETSTR_LAO (RID_SUBSET_START + 25) +#define RID_SUBSETSTR_BASIC_GEORGIAN (RID_SUBSET_START + 26) +#define RID_SUBSETSTR_GEORGIAN_EXTENDED (RID_SUBSET_START + 27) +#define RID_SUBSETSTR_HANGUL_JAMO (RID_SUBSET_START + 28) +#define RID_SUBSETSTR_LATIN_EXTENDED_ADDS (RID_SUBSET_START + 29) +#define RID_SUBSETSTR_GREEK_EXTENDED (RID_SUBSET_START + 30) +#define RID_SUBSETSTR_GENERAL_PUNCTUATION (RID_SUBSET_START + 31) +#define RID_SUBSETSTR_SUB_SUPER_SCRIPTS (RID_SUBSET_START + 32) +#define RID_SUBSETSTR_CURRENCY_SYMBOLS (RID_SUBSET_START + 33) +#define RID_SUBSETSTR_COMB_DIACRITIC_SYMS (RID_SUBSET_START + 34) +#define RID_SUBSETSTR_LETTERLIKE_SYMBOLS (RID_SUBSET_START + 35) +#define RID_SUBSETSTR_NUMBER_FORMS (RID_SUBSET_START + 36) +#define RID_SUBSETSTR_ARROWS (RID_SUBSET_START + 37) +#define RID_SUBSETSTR_MATH_OPERATORS (RID_SUBSET_START + 38) +#define RID_SUBSETSTR_MISC_TECHNICAL (RID_SUBSET_START + 39) +#define RID_SUBSETSTR_CONTROL_PICTURES (RID_SUBSET_START + 40) +#define RID_SUBSETSTR_OPTICAL_CHAR_REC (RID_SUBSET_START + 41) +#define RID_SUBSETSTR_ENCLOSED_ALPHANUM (RID_SUBSET_START + 42) +#define RID_SUBSETSTR_BOX_DRAWING (RID_SUBSET_START + 43) +#define RID_SUBSETSTR_BLOCK_ELEMENTS (RID_SUBSET_START + 44) +#define RID_SUBSETSTR_GEOMETRIC_SHAPES (RID_SUBSET_START + 45) +#define RID_SUBSETSTR_MISC_DINGBATS (RID_SUBSET_START + 46) +#define RID_SUBSETSTR_DINGBATS (RID_SUBSET_START + 47) +#define RID_SUBSETSTR_CJK_SYMS_PUNCTUATION (RID_SUBSET_START + 48) +#define RID_SUBSETSTR_HIRAGANA (RID_SUBSET_START + 49) +#define RID_SUBSETSTR_KATAKANA (RID_SUBSET_START + 50) +#define RID_SUBSETSTR_BOPOMOFO (RID_SUBSET_START + 51) +#define RID_SUBSETSTR_HANGUL_COMPAT_JAMO (RID_SUBSET_START + 52) +#define RID_SUBSETSTR_CJK_MISC (RID_SUBSET_START + 53) +#define RID_SUBSETSTR_ENCLOSED_CJK_LETTERS (RID_SUBSET_START + 54) +#define RID_SUBSETSTR_CJK_COMPATIBILITY (RID_SUBSET_START + 55) +#define RID_SUBSETSTR_HANGUL (RID_SUBSET_START + 56) + +#define RID_SUBSETSTR_CJK_UNIFIED_IDGRAPH (RID_SUBSET_START + 59) +#define RID_SUBSETSTR_PRIVATE_USE_AREA (RID_SUBSET_START + 60) +#define RID_SUBSETSTR_CJK_COMPAT_IDGRAPHS (RID_SUBSET_START + 61) +#define RID_SUBSETSTR_ALPHA_PRESENTATION (RID_SUBSET_START + 62) +#define RID_SUBSETSTR_ARABIC_PRESENT_A (RID_SUBSET_START + 63) +#define RID_SUBSETSTR_COMBINING_HALF_MARKS (RID_SUBSET_START + 64) +#define RID_SUBSETSTR_CJK_COMPAT_FORMS (RID_SUBSET_START + 65) +#define RID_SUBSETSTR_SMALL_FORM_VARIANTS (RID_SUBSET_START + 66) +#define RID_SUBSETSTR_ARABIC_PRESENT_B (RID_SUBSET_START + 67) +#define RID_SUBSETSTR_HALFW_FULLW_FORMS (RID_SUBSET_START + 68) +#define RID_SUBSETSTR_SPECIALS (RID_SUBSET_START + 69) + +#define RID_SUBSETSTR_HANGUL_GA (RID_SUBSET_START + 150) +#define RID_SUBSETSTR_HANGUL_NA (RID_SUBSET_START + 151) +#define RID_SUBSETSTR_HANGUL_DA (RID_SUBSET_START + 152) +#define RID_SUBSETSTR_HANGUL_RA (RID_SUBSET_START + 153) +#define RID_SUBSETSTR_HANGUL_MA (RID_SUBSET_START + 154) +#define RID_SUBSETSTR_HANGUL_BA (RID_SUBSET_START + 155) +#define RID_SUBSETSTR_HANGUL_SA (RID_SUBSET_START + 156) +#define RID_SUBSETSTR_HANGUL_AH (RID_SUBSET_START + 157) +#define RID_SUBSETSTR_HANGUL_JA (RID_SUBSET_START + 158) +#define RID_SUBSETSTR_HANGUL_CHA (RID_SUBSET_START + 159) +#define RID_SUBSETSTR_HANGUL_KA (RID_SUBSET_START + 160) +#define RID_SUBSETSTR_HANGUL_TA (RID_SUBSET_START + 161) +#define RID_SUBSETSTR_HANGUL_PA (RID_SUBSET_START + 162) +#define RID_SUBSETSTR_HANGUL_HA (RID_SUBSET_START + 163) +#define RID_SUBSETSTR_YI (RID_SUBSET_START + 164) + +#define RID_SUBSETSTR_SINHALA (RID_SUBSET_START + 165) +#define RID_SUBSETSTR_TIBETAN (RID_SUBSET_START + 166) +#define RID_SUBSETSTR_MYANMAR (RID_SUBSET_START + 167) +#define RID_SUBSETSTR_KHMER (RID_SUBSET_START + 168) + +#define RID_SUBSETSTR_OGHAM (RID_SUBSET_START + 170) +#define RID_SUBSETSTR_RUNIC (RID_SUBSET_START + 171) +#define RID_SUBSETSTR_SYRIAC (RID_SUBSET_START + 172) +#define RID_SUBSETSTR_THAANA (RID_SUBSET_START + 173) +#define RID_SUBSETSTR_ETHIOPIC (RID_SUBSET_START + 174) +#define RID_SUBSETSTR_CHEROKEE (RID_SUBSET_START + 175) +#define RID_SUBSETSTR_CANADIAN_ABORIGINAL (RID_SUBSET_START + 176) +#define RID_SUBSETSTR_MONGOLIAN (RID_SUBSET_START + 177) +#define RID_SUBSETSTR_CJK_EXT_A_UNIFIED_IDGRAPH (RID_SUBSET_START + 178) + +#define RID_SUBSETSTR_MISC_MATH_SYMS_A (RID_SUBSET_START + 210) +#define RID_SUBSETSTR_SUPPL_ARROWS_A (RID_SUBSET_START + 211) +#define RID_SUBSETSTR_BRAILLE_PATTERNS (RID_SUBSET_START + 212) +#define RID_SUBSETSTR_SUPPL_ARROWS_B (RID_SUBSET_START + 213) +#define RID_SUBSETSTR_MISC_MATH_SYMS_B (RID_SUBSET_START + 214) +#define RID_SUBSETSTR_CJK_RADICAL_SUPPL (RID_SUBSET_START + 215) +#define RID_SUBSETSTR_KANXI_RADICALS (RID_SUBSET_START + 216) +#define RID_SUBSETSTR_IDEO_DESC_CHARS (RID_SUBSET_START + 217) + +#define RID_SUBSETSTR_TAGALOG (RID_SUBSET_START + 220) +#define RID_SUBSETSTR_HANUNOO (RID_SUBSET_START + 221) +#define RID_SUBSETSTR_TAGBANWA (RID_SUBSET_START + 222) +#define RID_SUBSETSTR_BUHID (RID_SUBSET_START + 223) +#define RID_SUBSETSTR_KANBUN (RID_SUBSET_START + 224) +#define RID_SUBSETSTR_BOPOMOFO_EXTENDED (RID_SUBSET_START + 225) +#define RID_SUBSETSTR_KATAKANA_PHONETIC (RID_SUBSET_START + 226) + +#define RID_SUBSET_END (RID_SUBSET_START + 299) diff --git a/svx/inc/svx/ucsubset.hxx b/svx/inc/svx/ucsubset.hxx new file mode 100644 index 000000000000..3e9de786063d --- /dev/null +++ b/svx/inc/svx/ucsubset.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ucsubset.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_SUBSETMAP_HXX +#define _SVX_SUBSETMAP_HXX + +#include "svx/svxdllapi.h" + +#include <svx/ucsubset.hrc> +#include <vcl/metric.hxx> + +#include <list> + +class FontCharMap; + +// classes Subset & SubsetMap -------------------------------------------- +// TODO: should be moved into Font Attributes territory, +// we let them mature here though because this is currently the only use + +class Subset +{ +public: + Subset( sal_UCS4 nMin, sal_UCS4 nMax, const String& aName ) + : mnRangeMin(nMin), mnRangeMax(nMax), maRangeName(aName) + {} + + Subset( sal_UCS4 nMin, sal_UCS4 nMax, int resId ); + + sal_UCS4 GetRangeMin() const { return mnRangeMin;} + sal_UCS4 GetRangeMax() const { return mnRangeMax;} + const String GetName() const { return maRangeName;} + +private: + sal_UCS4 mnRangeMin; + sal_UCS4 mnRangeMax; + String maRangeName; +}; + +typedef ::std::list<Subset> SubsetList; + +class SVX_DLLPUBLIC SubsetMap : private Resource +{ +public: + SubsetMap( const FontCharMap* ); + + const Subset* GetSubsetByUnicode( sal_UCS4 ) const; + const Subset* GetNextSubset( bool bFirst ) const; + +private: + SubsetList maSubsets; + mutable SubsetList::const_iterator maSubsetIterator; + + SVX_DLLPRIVATE void InitList(); + SVX_DLLPRIVATE void ApplyCharMap( const FontCharMap* ); +}; + +#endif diff --git a/svx/inc/svx/udlnitem.hxx b/svx/inc/svx/udlnitem.hxx new file mode 100644 index 000000000000..33d5d59e3ff6 --- /dev/null +++ b/svx/inc/svx/udlnitem.hxx @@ -0,0 +1,139 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: udlnitem.hxx,v $ + * $Revision: 1.4.212.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_UDLNITEM_HXX +#define _SVX_UDLNITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include <vcl/vclenum.hxx> +#include <tools/color.hxx> +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxTextLineItem ------------------------------------------------ + +/* Value container for underline and overline font effects */ + +class SVX_DLLPUBLIC SvxTextLineItem : public SfxEnumItem +{ + Color mColor; +public: + TYPEINFO(); + + SvxTextLineItem( const FontUnderline eSt, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual USHORT GetValueCount() const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId = 0 ); + + // MS VC4.0 kommt durcheinander + void SetValue( USHORT nNewVal ) + {SfxEnumItem::SetValue(nNewVal); } + virtual int HasBoolValue() const; + virtual BOOL GetBoolValue() const; + virtual void SetBoolValue( BOOL bVal ); + + virtual int operator==( const SfxPoolItem& ) const; + + inline SvxTextLineItem& operator=(const SvxTextLineItem& rTextLine) + { + SetValue( rTextLine.GetValue() ); + SetColor( rTextLine.GetColor() ); + return *this; + } + + // enum cast + FontUnderline GetLineStyle() const + { return (FontUnderline)GetValue(); } + void SetLineStyle( FontUnderline eNew ) + { SetValue((USHORT) eNew); } + + const Color& GetColor() const { return mColor; } + void SetColor( const Color& rCol ) { mColor = rCol; } +}; + +// class SvxUnderlineItem ------------------------------------------------ + +/* Value container for underline font effects */ + +class SVX_DLLPUBLIC SvxUnderlineItem : public SvxTextLineItem +{ +public: + TYPEINFO(); + + SvxUnderlineItem( const FontUnderline eSt, + const USHORT nId ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual String GetValueTextByPos( USHORT nPos ) const; +}; + +// class SvxOverlineItem ------------------------------------------------ + +/* Value container for overline font effects */ + +class SVX_DLLPUBLIC SvxOverlineItem : public SvxTextLineItem +{ +public: + TYPEINFO(); + + SvxOverlineItem( const FontUnderline eSt, + const USHORT nId ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual String GetValueTextByPos( USHORT nPos ) const; +}; + +#endif // #ifndef _SVX_UDLNITEM_HXX diff --git a/svx/inc/svx/ulspitem.hxx b/svx/inc/svx/ulspitem.hxx new file mode 100644 index 000000000000..9c57a445a0a7 --- /dev/null +++ b/svx/inc/svx/ulspitem.hxx @@ -0,0 +1,119 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ulspitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ULSPITEM_HXX +#define _SVX_ULSPITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/poolitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +namespace rtl +{ + class OUString; +} + +// class SvxULSpaceItem -------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt den oberen und unteren Rand einer Seite oder Absatz. +*/ + +#define ULSPACE_16_VERSION ((USHORT)0x0001) + +class SVX_DLLPUBLIC SvxULSpaceItem : public SfxPoolItem +{ + USHORT nUpper; //Oberer Rand + USHORT nLower; //Unterer Rand + USHORT nPropUpper, nPropLower; // relativ oder absolut (=100%) +public: + TYPEINFO(); + + SvxULSpaceItem( const USHORT nId ); + SvxULSpaceItem( const USHORT nUp, const USHORT nLow, + const USHORT nId ); + inline SvxULSpaceItem& operator=( const SvxULSpaceItem &rCpy ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual int ScaleMetrics( long nMult, long nDiv ); + virtual int HasMetrics() const; + + inline void SetUpper( const USHORT nU, const USHORT nProp = 100 ); + inline void SetLower( const USHORT nL, const USHORT nProp = 100 ); + + void SetUpperValue( const USHORT nU ) { nUpper = nU; } + void SetLowerValue( const USHORT nL ) { nLower = nL; } + void SetPropUpper( const USHORT nU ) { nPropUpper = nU; } + void SetPropLower( const USHORT nL ) { nPropLower = nL; } + + USHORT GetUpper() const { return nUpper; } + USHORT GetLower() const { return nLower; } + USHORT GetPropUpper() const { return nPropUpper; } + USHORT GetPropLower() const { return nPropLower; } +}; + +inline SvxULSpaceItem &SvxULSpaceItem::operator=( const SvxULSpaceItem &rCpy ) +{ + nUpper = rCpy.GetUpper(); + nLower = rCpy.GetLower(); + nPropUpper = rCpy.GetPropUpper(); + nPropLower = rCpy.GetPropLower(); + return *this; +} + +inline void SvxULSpaceItem::SetUpper( const USHORT nU, const USHORT nProp ) +{ + nUpper = USHORT((ULONG(nU) * nProp ) / 100); nPropUpper = nProp; +} +inline void SvxULSpaceItem::SetLower( const USHORT nL, const USHORT nProp ) +{ + nLower = USHORT((ULONG(nL) * nProp ) / 100); nPropLower = nProp; +} + +#endif + diff --git a/svx/inc/svx/unoedsrc.hxx b/svx/inc/svx/unoedsrc.hxx new file mode 100644 index 000000000000..6c3025072e3c --- /dev/null +++ b/svx/inc/svx/unoedsrc.hxx @@ -0,0 +1,554 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoedsrc.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOEDSRC_HXX +#define _SVX_UNOEDSRC_HXX + +#include <com/sun/star/accessibility/TextSegment.hpp> + +#include <tools/solar.h> +#include <i18npool/lang.h> +#include <tools/link.hxx> +#include <tools/gen.hxx> +#include <vcl/mapmod.hxx> +#include <tools/string.hxx> +#ifndef _SV_COLOR_HXX //autogen +#include <tools/color.hxx> +#endif +#include <svl/poolitem.hxx> +#include <svl/itempool.hxx> +#include "svx/svxdllapi.h" + +#include <list> + +struct ESelection; +struct EFieldInfo; +struct EBulletInfo; +class OutputDevice; +class String; +class SfxItemSet; +class SvUShorts; +class SvxTextForwarder; +class SvxViewForwarder; +class SvxEditViewForwarder; +class SvxFieldItem; +class SfxBroadcaster; +class EECharAttribArray; +class SvxUnoTextRangeBase; + +typedef std::list< SvxUnoTextRangeBase* > SvxUnoTextRangeBaseList; + +/** Wrapper class for unified EditEngine/Outliner access + + This class wraps a textual object, which might or might not + contain an EditEngine/Outliner. Is used e.g. for filling an + EditEngine with the content of a cell, note page or page template. +*/ +class SVX_DLLPUBLIC SvxEditSource +{ +public: + virtual ~SvxEditSource(); + + /// Returns a new reference to the same object. This is a shallow copy + virtual SvxEditSource* Clone() const = 0; + + /** Query the text forwarder + + @return the text forwarder, or NULL if the underlying object is dead + */ + virtual SvxTextForwarder* GetTextForwarder() = 0; + + /** Query the view forwarder + + @return the view forwarder, or NULL if the underlying object + is dead, or if no view is available + + @derive default implementation provided, overriding is optional + */ + virtual SvxViewForwarder* GetViewForwarder(); + + /** Query the edit view forwarder + + @param bCreate + Determines whether an EditView should be created, if there is + none active. If set to sal_True, and the underlying object is + not in EditMode, the text forwarder changes and the object is + set to EditMode. + + @return the edit view forwarder, or NULL if the underlying + object is dead, or if no view is available (if bCreate is + sal_False, NULL is also returned if the object is not in + EditMode) + + @derive default implementation provided, overriding is optional + + @attention If this method is called with bCreate equal to + sal_True, all previously returned text forwarder can become + invalid + */ + virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate = sal_False ); + + /// Write back data to model + virtual void UpdateData() = 0; + + /** Returns broadcaster the underlying edit engine's events are sent from + + @derive default implementation provided, overriding is optional + */ + virtual SfxBroadcaster& GetBroadcaster() const; + + /** adds the given SvxUnoTextRangeBase to the text object + capsulated by this SvxEditSource. This allows the text + object to inform all created text ranges about changes + and also allows to re use already created instances. + All SvxUnoTextRangeBase must remove itself with + removeRange() before theire deleted. */ + virtual void addRange( SvxUnoTextRangeBase* pNewRange ); + + /** removes the given SvxUnoTextRangeBase from the text + object capsulated by this SvxEditSource. This text range + will not be informed any longer of changes on the underlying + text and will also not re used anymore. */ + virtual void removeRange( SvxUnoTextRangeBase* pOldRange ); + + /** returns a const list of all text ranges that are registered + for the underlying text object. */ + virtual const SvxUnoTextRangeBaseList& getRanges() const; +}; + + +/** Contains an EditEngine or an Outliner and unifies access to them. + + The EditEngine-UNO objects use this class only. To reflect changes + not only in the EditEngine, but also in the model data, call + SvxEditSource::UpdateData(). This copies back the data to the model's + EditTextObject/OutlinerParaObject. + */ +class SVX_DLLPUBLIC SvxTextForwarder +{ +public: + virtual ~SvxTextForwarder(); + + virtual USHORT GetParagraphCount() const = 0; + virtual USHORT GetTextLen( USHORT nParagraph ) const = 0; + virtual String GetText( const ESelection& rSel ) const = 0; + virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const = 0; + virtual SfxItemSet GetParaAttribs( USHORT nPara ) const = 0; + virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) = 0; + virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) = 0; + virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const = 0; + + virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const = 0; + virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const = 0; + + virtual void QuickInsertText( const String& rText, const ESelection& rSel ) = 0; + virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) = 0; + virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) = 0; + virtual void QuickInsertLineBreak( const ESelection& rSel ) = 0; + + virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0; + + virtual SfxItemPool* GetPool() const = 0; + + virtual const SfxItemSet* GetEmptyItemSetPtr() = 0; + + // implementation functions for XParagraphAppend and XTextPortionAppend + virtual void AppendParagraph() = 0; + virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ) = 0; + + // XTextCopy + virtual void CopyText(const SvxTextForwarder& rSource) = 0; + + /** Query state of forwarder + + @return sal_False, if no longer valid + */ + virtual BOOL IsValid() const = 0; + + /** Query language of character at given position on the underlying edit engine + + @param nPara[0 .. n-1] + Index of paragraph to query language in + + @param nIndex[0 .. m-1] + Index of character to query language of + */ + virtual LanguageType GetLanguage( USHORT nPara, USHORT nIndex ) const = 0; + + /** Query number of fields in the underlying edit engine + + @param nPara[0 .. n-1] + Index of paragraph to query field number in + */ + virtual USHORT GetFieldCount( USHORT nPara ) const = 0; + + /** Query information for given field number in the underlying edit engine + + @param nPara[0 .. n-1] + Index of paragraph to query field info in + + @param nField[0 .. m-1] + Index of field to query information of + */ + virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const = 0; + + /** Query information regarding bullets for given paragraph on the underlying edit engine + + @param nPara[0 .. n-1] + Index of paragraph to query bullet info on + */ + virtual EBulletInfo GetBulletInfo( USHORT nPara ) const = 0; + + /** Query the bounding rectangle of the given character + + @param nPara[0 .. n] + Index of paragraph to query the bounds in. <p>The virtual + character after the last character of the represented text, + i.e. the one at position n is a special case. Because it does + not represent an existing character its bounding box is + defined in relation to preceding characters. It should be + rougly equivalent to the bounding box of some character when + inserted at the end of the text. Its height typically being + the maximal height of all the characters in the text or the + height of the preceding character, its width being at least + one pixel so that the bounding box is not degenerate.<br> + + @param nIndex[0 .. m-1] + Index of character to query the bounds of + + @return rectangle in logical coordinates, relative to upper + left corner of text. The coordinates returned here are to be + interpreted in the map mode given by GetMapMode(). + */ + virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const = 0; + + /** Query the bounding rectangle of the given paragraph + + @param nPara[0 .. n-1] + Index of paragraph to query the bounds of + + @return rectangle in logical coordinates, relative to upper + left corner of text. The coordinates returned here are to be + interpreted in the map mode given by GetMapMode(). + */ + virtual Rectangle GetParaBounds( USHORT nPara ) const = 0; + + /** Query the map mode of the underlying EditEngine/Outliner + + @return the map mode used on the EditEngine/Outliner. The + values returned by GetParaBounds() and GetCharBounds() are to + be interpreted in this map mode, the point given to + GetIndexAtPoint() is interpreted in this map mode. + */ + virtual MapMode GetMapMode() const = 0; + + /** Query the reference output device of the underlying EditEngine/Outliner + + @return the OutputDevice used from the EditEngine/Outliner to + format the text. It should be used when performing e.g. font + calculations, since this is usually a printer with fonts and + resolution different from the screen. + */ + virtual OutputDevice* GetRefDevice() const = 0; + + /** Query paragraph and character index of the character at the + given point. Returns sal_True on success, sal_False otherwise + + @param rPoint + Point to query text position of. Is interpreted in logical + coordinates, relativ to the upper left corner of the text, and + in the map mode given by GetMapMode() + + @param rPara[0 .. n-1] + Index of paragraph the point is within + + @param rIndex[0 .. m-1] + Index of character the point is over + + @return sal_True, if the point is over any text and both rPara and rIndex are valid + + */ + virtual sal_Bool GetIndexAtPoint( const Point& rPoint, USHORT& rPara, USHORT& rIndex ) const = 0; + + /** Get the start and the end index of the word at the given index + + An index value on a word leads from the first character of + that word up to and including the last space before the next + word. The index values returned do not contain any leading or + trailing white-space. If the input indices are invalid, + sal_False is returned. + + @param nPara[0 .. n-1] + Index of paragraph to start the search in + + @param nIndex[0 .. m-1] + Index of character to query the search on + + @param rStart + Start index (in the same paragraph) + + @param rEnd + End index (in the same paragraph), this point to the last + character still contained in the query + + @return sal_True, if the result is non-empty + */ + virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& rStart, USHORT& rEnd ) const = 0; + + /** Query range of similar attributes + + Please note that the range returned is half-open: [nStartIndex,nEndIndex) + + @param nStartIndex + Herein, the start index of the range of similar attributes is returned + + @param nEndIndex + Herein, the end index (exclusive) of the range of similar attributes is returned + + @param nIndex + The character index from which the range of similar attributed characters is requested + + @return sal_True, if the range has been successfully determined + */ + virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const = 0; + + /** Query number of lines in the formatted paragraph + + @param nPara[0 .. n-1] + Index of paragraph to query number of lines in + + @return number of lines in given paragraph + + */ + virtual USHORT GetLineCount( USHORT nPara ) const = 0; + + /** Query line length + + @param nPara[0 .. n-1] + Index of paragraph to query line length in + + @param nLine[0 .. m-1] + Index of line in paragraph to query line length of + + */ + virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const = 0; + + /** Query bounds of line in paragraph + + @param rStart [output param; 0 .. text_len] + The index in the paragraph text that belongs to the chara at the start of the line + + @param rEnd [output param; 0 .. text_len] + The index in the paragraph text that follows the last chara in the line + + @param nParagraph[0 .. n-1] + Index of paragraph to query line length in + + @param nLine[0 .. m-1] + Index of line in paragraph to query line length of + + */ + virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const = 0; + + /** Query the line number for a index in the paragraphs text + + @param nPara[0 .. n-1] + Index of paragraph to query line length in + + @param nIndex[0 .. m-1] + Index of of the chara in the paragraph text + + @returns [0 .. k-1] + The line number of the chara in the paragraph + */ + virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const = 0; + + /** Delete given text range and reformat text + + @param rSelection + The text range to be deleted + + @return sal_True if text has been successfully deleted + */ + virtual sal_Bool Delete( const ESelection& rSelection ) = 0; + + /** Insert/Replace given text in given range and reformat text + + @param rText + Text to insert/replace + + @param rSel + Selection where text should be replaced. The empty selection inserts + + @return sal_True if text has been successfully inserted + */ + virtual sal_Bool InsertText( const String& rText, const ESelection& rSel ) = 0; + + /** Updates the formatting + + @see EditEngine::QuickFormatDoc() for details + + @return sal_True if text have been successfully reformatted + */ + virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ) = 0; + + /** Get the outline depth of given paragraph + + @param nPara + Index of the paragraph to query the depth of + + @return the outline level of the given paragraph. The range is + [0,n), where n is the maximal outline level. + */ + virtual sal_Int16 GetDepth( USHORT nPara ) const = 0; + + /** Set the outline depth of given paragraph + + @param nPara + Index of the paragraph to set the depth of + + @param nNewDepth + The depth to set on the given paragraph. The range is + [0,n), where n is the maximal outline level. + + @return TRUE, if depth could be successfully set. Reasons for + failure are e.g. the text does not support outline level + (EditEngine), or the depth range is exceeded. + */ + virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ) = 0; + + virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara ); + virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue ); + + virtual sal_Bool IsParaIsNumberingRestart( sal_uInt16 nPara ); + virtual void SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart ); +}; + +/** Encapsulates the document view for the purpose of unified + EditEngine/Outliner access. + + This one has to be different from the SvxEditViewForwarder, since + the latter is only valid in edit mode. + */ +class SVX_DLLPUBLIC SvxViewForwarder +{ +public: + virtual ~SvxViewForwarder(); + + /** Query state of forwarder + + @return sal_False, if no longer valid + */ + virtual BOOL IsValid() const = 0; + + /** Query visible area of the view containing the text + + @return the visible rectangle of the text, i.e. the part of + the EditEngine or Outliner that is currently on screen. The + values are already in screen coordinates (pixel), and have to + be relative to the EditEngine/Outliner's upper left corner. + */ + virtual Rectangle GetVisArea() const = 0; + + /** Convert from logical, EditEngine-relative coordinates to screen coordinates + + @param rPoint + Point in logical, EditEngine-relative coordinates. + + @param rMapMode + The map mode to interpret the coordinates in. + + @return the point in screen coordinates + */ + virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const = 0; + + /** Convert from screen to logical, EditEngine-relative coordinates + + @param rPoint + Point in screen coordinates + + @param rMapMode + The map mode to interpret the coordinates in. + + @return the point in logical coordinates. + */ + virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const = 0; + +}; + + +/** Encapsulates EditView and OutlinerView for the purpose of unified + EditEngine/Outliner access + */ +class SvxEditViewForwarder : public SvxViewForwarder +{ +public: + + /** Query current selection. + + @param rSelection + Contains the current selection after method call + + @return sal_False, if there is no view or no selection (the empty selection _is_ a selection) + + */ + virtual sal_Bool GetSelection( ESelection& rSelection ) const = 0; + + /** Set selection in view. + + @param rSelection + The selection to set + + @return sal_False, if there is no view or selection is invalid + */ + virtual sal_Bool SetSelection( const ESelection& rSelection ) = 0; + + /** Copy current selection to clipboard. + + @return sal_False if no selection or no view (the empty selection _is_ a selection) + */ + virtual sal_Bool Copy() = 0; + + /** Cut current selection to clipboard. + + @eturn sal_False if no selection or no view (the empty selection _is_ a selection) + */ + virtual sal_Bool Cut() = 0; + + /** Paste clipboard into current selection. + + @return sal_False if no view or no selection (the empty selection _is_ a selection) + */ + virtual sal_Bool Paste() = 0; + +}; + +#endif + diff --git a/svx/inc/svx/unofield.hxx b/svx/inc/svx/unofield.hxx new file mode 100644 index 000000000000..ad819e1b9dbe --- /dev/null +++ b/svx/inc/svx/unofield.hxx @@ -0,0 +1,137 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unofield.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOFIELD_HXX +#define _SVX_UNOFIELD_HXX + +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/beans/XPropertySetInfo.hpp> +#include <com/sun/star/text/XTextField.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <cppuhelper/component.hxx> +#include "svx/svxdllapi.h" + +#include <comphelper/servicehelper.hxx> + +#include <svx/mutxhelp.hxx> + +// ids usable for the constructor +#define ID_DATEFIELD 0 +#define ID_URLFIELD 1 +#define ID_PAGEFIELD 2 +#define ID_PAGESFIELD 3 +#define ID_TIMEFIELD 4 +#define ID_FILEFIELD 5 +#define ID_TABLEFIELD 6 +#define ID_EXT_TIMEFIELD 7 +#define ID_EXT_FILEFIELD 8 +#define ID_AUTHORFIELD 9 +#define ID_MEASUREFIELD 10 +#define ID_EXT_DATEFIELD 11 +#define ID_HEADERFIELD 12 +#define ID_FOOTERFIELD 13 +#define ID_DATETIMEFIELD 14 +#define ID_UNKNOWN 15 // this must be the last entry + +class SvxUnoFieldData_Impl; +class SfxItemPropertySet; +class SvxFieldData; + +class SVX_DLLPUBLIC SvxUnoTextField : public SvxMutexHelper, + public ::cppu::OComponentHelper, + public ::com::sun::star::text::XTextField, + public ::com::sun::star::beans::XPropertySet, + public ::com::sun::star::lang::XServiceInfo, + public ::com::sun::star::lang::XUnoTunnel +{ +private: + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > mxAnchor; + const SfxItemPropertySet* mpPropSet; + sal_Int32 mnServiceId; + SvxUnoFieldData_Impl* mpImpl; + +protected: + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence; + +public: + SvxUnoTextField( sal_Int32 nServiceId ) throw(); + SvxUnoTextField( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xAnchor, const ::rtl::OUString& rPresentation, const SvxFieldData* pFieldData ) throw(); + virtual ~SvxUnoTextField() throw(); + + // Intern + virtual sal_Int32 GetFieldId( const SvxFieldData* pFieldData ) const throw(); + SvxFieldData* CreateFieldData() const throw(); + void SetAnchor( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xAnchor ) { mxAnchor = xAnchor; } + + UNO3_GETIMPLEMENTATION_DECL( SvxUnoTextField ) + + // ::com::sun::star::uno::XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // ::com::sun::star::lang::XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + // XTextField + virtual ::rtl::OUString SAL_CALL getPresentation( sal_Bool bShowCommand ) throw(::com::sun::star::uno::RuntimeException); + + // XTextContent + virtual void SAL_CALL attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XComponent + virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // OComponentHelper + virtual void SAL_CALL disposing(); + + // XServiceInfo + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); +}; + +#endif + diff --git a/svx/inc/svx/unofored.hxx b/svx/inc/svx/unofored.hxx new file mode 100644 index 000000000000..a9c72f766a35 --- /dev/null +++ b/svx/inc/svx/unofored.hxx @@ -0,0 +1,102 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unofored.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOFORED_HXX +#define _SVX_UNOFORED_HXX + +#include <svx/editeng.hxx> +#include <svx/unoedsrc.hxx> +#include "svx/svxdllapi.h" + +// SvxEditEngineForwarder - SvxTextForwarder fuer EditEngine + +class SVX_DLLPUBLIC SvxEditEngineForwarder : public SvxTextForwarder +{ +private: + EditEngine& rEditEngine; + +public: + SvxEditEngineForwarder( EditEngine& rEngine ); + virtual ~SvxEditEngineForwarder(); + + virtual USHORT GetParagraphCount() const; + virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual String GetText( const ESelection& rSel ) const; + virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ) const; + virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; + virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); + virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + + virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; + virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + + virtual void QuickInsertText( const String& rText, const ESelection& rSel ); + virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); + virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); + virtual void QuickInsertLineBreak( const ESelection& rSel ); + + virtual SfxItemPool* GetPool() const; + + virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual BOOL IsValid() const; + + virtual LanguageType GetLanguage( USHORT, USHORT ) const; + virtual USHORT GetFieldCount( USHORT nPara ) const; + virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; + virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; + virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; + virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual MapMode GetMapMode() const; + virtual OutputDevice* GetRefDevice() const; + virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; + virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; + virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; + virtual USHORT GetLineCount( USHORT nPara ) const; + virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; + virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; + virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool Delete( const ESelection& ); + virtual sal_Bool InsertText( const String&, const ESelection& ); + virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); + virtual sal_Int16 GetDepth( USHORT nPara ) const; + virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + + virtual const SfxItemSet* GetEmptyItemSetPtr(); + + // implementation functions for XParagraphAppend and XTextPortionAppend + virtual void AppendParagraph(); + virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + //XTextCopy + virtual void CopyText(const SvxTextForwarder& rSource); +}; + +#endif + diff --git a/svx/inc/svx/unoforou.hxx b/svx/inc/svx/unoforou.hxx new file mode 100644 index 000000000000..75adcc620a47 --- /dev/null +++ b/svx/inc/svx/unoforou.hxx @@ -0,0 +1,131 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoforou.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOFOROU_HXX +#define _SVX_UNOFOROU_HXX + +#include <svx/unoedsrc.hxx> +#include "svx/svxdllapi.h" + +#include <svx/editdata.hxx> + +class Outliner; +class SdrObject; + +// SvxOutlinerForwarder - SvxTextForwarder fuer Outliner + +class SVX_DLLPUBLIC SvxOutlinerForwarder : public SvxTextForwarder +{ +private: + Outliner& rOutliner; + SdrObject* pSdrObject; + + /** this pointer may be null or point to an item set for the attribs of + the selection maAttribsSelection */ + mutable SfxItemSet* mpAttribsCache; + + /** if we have a chached attribute item set, this is the selection of it */ + mutable ESelection maAttribCacheSelection; + + /** this pointer may be null or point to an item set for the paragraph + mnParaAttribsCache */ + mutable SfxItemSet* mpParaAttribsCache; + + /** if we have a cached para attribute item set, this is the paragraph of it */ + mutable USHORT mnParaAttribsCache; + +public: + SvxOutlinerForwarder( Outliner& rOutl, SdrObject* pSdrObj = 0 ); + virtual ~SvxOutlinerForwarder(); + + virtual USHORT GetParagraphCount() const; + virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual String GetText( const ESelection& rSel ) const; + virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; + virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); + virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + + virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; + virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + + virtual void QuickInsertText( const String& rText, const ESelection& rSel ); + virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); + virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); + virtual void QuickInsertLineBreak( const ESelection& rSel ); + + virtual SfxItemPool* GetPool() const; + + virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual BOOL IsValid() const; + + Outliner& GetOutliner() const { return rOutliner; } + + virtual LanguageType GetLanguage( USHORT, USHORT ) const; + virtual USHORT GetFieldCount( USHORT nPara ) const; + virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; + virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; + virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; + virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual MapMode GetMapMode() const; + virtual OutputDevice* GetRefDevice() const; + virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; + virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; + virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; + virtual USHORT GetLineCount( USHORT nPara ) const; + virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; + virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const; + virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool Delete( const ESelection& ); + virtual sal_Bool InsertText( const String&, const ESelection& ); + virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); + virtual sal_Int16 GetDepth( USHORT nPara ) const; + virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara ); + virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue ); + + virtual sal_Bool IsParaIsNumberingRestart( sal_uInt16 nPara ); + virtual void SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart ); + + /* this method flushes internal caches for this forwarder */ + void flushCache(); + + virtual const SfxItemSet* GetEmptyItemSetPtr(); + + // implementation functions for XParagraphAppend and XTextPortionAppend + virtual void AppendParagraph(); + virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + //XTextCopy + virtual void CopyText(const SvxTextForwarder& rSource); +}; + +#endif + diff --git a/svx/inc/svx/unoipset.hxx b/svx/inc/svx/unoipset.hxx new file mode 100644 index 000000000000..ffc9f834f7b4 --- /dev/null +++ b/svx/inc/svx/unoipset.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoipset.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOIPSET_HXX_ +#define _SVX_UNOIPSET_HXX_ + +#include <com/sun/star/beans/XPropertySetInfo.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include "svx/svxdllapi.h" +#include <svl/itemprop.hxx> + +class SvxIDPropertyCombineList; +class SdrItemPool; +class SfxItemSet; +class SvxShape; + +class SVX_DLLPUBLIC SvxItemPropertySet +{ + SfxItemPropertyMap m_aPropertyMap; + mutable com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> m_xInfo; + const SfxItemPropertyMapEntry* _pMap; + SvxIDPropertyCombineList* pCombiList; + sal_Bool mbConvertTwips; + +public: + SvxItemPropertySet( const SfxItemPropertyMapEntry *pMap, sal_Bool bConvertTwips = sal_False ); + ~SvxItemPropertySet(); + + // Methoden, die direkt mit dem ItemSet arbeiten + ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ) const; + void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet ) const; + + // Methoden, die stattdessen Any benutzen + ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap ) const; + void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal ) const; + + // Properties von einem anderen Set uebernehmen + void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet, SfxItemSet& rSet, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet )const; + sal_Bool AreThereOwnUsrAnys() const { return (pCombiList ? sal_True : sal_False); } + ::com::sun::star::uno::Any* GetUsrAnyForID(sal_uInt16 nWID) const; + void AddUsrAnyForID(const ::com::sun::star::uno::Any& rAny, sal_uInt16 nWID); + + com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > getPropertySetInfo() const; + const SfxItemPropertyMapEntry* getPropertyMapEntries() const {return _pMap;} + //void setPropertyMap( const SfxItemPropertyMapEntry *pMap ) { _pMap = pMap; } + const SfxItemPropertyMap* getPropertyMap()const { return &m_aPropertyMap;} + const SfxItemPropertySimpleEntry* getPropertyMapEntry(const ::rtl::OUString &rName) const; + + static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > getPropertySetInfo( const SfxItemPropertyMapEntry* pMap ); +}; + +#endif // _SVX_UNOIPSET_HXX_ + diff --git a/svx/inc/svx/unomid.hxx b/svx/inc/svx/unomid.hxx new file mode 100644 index 000000000000..f4c44d228b04 --- /dev/null +++ b/svx/inc/svx/unomid.hxx @@ -0,0 +1,272 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unomid.hxx,v $ + * $Revision: 1.3.212.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_UNOMID_HXX +#define _SVX_UNOMID_HXX +//LRSpaceItem +#define MID_LR_MARGIN 0 +#define MID_LRP_MARGIN 1 +#define MID_LR_REL_MARGIN 2 +#define MID_LRP_REL_MARGIN 3 +#define MID_L_MARGIN 4 +#define MID_R_MARGIN 5 +#define MID_L_REL_MARGIN 6 +#define MID_R_REL_MARGIN 7 +#define MID_FIRST_LINE_INDENT 8 +#define MID_FIRST_LINE_REL_INDENT 9 +#define MID_FIRST_AUTO 10 +#define MID_TXT_LMARGIN 11 + +//ULSpaceItem +#define MID_UL_MARGIN 1 +#define MID_UL_REL_MARGIN 2 +#define MID_UP_MARGIN 3 +#define MID_LO_MARGIN 4 +#define MID_UP_REL_MARGIN 5 +#define MID_LO_REL_MARGIN 6 + +//SvxBoolItem +#define MID_BOLD 0 +#define MID_WEIGHT 1 + +//SvxPostureItem +#define MID_ITALIC 0 +#define MID_POSTURE 1 + +//SvxFontHeightItem +#define MID_FONTHEIGHT 1 +#define MID_FONTHEIGHT_PROP 2 +#define MID_FONTHEIGHT_DIFF 3 + +//SvxFontWidthItem +#define MID_FONTWIDTH 0 +#define MID_FONTWIDTH_PROP 1 + +//SvxTextLineItem +#define MID_TEXTLINED 0 +#define MID_TL_STYLE 1 +#define MID_TL_COLOR 2 +#define MID_TL_HASCOLOR 3 + +//SvxCrossedOutItem +#define MID_CROSSED_OUT 0 +#define MID_CROSS_OUT 1 + +//SvxExcapementItem +#define MID_ESC 0 +#define MID_ESC_HEIGHT 1 +#define MID_AUTO_ESC 2 + +//SvxLanguageItem +#define MID_LANGUAGE 0 +#define MID_COUNTRY 1 +#define MID_LANG_COUNTRY 2 + +//BrushItem +#define MID_BACK_COLOR 0 +#define MID_GRAPHIC_POSITION 1 +#define MID_GRAPHIC_LINK 2 +#define MID_GRAPHIC 3 +#define MID_GRAPHIC_TRANSPARENT 4 +#define MID_GRAPHIC_URL 5 +#define MID_GRAPHIC_FILTER 6 +#define MID_GRAPHIC_REPEAT 7 +#define MID_GRAPHIC_TRANSPARENCY 8 +#define MID_BACK_COLOR_R_G_B 9 +#define MID_BACK_COLOR_TRANSPARENCY 10 + +//ProtectItem +#define MID_PROTECT_CONTENT 0 +#define MID_PROTECT_SIZE 1 +#define MID_PROTECT_POSITION 2 + +//AdjustItem +#define MID_PARA_ADJUST 0 +#define MID_LAST_LINE_ADJUST 1 +#define MID_EXPAND_SINGLE 2 + +//SvxPageItem +#define MID_PAGE_NUMTYPE 0 +#define MID_PAGE_ORIENTATION 1 +#define MID_PAGE_LAYOUT 2 + +//SvxMarginItem +#define MID_MARGIN_LR_MARGIN 0 +#define MID_MARGIN_UL_MARGIN 1 +#define MID_MARGIN_L_MARGIN 2 +#define MID_MARGIN_R_MARGIN 3 +#define MID_MARGIN_UP_MARGIN 4 +#define MID_MARGIN_LO_MARGIN 5 + +//SvxBoxItem +#define LEFT_BORDER 1 +#define RIGHT_BORDER 2 +#define TOP_BORDER 3 +#define BOTTOM_BORDER 4 +#define BORDER_DISTANCE 5 +#define LEFT_BORDER_DISTANCE 6 +#define RIGHT_BORDER_DISTANCE 7 +#define TOP_BORDER_DISTANCE 8 +#define BOTTOM_BORDER_DISTANCE 9 +#define MID_LEFT_BORDER 10 +#define MID_RIGHT_BORDER 11 +#define MID_TOP_BORDER 12 +#define MID_BOTTOM_BORDER 13 + +#define ALL_BORDER 10 +#define ALL_BORDER_PADDING 11 +#define LEFT_BORDER_PADDING 12 +#define RIGHT_BORDER_PADDING 13 +#define TOP_BORDER_PADDING 14 +#define BOTTOM_BORDER_PADDING 15 +#define ALL_BORDER_LINE_WIDTH 16 +#define LEFT_BORDER_LINE_WIDTH 17 +#define RIGHT_BORDER_LINE_WIDTH 18 +#define TOP_BORDER_LINE_WIDTH 19 +#define BOTTOM_BORDER_LINE_WIDTH 20 + +//SvxFontItem +// Don't use 0 as it used for the whole struct +#define MID_FONT_FAMILY_NAME 1 +#define MID_FONT_STYLE_NAME 2 +#define MID_FONT_FAMILY 3 +#define MID_FONT_CHAR_SET 4 +#define MID_FONT_PITCH 5 + +//SvxHyphenZoneItem +#define MID_IS_HYPHEN 0 +#define MID_HYPHEN_MIN_LEAD 1 +#define MID_HYPHEN_MIN_TRAIL 2 +#define MID_HYPHEN_MAX_HYPHENS 3 + +//SvxFmtBreakItem +#define MID_BREAK_BEFORE 0 +#define MID_BREAK_AFTER 1 + +//SvxCaseMapItem +#define MID_CASEMAP_VARIANT 0 +#define MID_CASEMAP_TRANS 1 + +//SvxLineSpaceItem +#define MID_LS_FIXED 0 +#define MID_LS_MINIMUM 1 +#define MID_LS_DISTANCE 2 + +//SvxLanguageItem +#define MID_LANG_INT 0 +#define MID_LANG_LOCALE 1 + +//NameOrIndex +#define MID_NAME 16 +#define MID_GRAFURL 32 + +// XFillBitmapItem (is also a NameOrIndex) +#define MID_BITMAP 8 + +//SvxTwoLinesItem +#define MID_TWOLINES 0 +#define MID_START_BRACKET 1 +#define MID_END_BRACKET 2 + +//SvxEmphasisMarkItem +#define MID_EMPHASIS 0 + +//SvxCharRotateItem +#define MID_ROTATE 0 +#define MID_FITTOLINE 1 + +// SvxCharReliefItem +#define MID_RELIEF 0 + +// SvxTabStop +#define MID_TABSTOPS 0 +#define MID_STD_TAB 1 + +// SvxHorJustifyItem +#define MID_HORJUST_HORJUST 0 +#define MID_HORJUST_ADJUST 1 + +// SvxPageModelItem +#define MID_AUTO 1 + +// SvxZoomItem +#define MID_VALUE 2 + +// SvxObjectItem +#define MID_START_X 1 +#define MID_START_Y 2 +#define MID_END_X 3 +#define MID_END_Y 4 +#define MID_LIMIT 5 + +// SvxBoxInfoItem +#define MID_HORIZONTAL 1 +#define MID_VERTICAL 2 +#define MID_VALIDFLAGS 4 + +// SvxColumnItem +#define MID_COLUMNARRAY 7 +#define MID_ACTUAL 4 +#define MID_TABLE 5 +#define MID_ORTHO 6 + +// XFillGradientItem +// Don't use 0 as it used for the whole struct +#define MID_FILLGRADIENT 1 +#define MID_GRADIENT_STYLE 2 +#define MID_GRADIENT_STARTCOLOR 3 +#define MID_GRADIENT_ENDCOLOR 4 +#define MID_GRADIENT_ANGLE 5 +#define MID_GRADIENT_BORDER 6 +#define MID_GRADIENT_XOFFSET 7 +#define MID_GRADIENT_YOFFSET 8 +#define MID_GRADIENT_STARTINTENSITY 9 +#define MID_GRADIENT_ENDINTENSITY 10 +#define MID_GRADIENT_STEPCOUNT 11 + +// XFillHatchItem +// Don't use 0 as it used for the whole struct +#define MID_FILLHATCH 1 +#define MID_HATCH_STYLE 2 +#define MID_HATCH_COLOR 3 +#define MID_HATCH_DISTANCE 4 +#define MID_HATCH_ANGLE 5 + +// XLineDashItem +// Don't use 0 as it used for the whole struct +#define MID_LINEDASH 1 +#define MID_LINEDASH_STYLE 2 +#define MID_LINEDASH_DOTS 3 +#define MID_LINEDASH_DOTLEN 4 +#define MID_LINEDASH_DASHES 5 +#define MID_LINEDASH_DASHLEN 6 +#define MID_LINEDASH_DISTANCE 7 + +#define MID_LEFT 3 +#endif diff --git a/svx/inc/svx/unomod.hxx b/svx/inc/svx/unomod.hxx new file mode 100644 index 000000000000..e4f9e33d4c5f --- /dev/null +++ b/svx/inc/svx/unomod.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unomod.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_UNOMOD_HXX +#define SVX_UNOMOD_HXX + +#include <com/sun/star/document/EventObject.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include "svx/svxdllapi.h" + +class SdrHint; +class SdrModel; + +class SVX_DLLPUBLIC SvxUnoDrawMSFactory : public ::com::sun::star::lang::XMultiServiceFactory +{ +public: + SvxUnoDrawMSFactory() throw() {}; + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw(::com::sun::star::uno::RuntimeException); + + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createTextField( const ::rtl::OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + // internal + ::com::sun::star::uno::Sequence< ::rtl::OUString > + concatServiceNames( ::com::sun::star::uno::Sequence< ::rtl::OUString >& rServices1, + ::com::sun::star::uno::Sequence< ::rtl::OUString >& rServices2 ) throw(); + + /** fills the given EventObject from the given SdrHint. + @returns + true if the SdrHint could be translated to an EventObject<br> + false if not + */ + static sal_Bool createEvent( const SdrModel* pDoc, const SdrHint* pSdrHint, ::com::sun::star::document::EventObject& aEvent ); +}; + +#endif + diff --git a/svx/inc/svx/unomodel.hxx b/svx/inc/svx/unomodel.hxx new file mode 100644 index 000000000000..70e27f06ac43 --- /dev/null +++ b/svx/inc/svx/unomodel.hxx @@ -0,0 +1,115 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unomodel.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_UNOMODEL_HXX +#define SVX_UNOMODEL_HXX + +#ifndef SVX_LIGHT + +#include <com/sun/star/drawing/XDrawPagesSupplier.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/ucb/XAnyCompareFactory.hpp> +#include <com/sun/star/io/XOutputStream.hpp> +#include <com/sun/star/io/XInputStream.hpp> +#include <sfx2/sfxbasemodel.hxx> +#include <svx/fmdmod.hxx> +#include "svx/svxdllapi.h" + +class SdrModel; + +class SVX_DLLPUBLIC SvxUnoDrawingModel : public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other + public SvxFmMSFactory, + public ::com::sun::star::drawing::XDrawPagesSupplier, + public ::com::sun::star::lang::XServiceInfo, + public ::com::sun::star::ucb::XAnyCompareFactory +{ + friend class SvxUnoDrawPagesAccess; + +private: + SdrModel* mpDoc; + + ::com::sun::star::uno::WeakReference< ::com::sun::star::drawing::XDrawPages > mxDrawPagesAccess; + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDashTable; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxGradientTable; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxHatchTable; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxBitmapTable; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxTransGradientTable; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxMarkerTable; + + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence; + +public: + SvxUnoDrawingModel( SdrModel* pDoc ) throw(); + virtual ~SvxUnoDrawingModel() throw(); + + SdrModel* GetDoc() const { return mpDoc; } + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XModel + virtual void SAL_CALL lockControllers( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL unlockControllers( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasControllersLocked( ) throw(::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + // XDrawPagesSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > SAL_CALL getDrawPages( ) throw(::com::sun::star::uno::RuntimeException); + + // XMultiServiceFactory ( SvxFmMSFactory ) + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XAnyCompareFactory + virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XAnyCompare > SAL_CALL createAnyCompareByName( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); +}; + +SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerExport( SdrModel* pModel, com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> xOut ); +SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerExport( SdrModel* pModel, com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> xOut, com::sun::star::uno::Reference< com::sun::star::lang::XComponent > xComponent ); +SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerExport( SdrModel* pModel, com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> xOut, com::sun::star::uno::Reference< com::sun::star::lang::XComponent > xComponent, const char* pExportService ); +SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerImport( SdrModel* pModel, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream ); +SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerImport( SdrModel* pModel, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream, com::sun::star::uno::Reference< com::sun::star::lang::XComponent > xComponent ); +SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerImport( SdrModel* pModel, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream, com::sun::star::uno::Reference< com::sun::star::lang::XComponent > xComponent, const char* pImportService ); + +#endif + +#endif + diff --git a/svx/inc/svx/unopage.hxx b/svx/inc/svx/unopage.hxx new file mode 100644 index 000000000000..83671f2934f8 --- /dev/null +++ b/svx/inc/svx/unopage.hxx @@ -0,0 +1,163 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unopage.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_UNOWPAGE_HXX +#define _SVX_UNOWPAGE_HXX + +#include <com/sun/star/lang/XComponent.hpp> +#include <cppuhelper/interfacecontainer.hxx> +#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/drawing/XDrawPage.hpp> +#include <com/sun/star/drawing/XShapeGrouper.hpp> +#include <com/sun/star/drawing/XShapeCombiner.hpp> +#include <com/sun/star/drawing/XShapeBinder.hpp> +#ifndef _COM_SUN_STAR_UNO_XUNOTUNNEL_HPP_ +#include <com/sun/star/lang/XUnoTunnel.hpp> +#endif +#include <cppuhelper/weak.hxx> +#include <cppuhelper/weakagg.hxx> +#include <svl/lstner.hxx> +#include <svx/mutxhelp.hxx> +#include "svx/svxdllapi.h" + +#include <cppuhelper/implbase5.hxx> +#include <comphelper/servicehelper.hxx> + +#include <svx/unoprov.hxx> + +class SdrPage; +class SdrModel; +class SdrView; +class SdrPageView; +class SdrObject; +class List; +class SvxShapeDescriptor; +class SvxShape; +class SvxShapeGroup; +class SvxShapeConnector; +class SvxShapeList; +class SvxDrawPageList; + +/*********************************************************************** +* Macros fuer Umrechnung Twips<->100tel mm * +***********************************************************************/ +#define TWIPS_TO_MM(val) ((val * 127 + 36) / 72) +#define MM_TO_TWIPS(val) ((val * 72 + 63) / 127) + +/*********************************************************************** +* * +***********************************************************************/ +class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper5< ::com::sun::star::drawing::XDrawPage, + ::com::sun::star::drawing::XShapeGrouper, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::lang::XComponent>, + public SfxListener, + protected SvxMutexHelper +{ + protected: + cppu::OBroadcastHelper mrBHelper; + + SdrPage* mpPage; + SdrModel* mpModel; + SdrView* mpView; + + void _SelectObjectsInView( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& aShapes, SdrPageView* pPageView ) throw (); + void _SelectObjectInView( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape, SdrPageView* pPageView ) throw(); + + virtual void disposing() throw(); + + public: + SvxDrawPage( SdrPage* pPage ) throw(); + SvxDrawPage() throw(); + virtual ~SvxDrawPage() throw(); + + // Internals + SdrPage* GetSdrPage() const { return mpPage; } + void ChangeModel( SdrModel* pNewModel ); + + // Erzeugen eines SdrObjects und Einfugen in die SdrPage + SdrObject *CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(); + + // Typ und Inventor bestimmen + void GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor, const ::rtl::OUString& aName ) const throw(); + + // Erzeugen eines SdrObjects anhand einer Description. Kann von + // abgeleiteten Klassen dazu benutzt werden, eigene Shapes zu + // unterstuetzen (z.B. Controls) + virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(); + + static SvxShape* CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, SdrObject *pObj = NULL, SvxDrawPage *pPage = NULL ) throw(); + + // Die folgende Methode wird gerufen, wenn ein SvxShape-Objekt angelegt + // werden soll. abgeleitete Klassen koennen hier eine Ableitung oder + // ein ein SvxShape aggregierenden Objekt anlegen. + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw(); + + static SvxDrawPage* GetPageForSdrPage( SdrPage* pPage ) throw(); + + UNO3_GETIMPLEMENTATION_DECL( SvxDrawPage ) + + // SfxListener + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + + // XInterface + virtual void SAL_CALL release() throw(); + + // XShapes + virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ; + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XShapeGrouper + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > SAL_CALL group( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xShapes ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL ungroup( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup >& aGroup ) throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); +}; + +#endif + diff --git a/svx/inc/svx/unoprnms.hxx b/svx/inc/svx/unoprnms.hxx new file mode 100644 index 000000000000..7f28e5677043 --- /dev/null +++ b/svx/inc/svx/unoprnms.hxx @@ -0,0 +1,379 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoprnms.hxx,v $ + * $Revision: 1.4.148.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_UNOPRNMS_HXX +#define _SVX_UNOPRNMS_HXX + +#define UNO_NAME_SHAPE_SIZE "Size" +#define UNO_NAME_SHAPE_POSITION "Position" + +#define UNO_NAME_CHAR_COLOR "CharColor" +#define UNO_NAME_CHAR_FONT "CharFont" +#define UNO_NAME_CHAR_HEIGHT "CharHeight" +#define UNO_NAME_CHAR_POSTURE "CharPosture" +#define UNO_NAME_CHAR_SHADOWED "CharShadowed" +#define UNO_NAME_CHAR_UNDERLINE "CharUnderline" +#define UNO_NAME_CHAR_WEIGHT "CharWeight" + +#define UNO_NAME_FILLSTYLE "FillStyle" +#define UNO_NAME_FILLCOLOR "FillColor" +#define UNO_NAME_FILLGRADIENT "FillGradient" +#define UNO_NAME_FILLHATCH "FillHatch" +#define UNO_NAME_FILLBITMAP "FillBitmap" +#define UNO_NAME_FILLBACKGROUND "FillBackground" +#define UNO_NAME_FILLCOLOR_2 "FillColor2" + +#define UNO_NAME_EDGEKIND "EdgeKind" +#define UNO_NAME_EDGELINE1DELTA "EdgeLine1Delta" +#define UNO_NAME_EDGELINE2DELTA "EdgeLine2Delta" +#define UNO_NAME_EDGELINE3DELTA "EdgeLine3Delta" +#define UNO_NAME_EDGENODE1HORZDIST "EdgeNode1HorzDist" +#define UNO_NAME_EDGENODE1VERTDIST "EdgeNode1VertDist" +#define UNO_NAME_EDGENODE2HORZDIST "EdgeNode2HorzDist" +#define UNO_NAME_EDGENODE2VERTDIST "EdgeNode2VertDist" + +#define UNO_NAME_FILLBMP_OFFSET_X "FillBitmapOffsetX" +#define UNO_NAME_FILLBMP_OFFSET_Y "FillBitmapOffsetY" +#define UNO_NAME_FILLBMP_POSITION_OFFSET_X "FillBitmapPositionOffsetX" +#define UNO_NAME_FILLBMP_POSITION_OFFSET_Y "FillBitmapPositionOffsetY" +#define UNO_NAME_FILLBMP_RECTANGLE_POINT "FillBitmapRectanglePoint" +#define UNO_NAME_FILLBMP_TILE "FillBitmapTile" +#define UNO_NAME_FILLBMP_STRETCH "FillBitmapStretch" +#define UNO_NAME_FILLBMP_LOGICAL_SIZE "FillBitmapLogicalSize" +#define UNO_NAME_FILLBMP_SIZE_X "FillBitmapSizeX" +#define UNO_NAME_FILLBMP_SIZE_Y "FillBitmapSizeY" +#define UNO_NAME_FILL_TRANSPARENCE "FillTransparence" +#define UNO_NAME_FILLBMP_MODE "FillBitmapMode" + +#define UNO_NAME_FILL_GRADIENT_STYLE "FillGradientStyle" +#define UNO_NAME_FILL_GRADIENT_START_COLOR "FillGradientStartColor" +#define UNO_NAME_FILL_GRADIENT_END_COLOR "FillGradientEndColor" +#define UNO_NAME_FILL_GRADIENT_ANGLE "FillGradientAngle" +#define UNO_NAME_FILL_GRADIENT_BORDER "FillGradientBorder" +#define UNO_NAME_FILL_GRADIENT_OFFSET_X "FillGradientOffsetX" +#define UNO_NAME_FILL_GRADIENT_OFFSET_Y "FillGradientOffsetY" +#define UNO_NAME_FILL_GRADIENT_START_INTENSITY "FillGradientStartIntensity" +#define UNO_NAME_FILL_GRADIENT_END_INTENSITY "FillGradientEndIntensity" +#define UNO_NAME_FILL_GRADIENT_STEPS "FillGradientSteps" + +#define UNO_NAME_FILL_HATCH_STYLE "FillHatchStyle" +#define UNO_NAME_FILL_HATCH_COLOR "FillHatchColor" +#define UNO_NAME_FILL_HATCH_DISTANCE "FillHatchDistance" +#define UNO_NAME_FILL_HATCH_ANGLE "FillHatchAngle" + +#define UNO_NAME_LINESTYLE "LineStyle" +#define UNO_NAME_LINEDASH "LineDash" +#define UNO_NAME_LINEWIDTH "LineWidth" +#define UNO_NAME_LINECOLOR "LineColor" +#define UNO_NAME_LINEJOINT "LineJoint" +#define UNO_NAME_LINESTART "LineStart" +#define UNO_NAME_LINEEND "LineEnd" +#define UNO_NAME_LINESTARTWIDTH "LineStartWidth" +#define UNO_NAME_LINEENDWIDTH "LineEndWidth" +#define UNO_NAME_LINESTARTCENTER "LineStartCenter" +#define UNO_NAME_LINEENDCENTER "LineEndCenter" +#define UNO_NAME_LINETRANSPARENCE "LineTransparence" + +#define UNO_NAME_SHADOW "Shadow" +#define UNO_NAME_SHADOWCOLOR "ShadowColor" +#define UNO_NAME_SHADOWXDIST "ShadowXDistance" +#define UNO_NAME_SHADOWYDIST "ShadowYDistance" +#define UNO_NAME_SHADOWTRANSPARENCE "ShadowTransparence" + +#define UNO_NAME_EDGERADIUS "CornerRadius" + +#define UNO_NAME_TEXT_MINFRAMEHEIGHT "TextMinimumFrameHeight" +#define UNO_NAME_TEXT_AUTOGROWHEIGHT "TextAutoGrowHeight" +#define UNO_NAME_TEXT_FITTOSIZE "TextFitToSize" +#define UNO_NAME_TEXT_LEFTDIST "TextLeftDistance" +#define UNO_NAME_TEXT_RIGHTDIST "TextRightDistance" +#define UNO_NAME_TEXT_UPPERDIST "TextUpperDistance" +#define UNO_NAME_TEXT_LOWERDIST "TextLowerDistance" +#define UNO_NAME_TEXT_VERTADJUST "TextVerticalAdjust" +#define UNO_NAME_TEXT_MAXFRAMEHEIGHT "TextMaximumFrameHeight" +#define UNO_NAME_TEXT_MINFRAMEWIDTH "TextMinimumFrameWidth" +#define UNO_NAME_TEXT_MAXFRAMEWIDTH "TextMaximumFrameWidth" +#define UNO_NAME_TEXT_AUTOGROWWIDTH "TextAutoGrowWidth" +#define UNO_NAME_TEXT_HORZADJUST "TextHorizontalAdjust" +#define UNO_NAME_TEXT_ANIKIND "TextAnimationKind" +#define UNO_NAME_TEXT_ANIDIRECTION "TextAnimationDirection" +#define UNO_NAME_TEXT_ANISTARTINSIDE "TextAnimationStartInside" +#define UNO_NAME_TEXT_ANISTOPINSIDE "TextAnimationStopInside" +#define UNO_NAME_TEXT_ANICOUNT "TextAnimationCount" +#define UNO_NAME_TEXT_ANIDELAY "TextAnimationDelay" +#define UNO_NAME_TEXT_ANIAMOUNT "TextAnimationAmount" +#define UNO_NAME_TEXT_CONTOURFRAME "TextContourFrame" +#define UNO_NAME_TEXT_WRITINGMODE "TextWritingMode" +#define UNO_NAME_TEXT_FONTINDEPENDENTLINESPACING "FontIndependentLineSpacing" +#define UNO_NAME_TEXT_WORDWRAP "TextWordWrap" + +#define UNO_NAME_MEASUREKIND "MeasureKind" +#define UNO_NAME_MEASURETEXTHPOS "MeasureTextHorizontalPosition" +#define UNO_NAME_MEASURETEXTVPOS "MeasureTextVerticalPosition" +#define UNO_NAME_MEASURELINEDIST "MeasureLineDistance" +#define UNO_NAME_MEASUREHELPLINEOVERHANG "MeasureHelpLineOverhang" +#define UNO_NAME_MEASUREHELPLINEDIST "MeasureHelpLineDistance" +#define UNO_NAME_MEASUREHELPLINE1LEN "MeasureHelpLine1Length" +#define UNO_NAME_MEASUREHELPLINE2LEN "MeasureHelpLine2Length" +#define UNO_NAME_MEASUREBELOWREFEDGE "MeasureBelowReferenceEdge" +#define UNO_NAME_MEASURETEXTROTA90 "MeasureTextRotate90" +#define UNO_NAME_MEASURETEXTUPSIDEDOWN "MeasureTextUpsideDown" +#define UNO_NAME_MEASUREOVERHANG "MeasureOverhang" +#define UNO_NAME_MEASUREUNIT "MeasureUnit" +#define UNO_NAME_MEASURESCALE "MeasureScale" +#define UNO_NAME_MEASURESHOWUNIT "MeasureShowUnit" +#define UNO_NAME_MEASUREFORMATSTRING "MeasureFormatString" +#define UNO_NAME_MEASURETEXTAUTOANGLE "MeasureTextAutoAngle" +#define UNO_NAME_MEASURETEXTAUTOANGLEVIEW "MeasureTextAutoAngleView" +#define UNO_NAME_MEASURETEXTISFIXEDANGLE "MeasureTextIsFixedAngle" +#define UNO_NAME_MEASURETEXTFIXEDANGLE "MeasureTextFixedAngle" + +#define UNO_NAME_CIRCKIND "CircleKind" +#define UNO_NAME_CIRCSTARTANGLE "CircleStartAngle" +#define UNO_NAME_CIRCENDANGLE "CircleEndAngle" + +#define UNO_NAME_POLYGONKIND "PolygonKind" +#define UNO_NAME_POLYPOLYGON "PolyPolygon" +#define UNO_NAME_POLYPOLYGONBEZIER "PolyPolygonBezier" +#define UNO_NAME_POLYGON "Polygon" + +#define UNO_NAME_MISC_OBJ_ZORDER "ZOrder" +#define UNO_NAME_MISC_OBJ_MOVEPROTECT "MoveProtect" +#define UNO_NAME_MISC_OBJ_SIZEPROTECT "SizeProtect" +#define UNO_NAME_MISC_OBJ_PRINTABLE "Printable" +#define UNO_NAME_MISC_OBJ_LAYERID "LayerID" +#define UNO_NAME_MISC_OBJ_LAYERNAME "LayerName" +#define UNO_NAME_MISC_OBJ_NAME "Name" +#define UNO_NAME_MISC_OBJ_ROTATEANGLE "RotateAngle" +#define UNO_NAME_MISC_OBJ_SHEARANGLE "ShearAngle" +#define UNO_NAME_MISC_OBJ_ROTATION_POINT_X "RotationPointX" +#define UNO_NAME_MISC_OBJ_ROTATION_POINT_Y "RotationPointY" +#define UNO_NAME_MISC_OBJ_FRAMERECT "FrameRect" +#define UNO_NAME_MISC_OBJ_BOUNDRECT "BoundRect" + +// #i68101# +#define UNO_NAME_MISC_OBJ_TITLE "Title" +#define UNO_NAME_MISC_OBJ_DESCRIPTION "Description" + +#define UNO_NAME_GRAPHOBJ_FILLBITMAP "GraphicObjectFillBitmap" +#define UNO_NAME_GRAPHOBJ_GRAFURL "GraphicURL" +#define UNO_NAME_GRAPHOBJ_GRAFSTREAMURL "GraphicStreamURL" +#define UNO_NAME_GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:" +#define UNO_NAME_GRAPHOBJ_URLPKGPREFIX "vnd.sun.star.Package:" +#define UNO_NAME_GRAPHOBJ_GRAPHIC "Graphic" + +#define UNO_NAME_OLE2_METAFILE "MetaFile" +#define UNO_NAME_OLE2_PERSISTNAME "PersistName" + +#define UNO_NAME_3D_SCENE_PERSPECTIVE "D3DScenePerspective" +#define UNO_NAME_3D_SCENE_DISTANCE "D3DSceneDistance" +#define UNO_NAME_3D_SCENE_FOCAL_LENGTH "D3DSceneFocalLength" +#define UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING "D3DSceneTwoSidedLighting" +#define UNO_NAME_3D_SCENE_LIGHTCOLOR_1 "D3DSceneLightColor1" +#define UNO_NAME_3D_SCENE_LIGHTCOLOR_2 "D3DSceneLightColor2" +#define UNO_NAME_3D_SCENE_LIGHTCOLOR_3 "D3DSceneLightColor3" +#define UNO_NAME_3D_SCENE_LIGHTCOLOR_4 "D3DSceneLightColor4" +#define UNO_NAME_3D_SCENE_LIGHTCOLOR_5 "D3DSceneLightColor5" +#define UNO_NAME_3D_SCENE_LIGHTCOLOR_6 "D3DSceneLightColor6" +#define UNO_NAME_3D_SCENE_LIGHTCOLOR_7 "D3DSceneLightColor7" +#define UNO_NAME_3D_SCENE_LIGHTCOLOR_8 "D3DSceneLightColor8" +#define UNO_NAME_3D_SCENE_LIGHTON_1 "D3DSceneLightOn1" +#define UNO_NAME_3D_SCENE_LIGHTON_2 "D3DSceneLightOn2" +#define UNO_NAME_3D_SCENE_LIGHTON_3 "D3DSceneLightOn3" +#define UNO_NAME_3D_SCENE_LIGHTON_4 "D3DSceneLightOn4" +#define UNO_NAME_3D_SCENE_LIGHTON_5 "D3DSceneLightOn5" +#define UNO_NAME_3D_SCENE_LIGHTON_6 "D3DSceneLightOn6" +#define UNO_NAME_3D_SCENE_LIGHTON_7 "D3DSceneLightOn7" +#define UNO_NAME_3D_SCENE_LIGHTON_8 "D3DSceneLightOn8" +#define UNO_NAME_3D_SCENE_LIGHTDIRECTION_1 "D3DSceneLightDirection1" +#define UNO_NAME_3D_SCENE_LIGHTDIRECTION_2 "D3DSceneLightDirection2" +#define UNO_NAME_3D_SCENE_LIGHTDIRECTION_3 "D3DSceneLightDirection3" +#define UNO_NAME_3D_SCENE_LIGHTDIRECTION_4 "D3DSceneLightDirection4" +#define UNO_NAME_3D_SCENE_LIGHTDIRECTION_5 "D3DSceneLightDirection5" +#define UNO_NAME_3D_SCENE_LIGHTDIRECTION_6 "D3DSceneLightDirection6" +#define UNO_NAME_3D_SCENE_LIGHTDIRECTION_7 "D3DSceneLightDirection7" +#define UNO_NAME_3D_SCENE_LIGHTDIRECTION_8 "D3DSceneLightDirection8" +#define UNO_NAME_3D_SCENE_AMBIENTCOLOR "D3DSceneAmbientColor" +#define UNO_NAME_3D_SCENE_SHADOW_SLANT "D3DSceneShadowSlant" +#define UNO_NAME_3D_SCENE_SHADE_MODE "D3DSceneShadeMode" + +#define UNO_NAME_3D_DOUBLE_SIDED "D3DDoubleSided" +#define UNO_NAME_3D_NORMALS_KIND "D3DNormalsKind" +#define UNO_NAME_3D_NORMALS_INVERT "D3DNormalsInvert" +#define UNO_NAME_3D_TEXTURE_PROJ_X "D3DTextureProjectionX" +#define UNO_NAME_3D_TEXTURE_PROJ_Y "D3DTextureProjectionY" +#define UNO_NAME_3D_SHADOW_3D "D3DShadow3D" +#define UNO_NAME_3D_MAT_COLOR "D3DMaterialColor" +#define UNO_NAME_3D_MAT_EMISSION "D3DMaterialEmission" +#define UNO_NAME_3D_MAT_SPECULAR "D3DMaterialSpecular" +#define UNO_NAME_3D_MAT_SPECULAR_INTENSITY "D3DMaterialSpecularIntensity" +#define UNO_NAME_3D_TEXTURE_KIND "D3DTextureKind" +#define UNO_NAME_3D_TEXTURE_MODE "D3DTextureMode" +#define UNO_NAME_3D_TEXTURE_FILTER "D3DTextureFilter" + +// #i28528# +// Added extra Item (Bool) for chart2 to be able to show reduced line geometry +#define UNO_NAME_3D_REDUCED_LINE_GEOMETRY "D3DReducedLineGeometry" + +#define UNO_NAME_3D_HORZ_SEGS "D3DHorizontalSegments" +#define UNO_NAME_3D_VERT_SEGS "D3DVerticalSegments" + +#define UNO_NAME_3D_PERCENT_DIAGONAL "D3DPercentDiagonal" +#define UNO_NAME_3D_BACKSCALE "D3DBackscale" +#define UNO_NAME_3D_LATHE_END_ANGLE "D3DEndAngle" + +#define UNO_NAME_3D_EXTRUDE_DEPTH "D3DDepth" + +#define UNO_NAME_3D_TRANSFORM_MATRIX "D3DTransformMatrix" +#define UNO_NAME_3D_CAMERA_GEOMETRY "D3DCameraGeometry" +#define UNO_NAME_3D_POS "D3DPosition" +#define UNO_NAME_3D_SIZE "D3DSize" +#define UNO_NAME_3D_POS_IS_CENTER "D3DPositionIsCenter" +#define UNO_NAME_3D_POLYPOLYGON3D "D3DPolyPolygon3D" +#define UNO_NAME_3D_NORMALSPOLYGON3D "D3DNormalsPolygon3D" +#define UNO_NAME_3D_TEXTUREPOLYGON3D "D3DTexturePolygon3D" +#define UNO_NAME_3D_LINEONLY "D3DLineOnly" + +// #107245# New 3D properties which are possible for lathe and extrude 3d objects +#define UNO_NAME_3D_SMOOTH_NORMALS "D3DSmoothNormals" +#define UNO_NAME_3D_SMOOTH_LIDS "D3DSmoothLids" +#define UNO_NAME_3D_CHARACTER_MODE "D3DCharacterMode" +#define UNO_NAME_3D_CLOSE_FRONT "D3DCloseFront" +#define UNO_NAME_3D_CLOSE_BACK "D3DCloseBack" + +#define UNO_NAME_NUMBERING "NumberingIsNumber" +#define UNO_NAME_NUMBERING_RULES "NumberingRules" +#define UNO_NAME_NUMBERING_LEVEL "NumberingLevel" + +#define UNO_NAME_NRULE_NUMBERINGTYPE "NumberingType" +#define UNO_NAME_NRULE_PREFIX "Prefix" +#define UNO_NAME_NRULE_SUFFIX "Suffix" +#define UNO_NAME_NRULE_BULLETID "BulletId" +#define UNO_NAME_NRULE_BULLET_COLOR "BulletColor" +#define UNO_NAME_NRULE_BULLET_RELSIZE "BulletRelSize" +#define UNO_NAME_NRULE_BULLET_FONT "BulletFont" +#define UNO_NAME_NRULE_GRAPHICURL "GraphicURL" +#define UNO_NAME_NRULE_START_WITH "StartWith" +#define UNO_NAME_NRULE_LEFT_MARGIN "LeftMargin" +#define UNO_NAME_NRULE_FIRST_LINE_OFFSET "FirstLineOffset" +#define UNO_NAME_NRULE_ADJUST "Adjust" + +#define UNO_NAME_EDIT_FONT_DESCRIPTOR "FontDescriptor" +#define UNO_NAME_EDIT_FONT_STYLENAME "FontStyleName" + +#define UNO_NAME_EDIT_PARA_ADJUST "ParaAdjust" +#define UNO_NAME_EDIT_PARA_BMARGIN "ParaBottomMargin" +#define UNO_NAME_EDIT_PARA_LASTLINEADJ "ParaLastLineAdjust" +#define UNO_NAME_EDIT_PARA_LMARGIN "ParaLeftMargin" +#define UNO_NAME_EDIT_PARA_LRPARAMARGIN "ParaLeftRightParaMargin" +#define UNO_NAME_EDIT_PARA_LINESPACING "ParaLineSpacing" +#define UNO_NAME_EDIT_PARA_RMARGIN "ParaRightMargin" +#define UNO_NAME_EDIT_PARA_TAPSTOPS "ParaTabStops" +#define UNO_NAME_EDIT_PARA_TBMARGIN "ParaTopBottomMargin" +#define UNO_NAME_EDIT_PARA_TMARGIN "ParaTopMargin" +#define UNO_NAME_EDIT_PARA_IS_HYPHEN "ParaIsHyphenation" +#define UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION "ParaIsHangingPunctuation" +#define UNO_NAME_EDIT_PARA_IS_CHARACTER_DISTANCE "ParaIsCharacterDistance" +#define UNO_NAME_EDIT_PARA_IS_FORBIDDEN_RULES "ParaIsForbiddenRules" +#define UNO_NAME_EDIT_PARA_FIRST_LINE_INDENT "ParaFirstLineIndent" + +#define UNO_NAME_EDIT_CHAR_HEIGHT "CharHeight" +#define UNO_NAME_EDIT_CHAR_FONTNAME "CharFontName" +#define UNO_NAME_EDIT_CHAR_FONTSTYLENAME "CharFontStyleName" +#define UNO_NAME_EDIT_CHAR_FONTFAMILY "CharFontFamily" +#define UNO_NAME_EDIT_CHAR_FONTCHARSET "CharFontCharSet" +#define UNO_NAME_EDIT_CHAR_FONTPITCH "CharFontPitch" +#define UNO_NAME_EDIT_CHAR_POSTURE "CharPosture" +#define UNO_NAME_EDIT_CHAR_WEIGHT "CharWeight" +#define UNO_NAME_EDIT_CHAR_LOCALE "CharLocale" + +#define UNO_NAME_EDIT_CHAR_HEIGHT_ASIAN "CharHeightAsian" +#define UNO_NAME_EDIT_CHAR_FONTNAME_ASIAN "CharFontNameAsian" +#define UNO_NAME_EDIT_CHAR_FONTSTYLENAME_ASIAN "CharFontStyleNameAsian" +#define UNO_NAME_EDIT_CHAR_FONTFAMILY_ASIAN "CharFontFamilyAsian" +#define UNO_NAME_EDIT_CHAR_FONTCHARSET_ASIAN "CharFontCharSetAsian" +#define UNO_NAME_EDIT_CHAR_FONTPITCH_ASIAN "CharFontPitchAsian" +#define UNO_NAME_EDIT_CHAR_POSTURE_ASIAN "CharPostureAsian" +#define UNO_NAME_EDIT_CHAR_WEIGHT_ASIAN "CharWeightAsian" +#define UNO_NAME_EDIT_CHAR_LOCALE_ASIAN "CharLocaleAsian" + +#define UNO_NAME_EDIT_CHAR_HEIGHT_COMPLEX "CharHeightComplex" +#define UNO_NAME_EDIT_CHAR_FONTNAME_COMPLEX "CharFontNameComplex" +#define UNO_NAME_EDIT_CHAR_FONTSTYLENAME_COMPLEX "CharFontStyleNameComplex" +#define UNO_NAME_EDIT_CHAR_FONTFAMILY_COMPLEX "CharFontFamilyComplex" +#define UNO_NAME_EDIT_CHAR_FONTCHARSET_COMPLEX "CharFontCharSetComplex" +#define UNO_NAME_EDIT_CHAR_FONTPITCH_COMPLEX "CharFontPitchComplex" +#define UNO_NAME_EDIT_CHAR_POSTURE_COMPLEX "CharPostureComplex" +#define UNO_NAME_EDIT_CHAR_WEIGHT_COMPLEX "CharWeightComplex" +#define UNO_NAME_EDIT_CHAR_LOCALE_COMPLEX "CharLocaleComplex" + +#define UNO_NAME_EDIT_CHAR_COLOR "CharColor" +#define UNO_NAME_EDIT_CHAR_CROSSEDOUT "CharCrossedOut" +#define UNO_NAME_EDIT_CHAR_STRIKEOUT "CharStrikeout" +#define UNO_NAME_EDIT_CHAR_ESCAPEMENT "CharEscapement" +#define UNO_NAME_EDIT_CHAR_FONTNAME "CharFontName" +#define UNO_NAME_EDIT_CHAR_SHADOWED "CharShadowed" +#define UNO_NAME_EDIT_CHAR_UNDERLINE "CharUnderline" +#define UNO_NAME_EDIT_CHAR_OVERLINE "CharOverline" + +#define UNO_NAME_BITMAP "Bitmap" + +#define UNO_NAME_LINKDISPLAYNAME "LinkDisplayName" +#define UNO_NAME_LINKDISPLAYBITMAP "LinkDisplayBitmap" + +#define UNO_NAME_GRAPHIC_LUMINANCE "AdjustLuminance" +#define UNO_NAME_GRAPHIC_CONTRAST "AdjustContrast" +#define UNO_NAME_GRAPHIC_RED "AdjustRed" +#define UNO_NAME_GRAPHIC_GREEN "AdjustGreen" +#define UNO_NAME_GRAPHIC_BLUE "AdjustBlue" +#define UNO_NAME_GRAPHIC_GAMMA "Gamma" +#define UNO_NAME_GRAPHIC_TRANSPARENCY "Transparency" +#define UNO_NAME_GRAPHIC_COLOR_MODE "GraphicColorMode" +#define UNO_NAME_GRAPHIC_GRAPHICCROP "GraphicCrop" + +#define UNO_NAME_CUSTOMSHAPE_ADJUSTMENT "CustomShapeAdjustment" + +// Die folgenden Properties sind veraltet und koennen irgendwann mal raus +#define UNO_NAME_EDIT_FONT_COLOR "FontColor" +#define UNO_NAME_EDIT_FONT_ESCAPEMENT "FontEscapement" +#define UNO_NAME_EDIT_FONT_HEIGHT "FontHeight" +#define UNO_NAME_EDIT_FONT_SHADOWED "FontShadowed" +#define UNO_NAME_EDIT_FONT_SLANT "FontSlant" +#define UNO_NAME_EDIT_FONT_STRIKEOUT "FontStrikeout" +#define UNO_NAME_EDIT_FONT_UNDERLINE "FontUnderline" +#define UNO_NAME_EDIT_FONT_WEIGHT "FontWeight" +#define UNO_NAME_EDIT_CHAR_STYLE "CharStyle" +#define UNO_NAME_EDIT_FONT_FAMILY "FontFamily" +#define UNO_NAME_EDIT_FONT_NAME "FontName" +#define UNO_NAME_EDIT_FONT_CHARSET "FontCharset" +// Ende der veralteten Properties + +#endif + + diff --git a/svx/inc/svx/unoprov.hxx b/svx/inc/svx/unoprov.hxx new file mode 100644 index 000000000000..3c7f87f58fbd --- /dev/null +++ b/svx/inc/svx/unoprov.hxx @@ -0,0 +1,176 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoprov.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_UNOPROV_HXX +#define SVX_UNOPROV_HXX + +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <svx/svdpool.hxx> +#include <svl/itemprop.hxx> +#include <tools/list.hxx> +#include "svx/svxdllapi.h" + +class SvxItemPropertySet; +/*********************************************************************** +* class UHashMap * +***********************************************************************/ + +struct UHashMapEntry +{ + ::rtl::OUString aIdentifier; + UINT32 nId; + + UHashMapEntry(const sal_Char * value, sal_Int32 length, UINT32 _nId) : aIdentifier(value,length,RTL_TEXTENCODING_ASCII_US), nId(_nId) { } +}; + +DECLARE_LIST( UHashMapEntryList, UHashMapEntry* ) + +#define HASHARRAYSIZE 0x10 +#define UHASHMAP_NOTFOUND sal::static_int_cast< UINT32 >(~0) + +class UHashMap +{ +private: + UHashMapEntryList m_aHashList[HASHARRAYSIZE]; + +public: + UHashMap( UHashMapEntry* pMap ); + ~UHashMap() {}; + + UINT32 getId( const ::rtl::OUString& rCompareString ); +}; + +/*********************************************************************** +* Soriterer * +***********************************************************************/ + +#define SVXMAP_SHAPE 0 +#define SVXMAP_CONNECTOR 1 +#define SVXMAP_DIMENSIONING 2 +#define SVXMAP_CIRCLE 3 +#define SVXMAP_POLYPOLYGON 4 +#define SVXMAP_POLYPOLYGONBEZIER 5 +#define SVXMAP_GRAPHICOBJECT 6 +#define SVXMAP_3DSCENEOBJECT 7 +#define SVXMAP_3DCUBEOBJEKT 8 +#define SVXMAP_3DSPHEREOBJECT 9 +#define SVXMAP_3DLATHEOBJECT 10 +#define SVXMAP_3DEXTRUDEOBJECT 11 +#define SVXMAP_3DPOLYGONOBJECT 12 +#define SVXMAP_ALL 13 +#define SVXMAP_GROUP 14 +#define SVXMAP_CAPTION 15 +#define SVXMAP_OLE2 16 +#define SVXMAP_PLUGIN 17 +#define SVXMAP_FRAME 18 +#define SVXMAP_APPLET 19 +#define SVXMAP_CONTROL 20 +#define SVXMAP_TEXT 21 +#define SVXMAP_CUSTOMSHAPE 22 +#define SVXMAP_MEDIA 23 +#define SVXMAP_TABLE 24 +#define SVXMAP_PAGE 25 +#define SVXMAP_END 26 // last+1 ! +/*********************************************************************** +* SvxUnoPropertyMapProvider * +***********************************************************************/ +class SVX_DLLPUBLIC SvxUnoPropertyMapProvider +{ + SfxItemPropertyMapEntry* aMapArr[SVXMAP_END]; + SvxItemPropertySet* aSetArr[SVXMAP_END]; +// void Sort(USHORT nId); +public: + SvxUnoPropertyMapProvider(); + ~SvxUnoPropertyMapProvider(); + const SfxItemPropertyMapEntry* GetMap(UINT16 nPropertyId); + const SvxItemPropertySet* GetPropertySet(UINT16 nPropertyId); +}; + +/*********************************************************************** +* Globals * +***********************************************************************/ + +const sal_Int16 OBJ_OLE2_APPLET = 100; +const sal_Int16 OBJ_OLE2_PLUGIN = 101; + +extern SvxUnoPropertyMapProvider aSvxMapProvider; +extern UHashMapEntry pSdrShapeIdentifierMap[]; +extern UHashMap aSdrShapeIdentifierMap; + +#define SFX_METRIC_ITEM (0x40) +#define E3D_INVENTOR_FLAG (0x80000000) + +#include <svx/unoipset.hxx> + +/*********************************************************************** +* class SvxServiceInfoHelper * +***********************************************************************/ + +/** this class provides a basic helper for classes suporting the XServiceInfo Interface. + * + * you can overload the <code>getSupprotedServiceNames</code> to implement a XServiceInfo. + * you can use the static helper methods to combine your services with that of parent + * or aggregatet classes. + */ +class SVX_DLLPUBLIC SvxServiceInfoHelper : public ::com::sun::star::lang::XServiceInfo +{ +public: + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // helper + static ::com::sun::star::uno::Sequence< ::rtl::OUString > concatSequences( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq1, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq2 ) throw(); + static void addToSequence( ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq,UINT16 nServices, /* sal_Char* */... ) throw(); + static sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& SupportedServices ) throw(); +}; + +/*********************************************************************** +* class SvxPropertySetInfoPool * +***********************************************************************/ + +const sal_Int32 SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS = 0; +const sal_Int32 SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER = 1; +const sal_Int32 SVXUNO_SERVICEID_LASTID = 1; + +namespace comphelper { class PropertySetInfo; } + +class SvxPropertySetInfoPool +{ +public: + SVX_DLLPUBLIC static comphelper::PropertySetInfo* getOrCreate( sal_Int32 nServiceId ) throw(); + +private: + static comphelper::PropertySetInfo* mpInfos[SVXUNO_SERVICEID_LASTID+1]; +}; + +#endif + diff --git a/svx/inc/svx/unoshape.hxx b/svx/inc/svx/unoshape.hxx new file mode 100644 index 000000000000..ec81d8beaa1c --- /dev/null +++ b/svx/inc/svx/unoshape.hxx @@ -0,0 +1,885 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoshape.hxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_UNOSHAPE_HXX +#define _SVX_UNOSHAPE_HXX + +#include <com/sun/star/document/XActionLockable.hpp> +#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp> +#include <com/sun/star/drawing/XGluePointsSupplier.hpp> +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/beans/XPropertyState.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/uno/XAggregation.hpp> +#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/awt/Point.hpp> +#include <com/sun/star/drawing/PolygonKind.hpp> +#include <com/sun/star/container/XNamed.hpp> +#include <com/sun/star/container/XChild.hpp> +#include <com/sun/star/beans/XMultiPropertySet.hpp> +#include <com/sun/star/beans/XMultiPropertyStates.hpp> +#include <tools/gen.hxx> +#include <tools/weakbase.hxx> +#include <svl/lstner.hxx> +#include <svx/unoipset.hxx> +#include <cppuhelper/weak.hxx> +#include <cppuhelper/weakagg.hxx> +#include <cppuhelper/interfacecontainer.h> +#include <osl/mutex.hxx> +#include "svx/svxdllapi.h" +#include <rtl/ref.hxx> + +#include <svx/svdouno.hxx> + +#include <comphelper/servicehelper.hxx> + +#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/implbase12.hxx> + +#include <svx/unoprov.hxx> + +class SfxItemSet; +class SdrModel; +class SvxDrawPage; +class SvGlobalName; +// --> OD 2009-01-16 #i59051# +namespace basegfx + { + class B2DPolyPolygon; + } // end of namespace basegfx +// <-- + +class SvxShapeMutex +{ +protected: + ::osl::Mutex maMutex; +}; + +struct SvxShapeImpl; +class SvxShapeMaster; + +// WARNING: if you update the supported interfaces, +// also update SvxShape::_getTypes() +typedef ::cppu::WeakAggImplHelper12< + ::com::sun::star::drawing::XShape, + ::com::sun::star::lang::XComponent, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::beans::XMultiPropertySet, + ::com::sun::star::beans::XPropertyState, + ::com::sun::star::lang::XUnoTunnel, + ::com::sun::star::container::XNamed, + ::com::sun::star::drawing::XGluePointsSupplier, + ::com::sun::star::container::XChild, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::document::XActionLockable, + ::com::sun::star::beans::XMultiPropertyStates> SvxShape_UnoImplHelper; + +class SVX_DLLPUBLIC SvxShape : public SvxShape_UnoImplHelper, + public SfxListener, + public SvxShapeMutex +{ +private: + ::com::sun::star::awt::Size maSize; + ::com::sun::star::awt::Point maPosition; + ::rtl::OUString maShapeType; + ::rtl::OUString maShapeName; + + /** these members are used to optimize XMultiProperty calls */ + SvxShapeImpl* mpImpl; + bool mbIsMultiPropertyCall; + + ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XIndexContainer > mxGluePoints; + +protected: + friend class SvxDrawPage; + friend class SvxShapeConnector; + friend class SdXShape; + + const SvxItemPropertySet* mpPropSet; + const SfxItemPropertyMapEntry* maPropMapEntries; + + ::tools::WeakReference< SdrObject > mpObj; + SdrModel* mpModel; + // Umrechnungen fuer den Writer, der in TWIPS arbeitet + void ForceMetricToItemPoolMetric(Pair& rPoint) const throw(); + void ForceMetricTo100th_mm(Pair& rPoint) const throw(); + // --> OD 2009-01-16 #i59051# + void ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw(); + void ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw(); + // <-- + + ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) const; + + sal_Bool tryQueryAggregation( const com::sun::star::uno::Type & rType, com::sun::star::uno::Any& rAny ); + + sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const ::rtl::OUString& rName ); + + /** called from the XActionLockable interface methods on initial locking */ + virtual void lock(); + + /** called from the XActionLockable interface methods on final unlock */ + virtual void unlock(); + + /** used from the XActionLockable interface */ + sal_uInt16 mnLockCount; + + const SfxItemPropertyMapEntry* getPropertyMapEntries() const { return maPropMapEntries; } + + void updateShapeKind(); + void endSetPropertyValues(); + + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + +public: + SvxShape( SdrObject* pObj ) throw (); + SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ) throw (); + SvxShape() throw (); + virtual ~SvxShape() throw (); + + // Internals + void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet); + virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ); + /** takes the ownership of the SdrObject. + + When the shape is disposed, and it has the ownership of its associated SdrObject, then + it will delete this object. + */ + void TakeSdrObjectOwnership(); + bool HasSdrObjectOwnership() const; + + void ChangeModel( SdrModel* pNewModel ); + + void InvalidateSdrObject() { mpObj.reset( NULL ); }; + const SvxItemPropertySet& GetPropertySet() { return *mpPropSet; } + SdrObject* GetSdrObject() const {return mpObj.get();} + void SetShapeType( const ::rtl::OUString& ShapeType ) { maShapeType = ShapeType; } + ::com::sun::star::uno::Any GetBitmap( BOOL bMetaFile = FALSE ) const throw (); + static SvxShape* GetShapeForSdrObj( SdrObject* pObj ) throw (); + + ::svx::PropertyChangeNotifier& getShapePropertyChangeNotifier(); + + void setShapeKind( sal_uInt32 nKind ); + sal_uInt32 getShapeKind() const; + + // styles need this + static sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const ::rtl::OUString& rName, SfxItemSet& rSet, SdrModel* pModel ); + static sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const ::rtl::OUString& rName, SfxItemSet& rSet ); + + /** same as SetFillAttribute but for property names instead of which ids, + and the property found is returned instead of set at the object + directly. + */ +// os: unused function +// static ::com::sun::star::uno::Any SAL_CALL GetFillAttributeByName( +// const ::rtl::OUString& rPropertyName, const ::rtl::OUString& rName, SdrModel* pModel ); + + UNO3_GETIMPLEMENTATION_DECL( SvxShape ) + + // access methods for master objects + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL _getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL _setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any SAL_CALL _getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + void SAL_CALL _setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Any SAL_CALL _getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL _getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL _getTypes( ) throw(::com::sun::star::uno::RuntimeException); + + void setMaster( SvxShapeMaster* pMaster ); + const SvxShapeMaster* getMaster() const; + SvxShapeMaster* getMaster(); + + // SfxListener + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw (); + + + /** @obsolete + not used anymore + */ + virtual void onUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect); + + // XAggregation + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); + + // XNamed + virtual ::rtl::OUString SAL_CALL getName( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException); + + // XShapeDescriptor + virtual ::rtl::OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException); + + // XShape + virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + + // XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XMultiPropertySet + virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + + // XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XMultiPropertyStates + virtual void SAL_CALL setAllPropertiesToDefault() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertiesToDefault( + const ::com::sun::star::uno::Sequence< + ::rtl::OUString >& aPropertyNames ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > + SAL_CALL getPropertyDefaults( + const ::com::sun::star::uno::Sequence< + ::rtl::OUString >& aPropertyNames ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + + // XGluePointsSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > SAL_CALL getGluePoints( ) throw(::com::sun::star::uno::RuntimeException); + + // XChild + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + // XActionLockable + virtual sal_Bool SAL_CALL isActionLocked( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addActionLock( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeActionLock( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setActionLocks( sal_Int16 nLock ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Int16 SAL_CALL resetActionLocks( ) throw (::com::sun::star::uno::RuntimeException); + +private: + /** initializes SdrObj-dependent members. Only to be called when GetSdrObject() != NULL + */ + SVX_DLLPRIVATE void impl_initFromSdrObject(); + /// CTOR-Impl + SVX_DLLPRIVATE void impl_construct(); +}; + +#include <svx/unotext.hxx> + +class SVX_DLLPUBLIC SvxShapeText : public SvxShape, public SvxUnoTextBase +{ +protected: + /** called from the XActionLockable interface methods on initial locking */ + virtual void lock(); + + /** called from the XActionLockable interface methods on final unlock */ + virtual void unlock(); + +protected: + using SvxUnoTextRangeBase::setPropertyValue; + using SvxUnoTextRangeBase::getPropertyValue; + + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + +public: + SvxShapeText() throw (); + SvxShapeText( SdrObject* pObj ) throw (); + SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw (); + virtual ~SvxShapeText() throw (); + + virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::text::XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw(::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setString( const ::rtl::OUString& aString ) throw(::com::sun::star::uno::RuntimeException); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); +}; + +class SvxShapeRect : public SvxShapeText +{ +public: + SvxShapeRect( SdrObject* pObj ) throw (); + virtual ~SvxShapeRect() throw (); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); +}; +#include <com/sun/star/drawing/XShapes.hpp> +#include <com/sun/star/drawing/XShapeGroup.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> + +/*********************************************************************** +* * +***********************************************************************/ +class SvxShapeGroup : public SvxShape, + public ::com::sun::star::drawing::XShapeGroup, + public ::com::sun::star::drawing::XShapes +{ +private: + rtl::Reference< SvxDrawPage> mxPage; + +public: + SvxShapeGroup( SdrObject* pObj,SvxDrawPage* pDrawPage ) throw (); + virtual ~SvxShapeGroup() throw (); + + virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XShapes + virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ; + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XShapeDescriptor + virtual ::rtl::OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException); + + // XShape + virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); + + // XShapeGroup + virtual void SAL_CALL enterGroup( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL leaveGroup( ) throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); +}; +#include <com/sun/star/drawing/XConnectorShape.hpp> + +/*********************************************************************** +* * +***********************************************************************/ +class SvxShapeConnector : public ::com::sun::star::drawing::XConnectorShape, + public SvxShapeText +{ +public: + SvxShapeConnector( SdrObject* pObj ) throw(); + virtual ~SvxShapeConnector() throw(); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XShapeDescriptor + virtual ::rtl::OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException); + + // XShape + virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); + + // XConnectorShape + virtual void SAL_CALL connectStart( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape, ::com::sun::star::drawing::ConnectionType nPos ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL connectEnd( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape, ::com::sun::star::drawing::ConnectionType nPos ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL disconnectBegin( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL disconnectEnd( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); +}; +#include <com/sun/star/drawing/XControlShape.hpp> + +/*********************************************************************** +* * +***********************************************************************/ +class SVX_DLLPUBLIC SvxShapeControl : public ::com::sun::star::drawing::XControlShape, public SvxShapeText +{ +protected: + using SvxUnoTextRangeBase::setPropertyValue; + using SvxUnoTextRangeBase::getPropertyValue; + +public: + SvxShapeControl( SdrObject* pObj ) throw(); + virtual ~SvxShapeControl() throw(); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XPropertySet + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XShapeDescriptor + virtual ::rtl::OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException); + + // XShape + virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); + + // XControlShape + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getControl() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xControl ) throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ +class SvxShapeDimensioning : public SvxShapeText +{ +public: + SvxShapeDimensioning( SdrObject* pObj ) throw(); + virtual ~SvxShapeDimensioning() throw(); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ +class SvxShapeCircle : public SvxShapeText +{ +public: + SvxShapeCircle( SdrObject* pObj ) throw (); + virtual ~SvxShapeCircle() throw (); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ + +class SVX_DLLPUBLIC SvxOle2Shape : public SvxShape +{ +protected: +// overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + void resetModifiedState(); + + const SvGlobalName GetClassName_Impl(rtl::OUString& rHexCLSID); +public: + SvxOle2Shape( SdrObject* pObj ) throw(); + SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw (); + virtual ~SvxOle2Shape() throw(); + + sal_Bool createObject( const SvGlobalName &aClassName ); + + sal_Bool createLink( const ::rtl::OUString& aLinkURL ); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); +}; + + +#include <basegfx/polygon/b2dpolypolygon.hxx> + +/*********************************************************************** +* * +***********************************************************************/ +class SvxShapePolyPolygon : public SvxShapeText +{ +private: + ::com::sun::star::drawing::PolygonKind mePolygonKind; + +protected: + using SvxUnoTextRangeBase::setPropertyValue; + using SvxUnoTextRangeBase::getPropertyValue; + + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + +public: + SvxShapePolyPolygon( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_LINE ) throw(com::sun::star::lang::IllegalArgumentException, com::sun::star::beans::PropertyVetoException); + virtual ~SvxShapePolyPolygon() throw(); + + // Local support functions + ::com::sun::star::drawing::PolygonKind GetPolygonKind() const throw(); + void SetPolygon(const basegfx::B2DPolyPolygon& rNew) throw(); + basegfx::B2DPolyPolygon GetPolygon() const throw(); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ + +class SvxShapePolyPolygonBezier : public SvxShapeText +{ +private: + ::com::sun::star::drawing::PolygonKind mePolygonKind; + +protected: + using SvxUnoTextRangeBase::setPropertyValue; + using SvxUnoTextRangeBase::getPropertyValue; + +public: + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + SvxShapePolyPolygonBezier( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_PATHLINE) throw(); + virtual ~SvxShapePolyPolygonBezier() throw(); + + // Local support functions + ::com::sun::star::drawing::PolygonKind GetPolygonKind() const throw(); + void SetPolygon(const basegfx::B2DPolyPolygon & rNew) throw(); + basegfx::B2DPolyPolygon GetPolygon() const throw(); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ +class SvxGraphicObject : public SvxShapeText +{ +protected: + using SvxUnoTextRangeBase::setPropertyValue; + using SvxUnoTextRangeBase::getPropertyValue; + + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + +public: + SvxGraphicObject( SdrObject* pObj ) throw(); + virtual ~SvxGraphicObject() throw(); +}; + +/*********************************************************************** +* * +***********************************************************************/ +class Svx3DSceneObject : public ::com::sun::star::drawing::XShapes, public SvxShape +{ +private: + rtl::Reference< SvxDrawPage > mxPage; + +protected: + using SvxShape::setPropertyValue; + using SvxShape::getPropertyValue; + +public: + Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw(); + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + virtual ~Svx3DSceneObject() throw(); + + virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XShapes + virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException) ; + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ +class Svx3DCubeObject : public SvxShape +{ +protected: + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + +public: + Svx3DCubeObject( SdrObject* pObj ) throw(); + virtual ~Svx3DCubeObject() throw(); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ +class Svx3DSphereObject : public SvxShape +{ +public: + Svx3DSphereObject( SdrObject* pObj ) throw(); +protected: + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + virtual ~Svx3DSphereObject() throw(); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ +class Svx3DLatheObject : public SvxShape +{ +protected: + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + +public: + Svx3DLatheObject( SdrObject* pObj ) throw(); + virtual ~Svx3DLatheObject() throw(); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ +class Svx3DExtrudeObject : public SvxShape +{ +public: + Svx3DExtrudeObject( SdrObject* pObj ) throw(); +protected: + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + virtual ~Svx3DExtrudeObject() throw(); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ +class Svx3DPolygonObject : public SvxShape +{ +protected: + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + +public: + Svx3DPolygonObject( SdrObject* pObj ) throw(); + virtual ~Svx3DPolygonObject() throw(); + + // XServiceInfo + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ +typedef ::cppu::WeakAggImplHelper1< + ::com::sun::star::drawing::XEnhancedCustomShapeDefaulter + > SvxShape_UnoImplHelper1; + +class SVX_DLLPUBLIC SvxCustomShape : public SvxShapeText, public SvxShape_UnoImplHelper1 +{ +private: + rtl::Reference< SvxDrawPage > mxPage; + +protected: + using SvxUnoTextRangeBase::setPropertyValue; + using SvxUnoTextRangeBase::getPropertyValue; + +public: + SvxCustomShape( SdrObject* pObj ) throw (); + // overide these for special property handling in subcasses. Return true if property is handled + //virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertyMapEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + + virtual ~SvxCustomShape() throw (); + + virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XShapeDescriptor + virtual ::rtl::OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException); + + // XShape + virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); + + // XPropertySet + void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + //XEnhancedCustomShapeDefaulter + virtual void SAL_CALL createCustomShapeDefaults( const rtl::OUString& rShapeType ) throw (::com::sun::star::uno::RuntimeException); +}; + +/*********************************************************************** +* * +***********************************************************************/ + +class SvxMediaShape : public SvxShape +{ +public: + SvxMediaShape( SdrObject* pObj ) throw(); + virtual ~SvxMediaShape() throw(); + +protected: + // overide these for special property handling in subcasses. Return true if property is handled + virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); +}; + +#endif diff --git a/svx/inc/svx/unoshprp.hxx b/svx/inc/svx/unoshprp.hxx new file mode 100644 index 000000000000..e23b24a21957 --- /dev/null +++ b/svx/inc/svx/unoshprp.hxx @@ -0,0 +1,541 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoshprp.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_UNOSHPRP_HXX +#define _SVX_UNOSHPRP_HXX + +#include <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/drawing/PointSequence.hpp> +#include <com/sun/star/drawing/PointSequenceSequence.hpp> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/drawing/RectanglePoint.hpp> +#include <com/sun/star/awt/XBitmap.hpp> +#include <com/sun/star/awt/Gradient.hpp> +#include <com/sun/star/drawing/Hatch.hpp> +#include <com/sun/star/drawing/FillStyle.hpp> +#include <com/sun/star/drawing/LineDash.hpp> +#ifndef _COM_SUN_STAR_DRAWING_LINEJOINT_Hpp_ +#include <com/sun/star/drawing/LineJoint.hpp> +#endif +#include <com/sun/star/drawing/LineStyle.hpp> +#include <com/sun/star/beans/PropertyAttribute.hpp> +#include <com/sun/star/awt/Rectangle.hpp> +#include <com/sun/star/drawing/TextAnimationDirection.hpp> +#include <com/sun/star/drawing/TextAnimationKind.hpp> +#include <com/sun/star/drawing/TextFitToSizeType.hpp> +#include <com/sun/star/drawing/TextVerticalAdjust.hpp> +#include <com/sun/star/drawing/TextHorizontalAdjust.hpp> +#include <com/sun/star/drawing/ConnectorType.hpp> +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/drawing/MeasureKind.hpp> +#include <com/sun/star/drawing/MeasureTextHorzPos.hpp> +#include <com/sun/star/drawing/MeasureTextVertPos.hpp> +#include <com/sun/star/drawing/HomogenMatrix3.hpp> +#include <com/sun/star/drawing/CircleKind.hpp> +#include <com/sun/star/drawing/PolygonKind.hpp> +#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp> +#include <com/sun/star/drawing/ColorMode.hpp> +#include <com/sun/star/drawing/HomogenMatrix.hpp> +#include <com/sun/star/drawing/Direction3D.hpp> +#include <com/sun/star/drawing/ProjectionMode.hpp> +#include <com/sun/star/drawing/ShadeMode.hpp> +#include <com/sun/star/drawing/Position3D.hpp> +#include <com/sun/star/drawing/NormalsKind.hpp> +#include <com/sun/star/drawing/TextureKind.hpp> +#include <com/sun/star/drawing/TextureMode.hpp> +#include <com/sun/star/drawing/TextureProjectionMode.hpp> +#include <com/sun/star/drawing/PolyPolygonShape3D.hpp> +#include <com/sun/star/text/GraphicCrop.hpp> +#include <com/sun/star/drawing/BitmapMode.hpp> +#include <com/sun/star/drawing/CameraGeometry.hpp> +#include <com/sun/star/text/WritingMode.hpp> +#include <com/sun/star/graphic/XGraphic.hpp> + +#define _SVX_USE_UNOGLOBALS_ +#include <svx/unoprov.hxx> +#include <svx/unoprnms.hxx> +#include <svx/unomid.hxx> +#include <svx/unotext.hxx> +#include <svl/itemprop.hxx> + +#include <svx/svxids.hrc> + +#ifndef SEQTYPE + #if defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500) + #define SEQTYPE(x) (new ::com::sun::star::uno::Type( x )) + #else + #define SEQTYPE(x) &(x) + #endif +#endif + +#define OWN_ATTR_VALUE_START (3900) +#define OWN_ATTR_VALUE_START_TEXT (OWN_ATTR_VALUE_START+0) // the next 10 entries are reserved for text +#define OWN_ATTR_VALUE_POLYGONKIND (OWN_ATTR_VALUE_START+10) +#define OWN_ATTR_VALUE_POLYPOLYGON (OWN_ATTR_VALUE_START+11) +#define OWN_ATTR_VALUE_POLYPOLYGONBEZIER (OWN_ATTR_VALUE_START+12) +#define OWN_ATTR_VALUE_FILLBITMAP (OWN_ATTR_VALUE_START+13) +#define OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX (OWN_ATTR_VALUE_START+14) +#define OWN_ATTR_3D_VALUE_POSITION (OWN_ATTR_VALUE_START+15) +#define OWN_ATTR_3D_VALUE_SIZE (OWN_ATTR_VALUE_START+16) +#define OWN_ATTR_3D_VALUE_POS_IS_CENTER (OWN_ATTR_VALUE_START+17) +#define OWN_ATTR_3D_VALUE_POLYPOLYGON3D (OWN_ATTR_VALUE_START+18) +#define OWN_ATTR_3D_VALUE_LINEONLY (OWN_ATTR_VALUE_START+19) +#define OWN_ATTR_BITMAP (OWN_ATTR_VALUE_START+20) +#define OWN_ATTR_EDGE_START_OBJ (OWN_ATTR_VALUE_START+21) +#define OWN_ATTR_EDGE_START_POS (OWN_ATTR_VALUE_START+22) +#define OWN_ATTR_EDGE_END_OBJ (OWN_ATTR_VALUE_START+23) +#define OWN_ATTR_EDGE_END_POS (OWN_ATTR_VALUE_START+24) +#define OWN_ATTR_FRAMERECT (OWN_ATTR_VALUE_START+25) +#define OWN_ATTR_VALUE_POLYGON (OWN_ATTR_VALUE_START+26) +#define OWN_ATTR_METAFILE (OWN_ATTR_VALUE_START+27) +#define OWN_ATTR_ISFONTWORK (OWN_ATTR_VALUE_START+28) +#define OWN_ATTR_BOUNDRECT (OWN_ATTR_VALUE_START+29) +#define OWN_ATTR_LDNAME (OWN_ATTR_VALUE_START+30) +#define OWN_ATTR_LDBITMAP (OWN_ATTR_VALUE_START+31) +#define OWN_ATTR_OLESIZE (OWN_ATTR_VALUE_START+32) +#define OWN_ATTR_GRAFURL (OWN_ATTR_VALUE_START+33) +#define OWN_ATTR_OLEMODEL (OWN_ATTR_VALUE_START+34) +#define OWN_ATTR_MIRRORED (OWN_ATTR_VALUE_START+35) +#define OWN_ATTR_CLSID (OWN_ATTR_VALUE_START+36) +#define OWN_ATTR_GLUEID_TAIL (OWN_ATTR_VALUE_START+37) +#define OWN_ATTR_GLUEID_HEAD (OWN_ATTR_VALUE_START+38) +#define OWN_ATTR_ZORDER (OWN_ATTR_VALUE_START+39) +#define OWN_ATTR_MEASURE_START_POS (OWN_ATTR_VALUE_START+40) +#define OWN_ATTR_MEASURE_END_POS (OWN_ATTR_VALUE_START+41) +#define OWN_ATTR_3D_VALUE_CAMERA_GEOMETRY (OWN_ATTR_VALUE_START+42) +#define OWN_ATTR_WRITINGMODE (OWN_ATTR_VALUE_START+43) +#define OWN_ATTR_GRAFSTREAMURL (OWN_ATTR_VALUE_START+44) +#define OWN_ATTR_FILLBMP_MODE (OWN_ATTR_VALUE_START+45) +#define OWN_ATTR_TRANSFORMATION (OWN_ATTR_VALUE_START+46) +#define OWN_ATTR_BASE_GEOMETRY (OWN_ATTR_VALUE_START+47) + +#define OWN_ATTR_APPLET_DOCBASE (OWN_ATTR_VALUE_START+48) +#define OWN_ATTR_APPLET_CODEBASE (OWN_ATTR_VALUE_START+49) +#define OWN_ATTR_APPLET_NAME (OWN_ATTR_VALUE_START+50) +#define OWN_ATTR_APPLET_CODE (OWN_ATTR_VALUE_START+51) +#define OWN_ATTR_APPLET_COMMANDS (OWN_ATTR_VALUE_START+52) +#define OWN_ATTR_APPLET_ISSCRIPT (OWN_ATTR_VALUE_START+53) +#define OWN_ATTR_PLUGIN_MIMETYPE (OWN_ATTR_VALUE_START+54) +#define OWN_ATTR_PLUGIN_URL (OWN_ATTR_VALUE_START+55) +#define OWN_ATTR_PLUGIN_COMMANDS (OWN_ATTR_VALUE_START+56) +#define OWN_ATTR_FRAME_URL (OWN_ATTR_VALUE_START+57) +#define OWN_ATTR_FRAME_NAME (OWN_ATTR_VALUE_START+58) +#define OWN_ATTR_FRAME_ISAUTOSCROLL (OWN_ATTR_VALUE_START+59) +#define OWN_ATTR_FRAME_ISBORDER (OWN_ATTR_VALUE_START+60) +#define OWN_ATTR_FRAME_MARGIN_WIDTH (OWN_ATTR_VALUE_START+61) +#define OWN_ATTR_FRAME_MARGIN_HEIGHT (OWN_ATTR_VALUE_START+62) + +// reuse own attr from ole shapes for tables +#define OWN_ATTR_TABLETEMPLATE (OWN_ATTR_VALUE_START+48) +#define OWN_ATTR_TABLETEMPLATE_FIRSTROW (OWN_ATTR_VALUE_START+49) +#define OWN_ATTR_TABLETEMPLATE_LASTROW (OWN_ATTR_VALUE_START+50) +#define OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN (OWN_ATTR_VALUE_START+51) +#define OWN_ATTR_TABLETEMPLATE_LASTCOLUMN (OWN_ATTR_VALUE_START+52) +#define OWN_ATTR_TABLETEMPLATE_BANDINGROWS (OWN_ATTR_VALUE_START+53) +#define OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS (OWN_ATTR_VALUE_START+54) +#define OWN_ATTR_TABLEBORDER (OWN_ATTR_VALUE_START+55) + +#define OWN_ATTR_OLE_VISAREA (OWN_ATTR_VALUE_START+63) +#define OWN_ATTR_CAPTION_POINT (OWN_ATTR_VALUE_START+64) +#define OWN_ATTR_PAGE_NUMBER (OWN_ATTR_VALUE_START+65) +#define OWN_ATTR_THUMBNAIL (OWN_ATTR_VALUE_START+66) +#define OWN_ATTR_PERSISTNAME (OWN_ATTR_VALUE_START+67) +//#define OWN_ATTR_HASLEVELS (OWN_ATTR_VALUE_START+68) +#define OWN_ATTR_MEDIA_URL (OWN_ATTR_VALUE_START+69) +#define OWN_ATTR_MEDIA_PREFERREDSIZE (OWN_ATTR_VALUE_START+70) +#define OWN_ATTR_MEDIA_LOOP (OWN_ATTR_VALUE_START+71) +#define OWN_ATTR_MEDIA_MUTE (OWN_ATTR_VALUE_START+72) +#define OWN_ATTR_MEDIA_VOLUMEDB (OWN_ATTR_VALUE_START+73) +#define OWN_ATTR_MEDIA_ZOOM (OWN_ATTR_VALUE_START+74) +#define OWN_ATTR_UINAME_SINGULAR (OWN_ATTR_VALUE_START+75) +#define OWN_ATTR_UINAME_PLURAL (OWN_ATTR_VALUE_START+76) +#define OWN_ATTR_VALUE_GRAPHIC (OWN_ATTR_VALUE_START+77) +#define OWN_ATTR_INTERNAL_OLE (OWN_ATTR_VALUE_START+78) +#define OWN_ATTR_OLE_EMBEDDED_OBJECT (OWN_ATTR_VALUE_START+79) +#define OWN_ATTR_OLE_ASPECT (OWN_ATTR_VALUE_START+80) + +// #i68101# +#define OWN_ATTR_MISC_OBJ_TITLE (OWN_ATTR_VALUE_START+81) +#define OWN_ATTR_MISC_OBJ_DESCRIPTION (OWN_ATTR_VALUE_START+82) + +#define OWN_ATTR_GRAPHIC_STREAM (OWN_ATTR_VALUE_START+83) +#define OWN_ATTR_3D_VALUE_NORMALSPOLYGON3D (OWN_ATTR_VALUE_START+84) +#define OWN_ATTR_3D_VALUE_TEXTUREPOLYGON3D (OWN_ATTR_VALUE_START+85) + +#define OWN_ATTR_OLE_LINKURL (OWN_ATTR_VALUE_START+86) + +#define OWN_ATTR_STYLE (OWN_ATTR_VALUE_START+87) + +#define OWN_ATTR_EDGE_POLYPOLYGONBEZIER (OWN_ATTR_VALUE_START+88) + +#define OWN_ATTR_VALUE_END OWN_ATTR_EDGE_POLYPOLYGONBEZIER // WARNING: ee items start at 3991! + +// #FontWork# +#define FONTWORK_PROPERTIES \ + { MAP_CHAR_LEN("FontWorkStyle"), XATTR_FORMTXTSTYLE, /*ENUM*/&::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN("FontWorkAdjust"), XATTR_FORMTXTADJUST, /*ENUM*/&::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN("FontWorkDistance"), XATTR_FORMTXTDISTANCE, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN("FontWorkStart"), XATTR_FORMTXTSTART, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN("FontWorkMirror"), XATTR_FORMTXTMIRROR, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN("FontWorkOutline"), XATTR_FORMTXTOUTLINE, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN("FontWorkShadow"), XATTR_FORMTXTSHADOW, /*ENUM*/&::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN("FontWorkShadowColor"), XATTR_FORMTXTSHDWCOLOR, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN("FontWorkShadowOffsetX"), XATTR_FORMTXTSHDWXVAL, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN("FontWorkShadowOffsetY"), XATTR_FORMTXTSHDWYVAL, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN("FontWorkForm"), XATTR_FORMTXTSTDFORM, /*ENUM*/&::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN("FontWorkHideForm"), XATTR_FORMTXTHIDEFORM, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN("FontWorkShadowTransparence"),XATTR_FORMTXTSHDWTRANSP, &::getCppuType((const sal_Int16*)0), 0, 0}, + +#define SHADOW_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_SHADOW), SDRATTR_SHADOW, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_SHADOWCOLOR), SDRATTR_SHADOWCOLOR, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_SHADOWTRANSPARENCE),SDRATTR_SHADOWTRANSPARENCE, &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_SHADOWXDIST), SDRATTR_SHADOWXDIST, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_SHADOWYDIST), SDRATTR_SHADOWYDIST, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, + +#define LINE_PROPERTIES_DEFAULTS\ + { MAP_CHAR_LEN(UNO_NAME_LINECOLOR), XATTR_LINECOLOR, &::getCppuType((const sal_Int32*)0) , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_LINEENDCENTER), XATTR_LINEENDCENTER, &::getBooleanCppuType() , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_LINEENDWIDTH), XATTR_LINEENDWIDTH, &::getCppuType((const sal_Int32*)0) , 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_LINEJOINT), XATTR_LINEJOINT, &::getCppuType((const ::com::sun::star::drawing::LineJoint*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_LINESTARTCENTER), XATTR_LINESTARTCENTER, &::getBooleanCppuType() , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_LINESTARTWIDTH), XATTR_LINESTARTWIDTH, &::getCppuType((const sal_Int32*)0) , 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_LINESTYLE), XATTR_LINESTYLE, &::getCppuType((const ::com::sun::star::drawing::LineStyle*)0) , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_LINETRANSPARENCE), XATTR_LINETRANSPARENCE, &::getCppuType((const sal_Int16*)0) , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_LINEWIDTH), XATTR_LINEWIDTH, &::getCppuType((const sal_Int32*)0) , 0, SFX_METRIC_ITEM}, + +#define LINE_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_LINEDASH), XATTR_LINEDASH, &::getCppuType((const ::com::sun::star::drawing::LineDash*)0) , 0, MID_LINEDASH}, \ + { MAP_CHAR_LEN("LineDashName"), XATTR_LINEDASH, &::getCppuType((const ::rtl::OUString*)0) , 0, MID_NAME}, \ + LINE_PROPERTIES_DEFAULTS + +#define LINE_PROPERTIES_START_END \ + { MAP_CHAR_LEN(UNO_NAME_LINEEND), XATTR_LINEEND, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0)), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, \ + { MAP_CHAR_LEN("LineEndName"), XATTR_LINEEND, &::getCppuType((const ::rtl::OUString*)0), 0, MID_NAME }, \ + { MAP_CHAR_LEN(UNO_NAME_LINESTART), XATTR_LINESTART, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0)), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, \ + { MAP_CHAR_LEN("LineStartName"), XATTR_LINESTART, &::getCppuType((const ::rtl::OUString*)0), 0, MID_NAME }, + +#define FILL_PROPERTIES_BMP \ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_LOGICAL_SIZE), XATTR_FILLBMP_SIZELOG, &::getBooleanCppuType() , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_OFFSET_X), XATTR_FILLBMP_TILEOFFSETX, &::getCppuType((const sal_Int32*)0) , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_OFFSET_Y), XATTR_FILLBMP_TILEOFFSETY, &::getCppuType((const sal_Int32*)0) , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_POSITION_OFFSET_X), XATTR_FILLBMP_POSOFFSETX, &::getCppuType((const sal_Int32*)0) , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_POSITION_OFFSET_Y), XATTR_FILLBMP_POSOFFSETY, &::getCppuType((const sal_Int32*)0) , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_RECTANGLE_POINT), XATTR_FILLBMP_POS, &::getCppuType((const ::com::sun::star::drawing::RectanglePoint*)0) , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_SIZE_X), XATTR_FILLBMP_SIZEX, &::getCppuType((const sal_Int32*)0) , 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_SIZE_Y), XATTR_FILLBMP_SIZEY, &::getCppuType((const sal_Int32*)0) , 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_STRETCH), XATTR_FILLBMP_STRETCH, &::getBooleanCppuType() , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_TILE), XATTR_FILLBMP_TILE, &::getBooleanCppuType() , 0, 0},\ + { MAP_CHAR_LEN(UNO_NAME_FILLBMP_MODE), OWN_ATTR_FILLBMP_MODE, &::getCppuType((const ::com::sun::star::drawing::BitmapMode*)0), 0, 0}, + +#define FILL_PROPERTIES_DEFAULTS \ + { MAP_CHAR_LEN(UNO_NAME_FILLCOLOR), XATTR_FILLCOLOR , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + +#define FILL_PROPERTIES \ + FILL_PROPERTIES_BMP \ + FILL_PROPERTIES_DEFAULTS \ + { MAP_CHAR_LEN(UNO_NAME_FILLBACKGROUND), XATTR_FILLBACKGROUND , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLBITMAP), XATTR_FILLBITMAP , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0) , 0, MID_BITMAP}, \ + { MAP_CHAR_LEN("FillBitmapName"), XATTR_FILLBITMAP , &::getCppuType((const ::rtl::OUString*)0), 0, MID_NAME }, \ + { MAP_CHAR_LEN("FillBitmapURL"), XATTR_FILLBITMAP , &::getCppuType((const ::rtl::OUString*)0), 0, MID_GRAFURL }, \ + { MAP_CHAR_LEN("FillGradientStepCount"), XATTR_GRADIENTSTEPCOUNT , &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_FILLGRADIENT), XATTR_FILLGRADIENT , &::getCppuType((const ::com::sun::star::awt::Gradient*)0), 0, MID_FILLGRADIENT}, \ + { MAP_CHAR_LEN("FillGradientName"), XATTR_FILLGRADIENT , &::getCppuType((const ::rtl::OUString*)0), 0, MID_NAME }, \ + { MAP_CHAR_LEN(UNO_NAME_FILLHATCH), XATTR_FILLHATCH , &::getCppuType((const ::com::sun::star::drawing::Hatch*)0), 0, MID_FILLHATCH}, \ + { MAP_CHAR_LEN("FillHatchName"), XATTR_FILLHATCH , &::getCppuType((const ::rtl::OUString*)0), 0, MID_NAME }, \ + { MAP_CHAR_LEN(UNO_NAME_FILLSTYLE), XATTR_FILLSTYLE , &::getCppuType((const ::com::sun::star::drawing::FillStyle*)0) , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_FILL_TRANSPARENCE), XATTR_FILLTRANSPARENCE, &::getCppuType((const sal_Int16*)0) , 0, 0}, \ + { MAP_CHAR_LEN("FillTransparenceGradient"), XATTR_FILLFLOATTRANSPARENCE, &::getCppuType((const ::com::sun::star::awt::Gradient*)0), 0, MID_FILLGRADIENT}, \ + { MAP_CHAR_LEN("FillTransparenceGradientName"), XATTR_FILLFLOATTRANSPARENCE, &::getCppuType((const ::rtl::OUString*)0), 0, MID_NAME }, \ + { MAP_CHAR_LEN(UNO_NAME_FILLCOLOR_2), XATTR_SECONDARYFILLCOLOR, &::getCppuType((const sal_Int32*)0), 0, 0}, + +#define EDGERADIUS_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_EDGERADIUS), SDRATTR_ECKENRADIUS , &::getCppuType((const sal_Int32*)0) , 0, SFX_METRIC_ITEM}, + +#define TEXT_PROPERTIES_DEFAULTS\ + { MAP_CHAR_LEN(UNO_NAME_TEXT_WRITINGMODE), SDRATTR_TEXTDIRECTION, &::getCppuType((const ::com::sun::star::text::WritingMode*)0), 0, 0},\ + { MAP_CHAR_LEN(UNO_NAME_TEXT_ANIAMOUNT), SDRATTR_TEXT_ANIAMOUNT, &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_ANICOUNT), SDRATTR_TEXT_ANICOUNT, &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_ANIDELAY), SDRATTR_TEXT_ANIDELAY, &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_ANIDIRECTION), SDRATTR_TEXT_ANIDIRECTION, &::getCppuType((const ::com::sun::star::drawing::TextAnimationDirection*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_ANIKIND), SDRATTR_TEXT_ANIKIND, &::getCppuType((const ::com::sun::star::drawing::TextAnimationKind*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_ANISTARTINSIDE), SDRATTR_TEXT_ANISTARTINSIDE, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_ANISTOPINSIDE), SDRATTR_TEXT_ANISTOPINSIDE, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_AUTOGROWHEIGHT), SDRATTR_TEXT_AUTOGROWHEIGHT, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_AUTOGROWWIDTH), SDRATTR_TEXT_AUTOGROWWIDTH, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_CONTOURFRAME), SDRATTR_TEXT_CONTOURFRAME, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_FITTOSIZE), SDRATTR_TEXT_FITTOSIZE, &::getCppuType((const ::com::sun::star::drawing::TextFitToSizeType*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_HORZADJUST), SDRATTR_TEXT_HORZADJUST, &::getCppuType((const ::com::sun::star::drawing::TextHorizontalAdjust*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_LEFTDIST), SDRATTR_TEXT_LEFTDIST, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_LOWERDIST), SDRATTR_TEXT_LOWERDIST, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_MAXFRAMEHEIGHT), SDRATTR_TEXT_MAXFRAMEHEIGHT, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_MAXFRAMEWIDTH), SDRATTR_TEXT_MAXFRAMEWIDTH, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_MINFRAMEHEIGHT), SDRATTR_TEXT_MINFRAMEHEIGHT, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_MINFRAMEWIDTH), SDRATTR_TEXT_MINFRAMEWIDTH, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_RIGHTDIST), SDRATTR_TEXT_RIGHTDIST, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_UPPERDIST), SDRATTR_TEXT_UPPERDIST, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_FONTINDEPENDENTLINESPACING),SDRATTR_TEXT_USEFIXEDCELLHEIGHT,&::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_TEXT_VERTADJUST), SDRATTR_TEXT_VERTADJUST, &::getCppuType((const ::com::sun::star::drawing::TextVerticalAdjust*)0), 0, 0},\ + { MAP_CHAR_LEN(UNO_NAME_TEXT_WORDWRAP), SDRATTR_TEXT_WORDWRAP, &::getBooleanCppuType(), 0, 0}, \ + SVX_UNOEDIT_CHAR_PROPERTIES, \ + SVX_UNOEDIT_PARA_PROPERTIES, + +#define TEXT_PROPERTIES \ + SVX_UNOEDIT_NUMBERING_PROPERTIE, \ + TEXT_PROPERTIES_DEFAULTS + +// { MAP_CHAR_LEN("HasLevels"), OWN_ATTR_HASLEVELS, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, + +#define MISC_OBJ_PROPERTIES_NO_SHEAR \ + { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_FRAMERECT), OWN_ATTR_FRAMERECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0 }, \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ROTATEANGLE), SDRATTR_ROTATEANGLE, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_BITMAP), OWN_ATTR_BITMAP, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence<sal_Int8>*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ + { MAP_CHAR_LEN("IsFontwork"), OWN_ATTR_ISFONTWORK, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, + +#define MISC_OBJ_PROPERTIES \ + MISC_OBJ_PROPERTIES_NO_SHEAR \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SHEARANGLE), SDRATTR_SHEARANGLE, &::getCppuType((const sal_Int32*)0), 0, 0}, + + +#define SHAPE_DESCRIPTOR_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME), SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_NAME), SDRATTR_OBJECTNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_PRINTABLE), SDRATTR_OBJPRINTABLE , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT , &::getBooleanCppuType(), 0, 0},\ + { MAP_CHAR_LEN("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ + { MAP_CHAR_LEN("UINamePlural"), OWN_ATTR_UINAME_PLURAL , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ + /* #i68101# */ \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, + +#define LINKTARGET_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, + + +#define CONNECTOR_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_EDGEKIND), SDRATTR_EDGEKIND, &::getCppuType((const ::com::sun::star::drawing::ConnectorType*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_EDGENODE1HORZDIST), SDRATTR_EDGENODE1HORZDIST, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_EDGENODE1VERTDIST), SDRATTR_EDGENODE1VERTDIST, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_EDGENODE2HORZDIST), SDRATTR_EDGENODE2HORZDIST, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_EDGENODE2VERTDIST), SDRATTR_EDGENODE2VERTDIST, &::getCppuType((const sal_Int32*)0), 0, 0}, + +#define SPECIAL_CONNECTOR_PROPERTIES \ + CONNECTOR_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_EDGELINE1DELTA), SDRATTR_EDGELINE1DELTA, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_EDGELINE2DELTA), SDRATTR_EDGELINE2DELTA, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_EDGELINE3DELTA), SDRATTR_EDGELINE3DELTA, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN("StartShape"), OWN_ATTR_EDGE_START_OBJ, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, \ + { MAP_CHAR_LEN("StartGluePointIndex"), OWN_ATTR_GLUEID_HEAD, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN("StartPosition"), OWN_ATTR_EDGE_START_POS, &::getCppuType((const ::com::sun::star::awt::Point*)0), 0, 0}, \ + { MAP_CHAR_LEN("EndShape"), OWN_ATTR_EDGE_END_OBJ, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, \ + { MAP_CHAR_LEN("EndPosition"), OWN_ATTR_EDGE_END_POS, &::getCppuType((const ::com::sun::star::awt::Point*)0), 0, 0},\ + { MAP_CHAR_LEN("EndGluePointIndex"), OWN_ATTR_GLUEID_TAIL, &::getCppuType((const sal_Int32*)0), 0, 0}, \ +\ + { MAP_CHAR_LEN("EdgeStartConnection"), OWN_ATTR_EDGE_START_OBJ, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, \ + { MAP_CHAR_LEN("EdgeStartPoint"), OWN_ATTR_EDGE_START_POS, &::getCppuType((const ::com::sun::star::awt::Point*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ + { MAP_CHAR_LEN("EdgeEndConnection"), OWN_ATTR_EDGE_END_OBJ, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, \ + { MAP_CHAR_LEN("EdgeEndPoint"), OWN_ATTR_EDGE_END_POS, &::getCppuType((const ::com::sun::star::awt::Point*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ +\ + { MAP_CHAR_LEN(UNO_NAME_POLYPOLYGONBEZIER), OWN_ATTR_EDGE_POLYPOLYGONBEZIER, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0), 0, 0}, + +#define SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS \ + { MAP_CHAR_LEN(UNO_NAME_MEASUREBELOWREFEDGE), SDRATTR_MEASUREBELOWREFEDGE, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASUREFORMATSTRING), SDRATTR_MEASUREFORMATSTRING, &::getCppuType((const ::rtl::OUString*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASUREHELPLINE1LEN), SDRATTR_MEASUREHELPLINE1LEN, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASUREHELPLINE2LEN), SDRATTR_MEASUREHELPLINE2LEN, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASUREHELPLINEDIST), SDRATTR_MEASUREHELPLINEDIST, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASUREHELPLINEOVERHANG), SDRATTR_MEASUREHELPLINEOVERHANG, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASUREKIND), SDRATTR_MEASUREKIND, &::getCppuType((const ::com::sun::star::drawing::MeasureKind*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASURELINEDIST), SDRATTR_MEASURELINEDIST, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASUREOVERHANG), SDRATTR_MEASUREOVERHANG, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASUREUNIT), SDRATTR_MEASUREUNIT, &::getCppuType((const sal_Int32*)0), 0, 0},\ + { MAP_CHAR_LEN(UNO_NAME_MEASURESHOWUNIT), SDRATTR_MEASURESHOWUNIT, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASURETEXTAUTOANGLE), SDRATTR_MEASURETEXTAUTOANGLE, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASURETEXTAUTOANGLEVIEW), SDRATTR_MEASURETEXTAUTOANGLEVIEW, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASURETEXTFIXEDANGLE), SDRATTR_MEASURETEXTFIXEDANGLE, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASURETEXTHPOS), SDRATTR_MEASURETEXTHPOS, &::getCppuType((const ::com::sun::star::drawing::MeasureTextHorzPos*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASURETEXTISFIXEDANGLE), SDRATTR_MEASURETEXTISFIXEDANGLE, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASURETEXTROTA90), SDRATTR_MEASURETEXTROTA90, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASURETEXTUPSIDEDOWN), SDRATTR_MEASURETEXTUPSIDEDOWN, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_MEASURETEXTVPOS), SDRATTR_MEASURETEXTVPOS, &::getCppuType((const ::com::sun::star::drawing::MeasureTextVertPos*)0), 0, 0}, \ + { MAP_CHAR_LEN("MeasureDecimalPlaces"), SDRATTR_MEASUREDECIMALPLACES, &::getCppuType((const sal_Int16*)0), 0, 0}, + + +#define SPECIAL_DIMENSIONING_PROPERTIES \ + SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS \ + { MAP_CHAR_LEN("StartPosition"), OWN_ATTR_MEASURE_START_POS, &::getCppuType((const ::com::sun::star::awt::Point*)0), 0, 0},\ + { MAP_CHAR_LEN("EndPosition"), OWN_ATTR_MEASURE_END_POS, &::getCppuType((const ::com::sun::star::awt::Point*)0), 0, 0}, + +#define SPECIAL_CIRCLE_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_CIRCENDANGLE), SDRATTR_CIRCENDANGLE, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_CIRCKIND), SDRATTR_CIRCKIND, &::getCppuType((const ::com::sun::star::drawing::CircleKind*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_CIRCSTARTANGLE),SDRATTR_CIRCSTARTANGLE, &::getCppuType((const sal_Int32*)0), 0, 0}, + +#define SPECIAL_POLYGON_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_POLYGONKIND), OWN_ATTR_VALUE_POLYGONKIND, &::getCppuType((const ::com::sun::star::drawing::PolygonKind*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, + +#define SPECIAL_POLYPOLYGON_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_POLYPOLYGON), OWN_ATTR_VALUE_POLYPOLYGON, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PointSequenceSequence*)0)), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_POLYGON), OWN_ATTR_VALUE_POLYGON, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PointSequence*)0)), 0, 0}, + +#define SPECIAL_POLYPOLYGONBEZIER_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_POLYPOLYGONBEZIER), OWN_ATTR_VALUE_POLYPOLYGONBEZIER, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0), 0, 0}, + +#define SPECIAL_GRAPHOBJ_PROPERTIES_DEFAULTS \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_LUMINANCE), SDRATTR_GRAFLUMINANCE , &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_CONTRAST), SDRATTR_GRAFCONTRAST , &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_RED), SDRATTR_GRAFRED , &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_GREEN), SDRATTR_GRAFGREEN , &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_BLUE), SDRATTR_GRAFBLUE , &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_GAMMA), SDRATTR_GRAFGAMMA , &::getCppuType((const double*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_TRANSPARENCY), SDRATTR_GRAFTRANSPARENCE , &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_COLOR_MODE), SDRATTR_GRAFMODE , &::getCppuType((const ::com::sun::star::drawing::ColorMode*)0), 0, 0}, + +#define SPECIAL_GRAPHOBJ_PROPERTIES \ + SPECIAL_GRAPHOBJ_PROPERTIES_DEFAULTS \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_GRAPHICCROP), SDRATTR_GRAFCROP , &::getCppuType((const ::com::sun::star::text::GraphicCrop*)0), 0, 0 }, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAFURL), OWN_ATTR_GRAFURL , &::getCppuType((const ::rtl::OUString*)0), 0, 0 }, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAFSTREAMURL),OWN_ATTR_GRAFSTREAMURL , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_FILLBITMAP), OWN_ATTR_VALUE_FILLBITMAP , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap>*)0) , 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAPHIC), OWN_ATTR_VALUE_GRAPHIC , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic>*)0) , 0, 0}, + + +#define SPECIAL_3DSCENEOBJECT_PROPERTIES_DEFAULTS \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_AMBIENTCOLOR), SDRATTR_3DSCENE_AMBIENTCOLOR , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_DISTANCE), SDRATTR_3DSCENE_DISTANCE , &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_FOCAL_LENGTH), SDRATTR_3DSCENE_FOCAL_LENGTH , &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTCOLOR_1), SDRATTR_3DSCENE_LIGHTCOLOR_1 , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTCOLOR_2), SDRATTR_3DSCENE_LIGHTCOLOR_2 , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTCOLOR_3), SDRATTR_3DSCENE_LIGHTCOLOR_3 , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTCOLOR_4), SDRATTR_3DSCENE_LIGHTCOLOR_4 , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTCOLOR_5), SDRATTR_3DSCENE_LIGHTCOLOR_5 , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTCOLOR_6), SDRATTR_3DSCENE_LIGHTCOLOR_6 , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTCOLOR_7), SDRATTR_3DSCENE_LIGHTCOLOR_7 , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTCOLOR_8), SDRATTR_3DSCENE_LIGHTCOLOR_8 , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTDIRECTION_1), SDRATTR_3DSCENE_LIGHTDIRECTION_1 , &::getCppuType((const ::com::sun::star::drawing::Direction3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTDIRECTION_2), SDRATTR_3DSCENE_LIGHTDIRECTION_2 , &::getCppuType((const ::com::sun::star::drawing::Direction3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTDIRECTION_3), SDRATTR_3DSCENE_LIGHTDIRECTION_3 , &::getCppuType((const ::com::sun::star::drawing::Direction3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTDIRECTION_4), SDRATTR_3DSCENE_LIGHTDIRECTION_4 , &::getCppuType((const ::com::sun::star::drawing::Direction3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTDIRECTION_5), SDRATTR_3DSCENE_LIGHTDIRECTION_5 , &::getCppuType((const ::com::sun::star::drawing::Direction3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTDIRECTION_6), SDRATTR_3DSCENE_LIGHTDIRECTION_6 , &::getCppuType((const ::com::sun::star::drawing::Direction3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTDIRECTION_7), SDRATTR_3DSCENE_LIGHTDIRECTION_7 , &::getCppuType((const ::com::sun::star::drawing::Direction3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTDIRECTION_8), SDRATTR_3DSCENE_LIGHTDIRECTION_8 , &::getCppuType((const ::com::sun::star::drawing::Direction3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTON_1), SDRATTR_3DSCENE_LIGHTON_1 , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTON_2), SDRATTR_3DSCENE_LIGHTON_2 , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTON_3), SDRATTR_3DSCENE_LIGHTON_3 , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTON_4), SDRATTR_3DSCENE_LIGHTON_4 , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTON_5), SDRATTR_3DSCENE_LIGHTON_5 , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTON_6), SDRATTR_3DSCENE_LIGHTON_6 , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTON_7), SDRATTR_3DSCENE_LIGHTON_7 , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_LIGHTON_8), SDRATTR_3DSCENE_LIGHTON_8 , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_PERSPECTIVE), SDRATTR_3DSCENE_PERSPECTIVE , &::getCppuType((const ::com::sun::star::drawing::ProjectionMode*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_SHADOW_SLANT), SDRATTR_3DSCENE_SHADOW_SLANT , &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_SHADE_MODE), SDRATTR_3DSCENE_SHADE_MODE , &::getCppuType((const ::com::sun::star::drawing::ShadeMode*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING),SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, &::getBooleanCppuType(), 0, 0}, + +#define SPECIAL_3DSCENEOBJECT_PROPERTIES \ + SPECIAL_3DSCENEOBJECT_PROPERTIES_DEFAULTS \ + { MAP_CHAR_LEN(UNO_NAME_3D_TRANSFORM_MATRIX), OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX , &::getCppuType((const ::com::sun::star::drawing::HomogenMatrix*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_CAMERA_GEOMETRY), OWN_ATTR_3D_VALUE_CAMERA_GEOMETRY , &::getCppuType((const ::com::sun::star::drawing::CameraGeometry*)0), 0, 0}, + +// #i28528# +// Added extra Item (Bool) for chart2 to be able to show reduced line geometry (SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY) +#define MISC_3D_OBJ_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_3D_DOUBLE_SIDED ),SDRATTR_3DOBJ_DOUBLE_SIDED , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_MAT_COLOR ),SDRATTR_3DOBJ_MAT_COLOR , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_MAT_EMISSION ),SDRATTR_3DOBJ_MAT_EMISSION , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_MAT_SPECULAR ),SDRATTR_3DOBJ_MAT_SPECULAR , &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_MAT_SPECULAR_INTENSITY ),SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY , &::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_NORMALS_INVERT ),SDRATTR_3DOBJ_NORMALS_INVERT , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_NORMALS_KIND ),SDRATTR_3DOBJ_NORMALS_KIND , &::getCppuType((const ::com::sun::star::drawing::NormalsKind*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SHADOW_3D ),SDRATTR_3DOBJ_SHADOW_3D , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_TEXTURE_FILTER ),SDRATTR_3DOBJ_TEXTURE_FILTER , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_TEXTURE_KIND ),SDRATTR_3DOBJ_TEXTURE_KIND , &::getCppuType((const ::com::sun::star::drawing::TextureKind*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_TEXTURE_MODE ),SDRATTR_3DOBJ_TEXTURE_MODE , &::getCppuType((const ::com::sun::star::drawing::TextureMode*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_TEXTURE_PROJ_X ),SDRATTR_3DOBJ_TEXTURE_PROJ_X , &::getCppuType((const ::com::sun::star::drawing::TextureProjectionMode*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_TEXTURE_PROJ_Y ),SDRATTR_3DOBJ_TEXTURE_PROJ_Y , &::getCppuType((const ::com::sun::star::drawing::TextureProjectionMode*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_REDUCED_LINE_GEOMETRY ),SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY , &::getBooleanCppuType(), 0, 0}, + +#define SPECIAL_3DCUBEOBJECT_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_3D_TRANSFORM_MATRIX ),OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX , &::getCppuType((const ::com::sun::star::drawing::HomogenMatrix*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_POS ),OWN_ATTR_3D_VALUE_POSITION , &::getCppuType((const ::com::sun::star::drawing::Position3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SIZE ),OWN_ATTR_3D_VALUE_SIZE , &::getCppuType((const ::com::sun::star::drawing::Direction3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_POS_IS_CENTER ),OWN_ATTR_3D_VALUE_POS_IS_CENTER , &::getBooleanCppuType(), 0, 0}, + +#define SPECIAL_3DSPHEREOBJECT_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_3D_TRANSFORM_MATRIX ),OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX , &::getCppuType((const ::com::sun::star::drawing::HomogenMatrix*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_POS ),OWN_ATTR_3D_VALUE_POSITION , &::getCppuType((const ::com::sun::star::drawing::Position3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SIZE ),OWN_ATTR_3D_VALUE_SIZE , &::getCppuType((const ::com::sun::star::drawing::Direction3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_HORZ_SEGS ),SDRATTR_3DOBJ_HORZ_SEGS, &::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_VERT_SEGS ),SDRATTR_3DOBJ_VERT_SEGS, &::getCppuType((const sal_Int32*)0), 0, 0}, + +// #107245# New 3D properties which are possible for lathe and extrude 3d objects +#define SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_3D_SMOOTH_NORMALS ), SDRATTR_3DOBJ_SMOOTH_NORMALS, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_SMOOTH_LIDS ), SDRATTR_3DOBJ_SMOOTH_LIDS, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_CHARACTER_MODE ), SDRATTR_3DOBJ_CHARACTER_MODE, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_CLOSE_FRONT ), SDRATTR_3DOBJ_CLOSE_FRONT, &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_CLOSE_BACK ), SDRATTR_3DOBJ_CLOSE_BACK, &::getBooleanCppuType(), 0, 0}, + +#define SPECIAL_3DLATHEOBJECT_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_3D_TRANSFORM_MATRIX ),OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX ,&::getCppuType((const ::com::sun::star::drawing::HomogenMatrix*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_POLYPOLYGON3D ),OWN_ATTR_3D_VALUE_POLYPOLYGON3D ,&::getCppuType((const ::com::sun::star::drawing::PolyPolygonShape3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_LATHE_END_ANGLE ),SDRATTR_3DOBJ_END_ANGLE ,&::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_HORZ_SEGS ),SDRATTR_3DOBJ_HORZ_SEGS ,&::getCppuType((const sal_Int32*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_PERCENT_DIAGONAL ),SDRATTR_3DOBJ_PERCENT_DIAGONAL ,&::getCppuType((const sal_Int16*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_VERT_SEGS ),SDRATTR_3DOBJ_VERT_SEGS ,&::getCppuType((const sal_Int32*)0), 0, 0}, + +#define SPECIAL_3DEXTRUDEOBJECT_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_3D_TRANSFORM_MATRIX ),OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX ,&::getCppuType((const ::com::sun::star::drawing::HomogenMatrix*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_POLYPOLYGON3D ),OWN_ATTR_3D_VALUE_POLYPOLYGON3D ,&::getCppuType((const ::com::sun::star::drawing::PolyPolygonShape3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_EXTRUDE_DEPTH ),SDRATTR_3DOBJ_DEPTH ,&::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_PERCENT_DIAGONAL ),SDRATTR_3DOBJ_PERCENT_DIAGONAL ,&::getCppuType((const sal_Int16*)0), 0, 0}, + +#define SPECIAL_3DPOLYGONOBJECT_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_3D_TRANSFORM_MATRIX ),OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX , &::getCppuType((const ::com::sun::star::drawing::HomogenMatrix*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_POLYPOLYGON3D ),OWN_ATTR_3D_VALUE_POLYPOLYGON3D , &::getCppuType((const ::com::sun::star::drawing::PolyPolygonShape3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_NORMALSPOLYGON3D ),OWN_ATTR_3D_VALUE_NORMALSPOLYGON3D, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonShape3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_TEXTUREPOLYGON3D ),OWN_ATTR_3D_VALUE_TEXTUREPOLYGON3D, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonShape3D*)0), 0, 0}, \ + { MAP_CHAR_LEN(UNO_NAME_3D_LINEONLY ),OWN_ATTR_3D_VALUE_LINEONLY , &::getBooleanCppuType(), 0, 0}, + +#define SPECIAL_3DBACKSCALE_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_3D_BACKSCALE ),SDRATTR_3DOBJ_BACKSCALE ,&::getCppuType((const sal_Int16*)0), 0, 0}, \ + +#define CUSTOMSHAPE_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_CUSTOMSHAPE_ADJUSTMENT),SDRATTR_CUSTOMSHAPE_ADJUSTMENT, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence<sal_Int32>*)0)), 0, 0}, \ + +#endif + diff --git a/svx/inc/svx/unoshtxt.hxx b/svx/inc/svx/unoshtxt.hxx new file mode 100644 index 000000000000..6027191d222e --- /dev/null +++ b/svx/inc/svx/unoshtxt.hxx @@ -0,0 +1,102 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoshtxt.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_UNOSHTXT_HXX +#define SVX_UNOSHTXT_HXX + +#include <memory> +#include <svx/unoedsrc.hxx> +#include "svx/svxdllapi.h" + +namespace com { namespace sun { namespace star { + namespace uno { + class XInterface; + } + namespace accessibility { + struct TextSegment; + } +} } } + +class SvxTextForwarder; +class SdrObject; +class SdrModel; +class SdrView; +class Window; +class SvxTextEditSourceImpl; +class SdrText; + +class SVX_DLLPUBLIC SvxTextEditSource : public SvxEditSource, public SvxViewForwarder +{ +public: + SvxTextEditSource( SdrObject* pObj, SdrText* pText, ::com::sun::star::uno::XInterface* pOwner); + + /** Since the views don't broadcast their dying, make sure that + this object gets destroyed if the view becomes invalid + + The window is necessary, since our views can display on multiple windows + */ + SvxTextEditSource( SdrObject& rObj, SdrText* pText, SdrView& rView, const Window& rViewWindow ); + + virtual ~SvxTextEditSource(); + + virtual SvxEditSource* Clone() const; + virtual SvxTextForwarder* GetTextForwarder(); + virtual SvxViewForwarder* GetViewForwarder(); + virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate = sal_False ); + virtual void UpdateData(); + + virtual void addRange( SvxUnoTextRangeBase* pNewRange ); + virtual void removeRange( SvxUnoTextRangeBase* pOldRange ); + virtual const SvxUnoTextRangeBaseList& getRanges() const; + + virtual SfxBroadcaster& GetBroadcaster() const; + + SdrObject* GetSdrObject() const; + + void lock(); + void unlock(); + +// static sal_Bool hasLevels( const SdrObject* pObject ); + + // the SvxViewForwarder interface + virtual BOOL IsValid() const; + virtual Rectangle GetVisArea() const; + virtual Point LogicToPixel( const Point&, const MapMode& ) const; + virtual Point PixelToLogic( const Point&, const MapMode& ) const; + + void ChangeModel( SdrModel* pNewModel ); + +private: + SVX_DLLPRIVATE SvxTextEditSource( SvxTextEditSourceImpl* pImpl ); + + SvxTextEditSourceImpl* mpImpl; +}; + +#endif diff --git a/svx/inc/svx/unotext.hxx b/svx/inc/svx/unotext.hxx new file mode 100644 index 000000000000..46e26dbbc0a8 --- /dev/null +++ b/svx/inc/svx/unotext.hxx @@ -0,0 +1,683 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unotext.hxx,v $ + * $Revision: 1.6.84.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOTEXT_HXX +#define _SVX_UNOTEXT_HXX + +#include <tools/link.hxx> +#include <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/text/XTextRange.hpp> +#include <com/sun/star/text/XText.hpp> +#ifndef _SMART_COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS +#include <com/sun/star/container/XEnumerationAccess.hpp> +#endif +#include <com/sun/star/text/XTextRangeMover.hpp> +#include <com/sun/star/text/XTextCursor.hpp> +#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/beans/XPropertyState.hpp> +#include <com/sun/star/beans/XMultiPropertySet.hpp> +#include <com/sun/star/text/XTextRangeCompare.hpp> +#include <com/sun/star/beans/XMultiPropertyStates.hpp> +#include <com/sun/star/text/XTextAppend.hpp> +#include <com/sun/star/text/XTextCopy.hpp> +#include <cppuhelper/weak.hxx> +#include <cppuhelper/weakagg.hxx> +#include <svl/itemprop.hxx> +#include <svx/editdata.hxx> +#include <svx/unoedsrc.hxx> +#include <svl/itemset.hxx> +#include <svl/itempool.hxx> +#include <svx/svxenum.hxx> +#include <svx/outliner.hxx> +#include <svx/unoforou.hxx> + +#include <svx/unoprnms.hxx> +#include <svx/eeitem.hxx> +#include <com/sun/star/text/XTextField.hpp> +#include <com/sun/star/container/XIndexReplace.hpp> +#include <com/sun/star/awt/FontSlant.hpp> +#include <com/sun/star/awt/FontDescriptor.hpp> +#include <com/sun/star/style/LineSpacing.hpp> +#include <com/sun/star/style/TabStop.hpp> +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/text/XTextRange.hpp> +#include <cppuhelper/interfacecontainer.h> +#include <osl/mutex.hxx> +#include "svx/svxdllapi.h" + +#include <comphelper/servicehelper.hxx> + +#ifndef SEQTYPE + #if defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500) + #define SEQTYPE(x) (new ::com::sun::star::uno::Type( x )) + #else + #define SEQTYPE(x) &(x) + #endif +#endif + +#include <svx/unoprov.hxx> +#include <svx/unomid.hxx> + +#define WID_FONTDESC 3900 +#define WID_NUMLEVEL 3901 +#define WID_PORTIONTYPE 3903 +#define WID_NUMBERINGSTARTVALUE 3904 +#define WID_PARAISNUMBERINGRESTART 3905 + +#define SVX_UNOEDIT_NUMBERING_PROPERTIE \ + {MAP_CHAR_LEN(UNO_NAME_NUMBERING_RULES), EE_PARA_NUMBULLET, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace>*)0), 0, 0 }, \ + {MAP_CHAR_LEN(UNO_NAME_NUMBERING), EE_PARA_BULLETSTATE,&::getBooleanCppuType(), 0, 0 } + +#define SVX_UNOEDIT_OUTLINER_PROPERTIES \ + SVX_UNOEDIT_NUMBERING_PROPERTIE, \ + {MAP_CHAR_LEN(UNO_NAME_NUMBERING_LEVEL), WID_NUMLEVEL, &::getCppuType((const sal_Int16*)0), 0, 0 }, \ + {MAP_CHAR_LEN("NumberingStartValue"), WID_NUMBERINGSTARTVALUE, &::getCppuType((const sal_Int16*)0), 0, 0 }, \ + {MAP_CHAR_LEN("ParaIsNumberingRestart"), WID_PARAISNUMBERINGRESTART, &::getBooleanCppuType(), 0, 0 } + +#define SVX_UNOEDIT_CHAR_PROPERTIES \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT), EE_CHAR_FONTHEIGHT, &::getCppuType((const float*)0), 0, MID_FONTHEIGHT|CONVERT_TWIPS }, \ + { MAP_CHAR_LEN("CharScaleWidth"), EE_CHAR_FONTWIDTH, &::getCppuType((const sal_Int16*)0), 0, 0 }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME), EE_CHAR_FONTINFO, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_FAMILY_NAME },\ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME),EE_CHAR_FONTINFO, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_STYLE_NAME }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY), EE_CHAR_FONTINFO, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_FAMILY }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET), EE_CHAR_FONTINFO, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_CHAR_SET }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH), EE_CHAR_FONTINFO, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_PITCH }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE), EE_CHAR_ITALIC, &::getCppuType((const ::com::sun::star::awt::FontSlant*)0),0, MID_POSTURE }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT), EE_CHAR_WEIGHT, &::getCppuType((const float*)0), 0, MID_WEIGHT }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_LOCALE), EE_CHAR_LANGUAGE, &::getCppuType((const ::com::sun::star::lang::Locale*)0),0, MID_LANG_LOCALE }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_COLOR), EE_CHAR_COLOR, &::getCppuType((const sal_Int32*)0), 0, 0 }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_ESCAPEMENT), EE_CHAR_ESCAPEMENT, &::getCppuType((const sal_Int16*)0), 0, MID_ESC }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_UNDERLINE), EE_CHAR_UNDERLINE, &::getCppuType((const sal_Int16*)0), 0, MID_TL_STYLE }, \ + { MAP_CHAR_LEN("CharUnderlineColor"), EE_CHAR_UNDERLINE, &::getCppuType((const sal_Int32*)0), 0, MID_TL_COLOR }, \ + { MAP_CHAR_LEN("CharUnderlineHasColor"), EE_CHAR_UNDERLINE, &::getBooleanCppuType(), 0, MID_TL_HASCOLOR } , \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_OVERLINE), EE_CHAR_OVERLINE, &::getCppuType((const sal_Int16*)0), 0, MID_TL_STYLE }, \ + { MAP_CHAR_LEN("CharOverlineColor"), EE_CHAR_OVERLINE, &::getCppuType((const sal_Int32*)0), 0, MID_TL_COLOR }, \ + { MAP_CHAR_LEN("CharOverlineHasColor"), EE_CHAR_OVERLINE, &::getBooleanCppuType(), 0, MID_TL_HASCOLOR } , \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_CROSSEDOUT), EE_CHAR_STRIKEOUT, &::getBooleanCppuType(), 0, MID_CROSSED_OUT }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_STRIKEOUT), EE_CHAR_STRIKEOUT, &::getCppuType((const sal_Int16*)0), 0, MID_CROSS_OUT}, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_SHADOWED), EE_CHAR_SHADOW, &::getBooleanCppuType(), 0, 0 }, \ + { MAP_CHAR_LEN("CharContoured"), EE_CHAR_OUTLINE, &::getBooleanCppuType(), 0, 0 }, \ + { MAP_CHAR_LEN("CharEscapementHeight"), EE_CHAR_ESCAPEMENT, &::getCppuType((const sal_Int8*)0), 0, MID_ESC_HEIGHT },\ + { MAP_CHAR_LEN("CharAutoKerning"), EE_CHAR_PAIRKERNING,&::getBooleanCppuType(), 0, 0 } , \ + { MAP_CHAR_LEN("CharKerning"), EE_CHAR_KERNING, &::getCppuType((const sal_Int16*)0) , 0, 0 }, \ + { MAP_CHAR_LEN("CharWordMode"), EE_CHAR_WLM, &::getBooleanCppuType(), 0, 0 }, \ + { MAP_CHAR_LEN("CharEmphasis"), EE_CHAR_EMPHASISMARK,&::getCppuType((const sal_Int16*)0), 0, MID_EMPHASIS},\ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT_ASIAN), EE_CHAR_FONTHEIGHT_CJK, &::getCppuType((const float*)0), 0, MID_FONTHEIGHT|CONVERT_TWIPS }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME_ASIAN), EE_CHAR_FONTINFO_CJK, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_FAMILY_NAME },\ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME_ASIAN), EE_CHAR_FONTINFO_CJK, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_STYLE_NAME }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY_ASIAN), EE_CHAR_FONTINFO_CJK, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_FAMILY }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET_ASIAN), EE_CHAR_FONTINFO_CJK, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_CHAR_SET }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH_ASIAN), EE_CHAR_FONTINFO_CJK, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_PITCH }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE_ASIAN), EE_CHAR_ITALIC_CJK, &::getCppuType((const ::com::sun::star::awt::FontSlant*)0),0, MID_POSTURE }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT_ASIAN), EE_CHAR_WEIGHT_CJK, &::getCppuType((const float*)0), 0, MID_WEIGHT }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_LOCALE_ASIAN), EE_CHAR_LANGUAGE_CJK, &::getCppuType((const ::com::sun::star::lang::Locale*)0),0, MID_LANG_LOCALE }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT_COMPLEX), EE_CHAR_FONTHEIGHT_CTL, &::getCppuType((const float*)0), 0, MID_FONTHEIGHT|CONVERT_TWIPS }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME_COMPLEX), EE_CHAR_FONTINFO_CTL, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_FAMILY_NAME },\ + {MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME_COMPLEX),EE_CHAR_FONTINFO_CTL, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_STYLE_NAME }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY_COMPLEX), EE_CHAR_FONTINFO_CTL, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_FAMILY }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET_COMPLEX), EE_CHAR_FONTINFO_CTL, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_CHAR_SET }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH_COMPLEX), EE_CHAR_FONTINFO_CTL, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_PITCH }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE_COMPLEX), EE_CHAR_ITALIC_CTL, &::getCppuType((const ::com::sun::star::awt::FontSlant*)0),0, MID_POSTURE }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT_COMPLEX), EE_CHAR_WEIGHT_CTL, &::getCppuType((const float*)0), 0, MID_WEIGHT }, \ + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_LOCALE_COMPLEX), EE_CHAR_LANGUAGE_CTL, &::getCppuType((const ::com::sun::star::lang::Locale*)0),0, MID_LANG_LOCALE }, \ + { MAP_CHAR_LEN("CharRelief" ), EE_CHAR_RELIEF, &::getCppuType((const sal_Int16*)0), 0, MID_RELIEF } + +#define SVX_UNOEDIT_FONT_PROPERTIES \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_FONT_DESCRIPTOR), WID_FONTDESC, &::getCppuType((const ::com::sun::star::awt::FontDescriptor*)0), 0, MID_FONT_FAMILY_NAME } + +#define SVX_UNOEDIT_PARA_PROPERTIES \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_ADJUST), EE_PARA_JUST, &::getCppuType((const sal_Int16*)0), 0, MID_PARA_ADJUST }, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_BMARGIN), EE_PARA_ULSPACE, &::getCppuType((const sal_Int32*)0), 0, MID_LO_MARGIN|SFX_METRIC_ITEM }, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_IS_HYPHEN), EE_PARA_HYPHENATE, &::getBooleanCppuType(), 0, 0 }, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_LASTLINEADJ), EE_PARA_JUST, &::getCppuType((const sal_Int16*)0), 0, MID_LAST_LINE_ADJUST }, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_LMARGIN), EE_PARA_LRSPACE, &::getCppuType((const sal_Int32*)0), 0, MID_TXT_LMARGIN|SFX_METRIC_ITEM }, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_LINESPACING), EE_PARA_SBL, &::getCppuType((const ::com::sun::star::style::LineSpacing*)0), 0, 0 }, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_RMARGIN), EE_PARA_LRSPACE, &::getCppuType((const sal_Int32*)0), 0, MID_R_MARGIN|SFX_METRIC_ITEM }, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_TAPSTOPS), EE_PARA_TABS, SEQTYPE(::getCppuType((const ::com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop >*)0)), 0, 0 }, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_TMARGIN), EE_PARA_ULSPACE, &::getCppuType((const sal_Int32*)0), 0, MID_UP_MARGIN|SFX_METRIC_ITEM },\ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_FIRST_LINE_INDENT), EE_PARA_LRSPACE, &::getCppuType((const sal_Int32*)0), 0, MID_FIRST_LINE_INDENT|SFX_METRIC_ITEM}, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION),EE_PARA_HANGINGPUNCTUATION, &::getBooleanCppuType(), 0 ,0 }, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_IS_CHARACTER_DISTANCE), EE_PARA_ASIANCJKSPACING, &::getBooleanCppuType(), 0 ,0 }, \ + {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_IS_FORBIDDEN_RULES), EE_PARA_FORBIDDENRULES, &::getBooleanCppuType(), 0 ,0 },\ + {MAP_CHAR_LEN("WritingMode"), EE_PARA_WRITINGDIR, &::getCppuType((const sal_Int16*)0), 0, 0 } + +class SvxEditSource; +class SvxTextForwarder; +class SvxFieldItem; +class SvxTextEditSource; +class SvxFieldData; +struct ESelection; + +SVX_DLLPUBLIC void GetSelection( struct ESelection& rSel, SvxTextForwarder* pForwarder ) throw(); +SVX_DLLPUBLIC void CheckSelection( struct ESelection& rSel, SvxTextForwarder* pForwarder ) throw(); + +// ==================================================================== +// Diese Klasse implementiert eine SvxEditSource und einen SvxTextForwarder +// und macht ansonsten rein garnichts +// ==================================================================== + +class SvxDummyTextSource : public SvxEditSource, public SvxTextForwarder +{ +public: + + // SvxEditSource + virtual ~SvxDummyTextSource(); + virtual SvxEditSource* Clone() const; + virtual SvxTextForwarder* GetTextForwarder(); + virtual void UpdateData(); + + // SvxTextForwarder + virtual sal_uInt16 GetParagraphCount() const; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; + virtual String GetText( const ESelection& rSel ) const; + virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); + virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const; + + sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; + sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const; + + virtual SfxItemPool* GetPool() const; + + virtual void QuickInsertText( const String& rText, const ESelection& rSel ); + virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); + virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); + virtual void QuickInsertLineBreak( const ESelection& rSel ); + + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual sal_Bool IsValid() const; + + virtual void SetNotifyHdl( const Link& ); + virtual LanguageType GetLanguage( USHORT, USHORT ) const; + virtual USHORT GetFieldCount( USHORT nPara ) const; + virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; + virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; + virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; + virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual MapMode GetMapMode() const; + virtual OutputDevice* GetRefDevice() const; + virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; + virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; + virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; + virtual USHORT GetLineCount( USHORT nPara ) const; + virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; + virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; + virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool Delete( const ESelection& ); + virtual sal_Bool InsertText( const String&, const ESelection& ); + virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); + virtual sal_Int16 GetDepth( USHORT nPara ) const; + virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + + virtual const SfxItemSet* GetEmptyItemSetPtr(); + + // implementation functions for XParagraphAppend and XTextPortionAppend + virtual void AppendParagraph(); + virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + //XTextCopy + virtual void CopyText(const SvxTextForwarder& rSource); +}; + +namespace accessibility +{ + class AccessibleEditableTextPara; +} + +// ==================================================================== +class SVX_DLLPUBLIC SvxUnoTextRangeBase : public ::com::sun::star::text::XTextRange, + public ::com::sun::star::beans::XPropertySet, + public ::com::sun::star::beans::XMultiPropertySet, + public ::com::sun::star::beans::XMultiPropertyStates, + public ::com::sun::star::beans::XPropertyState, + public ::com::sun::star::lang::XServiceInfo, + public ::com::sun::star::text::XTextRangeCompare, + public ::com::sun::star::lang::XUnoTunnel + +{ + friend class SvxUnoTextRangeEnumeration; + friend class accessibility::AccessibleEditableTextPara; + +protected: + SvxEditSource* mpEditSource; + ESelection maSelection; + const SvxItemPropertySet* mpPropSet; + + virtual void SAL_CALL _setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL _getPropertyValue( const ::rtl::OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL _setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues, sal_Int32 nPara = -1 ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL _getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, sal_Int32 nPara = -1 ) throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const ::rtl::OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL _getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + // returns true if property found or false if unknown property + virtual sal_Bool _getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::beans::PropertyState& rState); + + virtual void SAL_CALL _setPropertyToDefault( const ::rtl::OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void _setPropertyToDefault( SvxTextForwarder* pForwarder, const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException ); + void SetEditSource( SvxEditSource* _pEditSource ) throw(); + + virtual void getPropertyValue( const SfxItemPropertySimpleEntry* pMap, com::sun::star::uno::Any& rAny, const SfxItemSet& rSet ) throw(::com::sun::star::beans::UnknownPropertyException ); + virtual void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const com::sun::star::uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException ); + +public: + SvxUnoTextRangeBase( const SvxItemPropertySet* _pSet ) throw(); + SvxUnoTextRangeBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw(); + SvxUnoTextRangeBase( const SvxUnoTextRangeBase& rRange ) throw(); + virtual ~SvxUnoTextRangeBase() throw(); + + // Internal + const ESelection& GetSelection() const throw() { CheckSelection( ((SvxUnoTextRangeBase*)this)->maSelection, mpEditSource->GetTextForwarder() ); return maSelection; }; + void SetSelection( const ESelection& rSelection ) throw(); + + virtual void CollapseToStart(void) throw(); + virtual void CollapseToEnd(void) throw(); + virtual sal_Bool IsCollapsed(void) throw(); + virtual sal_Bool GoLeft(sal_Int16 nCount, sal_Bool Expand) throw(); + virtual sal_Bool GoRight(sal_Int16 nCount, sal_Bool Expand) throw(); + virtual void GotoStart(sal_Bool Expand) throw(); + virtual void GotoEnd(sal_Bool Expand) throw(); + + //const SfxItemPropertyMapEntry* getPropertyMapEntries() const throw() { return maPropSet.getPropertyMapEntries(); } + const SvxItemPropertySet* getPropertySet() const throw() { return mpPropSet; } + SvxEditSource* GetEditSource() const throw() { return mpEditSource; } + + static sal_Bool SetPropertyValueHelper( const SfxItemSet& rOldSet, const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection = NULL, SvxTextEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException ); + static sal_Bool GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::uno::Any& aAny, const ESelection* pSelection = NULL, SvxTextEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException ); + + void attachField( const SvxFieldData* pData ) throw(); + + UNO3_GETIMPLEMENTATION_DECL( SvxUnoTextRangeBase ) + + // ::com::sun::star::text::XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw(::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setString( const ::rtl::OUString& aString ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::beans::XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XMultiPropertySet + virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::beans::XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::beans::XMultiPropertyStates + //virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XTextRangeCompare + virtual ::sal_Int16 SAL_CALL compareRegionStarts( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL compareRegionEnds( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XServiceInfo + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static( ) SAL_THROW(()); +}; + +// ==================================================================== + +class SvxUnoTextBase; +class SVX_DLLPUBLIC SvxUnoTextRange : public SvxUnoTextRangeBase, + public ::com::sun::star::lang::XTypeProvider, + public ::cppu::OWeakAggObject +{ + friend class SvxUnoTextRangeEnumeration; +private: + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; + sal_Bool mbPortion; + +protected: + static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence; + +public: + SvxUnoTextRange( const SvxUnoTextBase& rParent, sal_Bool bPortion = sal_False ) throw(); + virtual ~SvxUnoTextRange() throw(); + + // ::com::sun::star::uno::XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // ::com::sun::star::text::XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); +}; + +class SVX_DLLPUBLIC SvxUnoTextBase : public SvxUnoTextRangeBase, + public ::com::sun::star::text::XTextAppend, + public ::com::sun::star::text::XTextCopy, + public ::com::sun::star::container::XEnumerationAccess, + public ::com::sun::star::text::XTextRangeMover, + public ::com::sun::star::lang::XTypeProvider +{ +protected: + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; + static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence; + +public: + SvxUnoTextBase( ) throw(); + SvxUnoTextBase( const SvxItemPropertySet* _pSet ) throw(); + SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw(); + SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > xParent ) throw(); + SvxUnoTextBase( const SvxUnoTextBase& rText ) throw(); + virtual ~SvxUnoTextBase() throw(); + + UNO3_GETIMPLEMENTATION_DECL( SvxUnoTextBase ) + + ESelection InsertField( const SvxFieldItem& rField ) throw(); + static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getStaticTypes() throw(); + + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createTextCursorBySelection( const ESelection& rSel ); + + // ::com::sun::star::uno::XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::text::XSimpleText + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& aTextPosition ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertString( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, const ::rtl::OUString& aString, sal_Bool bAbsorb ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertControlCharacter( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::text::XText + virtual void SAL_CALL insertTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& xContent, sal_Bool bAbsorb ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& xContent ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setString( const ::rtl::OUString& aString ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::text::XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::container::XEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::container::XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::text::XTextRangeMover + virtual void SAL_CALL moveTextRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, sal_Int16 nParagraphs ) throw(::com::sun::star::uno::RuntimeException); + + // com::sun::star::text::XParagraphAppend (new import API) + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendParagraph( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL finishParagraph( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + + // com::sun::star::text::XTextPortionAppend (new import API) + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendTextPortion( const ::rtl::OUString& Text, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + + // com::sun::star::text::XTextCopy + virtual void SAL_CALL copyText( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCopy >& xSource ) throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static( ) SAL_THROW(()); + + // ::com::sun::star::lang::XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); +}; + +// ==================================================================== +class SVX_DLLPUBLIC SvxUnoText : public SvxUnoTextBase, + public ::cppu::OWeakAggObject +{ +public: + SvxUnoText( ) throw(); + SvxUnoText( const SvxItemPropertySet* _pSet ) throw(); + SvxUnoText( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > xParent ) throw(); + SvxUnoText( const SvxUnoText& rText ) throw(); + virtual ~SvxUnoText() throw(); + + // Internal + UNO3_GETIMPLEMENTATION_DECL( SvxUnoText ) + + // ::com::sun::star::uno::XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // ::com::sun::star::lang::XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); +}; + +// ==================================================================== + +#include <cppuhelper/implbase1.hxx> + +class SvxUnoTextContentEnumeration : public ::cppu::WeakAggImplHelper1< ::com::sun::star::container::XEnumeration > +{ +private: + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > mxParentText; + SvxEditSource* mpEditSource; + sal_uInt16 mnNextParagraph; + const SvxUnoTextBase& mrText; + +public: + SvxUnoTextContentEnumeration( const SvxUnoTextBase& _rText ) throw(); + virtual ~SvxUnoTextContentEnumeration() throw(); + + // ::com::sun::star::container::XEnumeration + virtual sal_Bool SAL_CALL hasMoreElements( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL nextElement( ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); +}; + +// ==================================================================== +#include <com/sun/star/text/XTextContent.hpp> + +class SvUShorts; +class SvxUnoTextContent : public SvxUnoTextRangeBase, + public ::com::sun::star::text::XTextContent, + public ::com::sun::star::container::XEnumerationAccess, + public ::com::sun::star::lang::XTypeProvider, + public ::cppu::OWeakAggObject +{ + friend class SvxUnoTextContentEnumeration; +private: + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > mxParentText; + sal_uInt16 mnParagraph; + const SvxUnoTextBase& mrParentText; + + // for xComponent + ::osl::Mutex maDisposeContainerMutex; + ::cppu::OInterfaceContainerHelper maDisposeListeners; + bool mbDisposing; + +protected: + static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence; + + using SvxUnoTextRangeBase::setPropertyValue; + using SvxUnoTextRangeBase::getPropertyValue; + +public: + SvxUnoTextContent() throw(); + SvxUnoTextContent( const SvxUnoTextBase& rText, sal_uInt16 nPara ) throw(); + SvxUnoTextContent( const SvxUnoTextContent& rContent ) throw(); + virtual ~SvxUnoTextContent() throw(); + + // ::com::sun::star::uno::XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // ::com::sun::star::text::XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::text::XTextContent -> ::com::sun::star::lang::XComponent + virtual void SAL_CALL attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XComponent + virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::container::XEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::container::XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::beans::XPropertySet + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XMultiPropertySet + virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::beans::XPropertyState + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); +}; + +// ==================================================================== + +class SvxUnoTextRangeEnumeration : public ::cppu::WeakAggImplHelper1< ::com::sun::star::container::XEnumeration > +{ +private: + SvxEditSource* mpEditSource; + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > mxParentText; + const SvxUnoTextBase& mrParentText; + sal_uInt16 mnParagraph; + SvUShorts* mpPortions; + sal_uInt16 mnNextPortion; + +public: + SvxUnoTextRangeEnumeration( const SvxUnoTextBase& rText, sal_uInt16 nPara ) throw(); + virtual ~SvxUnoTextRangeEnumeration() throw(); + + // ::com::sun::star::container::XEnumeration + virtual sal_Bool SAL_CALL hasMoreElements( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL nextElement( ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); +}; + +// ==================================================================== + +class SVX_DLLPUBLIC SvxUnoTextCursor : public SvxUnoTextRangeBase, + public ::com::sun::star::text::XTextCursor, + public ::com::sun::star::lang::XTypeProvider, + public ::cppu::OWeakAggObject +{ +private: + ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > mxParentText; + +protected: + static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence; + +public: + SvxUnoTextCursor( const SvxUnoTextBase& rText ) throw(); + SvxUnoTextCursor( const SvxUnoTextCursor& rCursor ) throw(); + virtual ~SvxUnoTextCursor() throw(); + + // ::com::sun::star::uno::XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // ::com::sun::star::text::XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText() throw(::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setString( const ::rtl::OUString& aString ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::text::XTextCursor -> ::com::sun::star::text::XTextRange + virtual void SAL_CALL collapseToStart( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL collapseToEnd( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoStart( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + +}; + +SVX_DLLPUBLIC const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet(); +SVX_DLLPUBLIC const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap(); +SVX_DLLPUBLIC const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet(); +SVX_DLLPUBLIC const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap(); + +#endif diff --git a/svx/inc/svx/unoviwed.hxx b/svx/inc/svx/unoviwed.hxx new file mode 100644 index 000000000000..03878243d841 --- /dev/null +++ b/svx/inc/svx/unoviwed.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoviwed.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOVIWED_HXX +#define _SVX_UNOVIWED_HXX + +#include <svx/unoedsrc.hxx> + +#include <svx/editdata.hxx> + +class EditView; + +/// Specialization for Calc +class SvxEditEngineViewForwarder : public SvxEditViewForwarder +{ +private: + EditView& mrView; + +public: + SvxEditEngineViewForwarder( EditView& rView ); + virtual ~SvxEditEngineViewForwarder(); + + virtual BOOL IsValid() const; + + virtual Rectangle GetVisArea() const; + virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; + virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; + + virtual sal_Bool GetSelection( ESelection& rSelection ) const; + virtual sal_Bool SetSelection( const ESelection& rSelection ); + virtual sal_Bool Copy(); + virtual sal_Bool Cut(); + virtual sal_Bool Paste(); + +}; + +#endif + diff --git a/svx/inc/svx/unoviwou.hxx b/svx/inc/svx/unoviwou.hxx new file mode 100644 index 000000000000..b2949f05f9d7 --- /dev/null +++ b/svx/inc/svx/unoviwou.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoviwou.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOVIWOU_HXX +#define _SVX_UNOVIWOU_HXX + +#include <svx/unoedsrc.hxx> +#include "svx/svxdllapi.h" + +class OutlinerView; + +/// Specialization for Draw/Impress +class SVX_DLLPUBLIC SvxDrawOutlinerViewForwarder : public SvxEditViewForwarder +{ +private: + OutlinerView& mrOutlinerView; + Point maTextShapeTopLeft; + + SVX_DLLPRIVATE Point GetTextOffset() const; + +public: + explicit SvxDrawOutlinerViewForwarder( OutlinerView& rOutl ); + SvxDrawOutlinerViewForwarder( OutlinerView& rOutl, const Point& rShapePosTopLeft ); + virtual ~SvxDrawOutlinerViewForwarder(); + + virtual BOOL IsValid() const; + + virtual Rectangle GetVisArea() const; + virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; + virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; + + virtual sal_Bool GetSelection( ESelection& rSelection ) const; + virtual sal_Bool SetSelection( const ESelection& rSelection ); + virtual sal_Bool Copy(); + virtual sal_Bool Cut(); + virtual sal_Bool Paste(); + + /// Set the top, left position of the underlying draw shape, to + /// allow EditEngine offset calculations + void SetShapePos( const Point& rShapePosTopLeft ); +}; + +#endif + diff --git a/svx/inc/svx/view3d.hxx b/svx/inc/svx/view3d.hxx new file mode 100644 index 000000000000..b6b25e923300 --- /dev/null +++ b/svx/inc/svx/view3d.hxx @@ -0,0 +1,280 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: view3d.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _E3D_VIEW3D_HXX +#define _E3D_VIEW3D_HXX + +#include <svx/svdview.hxx> +#include <svx/def3d.hxx> +#include <svx/deflt3d.hxx> +#include <basegfx/point/b2dpoint.hxx> +#include "svx/svxdllapi.h" + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class E3dObject; +class E3dScene; +class SceneList; +class Impl3DMirrorConstructOverlay; + +/************************************************************************* +|* +|* Ableitung von SdrView zur Bearbeitung von 3D-Objekten +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dView : public SdrView +{ +protected: + E3dDefaultAttributes a3DDefaultAttr; + MouseEvent aMouseEvent; // Die Parameter der letzten Events (Mouse, Keyboard) + Color aDefaultLightColor; // dito mit den Farben + Color aDefaultAmbientColor; + + double fDefaultScaleX; // Verzerrungen + double fDefaultScaleY; + double fDefaultScaleZ; + double fDefaultRotateX; // und Drehungen + double fDefaultRotateY; + double fDefaultRotateZ; + double fDefaultExtrusionDeepth; // Extrusionstiefe + double fDefaultLightIntensity; // Intensitaeten der beiden (notwendigen) Licht- + double fDefaultAmbientIntensity; // quellen + long nHDefaultSegments; // wieviele HSegmente braucht mein Lathe-Ojekt + long nVDefaultSegments; // wieviele VSegmente braucht mein Lathe-Ojekt + + E3dDragConstraint eDragConstraint; + + // Migrate selections + Impl3DMirrorConstructOverlay* mpMirrorOverlay; + + BOOL bDoubleSided; + + void InitView(); + + void ImpCreate3DObject(E3dScene* pScene, SdrObject* pObj, BOOL bExtrude, double fDepth, basegfx::B2DHomMatrix& rLatheMat); + void ImpCreateSingle3DObjectFlat(E3dScene* pScene, SdrObject* pObj, BOOL bExtrude, double fDepth, basegfx::B2DHomMatrix& rLatheMat); + void ImpChangeSomeAttributesFor3DConversion(SdrObject* pObj); + void ImpChangeSomeAttributesFor3DConversion2(SdrObject* pObj); + + void InitScene(E3dScene* pScene, double fW, double fH, double fCamZ); + void ImpIsConvertTo3DPossible(SdrObject* pObj, BOOL& rAny3D, BOOL& rGroupSelected) const; + void BreakSingle3DObj(E3dObject* pObj); + +public: + TYPEINFO(); + E3dView(SdrModel* pModel, OutputDevice* pOut = 0L); + virtual ~E3dView(); + + // Alle markierten Objekte auf dem angegebenen OutputDevice ausgeben. + virtual void DrawMarkedObj(OutputDevice& rOut) const; + + // Zugriff auf die Default-Attribute + E3dDefaultAttributes& Get3DDefaultAttributes() { return a3DDefaultAttr; } + virtual BOOL BegDragObj(const Point& rPnt, OutputDevice* pOut = NULL, SdrHdl* pHdl = NULL, short nMinMov = -3, SdrDragMethod* pForcedMeth = NULL); + virtual void CheckPossibilities(); + + // Event setzen/rausruecken + void SetMouseEvent(const MouseEvent& rNew) { aMouseEvent = rNew; } + const MouseEvent& GetMouseEvent() { return aMouseEvent; } + + // Model holen ueberladen, da bei einzelnen 3D Objekten noch eine Szene + // untergeschoben werden muss + virtual SdrModel* GetMarkedObjModel() const; + + // Bei Paste muss - falls in eine Scene eingefuegt wird - die + // Objekte der Szene eingefuegt werden, die Szene selbst aber nicht + using SdrView::Paste; + virtual BOOL Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0); + + // #83403# Service routine used from local Clone() and from SdrCreateView::EndCreateObj(...) + BOOL ImpCloneAll3DObjectsToDestScene(E3dScene* pSrcScene, E3dScene* pDstScene, Point aOffset); + + BOOL HasMarkedScene(); + E3dScene* GetMarkedScene(); + + BOOL IsConvertTo3DObjPossible() const; + void ConvertMarkedObjTo3D(BOOL bExtrude=TRUE, basegfx::B2DPoint aPnt1 = basegfx::B2DPoint(0.0, 0.0), basegfx::B2DPoint aPnt2 = basegfx::B2DPoint(0.0, 1.0)); + + // Nachtraeglichhe Korrekturmoeglichkeit um alle Extrudes in einer + // bestimmten Tiefensortierung anzulegen + void DoDepthArrange(E3dScene* pScene, double fDepth); + void ConvertMarkedToPolyObj(BOOL bLineToArea); + E3dScene* SetCurrent3DObj(E3dObject* p3DObj); + void Start3DCreation(); + + // migration of overlay + sal_Bool Is3DRotationCreationActive() const { return (0L != mpMirrorOverlay); } + + virtual void MovAction(const Point& rPnt); + void End3DCreation(BOOL bUseDefaultValuesForMirrorAxes=FALSE); + void ResetCreationActive(); + + double GetDefaultCamPosZ(); + + double &DefaultScaleX () + { + return fDefaultScaleX; + } + + double DefaultScaleX () const + { + return fDefaultScaleX; + } + + double &DefaultScaleY () + { + return fDefaultScaleY; + } + + double DefaultScaleY () const + { + return fDefaultScaleY; + } + + double &DefaultScaleZ () + { + return fDefaultScaleZ; + } + + double DefaultScaleZ () const + { + return fDefaultScaleZ; + } + + double &DefaultRotateX () + { + return fDefaultRotateX; + } + + double DefaultRotateX () const + { + return fDefaultRotateX; + } + + double &DefaultRotateY () + { + return fDefaultRotateY; + } + + double DefaultRotateY () const + { + return fDefaultRotateY; + } + + double &DefaultRotateZ () + { + return fDefaultRotateZ; + } + + double DefaultRotateZ () const + { + return fDefaultRotateZ; + } + + double &DefaultExtrusionDeepth () + { + return fDefaultExtrusionDeepth; + } + + double DefaultExtrusionDeepth () const + { + return fDefaultExtrusionDeepth; + } + + double GetDefaultCamFocal(); + + double &DefaultLightIntensity () + { + return fDefaultLightIntensity; + } + + double DefaultLightIntensity () const + { + return fDefaultLightIntensity; + } + + double &DefaultAmbientIntensity () + { + return fDefaultAmbientIntensity; + } + + double DefaultAmbientIntensity () const + { + return fDefaultAmbientIntensity; + } + + const Color &DefaultLightColor () const + { + return aDefaultLightColor; + } + + Color DefaultLightColor () + { + return aDefaultLightColor; + } + + const Color &DefaultAmbientColor () const + { + return aDefaultAmbientColor; + } + + Color DefaultAmbientColor () + { + return aDefaultAmbientColor; + } + + long GetHDefaultSegments() const { return nHDefaultSegments; } + void SetHDefaultSegments(long nSegs) { nHDefaultSegments = nSegs; } + + long GetVDefaultSegments() const { return nVDefaultSegments; } + void SetVDefaultSegments(long nSegs) { nVDefaultSegments = nSegs; } + + BOOL IsBreak3DObjPossible() const; + void Break3DObj(); + + BOOL DoubleSided () const + { + return bDoubleSided; + } + + BOOL &DoubleSided () + { + return bDoubleSided; + } + + void MergeScenes(); + SfxItemSet Get3DAttributes(E3dScene* pInScene = NULL, BOOL bOnly3DAttr=FALSE) const; + void Set3DAttributes(const SfxItemSet& rAttr, E3dScene* pInScene = NULL, BOOL bOnly3DAttr=FALSE); +}; + +#endif // _E3D_VIEW3D_HXX diff --git a/svx/inc/svx/viewlayoutitem.hxx b/svx/inc/svx/viewlayoutitem.hxx new file mode 100644 index 000000000000..a58e83c1a38b --- /dev/null +++ b/svx/inc/svx/viewlayoutitem.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewlayoutitem.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_VIEWLAYOUTITEM_HXX +#define _SVX_VIEWLAYOUTITEM_HXX + +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +//------------------------------------------------------------------------- + +class SVX_DLLPUBLIC SvxViewLayoutItem: public SfxUInt16Item +{ + bool mbBookMode; + +public: + TYPEINFO(); + + SvxViewLayoutItem( USHORT nColumns = 0, bool bBookMode = false, USHORT nWhich = SID_ATTR_VIEWLAYOUT ); + SvxViewLayoutItem( const SvxViewLayoutItem& ); + ~SvxViewLayoutItem(); + + void SetBookMode( bool bNew ) {mbBookMode = bNew; } + bool IsBookMode() const {return mbBookMode; } + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStrm, USHORT nVersion ) const; // leer + virtual SvStream& Store( SvStream& rStrm , USHORT nItemVersion ) const; // leer + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; // leer + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); // leer +}; + +//------------------------------------------------------------------------ + +#endif diff --git a/svx/inc/svx/viewpt3d.hxx b/svx/inc/svx/viewpt3d.hxx new file mode 100644 index 000000000000..bd6f2f5310ef --- /dev/null +++ b/svx/inc/svx/viewpt3d.hxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: viewpt3d.hxx,v $ + * $Revision: 1.3.226.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _VIEWPT3D_HXX +#define _VIEWPT3D_HXX + +#include "svx/svxdllapi.h" +#include <basegfx/matrix/b3dhommatrix.hxx> +#include <basegfx/point/b3dpoint.hxx> +#include <basegfx/vector/b3dvector.hxx> +#include <tools/gen.hxx> + +// predefines +namespace basegfx { class B3DRange; } // end of namespace basegfx + +/************************************************************************* +|* +|* enums fuer Projektion und Seitenverhaeltnis +|* +\************************************************************************/ + +enum ProjectionType { PR_PARALLEL, PR_PERSPECTIVE }; +enum AspectMapType { AS_NO_MAPPING, AS_HOLD_SIZE, AS_HOLD_X, AS_HOLD_Y }; + + +/************************************************************************* +|* +|* 3D-Viewport nach PHIGS +|* +\************************************************************************/ + +class SVX_DLLPUBLIC Viewport3D +{ + protected: + basegfx::B3DHomMatrix aViewTf; // die eigentliche Transformationsmatrix + basegfx::B3DPoint aVRP; // View Reference Point + basegfx::B3DVector aVPN; // View Plane Normal + basegfx::B3DVector aVUV; // View Up Vector + basegfx::B3DPoint aPRP; // Projection Reference Point(View-Koordinaten) + // bisher wird nur die Z-Koordinate beachtet + double fVPD; // View Plane Distance + double fNearClipDist; // Abstand der vorderen Clippingebene + double fFarClipDist; // Abstand der hinteren Clippingebene + + ProjectionType eProjection; // Art der Projektion + AspectMapType eAspectMapping; // Flag fuer Seitenverhaeltnis-Anpassung + // bei Ausgabe auf das Geraet + Rectangle aDeviceRect; // Position und Groesse des Ausgabebereichs + + struct + { + double X, Y, W, H; // Position und Groesse des View-Windows + } aViewWin; // in View-Koordinaten + + basegfx::B3DPoint aViewPoint; // Beobachterstandpunkt in Weltkoordinaten; + // wird mit der Transformation berechnet + BOOL bTfValid; // Flag, ob Transformation gueltig ist + + double fWRatio; // Device/View-Seitenverhaeltnisse + double fHRatio; + + void MakeTransform(void); + + public: + Viewport3D(); + + void SetVRP(const basegfx::B3DPoint& rNewVRP); + void SetVPN(const basegfx::B3DVector& rNewVPN); + void SetVUV(const basegfx::B3DVector& rNewVUV); + void SetPRP(const basegfx::B3DPoint& rNewPRP); + void SetVPD(double fNewVPD); + void SetNearClipDist(double fNewNCD); + void SetFarClipDist(double fNewFCD); + + const basegfx::B3DPoint& GetVRP() const { return aVRP; } + const basegfx::B3DVector& GetVPN() const { return aVPN; } + const basegfx::B3DVector& GetVUV() const { return aVUV; } + const basegfx::B3DPoint& GetPRP() const { return aPRP; } + double GetVPD() const { return fVPD; } + double GetNearClipDist() const { return fNearClipDist; } + double GetFarClipDist() const { return fFarClipDist; } + + void SetProjection(ProjectionType ePrj) + { eProjection = ePrj; bTfValid = FALSE; } + ProjectionType GetProjection() const { return(eProjection); } + + void SetAspectMapping(AspectMapType eAsp) + { eAspectMapping = eAsp; bTfValid = FALSE; } + AspectMapType GetAspectMapping() { return eAspectMapping; } + + void SetViewWindow(double fX, double fY, double fW, double fH); + void GetViewWindow(double& rX, double& rY, double& rW, double& rH) const; + + void SetDeviceWindow(const Rectangle& rRect); + const Rectangle& GetDeviceWindow() const { return aDeviceRect; } + + // Beobachterstandpunkt in Weltkoordinaten zurueckgeben + const basegfx::B3DPoint& GetViewPoint(); + + // View-Transformationen + const basegfx::B3DHomMatrix& GetViewTransform(); + + // Projektion und Mapping + basegfx::B3DPoint DoProjection(const basegfx::B3DPoint& rVec) const; + basegfx::B3DPoint MapToDevice(const basegfx::B3DPoint& rVec) const; +}; + +#endif // _VIEWPT3D_HXX diff --git a/svx/inc/svx/volume3d.hxx b/svx/inc/svx/volume3d.hxx new file mode 100644 index 000000000000..6fa2ee7211e5 --- /dev/null +++ b/svx/inc/svx/volume3d.hxx @@ -0,0 +1,36 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: volume3d.hxx,v $ + * $Revision: 1.3.226.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _VOLUME3D_HXX +#define _VOLUME3D_HXX + +#include <basegfx/range/b3drange.hxx> + +#endif // _VOLUME3D_HXX diff --git a/svx/inc/svx/wghtitem.hxx b/svx/inc/svx/wghtitem.hxx new file mode 100644 index 000000000000..2a63885e3e42 --- /dev/null +++ b/svx/inc/svx/wghtitem.hxx @@ -0,0 +1,95 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: wghtitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_WGHTITEM_HXX +#define _SVX_WGHTITEM_HXX + +// include --------------------------------------------------------------- + +#include <vcl/vclenum.hxx> +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxWeightItem --------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt die Font-Staerke. +*/ + +class SVX_DLLPUBLIC SvxWeightItem : public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxWeightItem( const FontWeight eWght /*= WEIGHT_NORMAL*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual String GetValueTextByPos( USHORT nPos ) const; + virtual USHORT GetValueCount() const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual int HasBoolValue() const; + virtual BOOL GetBoolValue() const; + virtual void SetBoolValue( BOOL bVal ); + + inline SvxWeightItem& operator=(const SvxWeightItem& rWeight) { + SetValue( rWeight.GetValue() ); + return *this; + } + + // enum cast + FontWeight GetWeight() const + { return (FontWeight)GetValue(); } + void SetWeight( FontWeight eNew ) + { SetValue( (USHORT)eNew ); } +}; + +#endif // #ifndef _SVX_WGHTITEM_HXX + diff --git a/svx/inc/svx/widwitem.hxx b/svx/inc/svx/widwitem.hxx new file mode 100644 index 000000000000..682e3bea5c39 --- /dev/null +++ b/svx/inc/svx/widwitem.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: widwitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_WIDWITEM_HXX +#define _SVX_WIDWITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/intitem.hxx> + +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxWidowsItem --------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt die Anzahl der Zeilen fuer die Hurenkinderregelung. +*/ + +class SVX_DLLPUBLIC SvxWidowsItem: public SfxByteItem +{ + friend SvStream & operator<<( SvStream & aS, SvxWidowsItem & ); +public: + TYPEINFO(); + + SvxWidowsItem( const BYTE nL /*= 0*/, const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream &, USHORT ) const; + virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxWidowsItem& operator=( const SvxWidowsItem& rWidows ) + { + SetValue( rWidows.GetValue() ); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/writingmodeitem.hxx b/svx/inc/svx/writingmodeitem.hxx new file mode 100644 index 000000000000..0e481479a611 --- /dev/null +++ b/svx/inc/svx/writingmodeitem.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: writingmodeitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_WRITINGMODEITEM_HXX +#define _SVX_WRITINGMODEITEM_HXX + +// include --------------------------------------------------------------- + +#include <com/sun/star/text/WritingMode.hpp> +#include <svl/intitem.hxx> +#include <svx/svddef.hxx> +#include "svx/svxdllapi.h" + +// class SvxWritingModeItem ---------------------------------------------- + +class SVX_DLLPUBLIC SvxWritingModeItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + + SvxWritingModeItem( ::com::sun::star::text::WritingMode eValue /*= com::sun::star::text::WritingMode_LR_TB*/, + USHORT nWhich /*= SDRATTR_TEXTDIRECTION*/ ); + virtual ~SvxWritingModeItem(); + + SvxWritingModeItem& operator=( const SvxWritingModeItem& rItem ); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual int operator==( const SfxPoolItem& ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, + const IntlWrapper * = 0 ) const; + + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId ) const; +}; + +#endif // #ifndef _SVX_WRITINGMODEITEM_HXX + diff --git a/svx/inc/svx/wrlmitem.hxx b/svx/inc/svx/wrlmitem.hxx new file mode 100644 index 000000000000..aa5116125d28 --- /dev/null +++ b/svx/inc/svx/wrlmitem.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: wrlmitem.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_WRLMITEM_HXX +#define _SVX_WRLMITEM_HXX + +// include --------------------------------------------------------------- + +#include <svl/eitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxWordLineModeItem --------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt, ob Unterstrichen und Durchgestrichen auf + Wortgrenzen beschraenkt ist. +*/ + +class SVX_DLLPUBLIC SvxWordLineModeItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + SvxWordLineModeItem( const BOOL bWordLineMode /*= FALSE*/, + const USHORT nId ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxWordLineModeItem& operator=( const SvxWordLineModeItem& rWLM ) + { + SetValue( rWLM.GetValue() ); + return *this; + } +}; + +#endif + diff --git a/svx/inc/svx/xbitmap.hxx b/svx/inc/svx/xbitmap.hxx new file mode 100644 index 000000000000..4e0f16d21b20 --- /dev/null +++ b/svx/inc/svx/xbitmap.hxx @@ -0,0 +1,103 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xbitmap.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XBITMAP_HXX +#define _SVX_XBITMAP_HXX + +#include <tools/color.hxx> +#ifndef _BITMAP_HXX //autogen +#include <vcl/bitmap.hxx> +#endif +#include <goodies/grfmgr.hxx> +#include <svx/xenum.hxx> +#include "svx/svxdllapi.h" + +//--------------- +// class XOBitmap +//--------------- + +#if defined HP9000 || defined SINIX +static Size aXOBitmapDefaultSize( 8, 8 ); +#endif + +class SVX_DLLPUBLIC XOBitmap +{ +protected: + XBitmapType eType; + XBitmapStyle eStyle; + GraphicObject aGraphicObject; + USHORT* pPixelArray; + Size aArraySize; + Color aPixelColor; + Color aBckgrColor; + BOOL bGraphicDirty; + +public: + XOBitmap(); + XOBitmap( const GraphicObject& rGraphicObject, XBitmapStyle eStyle = XBITMAP_TILE ); + XOBitmap( const Bitmap& rBitmap, XBitmapStyle eStyle = XBITMAP_TILE ); +#if defined HP9000 || defined SINIX + XOBitmap( const USHORT* pArray, const Color& aPixelColor, + const Color& aBckgrColor, const Size& rSize = aXOBitmapDefaultSize, + XBitmapStyle eStyle = XBITMAP_TILE ); +#else + XOBitmap( const USHORT* pArray, const Color& aPixelColor, + const Color& aBckgrColor, const Size& rSize = Size( 8, 8 ), + XBitmapStyle eStyle = XBITMAP_TILE ); +#endif + XOBitmap( const XOBitmap& rXBmp ); + ~XOBitmap(); + + XOBitmap& operator=( const XOBitmap& rXOBitmap ); + int operator==( const XOBitmap& rXOBitmap ) const; + + void Bitmap2Array(); + void Array2Bitmap(); + + void SetGraphicObject( const GraphicObject& rObj ) { aGraphicObject = rObj; bGraphicDirty = FALSE; } + void SetBitmap( const Bitmap& rBmp ) { aGraphicObject = GraphicObject( Graphic( rBmp ) ); bGraphicDirty = FALSE; } + void SetBitmapType( XBitmapType eNewType ) { eType = eNewType; } + void SetBitmapStyle( XBitmapStyle eNewStyle ) { eStyle = eNewStyle; } + void SetPixelArray( const USHORT* pArray ); + void SetPixelSize( const Size& rSize ) { aArraySize = rSize; bGraphicDirty = TRUE; } + void SetPixelColor( const Color& rColor ) { aPixelColor = rColor; bGraphicDirty = TRUE; } + void SetBackgroundColor( const Color& rColor ) { aBckgrColor = rColor; bGraphicDirty = TRUE; } + + XBitmapType GetBitmapType() const { return eType; } + XBitmapStyle GetBitmapStyle() const { return eStyle; } + const GraphicObject& GetGraphicObject() const; + Bitmap GetBitmap() const; + USHORT* GetPixelArray() const { return pPixelArray; } + Color GetPixelColor() const { return aPixelColor; } + Color GetBackgroundColor() const { return aBckgrColor; } +}; + +#endif + diff --git a/svx/inc/svx/xbtmpit.hxx b/svx/inc/svx/xbtmpit.hxx new file mode 100644 index 000000000000..8249486263f9 --- /dev/null +++ b/svx/inc/svx/xbtmpit.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xbtmpit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XBTMPIT_HXX +#define _SVX_XBTMPIT_HXX + +#include "svx/svxdllapi.h" + +#include <svx/xbitmap.hxx> +#include <svx/xit.hxx> + +class SdrModel; + +//---------------------- +// class XFillBitmapItem +//---------------------- +class SVX_DLLPUBLIC XFillBitmapItem : public NameOrIndex +{ + XOBitmap aXOBitmap; + +public: + TYPEINFO(); + XFillBitmapItem() : NameOrIndex(XATTR_FILLBITMAP, -1 ) {} + XFillBitmapItem( long nIndex, const XOBitmap& rTheBitmap ); + XFillBitmapItem( const String& rName, const XOBitmap& rTheBitmap ); + XFillBitmapItem( SfxItemPool* pPool, const XOBitmap& rTheBitmap ); + XFillBitmapItem( SfxItemPool* pPool ); + XFillBitmapItem( const XFillBitmapItem& rItem ); + XFillBitmapItem( SvStream& rIn, USHORT nVer = 0 ); + + virtual int operator==( const SfxPoolItem& rItem ) const; + virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + virtual SvStream& Store( SvStream& rOut, USHORT nItemVersion ) const; + virtual USHORT GetVersion( USHORT nFileFormatVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + const XOBitmap& GetBitmapValue( const XBitmapTable* pTable = 0 ) const; // GetValue -> GetBitmapValue + void SetBitmapValue( const XOBitmap& rNew ) { aXOBitmap = rNew; Detach(); } // SetValue -> SetBitmapValue + + static BOOL CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); + XFillBitmapItem* checkForUniqueItem( SdrModel* pModel ) const; +}; + +#endif diff --git a/svx/inc/svx/xcolit.hxx b/svx/inc/svx/xcolit.hxx new file mode 100644 index 000000000000..e8d041079652 --- /dev/null +++ b/svx/inc/svx/xcolit.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xcolit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XCOLORITEM_HXX +#define _SVX_XCOLORITEM_HXX + +#include <tools/color.hxx> +#include "svx/svxdllapi.h" + +#include <svx/xit.hxx> + +class XColorTable; + +//----------------- +// class XColorItem +//----------------- +class SVX_DLLPUBLIC XColorItem : public NameOrIndex +{ + Color aColor; + +public: + TYPEINFO(); + XColorItem() {} + XColorItem(USHORT nWhich, INT32 nIndex, const Color& rTheColor); + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + XColorItem(USHORT nWhich, const String& rName, const Color& rTheColor); + XColorItem(USHORT nWhich, SvStream& rIn); + XColorItem(const XColorItem& rItem); + + virtual int operator==(const SfxPoolItem& rItem) const; + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual SvStream& Store(SvStream& rOut, USHORT nItemVersion ) const; + + const Color& GetColorValue(const XColorTable* pTable = 0) const; + void SetColorValue(const Color& rNew) { aColor = rNew; Detach(); } +}; + +#endif + diff --git a/svx/inc/svx/xdash.hxx b/svx/inc/svx/xdash.hxx new file mode 100644 index 000000000000..0530b5934bf9 --- /dev/null +++ b/svx/inc/svx/xdash.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xdash.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XDASH_HXX +#define _SVX_XDASH_HXX + +//------------- +// class XDash +//------------- + +#include <svx/xenum.hxx> +#include "svx/svxdllapi.h" + +#include <vector> + +class SVX_DLLPUBLIC XDash +{ +protected: + XDashStyle eDash; + USHORT nDots; + ULONG nDotLen; + USHORT nDashes; + ULONG nDashLen; + ULONG nDistance; + +public: + XDash(XDashStyle eDash = XDASH_RECT, + USHORT nDots = 1, ULONG nDotLen = 20, + USHORT nDashes = 1, ULONG nDashLen = 20, ULONG nDistance = 20); + + bool operator==(const XDash& rDash) const; + + void SetDashStyle(XDashStyle eNewStyle) { eDash = eNewStyle; } + void SetDots(USHORT nNewDots) { nDots = nNewDots; } + void SetDotLen(ULONG nNewDotLen) { nDotLen = nNewDotLen; } + void SetDashes(USHORT nNewDashes) { nDashes = nNewDashes; } + void SetDashLen(ULONG nNewDashLen) { nDashLen = nNewDashLen; } + void SetDistance(ULONG nNewDistance) { nDistance = nNewDistance; } + + XDashStyle GetDashStyle() const { return eDash; } + USHORT GetDots() const { return nDots; } + ULONG GetDotLen() const { return nDotLen; } + USHORT GetDashes() const { return nDashes; } + ULONG GetDashLen() const { return nDashLen; } + ULONG GetDistance() const { return nDistance; } + + // XDash is translated into an array of doubles which describe the lengths of the + // dashes, dots and empty passages. It returns the complete length of the full DashDot + // sequence and fills the given vetor of doubles accordingly (also resizing, so deleting it). + double CreateDotDashArray(::std::vector< double >& rDotDashArray, double fLineWidth) const; +}; + +#endif diff --git a/svx/inc/svx/xdef.hxx b/svx/inc/svx/xdef.hxx new file mode 100644 index 000000000000..a195d9012c10 --- /dev/null +++ b/svx/inc/svx/xdef.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xdef.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _XDEF_HXX +#define _XDEF_HXX + +/************************************************************************* +|* +|* Attribut einfuegen: Zeile kopieren, VOR welcher eingefuegt werden +|* soll, Bezeichnung aendern und diese auch am Ende der darauffolgenden +|* Zeile eintragen +|* +\************************************************************************/ + +#define COL_DEFAULT_SHAPE_FILLING RGB_COLORDATA( 153, 204, 255 ) // blue 8 + +#define XATTR_START 1000 + +#define XATTR_LINE_FIRST XATTR_START /* V3: 1000 V2: 1000 */ +#define XATTR_LINESTYLE XATTR_LINE_FIRST +#define XATTR_LINEDASH (XATTR_LINE_FIRST + 1) /* V3: 1001 V2: 1001 */ +#define XATTR_LINEWIDTH (XATTR_LINE_FIRST + 2) /* V3: 1002 V2: 1002 */ +#define XATTR_LINECOLOR (XATTR_LINE_FIRST + 3) /* V3: 1003 V2: 1003 */ +#define XATTR_LINESTART (XATTR_LINE_FIRST + 4) /* V3: 1004 V2: 1004 */ +#define XATTR_LINEEND (XATTR_LINE_FIRST + 5) /* V3: 1005 V2: 1005 */ +#define XATTR_LINESTARTWIDTH (XATTR_LINE_FIRST + 6) /* V3: 1006 V2: 1006 */ +#define XATTR_LINEENDWIDTH (XATTR_LINE_FIRST + 7) /* V3: 1007 V2: 1007 */ +#define XATTR_LINESTARTCENTER (XATTR_LINE_FIRST + 8) /* V3: 1008 V2: 1008 */ +#define XATTR_LINEENDCENTER (XATTR_LINE_FIRST + 9) /* V3: 1009 V2: 1009 */ +#define XATTR_LINETRANSPARENCE (XATTR_LINE_FIRST + 10) /* V3: 1010 V2: 1010 */ +#define XATTR_LINEJOINT (XATTR_LINE_FIRST + 11) /* V3: 1011 V2: 1011 */ +#define XATTR_LINE_LAST XATTR_LINEJOINT +#define XATTRSET_LINE (XATTR_LINE_LAST + 1) /* V3: 1017 V2: 1017 */ + +#define XATTR_FILL_FIRST (XATTRSET_LINE + 1) /* V3: 1018 V2: 1018 */ +#define XATTR_FILLSTYLE XATTR_FILL_FIRST +#define XATTR_FILLCOLOR (XATTR_FILL_FIRST + 1) /* V3: 1019 V2: 1019 */ +#define XATTR_FILLGRADIENT (XATTR_FILL_FIRST + 2) /* V3: 1020 V2: 1020 */ +#define XATTR_FILLHATCH (XATTR_FILL_FIRST + 3) /* V3: 1021 V2: 1021 */ +#define XATTR_FILLBITMAP (XATTR_FILL_FIRST + 4) /* V3: 1022 V2: 1022 */ +#define XATTR_FILLTRANSPARENCE (XATTR_FILL_FIRST + 5) /* V3: 1023 V2: 1023 */ +#define XATTR_GRADIENTSTEPCOUNT (XATTR_FILL_FIRST + 6) /* V3: 1024 V2: 1024 */ +#define XATTR_FILLBMP_TILE (XATTR_FILL_FIRST + 7) /* V3: 1025 V2: 1025 */ +#define XATTR_FILLBMP_POS (XATTR_FILL_FIRST + 8) /* V3: 1026 V2: 1026 */ +#define XATTR_FILLBMP_SIZEX (XATTR_FILL_FIRST + 9) /* V3: 1027 V2: 1027 */ +#define XATTR_FILLBMP_SIZEY (XATTR_FILL_FIRST + 10) /* V3: 1028 V2: 1028 */ +#define XATTR_FILLFLOATTRANSPARENCE (XATTR_FILL_FIRST + 11) /* V3: 1029 V2: 1029 */ +#define XATTR_SECONDARYFILLCOLOR (XATTR_FILL_FIRST + 12) /* V3: 1030 */ +#define XATTR_FILLBMP_SIZELOG (XATTR_FILL_FIRST + 13) /* V3: 1031 */ +#define XATTR_FILLBMP_TILEOFFSETX (XATTR_FILL_FIRST + 14) /* V3: 1032 */ +#define XATTR_FILLBMP_TILEOFFSETY (XATTR_FILL_FIRST + 15) /* V3: 1033 */ +#define XATTR_FILLBMP_STRETCH (XATTR_FILL_FIRST + 16) /* V3: 1034 */ +#define XATTR_FILLBMP_POSOFFSETX (XATTR_FILL_FIRST + 17) /* V3: 1041 */ +#define XATTR_FILLBMP_POSOFFSETY (XATTR_FILL_FIRST + 18) /* V3: 1042 */ +#define XATTR_FILLBACKGROUND (XATTR_FILL_FIRST + 19) /* V3: 1043 */ +#define XATTR_FILL_LAST XATTR_FILLBACKGROUND +#define XATTRSET_FILL (XATTR_FILL_LAST + 1) /* V3: 1047 V2: 1030 */ + +#define XATTR_TEXT_FIRST (XATTRSET_FILL + 1) +#define XATTR_FORMTXTSTYLE XATTR_TEXT_FIRST /* V3: 1048 V2: 1031 */ +#define XATTR_FORMTXTADJUST (XATTR_TEXT_FIRST + 1) /* V3: 1049 V2: 1032 */ +#define XATTR_FORMTXTDISTANCE (XATTR_TEXT_FIRST + 2) /* V3: 1050 V2: 1033 */ +#define XATTR_FORMTXTSTART (XATTR_TEXT_FIRST + 3) /* V3: 1051 V2: 1034 */ +#define XATTR_FORMTXTMIRROR (XATTR_TEXT_FIRST + 4) /* V3: 1052 V2: 1035 */ +#define XATTR_FORMTXTOUTLINE (XATTR_TEXT_FIRST + 5) /* V3: 1053 V2: 1036 */ +#define XATTR_FORMTXTSHADOW (XATTR_TEXT_FIRST + 6) /* V3: 1054 V2: 1037 */ +#define XATTR_FORMTXTSHDWCOLOR (XATTR_TEXT_FIRST + 7) /* V3: 1055 V2: 1038 */ +#define XATTR_FORMTXTSHDWXVAL (XATTR_TEXT_FIRST + 8) /* V3: 1056 V2: 1039 */ +#define XATTR_FORMTXTSHDWYVAL (XATTR_TEXT_FIRST + 9) /* V3: 1057 V2: 1040 */ +#define XATTR_FORMTXTSTDFORM (XATTR_TEXT_FIRST + 10) /* V3: 1058 V2: 1041 */ +#define XATTR_FORMTXTHIDEFORM (XATTR_TEXT_FIRST + 11) /* V3: 1059 V2: 1042 */ +#define XATTR_FORMTXTSHDWTRANSP (XATTR_TEXT_FIRST + 12) /* V3: 1060 V2: 1043 */ +#define XATTR_TEXT_LAST XATTR_FORMTXTSHDWTRANSP + +#define XATTR_END XATTR_TEXT_LAST + +#endif diff --git a/svx/inc/svx/xenum.hxx b/svx/inc/svx/xenum.hxx new file mode 100644 index 000000000000..d0f82fd7ac52 --- /dev/null +++ b/svx/inc/svx/xenum.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xenum.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _XENUM_HXX +#define _XENUM_HXX + +enum XLineStyle { XLINE_NONE, XLINE_SOLID, XLINE_DASH }; +enum XLineJoint +{ + XLINEJOINT_NONE, // no rounding + XLINEJOINT_MIDDLE, // calc middle value between joints + XLINEJOINT_BEVEL, // join edges with line + XLINEJOINT_MITER, // extend till cut + XLINEJOINT_ROUND // create arc +}; +enum XDashStyle { XDASH_RECT, XDASH_ROUND, XDASH_RECTRELATIVE, + XDASH_ROUNDRELATIVE }; +enum XFillStyle { XFILL_NONE, XFILL_SOLID, XFILL_GRADIENT, XFILL_HATCH, + XFILL_BITMAP }; +enum XGradientStyle { XGRAD_LINEAR, XGRAD_AXIAL, XGRAD_RADIAL, + XGRAD_ELLIPTICAL, XGRAD_SQUARE, XGRAD_RECT }; +enum XHatchStyle { XHATCH_SINGLE, XHATCH_DOUBLE, XHATCH_TRIPLE }; +enum XFormTextStyle { XFT_ROTATE, XFT_UPRIGHT, XFT_SLANTX, XFT_SLANTY, + XFT_NONE }; +enum XFormTextAdjust { XFT_LEFT, XFT_RIGHT, XFT_AUTOSIZE, XFT_CENTER }; +enum XFormTextShadow { XFTSHADOW_NONE, XFTSHADOW_NORMAL, XFTSHADOW_SLANT}; +enum XFormTextStdForm { XFTFORM_NONE = 0, XFTFORM_TOPCIRC, XFTFORM_BOTCIRC, + XFTFORM_LFTCIRC, XFTFORM_RGTCIRC, XFTFORM_TOPARC, + XFTFORM_BOTARC, XFTFORM_LFTARC, XFTFORM_RGTARC, + XFTFORM_BUTTON1, XFTFORM_BUTTON2, + XFTFORM_BUTTON3, XFTFORM_BUTTON4}; +enum XBitmapStyle { XBITMAP_TILE, XBITMAP_STRETCH }; +enum XBitmapType { XBITMAP_IMPORT, XBITMAP_8X8, XBITMAP_NONE, + XBITMAP_16X16 }; + + +#endif // _XENUM_HXX + diff --git a/svx/inc/svx/xfillit.hxx b/svx/inc/svx/xfillit.hxx new file mode 100644 index 000000000000..6ac90e8a8a93 --- /dev/null +++ b/svx/inc/svx/xfillit.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xfillit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_FILLITEM_HXX +#define _SVX_FILLITEM_HXX + +#ifndef _BITMAP_HXX //autogen +#include <vcl/bitmap.hxx> +#endif +#include <svx/xcolit.hxx> +#include <svx/xgrad.hxx> +#include <svx/xhatch.hxx> +#include <svx/xenum.hxx> +#include <svl/eitem.hxx> + +#include <svx/xflclit.hxx> +#include <svx/xsflclit.hxx> +#include <svx/xflgrit.hxx> +#include <svx/xflhtit.hxx> +#include <svx/xbitmap.hxx> +#include <svx/xbtmpit.hxx> +#include <svx/xflftrit.hxx> + +class XGradient; +class XOBitmap; + +#endif diff --git a/svx/inc/svx/xfillit0.hxx b/svx/inc/svx/xfillit0.hxx new file mode 100644 index 000000000000..4fbc0686a5ba --- /dev/null +++ b/svx/inc/svx/xfillit0.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xfillit0.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_XFILLIT0_HXX +#define SVX_XFILLIT0_HXX + +#include <svl/eitem.hxx> + +#include <svx/xdef.hxx> +#include <svx/xenum.hxx> +#include "svx/svxdllapi.h" + +//--------------------- +// class XFillStyleItem +//--------------------- + +class SVX_DLLPUBLIC XFillStyleItem : public SfxEnumItem +{ +public: + TYPEINFO(); + XFillStyleItem(XFillStyle = XFILL_SOLID); + XFillStyleItem(SvStream& rIn); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + virtual USHORT GetValueCount() const; + XFillStyle GetValue() const { return (XFillStyle) SfxEnumItem::GetValue(); } +}; + +#endif + diff --git a/svx/inc/svx/xflasit.hxx b/svx/inc/svx/xflasit.hxx new file mode 100644 index 000000000000..f5ca7bc9efff --- /dev/null +++ b/svx/inc/svx/xflasit.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflasit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLASIT_HXX +#define _SVX_XFLASIT_HXX + +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* SetItem mit dem ItemSet aller Fuellattribute +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillAttrSetItem : public SfxSetItem +{ +public: + TYPEINFO(); + XFillAttrSetItem(SfxItemSet* pItemSet ); + XFillAttrSetItem(SfxItemPool* pItemPool); + XFillAttrSetItem(const XFillAttrSetItem& rAttr); + XFillAttrSetItem(const XFillAttrSetItem& rAttr, + SfxItemPool* pItemPool); + virtual SfxPoolItem* Clone( SfxItemPool* pToPool ) const; + virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVersion ) const; + virtual SvStream& Store( SvStream& rStream, USHORT nItemVersion ) const; +}; + +#endif diff --git a/svx/inc/svx/xflbckit.hxx b/svx/inc/svx/xflbckit.hxx new file mode 100644 index 000000000000..aecae3acdeb4 --- /dev/null +++ b/svx/inc/svx/xflbckit.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflbckit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLBCKIT_HXX +#define _SVX_XFLBCKIT_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Item to enable background for filled objects +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBackgroundItem : public SfxBoolItem +{ +public: + TYPEINFO(); + + XFillBackgroundItem( BOOL bFill = FALSE ); + SVX_DLLPRIVATE XFillBackgroundItem( SvStream& rIn ); + + + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xflbmpit.hxx b/svx/inc/svx/xflbmpit.hxx new file mode 100644 index 000000000000..231bab10f122 --- /dev/null +++ b/svx/inc/svx/xflbmpit.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflbmpit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLBMPIT_HXX +#define _SVX_XFLBMPIT_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBmpPosItem : public SfxEnumItem +{ +public: + TYPEINFO(); + XFillBmpPosItem( RECT_POINT eRP = RP_MM ); + SVX_DLLPRIVATE XFillBmpPosItem( SvStream& rIn ); + + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + SVX_DLLPRIVATE virtual USHORT GetValueCount() const; + SVX_DLLPRIVATE RECT_POINT GetValue() const { return (RECT_POINT) SfxEnumItem::GetValue(); } +}; + + +#endif diff --git a/svx/inc/svx/xflbmsli.hxx b/svx/inc/svx/xflbmsli.hxx new file mode 100644 index 000000000000..a0f88b111331 --- /dev/null +++ b/svx/inc/svx/xflbmsli.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflbmsli.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLBMSLI_HXX +#define _SVX_XFLBMSLI_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBmpSizeLogItem : public SfxBoolItem +{ +public: + TYPEINFO(); + XFillBmpSizeLogItem( BOOL bLog = TRUE ); + SVX_DLLPRIVATE XFillBmpSizeLogItem( SvStream& rIn ); + + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xflbmsxy.hxx b/svx/inc/svx/xflbmsxy.hxx new file mode 100644 index 000000000000..254428badb6c --- /dev/null +++ b/svx/inc/svx/xflbmsxy.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflbmsxy.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLBMSXY_HXX +#define _SVX_XFLBMSXY_HXX + +#include <svl/metitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBmpSizeXItem : public SfxMetricItem +{ +public: + TYPEINFO(); + XFillBmpSizeXItem( long nSizeX = 0 ); + SVX_DLLPRIVATE XFillBmpSizeXItem( SvStream& rIn ); + + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + // Dieses Item nimmt sowohl metrische als auch + // Prozentwerte ( sind negativ ) auf; das muessen + // wir hier beruecksichtigen + SVX_DLLPRIVATE virtual FASTBOOL HasMetrics() const; +}; + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBmpSizeYItem : public SfxMetricItem +{ +public: + TYPEINFO(); + XFillBmpSizeYItem( long nSizeY = 0 ); + SVX_DLLPRIVATE XFillBmpSizeYItem( SvStream& rIn ); + + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + // Dieses Item nimmt sowohl metrische als auch + // Prozentwerte ( sind negativ ) auf; das muessen + // wir hier beruecksichtigen + SVX_DLLPRIVATE virtual FASTBOOL HasMetrics() const; +}; + +#endif diff --git a/svx/inc/svx/xflbmtit.hxx b/svx/inc/svx/xflbmtit.hxx new file mode 100644 index 000000000000..db969aa650c5 --- /dev/null +++ b/svx/inc/svx/xflbmtit.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflbmtit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLBMTIT_HXX +#define _SVX_XFLBMTIT_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBmpTileItem : public SfxBoolItem +{ +public: + TYPEINFO(); + XFillBmpTileItem( BOOL bTile = TRUE ); + XFillBmpTileItem( SvStream& rIn ); + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xflboxy.hxx b/svx/inc/svx/xflboxy.hxx new file mode 100644 index 000000000000..2dfd12f6d6dc --- /dev/null +++ b/svx/inc/svx/xflboxy.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflboxy.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLBOXY_HXX +#define _SVX_XFLBOXY_HXX + +#include <svl/intitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBmpPosOffsetXItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + XFillBmpPosOffsetXItem( USHORT nOffPosX = 0 ); + SVX_DLLPRIVATE XFillBmpPosOffsetXItem( SvStream& rIn ); + + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBmpPosOffsetYItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + XFillBmpPosOffsetYItem( USHORT nOffPosY = 0 ); + SVX_DLLPRIVATE XFillBmpPosOffsetYItem( SvStream& rIn ); + + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xflbstit.hxx b/svx/inc/svx/xflbstit.hxx new file mode 100644 index 000000000000..a91c44d02831 --- /dev/null +++ b/svx/inc/svx/xflbstit.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflbstit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLBSTIT_HXX +#define _SVX_XFLBSTIT_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBmpStretchItem : public SfxBoolItem +{ +public: + TYPEINFO(); + XFillBmpStretchItem( BOOL bStretch = TRUE ); + XFillBmpStretchItem( SvStream& rIn ); + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xflbtoxy.hxx b/svx/inc/svx/xflbtoxy.hxx new file mode 100644 index 000000000000..2f6744e4c022 --- /dev/null +++ b/svx/inc/svx/xflbtoxy.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflbtoxy.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLBTOXY_HXX +#define _SVX_XFLBTOXY_HXX + +#include <svl/intitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBmpTileOffsetXItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + XFillBmpTileOffsetXItem( USHORT nOffX = 0 ); + SVX_DLLPRIVATE XFillBmpTileOffsetXItem( SvStream& rIn ); + + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + + +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillBmpTileOffsetYItem : public SfxUInt16Item +{ +public: + TYPEINFO(); + XFillBmpTileOffsetYItem( USHORT nOffX = 0 ); + SVX_DLLPRIVATE XFillBmpTileOffsetYItem( SvStream& rIn ); + + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xflclit.hxx b/svx/inc/svx/xflclit.hxx new file mode 100644 index 000000000000..39a382bd5e60 --- /dev/null +++ b/svx/inc/svx/xflclit.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflclit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLCLIT_HXX +#define _SVX_XFLCLIT_HXX + +#include <svx/xcolit.hxx> +#include "svx/svxdllapi.h" + +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// Fuellattribute +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +//--------------------- +// class XFillColorItem +//--------------------- +class SVX_DLLPUBLIC XFillColorItem : public XColorItem +{ +public: + TYPEINFO(); + XFillColorItem() {} + XFillColorItem(INT32 nIndex, const Color& rTheColor); + XFillColorItem(const String& rName, const Color& rTheColor); + XFillColorItem(SvStream& rIn); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif + diff --git a/svx/inc/svx/xflftrit.hxx b/svx/inc/svx/xflftrit.hxx new file mode 100644 index 000000000000..1e77f2a6d2e0 --- /dev/null +++ b/svx/inc/svx/xflftrit.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflftrit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLFTRIT_HXX +#define _SVX_XFLFTRIT_HXX + +#include <svx/xflgrit.hxx> +#include "svx/svxdllapi.h" + +//----------------------------------- +// class XFillFloatTransparenceItem - +//----------------------------------- + +class SVX_DLLPUBLIC XFillFloatTransparenceItem : public XFillGradientItem +{ +private: + + long nDummy1; + long nDummy2; + BOOL bEnabled; + +public: + TYPEINFO(); + + XFillFloatTransparenceItem(); + XFillFloatTransparenceItem( INT32 nIndex, const XGradient& rGradient, BOOL bEnable = TRUE ); + XFillFloatTransparenceItem(const String& rName, const XGradient& rGradient, BOOL bEnable = TRUE ); + XFillFloatTransparenceItem(SfxItemPool* pPool, const XGradient& rTheGradient, BOOL bEnable = TRUE ); + XFillFloatTransparenceItem(SfxItemPool* pPool ); + XFillFloatTransparenceItem( const XFillFloatTransparenceItem& rItem ); + + virtual int operator==( const SfxPoolItem& rItem ) const; + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual USHORT GetVersion( USHORT nFileFormatVersion ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, String &rText, const IntlWrapper * pIntlWrapper = 0 ) const; + + BOOL IsEnabled() const { return bEnabled; } + void SetEnabled( BOOL bEnable ) { bEnabled = bEnable; } + + static BOOL CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); + XFillFloatTransparenceItem* checkForUniqueItem( SdrModel* pModel ) const; +}; + +#endif diff --git a/svx/inc/svx/xflgrit.hxx b/svx/inc/svx/xflgrit.hxx new file mode 100644 index 000000000000..fd0a7a202c81 --- /dev/null +++ b/svx/inc/svx/xflgrit.hxx @@ -0,0 +1,77 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflgrit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLGRIT_HXX +#define _SVX_XFLGRIT_HXX + +#include <svx/xit.hxx> +#include <svx/xgrad.hxx> +#include "svx/svxdllapi.h" + +class SdrModel; + +//------------------------ +// class XFillGradientItem +//------------------------ +class SVX_DLLPUBLIC XFillGradientItem : public NameOrIndex +{ + XGradient aGradient; + +public: + TYPEINFO(); + XFillGradientItem() : NameOrIndex(XATTR_FILLGRADIENT, -1) {} + XFillGradientItem(INT32 nIndex, const XGradient& rTheGradient); + XFillGradientItem(const UniString& rName, const XGradient& rTheGradient); + XFillGradientItem(SfxItemPool* pPool, const XGradient& rTheGradient); + XFillGradientItem(SfxItemPool* pPool ); + XFillGradientItem(const XFillGradientItem& rItem); + XFillGradientItem(SvStream& rIn, USHORT nVer = 0); + + virtual int operator==(const SfxPoolItem& rItem) const; + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual SvStream& Store(SvStream& rOut, USHORT nItemVersion ) const; + virtual USHORT GetVersion( USHORT nFileFormatVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + const XGradient& GetGradientValue(const XGradientTable* pTable = 0) const; // GetValue -> GetGradientValue + void SetGradientValue(const XGradient& rNew) { aGradient = rNew; Detach(); } // SetValue -> SetGradientValue + + static BOOL CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); + XFillGradientItem* checkForUniqueItem( SdrModel* pModel ) const; +}; + +#endif + diff --git a/svx/inc/svx/xflhtit.hxx b/svx/inc/svx/xflhtit.hxx new file mode 100644 index 000000000000..212977c87a1f --- /dev/null +++ b/svx/inc/svx/xflhtit.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xflhtit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLHTIT_HXX +#define _SVX_XFLHTIT_HXX + +#include <svx/xit.hxx> +#include <svx/xhatch.hxx> +#include "svx/svxdllapi.h" + +class SdrModel; + +//--------------------- +// class XFillHatchItem +//--------------------- +class SVX_DLLPUBLIC XFillHatchItem : public NameOrIndex +{ + XHatch aHatch; + +public: + TYPEINFO(); + XFillHatchItem() : NameOrIndex(XATTR_FILLHATCH, -1) {} + XFillHatchItem(INT32 nIndex, const XHatch& rTheHatch); + XFillHatchItem(const String& rName, const XHatch& rTheHatch); + XFillHatchItem(SfxItemPool* pPool, const XHatch& rTheHatch); + XFillHatchItem(SfxItemPool* pPool ); + XFillHatchItem(const XFillHatchItem& rItem); + XFillHatchItem(SvStream& rIn); + + virtual int operator==(const SfxPoolItem& rItem) const; + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual SvStream& Store(SvStream& rOut, USHORT nItemVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + virtual FASTBOOL HasMetrics() const; + virtual FASTBOOL ScaleMetrics(long nMul, long nDiv); + + const XHatch& GetHatchValue(const XHatchTable* pTable = 0) const; // GetValue -> GetHatchValue + void SetHatchValue(const XHatch& rNew) { aHatch = rNew; Detach(); } // SetValue -> SetHatchValue + + static BOOL CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); + XFillHatchItem* checkForUniqueItem( SdrModel* pModel ) const; +}; + +#endif + diff --git a/svx/inc/svx/xfltrit.hxx b/svx/inc/svx/xfltrit.hxx new file mode 100644 index 000000000000..5b78342d1ebf --- /dev/null +++ b/svx/inc/svx/xfltrit.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xfltrit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFLTRIT_HXX +#define _SVX_XFLTRIT_HXX + +#include <svl/intitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Transparenz-Item fuer Fuellungen (Solid) +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFillTransparenceItem: public SfxUInt16Item +{ +public: + TYPEINFO(); + XFillTransparenceItem(USHORT nFillTransparence = 0); + XFillTransparenceItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xftadit.hxx b/svx/inc/svx/xftadit.hxx new file mode 100644 index 000000000000..a29dfb8540a8 --- /dev/null +++ b/svx/inc/svx/xftadit.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xftadit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFTADIT_HXX +#define _SVX_XFTADIT_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* FormText-AdjustItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextAdjustItem : public SfxEnumItem +{ +public: + TYPEINFO(); + XFormTextAdjustItem(XFormTextAdjust = XFT_CENTER); + XFormTextAdjustItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; + XFormTextAdjust GetValue() const { return (XFormTextAdjust) SfxEnumItem::GetValue(); } + // #FontWork# + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +#endif diff --git a/svx/inc/svx/xftdiit.hxx b/svx/inc/svx/xftdiit.hxx new file mode 100644 index 000000000000..fc47ac7b6c7d --- /dev/null +++ b/svx/inc/svx/xftdiit.hxx @@ -0,0 +1,53 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xftdiit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFTDIIT_HXX +#define _SVX_XFTDIIT_HXX + +#include <svl/metitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* FormText-DistanceItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextDistanceItem : public SfxMetricItem +{ +public: + TYPEINFO(); + XFormTextDistanceItem(long nDist = 0); + XFormTextDistanceItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; +}; + +#endif diff --git a/svx/inc/svx/xftmrit.hxx b/svx/inc/svx/xftmrit.hxx new file mode 100644 index 000000000000..f0d7fc1ac362 --- /dev/null +++ b/svx/inc/svx/xftmrit.hxx @@ -0,0 +1,53 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xftmrit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFTMRIT_HXX +#define _SVX_XFTMRIT_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* FormText-MirrorItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextMirrorItem : public SfxBoolItem +{ +public: + TYPEINFO(); + XFormTextMirrorItem(BOOL bMirror = FALSE); + XFormTextMirrorItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; +}; + +#endif diff --git a/svx/inc/svx/xftouit.hxx b/svx/inc/svx/xftouit.hxx new file mode 100644 index 000000000000..19fe8db664bd --- /dev/null +++ b/svx/inc/svx/xftouit.hxx @@ -0,0 +1,53 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xftouit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFTOUIT_HXX +#define _SVX_XFTOUIT_HXX + +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* FormText-OutlineItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextOutlineItem : public SfxBoolItem +{ +public: + TYPEINFO(); + XFormTextOutlineItem(BOOL bOutline = FALSE); + XFormTextOutlineItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; +}; + +#endif + diff --git a/svx/inc/svx/xftsfit.hxx b/svx/inc/svx/xftsfit.hxx new file mode 100644 index 000000000000..ccb021d21431 --- /dev/null +++ b/svx/inc/svx/xftsfit.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xftsfit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFTSFIT_HXX +#define _SVX_XFTSFIT_HXX + +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* FormText-StdFormItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextStdFormItem : public SfxEnumItem +{ +public: + TYPEINFO(); + XFormTextStdFormItem(XFormTextStdForm = XFTFORM_NONE); + XFormTextStdFormItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; + XFormTextStdForm GetValue() const { return (XFormTextStdForm) SfxEnumItem::GetValue(); } + // #FontWork# + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +#endif + diff --git a/svx/inc/svx/xftshcit.hxx b/svx/inc/svx/xftshcit.hxx new file mode 100644 index 000000000000..7f767d163278 --- /dev/null +++ b/svx/inc/svx/xftshcit.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xftshcit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFTSHCLIT_HXX +#define _SVX_XFTSHCLIT_HXX + +#include <svx/xcolit.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* FormText-ShadowColorItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextShadowColorItem : public XColorItem +{ +public: + TYPEINFO(); + XFormTextShadowColorItem() {} + XFormTextShadowColorItem(INT32 nIndex, const Color& rTheColor); + XFormTextShadowColorItem(const String& rName, const Color& rTheColor); + XFormTextShadowColorItem(SvStream& rIn); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; +}; + +#endif diff --git a/svx/inc/svx/xftshit.hxx b/svx/inc/svx/xftshit.hxx new file mode 100644 index 000000000000..973a12095dd9 --- /dev/null +++ b/svx/inc/svx/xftshit.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xftshit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFTSHIT_HXX +#define _SVX_XFTSHIT_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* FormText-ShadowItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextShadowItem : public SfxEnumItem +{ +public: + TYPEINFO(); + XFormTextShadowItem(XFormTextShadow = XFTSHADOW_NONE); + XFormTextShadowItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; + XFormTextShadow GetValue() const { return (XFormTextShadow) SfxEnumItem::GetValue(); } + // #FontWork# + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +#endif + diff --git a/svx/inc/svx/xftshtit.hxx b/svx/inc/svx/xftshtit.hxx new file mode 100644 index 000000000000..7d7744640533 --- /dev/null +++ b/svx/inc/svx/xftshtit.hxx @@ -0,0 +1,52 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xftshtit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFTSHTIT_HXX +#define _SVX_XFTSHTIT_HXX + +#include <svl/intitem.hxx> + +/************************************************************************* +|* +|* FormText-Item fuer transparents Schatten +|* +\************************************************************************/ + +class XFormTextShadowTranspItem: public SfxUInt16Item +{ +public: + TYPEINFO(); + XFormTextShadowTranspItem(USHORT nShdwTransparence = 0); + XFormTextShadowTranspItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; +}; + +#endif diff --git a/svx/inc/svx/xftshxy.hxx b/svx/inc/svx/xftshxy.hxx new file mode 100644 index 000000000000..7f83e8e826b2 --- /dev/null +++ b/svx/inc/svx/xftshxy.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xftshxy.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFTSHXY_HXX +#define _SVX_XFTSHXY_HXX + +#include <svl/metitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* FormText-ShadowXValItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextShadowXValItem : public SfxMetricItem +{ +public: + TYPEINFO(); + XFormTextShadowXValItem(long nVal = 0); + XFormTextShadowXValItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; +}; + +/************************************************************************* +|* +|* FormText-ShadowYValItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextShadowYValItem : public SfxMetricItem +{ +public: + TYPEINFO(); + XFormTextShadowYValItem(long nVal = 0); + XFormTextShadowYValItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; +}; + +#endif + diff --git a/svx/inc/svx/xftstit.hxx b/svx/inc/svx/xftstit.hxx new file mode 100644 index 000000000000..dd9b14e1f75d --- /dev/null +++ b/svx/inc/svx/xftstit.hxx @@ -0,0 +1,53 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xftstit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XFTSTIT_HXX +#define _SVX_XFTSTIT_HXX + +#include <svl/metitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* FormText-StartPositionItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextStartItem : public SfxMetricItem +{ +public: + TYPEINFO(); + XFormTextStartItem(long nStart = 0); + XFormTextStartItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; +}; + +#endif diff --git a/svx/inc/svx/xgrad.hxx b/svx/inc/svx/xgrad.hxx new file mode 100644 index 000000000000..d5dc739000f1 --- /dev/null +++ b/svx/inc/svx/xgrad.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xgrad.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX__XGRADIENT_HXX +#define _SVX__XGRADIENT_HXX + +#include <svx/xenum.hxx> +#include <tools/color.hxx> +#include "svx/svxdllapi.h" + +//----------------- +// class XGradient +//----------------- + +class SVX_DLLPUBLIC XGradient +{ +protected: + XGradientStyle eStyle; + Color aStartColor; + Color aEndColor; + long nAngle; + USHORT nBorder; + USHORT nOfsX; + USHORT nOfsY; + USHORT nIntensStart; + USHORT nIntensEnd; + USHORT nStepCount; + +public: + XGradient(); + XGradient( const Color& rStart, const Color& rEnd, + XGradientStyle eStyle = XGRAD_LINEAR, long nAngle = 0, + USHORT nXOfs = 50, USHORT nYOfs = 50, USHORT nBorder = 0, + USHORT nStartIntens = 100, USHORT nEndIntens = 100, + USHORT nSteps = 0 ); + + bool operator==(const XGradient& rGradient) const; + + void SetGradientStyle(XGradientStyle eNewStyle) { eStyle = eNewStyle; } + void SetStartColor(const Color& rColor) { aStartColor = rColor; } + void SetEndColor(const Color& rColor) { aEndColor = rColor; } + void SetAngle(long nNewAngle) { nAngle = nNewAngle; } + void SetBorder(USHORT nNewBorder) { nBorder = nNewBorder; } + void SetXOffset(USHORT nNewOffset) { nOfsX = nNewOffset; } + void SetYOffset(USHORT nNewOffset) { nOfsY = nNewOffset; } + void SetStartIntens(USHORT nNewIntens) { nIntensStart = nNewIntens; } + void SetEndIntens(USHORT nNewIntens) { nIntensEnd = nNewIntens; } + void SetSteps(USHORT nSteps) { nStepCount = nSteps; } + + XGradientStyle GetGradientStyle() const { return eStyle; } + Color GetStartColor() const { return aStartColor; } + Color GetEndColor() const { return aEndColor; } + long GetAngle() const { return nAngle; } + USHORT GetBorder() const { return nBorder; } + USHORT GetXOffset() const { return nOfsX; } + USHORT GetYOffset() const { return nOfsY; } + USHORT GetStartIntens() const { return nIntensStart; } + USHORT GetEndIntens() const { return nIntensEnd; } + USHORT GetSteps() const { return nStepCount; } +}; + +#endif diff --git a/svx/inc/svx/xgrscit.hxx b/svx/inc/svx/xgrscit.hxx new file mode 100644 index 000000000000..3cf97e3c7ce0 --- /dev/null +++ b/svx/inc/svx/xgrscit.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xgrscit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XGRSCIT_HXX +#define _SVX_XGRSCIT_HXX + +#include <svl/intitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* GradientenSchritte-Item fuer Gradienten-Fuellungen +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XGradientStepCountItem: public SfxUInt16Item +{ +public: + TYPEINFO(); + XGradientStepCountItem( USHORT nStepCount = 0 ); + XGradientStepCountItem( SvStream& rIn ); + virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xhatch.hxx b/svx/inc/svx/xhatch.hxx new file mode 100644 index 000000000000..ba40d4514df8 --- /dev/null +++ b/svx/inc/svx/xhatch.hxx @@ -0,0 +1,68 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xhatch.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XHATCH_HXX +#define _SVX_XHATCH_HXX + +#include <svx/xenum.hxx> +#include <tools/color.hxx> +#include "svx/svxdllapi.h" + +//-------------- +// class XHatch +//-------------- + +class SVX_DLLPUBLIC XHatch +{ +protected: + XHatchStyle eStyle; + Color aColor; + long nDistance; + long nAngle; + +public: + XHatch() : eStyle(XHATCH_SINGLE), nDistance(0), nAngle(0) {} + XHatch(const Color& rCol, XHatchStyle eStyle = XHATCH_SINGLE, + long nDistance = 20, long nAngle = 0); + + bool operator==(const XHatch& rHatch) const; + + void SetHatchStyle(XHatchStyle eNewStyle) { eStyle = eNewStyle; } + void SetColor(const Color& rColor) { aColor = rColor; } + void SetDistance(long nNewDistance) { nDistance = nNewDistance; } + void SetAngle(long nNewAngle) { nAngle = nNewAngle; } + + XHatchStyle GetHatchStyle() const { return eStyle; } + Color GetColor() const { return aColor; } + long GetDistance() const { return nDistance; } + long GetAngle() const { return nAngle; } +}; + +#endif diff --git a/svx/inc/svx/xit.hxx b/svx/inc/svx/xit.hxx new file mode 100644 index 000000000000..b864cf0d20c0 --- /dev/null +++ b/svx/inc/svx/xit.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XIT_HXX +#define _SVX_XIT_HXX + +#include <svl/stritem.hxx> +#include <svx/xdef.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************/ + +class XColorTable; +class XDashTable; +class XLineEndTable; +class XHatchTable; +class XBitmapTable; +class XGradientTable; +class SfxItemPool; +class NameOrIndex; +class XPropertyList; + +typedef BOOL (*SvxCompareValueFunc)( const NameOrIndex* p1, const NameOrIndex* p2 ); + +//------------------- +// class NameOrIndex +//------------------- +class SVX_DLLPUBLIC NameOrIndex : public SfxStringItem +{ + INT32 nPalIndex; + +protected: + void Detach() { nPalIndex = -1; } + +public: + TYPEINFO(); + NameOrIndex() { nPalIndex = -1; } + NameOrIndex(USHORT nWhich, INT32 nIndex); + NameOrIndex(USHORT nWhich, + const String& rName= String()); + NameOrIndex(USHORT nWhich, SvStream& rIn); + NameOrIndex(const NameOrIndex& rNameOrIndex); + ~NameOrIndex() {}; + + virtual int operator==(const SfxPoolItem& rItem) const; + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual SvStream& Store(SvStream& rOut, USHORT nItemVersion ) const; + + String GetName() const { return GetValue(); } + void SetName(const String& rName) { SetValue(rName); } + INT32 GetIndex() const { return nPalIndex; } + void SetIndex(INT32 nIndex) { nPalIndex = nIndex; } + BOOL IsIndex() const { return (nPalIndex >= 0); } + + /** this static checks if the given NameOrIndex item has a unique name for its value. + The returned String is a unique name for an item with this value in both given pools. + Argument pPool2 can be null. + If returned string equals NameOrIndex->GetName(), the name was already unique. + */ + static String CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, const SfxItemPool* pPool2, SvxCompareValueFunc pCompareValueFunc, USHORT nPrefixResId, XPropertyList* pDefaults = NULL ); +}; + +#endif diff --git a/svx/inc/svx/xlineit.hxx b/svx/inc/svx/xlineit.hxx new file mode 100644 index 000000000000..46e8d34e32bc --- /dev/null +++ b/svx/inc/svx/xlineit.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlineit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLINIIT_HXX +#define _SVX_XLINIIT_HXX + +#include <svx/xit.hxx> +#include <svx/xcolit.hxx> +#include <svx/xpoly.hxx> +#include <svx/xenum.hxx> +#include <svl/metitem.hxx> +#include <svl/eitem.hxx> + +class XDash; +class XDashTable; +class SvStream; + +#include <svx/xdash.hxx> +#include <svx/xlndsit.hxx> +#include <svx/xlnwtit.hxx> +#include <svx/xlnclit.hxx> +#include <svx/xlnstit.hxx> +#include <svx/xlnedit.hxx> +#include <svx/xlnstwit.hxx> +#include <svx/xlnedwit.hxx> +#include <svx/xlnstcit.hxx> +#include <svx/xlnedcit.hxx> + +#endif + diff --git a/svx/inc/svx/xlineit0.hxx b/svx/inc/svx/xlineit0.hxx new file mode 100644 index 000000000000..41754785f0bf --- /dev/null +++ b/svx/inc/svx/xlineit0.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlineit0.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLINEIT0_HXX +#define _SVX_XLINEIT0_HXX + +#include <svx/xenum.hxx> +#include <svl/eitem.hxx> +//--------------------- +// class LineStyleItem +//--------------------- +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC XLineStyleItem : public SfxEnumItem +{ +public: + TYPEINFO(); + XLineStyleItem(XLineStyle = XLINE_SOLID); + XLineStyleItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + virtual USHORT GetValueCount() const; + XLineStyle GetValue() const { return (XLineStyle) SfxEnumItem::GetValue(); } +}; + +#endif + diff --git a/svx/inc/svx/xlinjoit.hxx b/svx/inc/svx/xlinjoit.hxx new file mode 100644 index 000000000000..97b4bb2ac276 --- /dev/null +++ b/svx/inc/svx/xlinjoit.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlinjoit.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLINJOIT_HXX +#define _SVX_XLINJOIT_HXX + +#include <svl/eitem.hxx> +#include <svx/xenum.hxx> +#include "svx/svxdllapi.h" + +//--------------------- +// class LineStyleItem +//--------------------- + +class SVX_DLLPUBLIC XLineJointItem : public SfxEnumItem +{ +public: + TYPEINFO(); + XLineJointItem( XLineJoint eLineJoint = XLINEJOINT_ROUND ); + XLineJointItem( SvStream& rIn ); + + virtual USHORT GetVersion( USHORT nFileFormatVersion ) const; + virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + virtual USHORT GetValueCount() const; + XLineJoint GetValue() const { return (XLineJoint) SfxEnumItem::GetValue(); } +}; + +#endif // _SVX_XLINJOIT_HXX diff --git a/svx/inc/svx/xlnasit.hxx b/svx/inc/svx/xlnasit.hxx new file mode 100644 index 000000000000..413de684537b --- /dev/null +++ b/svx/inc/svx/xlnasit.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlnasit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNASIT_HXX +#define _SVX_XLNASIT_HXX + + +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* SetItem mit dem ItemSet aller Linienattribute +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XLineAttrSetItem : public SfxSetItem +{ +public: + TYPEINFO(); + XLineAttrSetItem(SfxItemSet* pItemSet ); + XLineAttrSetItem(SfxItemPool* pItemPool); + XLineAttrSetItem(const XLineAttrSetItem& rAttr); + XLineAttrSetItem(const XLineAttrSetItem& rAttr, + SfxItemPool* pItemPool); + virtual SfxPoolItem* Clone( SfxItemPool* pToPool ) const; + virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVersion ) const; + virtual SvStream& Store( SvStream& rStream, USHORT nItemVersion ) const; +}; + +#endif diff --git a/svx/inc/svx/xlnclit.hxx b/svx/inc/svx/xlnclit.hxx new file mode 100644 index 000000000000..f3622b32ce90 --- /dev/null +++ b/svx/inc/svx/xlnclit.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlnclit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNCLIT_HXX +#define _SVX_XLNCLIT_HXX + +#include <svx/xcolit.hxx> +#include "svx/svxdllapi.h" + +//--------------------- +// class XLineColorItem +//--------------------- +class SVX_DLLPUBLIC XLineColorItem : public XColorItem +{ +public: + TYPEINFO(); + XLineColorItem() {} + XLineColorItem(INT32 nIndex, const Color& rTheColor); + XLineColorItem(const String& rName, const Color& rTheColor); + XLineColorItem(SvStream& rIn); + + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xlndsit.hxx b/svx/inc/svx/xlndsit.hxx new file mode 100644 index 000000000000..4315161b34eb --- /dev/null +++ b/svx/inc/svx/xlndsit.hxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlndsit.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNDSIT_HXX +#define _SVX_XLNDSIT_HXX + +#include <svx/xit.hxx> + +#ifndef _SVX_XLINIIT_HXX //autogen +#include <svx/xdash.hxx> +#endif +#include "svx/svxdllapi.h" + +class SdrModel; + +//-------------------- +// class XLineDashItem +//-------------------- +class SVX_DLLPUBLIC XLineDashItem : public NameOrIndex +{ + XDash aDash; + +public: + TYPEINFO(); + XLineDashItem() : NameOrIndex(XATTR_LINEDASH, -1) {} + XLineDashItem(INT32 nIndex, const XDash& rTheDash); + XLineDashItem(const String& rName, const XDash& rTheDash); + XLineDashItem(SfxItemPool* pPool, const XDash& rTheDash); + XLineDashItem(SfxItemPool* pPool ); + XLineDashItem(const XLineDashItem& rItem); + XLineDashItem(SvStream& rIn); + + virtual int operator==(const SfxPoolItem& rItem) const; + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual SvStream& Store(SvStream& rOut, USHORT nItemVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + virtual FASTBOOL HasMetrics() const; + virtual FASTBOOL ScaleMetrics(long nMul, long nDiv); + + const XDash& GetDashValue(const XDashTable* pTable = 0) const; // GetValue -> GetDashValue + void SetDashValue(const XDash& rNew) { aDash = rNew; Detach(); } // SetValue -> SetDashValue + + static BOOL CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); + XLineDashItem* checkForUniqueItem( SdrModel* pModel ) const; +}; + +#endif + diff --git a/svx/inc/svx/xlnedcit.hxx b/svx/inc/svx/xlnedcit.hxx new file mode 100644 index 000000000000..0adabb2862e5 --- /dev/null +++ b/svx/inc/svx/xlnedcit.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlnedcit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNEDCIT_HXX +#define _SVX_XLNEDCIT_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +//---------------------------- +// class XLineEndCenterItem +//---------------------------- +class SVX_DLLPUBLIC XLineEndCenterItem : public SfxBoolItem +{ +public: + TYPEINFO(); + XLineEndCenterItem(BOOL bEndCenter = FALSE); + XLineEndCenterItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xlnedit.hxx b/svx/inc/svx/xlnedit.hxx new file mode 100644 index 000000000000..46ef12ee2937 --- /dev/null +++ b/svx/inc/svx/xlnedit.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlnedit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNEDIT_HXX +#define _SVX_XLNEDIT_HXX + +#include <svx/xit.hxx> +#include "svx/svxdllapi.h" +#include <basegfx/polygon/b2dpolypolygon.hxx> + +class SdrModel; + +//---------------------- +// class XLineEndItem +//---------------------- +class SVX_DLLPUBLIC XLineEndItem : public NameOrIndex +{ + basegfx::B2DPolyPolygon maPolyPolygon; + +public: + TYPEINFO(); + XLineEndItem(INT32 nIndex = -1); + XLineEndItem(const String& rName, const basegfx::B2DPolyPolygon& rPolyPolygon); + XLineEndItem(SfxItemPool* pPool, const basegfx::B2DPolyPolygon& rPolyPolygon); + XLineEndItem(SfxItemPool* pPool ); + XLineEndItem(const XLineEndItem& rItem); + XLineEndItem(SvStream& rIn); + + virtual int operator==(const SfxPoolItem& rItem) const; + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual SvStream& Store(SvStream& rOut, USHORT nItemVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + basegfx::B2DPolyPolygon GetLineEndValue(const XLineEndTable* pTable = 0) const; + void SetLineEndValue(const basegfx::B2DPolyPolygon& rPolyPolygon) { maPolyPolygon = rPolyPolygon; Detach(); } + + XLineEndItem* checkForUniqueItem( SdrModel* pModel ) const; +}; + +#endif diff --git a/svx/inc/svx/xlnedwit.hxx b/svx/inc/svx/xlnedwit.hxx new file mode 100644 index 000000000000..13735ae5f7d6 --- /dev/null +++ b/svx/inc/svx/xlnedwit.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlnedwit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNEDWIT_HXX +#define _SVX_XLNEDWIT_HXX + +#include <svl/metitem.hxx> +#include "svx/svxdllapi.h" + +#define LINE_END_WIDTH_DEFAULT (200) + +//--------------------------- +// class XLineEndWidthItem +//--------------------------- + +class SVX_DLLPUBLIC XLineEndWidthItem : public SfxMetricItem +{ +public: + TYPEINFO(); + XLineEndWidthItem(long nWidth = LINE_END_WIDTH_DEFAULT); + XLineEndWidthItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif + diff --git a/svx/inc/svx/xlnstcit.hxx b/svx/inc/svx/xlnstcit.hxx new file mode 100644 index 000000000000..c7d65bf1f106 --- /dev/null +++ b/svx/inc/svx/xlnstcit.hxx @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlnstcit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNSTCIT_HXX +#define _SVX_XLNSTCIT_HXX + +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +//------------------------------ +// class XLineStartCenterItem +//------------------------------ +class SVX_DLLPUBLIC XLineStartCenterItem : public SfxBoolItem +{ +public: + TYPEINFO(); + XLineStartCenterItem(BOOL bStartCenter = FALSE); + XLineStartCenterItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif + diff --git a/svx/inc/svx/xlnstit.hxx b/svx/inc/svx/xlnstit.hxx new file mode 100644 index 000000000000..1d6af8690acd --- /dev/null +++ b/svx/inc/svx/xlnstit.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlnstit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNSTIT_HXX +#define _SVX_XLNSTIT_HXX + +#include <svx/xit.hxx> +#include "svx/svxdllapi.h" +#include <basegfx/polygon/b2dpolypolygon.hxx> + +class SdrModel; + +//------------------------ +// class XLineStartItem +//------------------------ +class SVX_DLLPUBLIC XLineStartItem : public NameOrIndex +{ + basegfx::B2DPolyPolygon maPolyPolygon; + +public: + TYPEINFO(); + XLineStartItem(INT32 nIndex = -1); + XLineStartItem(const String& rName, const basegfx::B2DPolyPolygon& rPolyPolygon); + XLineStartItem(SfxItemPool* pPool, const basegfx::B2DPolyPolygon& rPolyPolygon); + XLineStartItem(SfxItemPool* pPool ); + XLineStartItem(const XLineStartItem& rItem); + XLineStartItem(SvStream& rIn); + + virtual int operator==(const SfxPoolItem& rItem) const; + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual SvStream& Store(SvStream& rOut, USHORT nItemVersion ) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + basegfx::B2DPolyPolygon GetLineStartValue(const XLineEndTable* pTable = 0) const; + void SetLineStartValue(const basegfx::B2DPolyPolygon& rPolyPolygon) { maPolyPolygon = rPolyPolygon; Detach(); } + + XLineStartItem* checkForUniqueItem( SdrModel* pModel ) const; +}; + +#endif diff --git a/svx/inc/svx/xlnstwit.hxx b/svx/inc/svx/xlnstwit.hxx new file mode 100644 index 000000000000..a5899b7743cc --- /dev/null +++ b/svx/inc/svx/xlnstwit.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlnstwit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNSTWIT_HXX +#define _SVX_XLNSTWIT_HXX + +#include <svl/metitem.hxx> +#include "svx/svxdllapi.h" + +#define LINE_START_WIDTH_DEFAULT (200) + +//----------------------------- +// class XLineStartWidthItem +//----------------------------- +class SVX_DLLPUBLIC XLineStartWidthItem : public SfxMetricItem +{ +public: + TYPEINFO(); + XLineStartWidthItem(long nWidth = LINE_START_WIDTH_DEFAULT); + XLineStartWidthItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + +}; + +#endif diff --git a/svx/inc/svx/xlntrit.hxx b/svx/inc/svx/xlntrit.hxx new file mode 100644 index 000000000000..2590ea304e3b --- /dev/null +++ b/svx/inc/svx/xlntrit.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlntrit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNTRIT_HXX +#define _SVX_XLNTRIT_HXX + +#include <svl/intitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Transparenz-Item fuer Linien +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XLineTransparenceItem: public SfxUInt16Item +{ +public: + TYPEINFO(); + XLineTransparenceItem(USHORT nLineTransparence = 0); + XLineTransparenceItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xlnwtit.hxx b/svx/inc/svx/xlnwtit.hxx new file mode 100644 index 000000000000..11f832716a08 --- /dev/null +++ b/svx/inc/svx/xlnwtit.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xlnwtit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XLNWTIT_HXX +#define _SVX_XLNWTIT_HXX + +#include <svl/metitem.hxx> +#include "svx/svxdllapi.h" + +//--------------------- +// class XLineWidthItem +//--------------------- +class SVX_DLLPUBLIC XLineWidthItem : public SfxMetricItem +{ +public: + TYPEINFO(); + XLineWidthItem(long nWidth = 0); + XLineWidthItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; +}; + +#endif diff --git a/svx/inc/svx/xpoly.hxx b/svx/inc/svx/xpoly.hxx new file mode 100644 index 000000000000..4911e1545174 --- /dev/null +++ b/svx/inc/svx/xpoly.hxx @@ -0,0 +1,219 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xpoly.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _XPOLY_HXX +#define _XPOLY_HXX + +// include --------------------------------------------------------------- + +#include <tools/solar.h> +#include <basegfx/polygon/b2dpolypolygon.hxx> +#include "svx/svxdllapi.h" + +class Point; +class Rectangle; +class SvStream; +class Polygon; +class PolyPolygon; +class OutputDevice; + +/************************************************************************/ + +#define XPOLYPOLY_APPEND 0xFFFF +#define XPOLY_APPEND 0xFFFF + +#ifdef WIN // Windows 16 Bit +#define XPOLY_MAXPOINTS 8160 /* =0xFF00/sizeof(Point), also mit etwas Platz! */ +#else +#define XPOLY_MAXPOINTS 0xFFF0 /* Auch fuer die 32-Bitter etwas Luft lassen */ +#endif + +/************************************************************************/ +// Punktstile im XPolygon: +// NORMAL : Anfangs- oder Endpunkt einer Kurve oder Linie +// SMOOTH : Glatter Uebergang zwischen Kurven +// SYMMTR : glatter und symmetrischer Uebergang zwischen Kurven +// CONTROL: Kontrollpunkt einer Bezierkurve + +enum XPolyFlags { XPOLY_NORMAL, XPOLY_SMOOTH, XPOLY_CONTROL, XPOLY_SYMMTR }; + + +/************************************************************************* +|* +|* Klasse XPolygon; hat neben dem Point-Array noch ein Array mit Flags, +|* die Informationen ueber den jeweiligen Punkt enthalten +|* +\************************************************************************/ + +class ImpXPolygon; + +class SVX_DLLPUBLIC XPolygon +{ +protected: + ImpXPolygon* pImpXPolygon; + + // ImpXPolygon-ReferenceCount pruefen und ggf. abkoppeln + void CheckReference(); + + // Hilfsfunktionen fuer Bezierkonvertierung + void SubdivideBezier(USHORT nPos, BOOL bCalcFirst, double fT); + void GenBezArc(const Point& rCenter, long nRx, long nRy, + long nXHdl, long nYHdl, USHORT nStart, USHORT nEnd, + USHORT nQuad, USHORT nFirst); + BOOL CheckAngles(USHORT& nStart, USHORT nEnd, USHORT& nA1, USHORT& nA2); + +public: + XPolygon( USHORT nSize=16, USHORT nResize=16 ); + XPolygon( const XPolygon& rXPoly ); + XPolygon( const Polygon& rPoly ); + XPolygon( const Rectangle& rRect, long nRx = 0, long nRy = 0 ); + XPolygon( const Point& rCenter, long nRx, long nRy, + USHORT nStartAngle = 0, USHORT nEndAngle = 3600, + BOOL bClose = TRUE ); + + ~XPolygon(); + + void SetSize( USHORT nSize ); + USHORT GetSize() const; + + void SetPointCount( USHORT nPoints ); + USHORT GetPointCount() const; + + void Insert( USHORT nPos, const Point& rPt, XPolyFlags eFlags ); + void Insert( USHORT nPos, const XPolygon& rXPoly ); + void Insert( USHORT nPos, const Polygon& rPoly ); + void Remove( USHORT nPos, USHORT nCount ); + void Move( long nHorzMove, long nVertMove ); + Rectangle GetBoundRect() const; + + const Point& operator[]( USHORT nPos ) const; + Point& operator[]( USHORT nPos ); + XPolygon& operator=( const XPolygon& rXPoly ); + BOOL operator==( const XPolygon& rXPoly ) const; + BOOL operator!=( const XPolygon& rXPoly ) const; + + XPolyFlags GetFlags( USHORT nPos ) const; + void SetFlags( USHORT nPos, XPolyFlags eFlags ); + BOOL IsControl(USHORT nPos) const; + BOOL IsSmooth(USHORT nPos) const; + + // Abstand zwischen zwei Punkten + double CalcDistance(USHORT nP1, USHORT nP2); + + // Bezierkonvertierungen + void CalcSmoothJoin(USHORT nCenter, USHORT nDrag, USHORT nPnt); + void CalcTangent(USHORT nCenter, USHORT nPrev, USHORT nNext); + void PointsToBezier(USHORT nFirst); + + // Transformationen + void Translate(const Point& rTrans); + void Rotate(const Point& rCenter, double fSin, double fCos); + void Rotate(const Point& rCenter, USHORT nAngle); + void Scale(double fSx, double fSy); + void SlantX(long nYRef, double fSin, double fCos); + void SlantY(long nXRef, double fSin, double fCos); + void Distort(const Rectangle& rRefRect, const XPolygon& rDistortedRect); + void Rotate20 (); + + // #116512# convert to basegfx::B2DPolygon and return + basegfx::B2DPolygon getB2DPolygon() const; + + // #116512# constructor to convert from basegfx::B2DPolygon + // #i76339# made explicit + explicit XPolygon(const basegfx::B2DPolygon& rPolygon); +}; + +/************************************************************************* +|* +|* Klasse XPolyPolygon; wie PolyPolygon, nur statt aus Polygonen aus +|* XPolygonen bestehend +|* +\************************************************************************/ + +class ImpXPolyPolygon; + +class SVX_DLLPUBLIC XPolyPolygon +{ +protected: + ImpXPolyPolygon* pImpXPolyPolygon; + + // ImpXPolyPolygon-ReferenceCount pruefen und ggf. abkoppeln + void CheckReference(); + +public: + XPolyPolygon( USHORT nInitSize = 16, USHORT nResize = 16 ); + XPolyPolygon( const XPolygon& rXPoly ); + XPolyPolygon( const XPolyPolygon& rXPolyPoly ); + XPolyPolygon( const PolyPolygon& rPolyPoly); + + ~XPolyPolygon(); + + void Insert( const XPolygon& rXPoly, + USHORT nPos = XPOLYPOLY_APPEND ); + void Insert( const XPolyPolygon& rXPoly, + USHORT nPos=XPOLYPOLY_APPEND ); + XPolygon Remove( USHORT nPos ); + XPolygon Replace( const XPolygon& rXPoly, USHORT nPos ); + const XPolygon& GetObject( USHORT nPos ) const; + + void Clear(); + USHORT Count() const; + + void Move( long nHorzMove, long nVertMove ); + Rectangle GetBoundRect() const; + + const XPolygon& operator[]( USHORT nPos ) const + { return GetObject( nPos ); } + XPolygon& operator[]( USHORT nPos ); + + XPolyPolygon& operator=( const XPolyPolygon& rXPolyPoly ); + BOOL operator==( const XPolyPolygon& rXPolyPoly ) const; + BOOL operator!=( const XPolyPolygon& rXPolyPoly ) const; + + // Transformationen + void Translate(const Point& rTrans); + void Rotate(const Point& rCenter, double fSin, double fCos); + void Rotate(const Point& rCenter, USHORT nAngle); + void Scale(double fSx, double fSy); + void SlantX(long nYRef, double fSin, double fCos); + void SlantY(long nXRef, double fSin, double fCos); + void Distort(const Rectangle& rRefRect, const XPolygon& rDistortedRect); + void Rotate20 (); + + // #116512# convert to basegfx::B2DPolyPolygon and return + basegfx::B2DPolyPolygon getB2DPolyPolygon() const; + + // #116512# constructor to convert from basegfx::B2DPolyPolygon + // #i76339# made explicit + explicit XPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon); +}; + +#endif // _XPOLY_HXX + +// eof diff --git a/svx/inc/svx/xpool.hxx b/svx/inc/svx/xpool.hxx new file mode 100644 index 000000000000..10fb329b6216 --- /dev/null +++ b/svx/inc/svx/xpool.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xpool.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _XPOOL_HXX +#define _XPOOL_HXX + +#include <svl/itempool.hxx> +#include <svx/xdef.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Klassendeklaration +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XOutdevItemPool : public SfxItemPool +{ +protected: + SfxPoolItem** mppLocalPoolDefaults; + SfxItemInfo* mpLocalItemInfos; + +public: + XOutdevItemPool( + SfxItemPool* pMaster = 0L, + sal_uInt16 nAttrStart = XATTR_START, + sal_uInt16 nAttrEnd = XATTR_END, + sal_Bool bLoadRefCounts = sal_True); + XOutdevItemPool(const XOutdevItemPool& rPool); + + virtual SfxItemPool* Clone() const; +protected: + virtual ~XOutdevItemPool(); +}; + +#endif // _XPOOL_HXX diff --git a/svx/inc/svx/xsetit.hxx b/svx/inc/svx/xsetit.hxx new file mode 100644 index 000000000000..02dc65747540 --- /dev/null +++ b/svx/inc/svx/xsetit.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xsetit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XSETITEM_HXX +#define _SVX_XSETITEM_HXX + +#ifndef _XATTR_HXX +#include <svx/xit.hxx> +#endif +#include <svl/metitem.hxx> +#include <svl/eitem.hxx> +#include <svx/rectenum.hxx> + +#include <svx/xlnasit.hxx> +#include <svx/xflasit.hxx> +#include <svx/xlntrit.hxx> +#include <svx/xfltrit.hxx> +#include <svx/xftshtit.hxx> +#include <svx/xgrscit.hxx> +#include <svx/xflbmtit.hxx> +#include <svx/xflbmpit.hxx> +#include <svx/xflbmsxy.hxx> +#include <svx/xflbmsli.hxx> +#include <svx/xflbtoxy.hxx> +#include <svx/xflbstit.hxx> +#include <svx/xflboxy.hxx> +#include <svx/xflbckit.hxx> + +#endif diff --git a/svx/inc/svx/xsflclit.hxx b/svx/inc/svx/xsflclit.hxx new file mode 100644 index 000000000000..802d247180a8 --- /dev/null +++ b/svx/inc/svx/xsflclit.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xsflclit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XSFLCLIT_HXX +#define _SVX_XSFLCLIT_HXX + +#include <svx/xcolit.hxx> + +//------------------------------ +// class XSecondaryFillColorItem +//------------------------------ +class SVX_DLLPUBLIC XSecondaryFillColorItem : public XColorItem +{ +public: + TYPEINFO(); + SVX_DLLPRIVATE XSecondaryFillColorItem() {} + SVX_DLLPRIVATE XSecondaryFillColorItem(INT32 nIndex, const Color& rTheColor); + XSecondaryFillColorItem(const String& rName, const Color& rTheColor); + SVX_DLLPRIVATE XSecondaryFillColorItem(SvStream& rIn); + + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + SVX_DLLPRIVATE virtual USHORT GetVersion( USHORT nFileFormatVersion ) const; + +}; + +#endif + diff --git a/svx/inc/svx/xtable.hxx b/svx/inc/svx/xtable.hxx new file mode 100644 index 000000000000..885cdab72a16 --- /dev/null +++ b/svx/inc/svx/xtable.hxx @@ -0,0 +1,656 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xtable.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _XTABLE_HXX +#define _XTABLE_HXX + +// include --------------------------------------------------------------- + +#include <svx/xpoly.hxx> +#include <svx/xdash.hxx> +#include <svx/xhatch.hxx> +#include <svx/xgrad.hxx> +#include <svx/xbitmap.hxx> +#include <svx/xflasit.hxx> +#include <svx/xlnasit.hxx> + +#ifndef _SV_COLOR_HXX +#include <tools/color.hxx> +#endif +#include <tools/string.hxx> + +#ifndef _TABLE_HXX //autogen +#include <tools/table.hxx> +#endif +#include "svx/svxdllapi.h" +#include <basegfx/polygon/b2dpolypolygon.hxx> + +class Color; +class Bitmap; +class VirtualDevice; +class XOutdevItemPool; + +// Breite und Hoehe der LB-Bitmaps +#define BITMAP_WIDTH 32 +#define BITMAP_HEIGHT 12 + +// Standard-Vergleichsstring +extern sal_Unicode __FAR_DATA pszStandard[]; // "standard" + +// Funktion zum Konvertieren in echte RGB-Farben, da mit +// enum COL_NAME nicht verglichen werden kann. +SVX_DLLPUBLIC Color RGB_Color( ColorData nColorName ); + +// --------------------- +// class XPropertyEntry +// --------------------- + +class XPropertyEntry +{ +protected: + String aName; + + XPropertyEntry(const String& rName) : aName(rName) {} + XPropertyEntry(const XPropertyEntry& rOther): aName(rOther.aName) {} +public: + + virtual ~XPropertyEntry() {} + void SetName(const String& rName) { aName = rName; } + String& GetName() { return aName; } +}; + +// ------------------ +// class XColorEntry +// ------------------ + +class XColorEntry : public XPropertyEntry +{ + Color aColor; + +public: + XColorEntry(const Color& rColor, const String& rName) : + XPropertyEntry(rName), aColor(rColor) {} + XColorEntry(const XColorEntry& rOther) : + XPropertyEntry(rOther), aColor(rOther.aColor) {} + + void SetColor(const Color& rColor) { aColor = rColor; } + Color& GetColor() { return aColor; } +}; + +// -------------------- +// class XLineEndEntry +// -------------------- + +class XLineEndEntry : public XPropertyEntry +{ + basegfx::B2DPolyPolygon aB2DPolyPolygon; + +public: + XLineEndEntry(const basegfx::B2DPolyPolygon& rB2DPolyPolygon, const String& rName) + : XPropertyEntry(rName), + aB2DPolyPolygon(rB2DPolyPolygon) + {} + + XLineEndEntry(const XLineEndEntry& rOther) + : XPropertyEntry(rOther), + aB2DPolyPolygon(rOther.aB2DPolyPolygon) + {} + + void SetLineEnd(const basegfx::B2DPolyPolygon& rB2DPolyPolygon) + { + aB2DPolyPolygon = rB2DPolyPolygon; + } + + basegfx::B2DPolyPolygon& GetLineEnd() + { + return aB2DPolyPolygon; + } +}; + +// ------------------ +// class XDashEntry +// ------------------ + +class XDashEntry : public XPropertyEntry +{ + XDash aDash; + +public: + XDashEntry(const XDash& rDash, const String& rName) : + XPropertyEntry(rName), aDash(rDash) {} + XDashEntry(const XDashEntry& rOther) : + XPropertyEntry(rOther), aDash(rOther.aDash) {} + + void SetDash(const XDash& rDash) { aDash = rDash; } + XDash& GetDash() { return aDash; } +}; + +// ------------------ +// class XHatchEntry +// ------------------ + +class XHatchEntry : public XPropertyEntry +{ + XHatch aHatch; + +public: + XHatchEntry(const XHatch& rHatch, const String& rName) : + XPropertyEntry(rName), aHatch(rHatch) {} + XHatchEntry(const XHatchEntry& rOther) : + XPropertyEntry(rOther), aHatch(rOther.aHatch) {} + + void SetHatch(const XHatch& rHatch) { aHatch = rHatch; } + XHatch& GetHatch() { return aHatch; } +}; + +// --------------------- +// class XGradientEntry +// --------------------- + +class XGradientEntry : public XPropertyEntry +{ + XGradient aGradient; + +public: + XGradientEntry(const XGradient& rGradient, const String& rName): + XPropertyEntry(rName), aGradient(rGradient) {} + XGradientEntry(const XGradientEntry& rOther) : + XPropertyEntry(rOther), aGradient(rOther.aGradient) {} + + void SetGradient(const XGradient& rGrad) { aGradient = rGrad; } + XGradient& GetGradient() { return aGradient; } +}; + +// --------------------- +// class XBitmapEntry +// --------------------- + +class XBitmapEntry : public XPropertyEntry +{ + XOBitmap aXOBitmap; + +public: + XBitmapEntry( const XOBitmap& rXOBitmap, const String& rName ): + XPropertyEntry( rName ), aXOBitmap( rXOBitmap ) {} + XBitmapEntry( const XBitmapEntry& rOther ) : + XPropertyEntry( rOther ), aXOBitmap( rOther.aXOBitmap ) {} + + void SetXBitmap(const XOBitmap& rXOBitmap) { aXOBitmap = rXOBitmap; } + XOBitmap& GetXBitmap() { return aXOBitmap; } +}; + +// --------------------- +// class XPropertyTable +// --------------------- + +class SVX_DLLPUBLIC XPropertyTable +{ +protected: + String aName; // nicht persistent ! + String aPath; + XOutdevItemPool* pXPool; + + Table aTable; + Table* pBmpTable; + + BOOL bTableDirty; + BOOL bBitmapsDirty; + BOOL bOwnPool; + + XPropertyTable( const String& rPath, + XOutdevItemPool* pXPool = NULL, + USHORT nInitSize = 16, + USHORT nReSize = 16 ); + XPropertyTable( SvStream& rIn ); + void Clear(); + +public: + virtual ~XPropertyTable(); + + long Count() const; + + BOOL Insert(long nIndex, XPropertyEntry* pEntry); + XPropertyEntry* Replace(long nIndex, XPropertyEntry* pEntry); + XPropertyEntry* Remove(long nIndex, USHORT nDummy); + XPropertyEntry* Get( long nIndex, USHORT nDummy ) const; + + long Get(const String& rName); + Bitmap* GetBitmap( long nIndex ) const; + + const String& GetName() const { return aName; } + void SetName( const String& rString ); + const String& GetPath() const { return aPath; } + void SetPath( const String& rString ) { aPath = rString; } + BOOL IsDirty() const { return bTableDirty && bBitmapsDirty; } + void SetDirty( BOOL bDirty = TRUE ) + { bTableDirty = bDirty; bBitmapsDirty = bDirty; } + + virtual BOOL Load() = 0; + virtual BOOL Save() = 0; + virtual BOOL Create() = 0; + virtual BOOL CreateBitmapsForUI() = 0; + virtual Bitmap* CreateBitmapForUI( long nIndex, BOOL bDelete = TRUE ) = 0; +}; + +// -------------------- +// class XPropertyList +// -------------------- + +class SVX_DLLPUBLIC XPropertyList +{ +protected: + String aName; // nicht persistent ! + String aPath; + XOutdevItemPool* pXPool; + + List aList; + List* pBmpList; + + BOOL bListDirty; + BOOL bBitmapsDirty; + BOOL bOwnPool; + + XPropertyList( const String& rPath, + XOutdevItemPool* pXPool = NULL, + USHORT nInitSize = 16, + USHORT nReSize = 16 ); + XPropertyList( SvStream& rIn ); + void Clear(); + +public: + virtual ~XPropertyList(); + + long Count() const; + + void Insert( XPropertyEntry* pEntry, long nIndex = LIST_APPEND ); + XPropertyEntry* Replace( XPropertyEntry* pEntry, long nIndex ); + XPropertyEntry* Remove( long nIndex, USHORT nDummy ); + XPropertyEntry* Get( long nIndex, USHORT nDummy ) const; + + long Get(const String& rName); + Bitmap* GetBitmap( long nIndex ) const; + + const String& GetName() const { return aName; } + void SetName( const String& rString ); + const String& GetPath() const { return aPath; } + void SetPath( const String& rString ) { aPath = rString; } + BOOL IsDirty() const { return bListDirty && bBitmapsDirty; } + void SetDirty( BOOL bDirty = TRUE ) + { bListDirty = bDirty; bBitmapsDirty = bDirty; } + + virtual BOOL Load() = 0; + virtual BOOL Save() = 0; + virtual BOOL Create() = 0; + virtual BOOL CreateBitmapsForUI() = 0; + virtual Bitmap* CreateBitmapForUI( long nIndex, BOOL bDelete = TRUE ) = 0; +}; + +// ------------------ +// class XColorTable +// ------------------ + +class SVX_DLLPUBLIC XColorTable : public XPropertyTable +{ +public: + XColorTable( const String& rPath, + XOutdevItemPool* pXPool = NULL, + USHORT nInitSize = 16, + USHORT nReSize = 16 ); + virtual ~XColorTable(); + + using XPropertyTable::Replace; + XColorEntry* Replace(long nIndex, XColorEntry* pEntry ); + using XPropertyTable::Remove; + XColorEntry* Remove(long nIndex); + using XPropertyTable::Get; + XColorEntry* GetColor(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI( long nIndex, BOOL bDelete = TRUE ); + + static XColorTable* GetStdColorTable(); +}; + +// ------------------- +// class XColorList +// ------------------- + +class XColorList : public XPropertyList +{ +public: + XColorList( const String& rPath, + XOutdevItemPool* pXPool = NULL, + USHORT nInitSize = 16, + USHORT nReSize = 16 ); + virtual ~XColorList(); + + using XPropertyList::Replace; + XColorEntry* Replace(XColorEntry* pEntry, long nIndex ); + using XPropertyList::Remove; + XColorEntry* Remove(long nIndex); + using XPropertyList::Get; + XColorEntry* GetColor(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI( long nIndex, BOOL bDelete = TRUE ); +}; + +// -------------------- +// class XLineEndTable +// -------------------- + +class XLineEndTable : public XPropertyTable +{ +public: + XLineEndTable( const String& rPath, + XOutdevItemPool* pXPool = NULL, + USHORT nInitSize = 16, + USHORT nReSize = 16 ); + virtual ~XLineEndTable(); + + using XPropertyTable::Replace; + XLineEndEntry* Replace(long nIndex, XLineEndEntry* pEntry ); + using XPropertyTable::Remove; + XLineEndEntry* Remove(long nIndex); + using XPropertyTable::Get; + XLineEndEntry* GetLineEnd(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI( long nIndex, BOOL bDelete = TRUE ); +}; + +// ------------------- +// class XLineEndList +// ------------------- +class impXLineEndList; + +class SVX_DLLPUBLIC XLineEndList : public XPropertyList +{ +private: + impXLineEndList* mpData; + + void impCreate(); + void impDestroy(); + +public: + XLineEndList(const String& rPath, XOutdevItemPool* pXPool = 0, sal_uInt16 nInitSize = 16, sal_uInt16 nReSize = 16); + virtual ~XLineEndList(); + + using XPropertyList::Replace; + XLineEndEntry* Replace(XLineEndEntry* pEntry, long nIndex); + using XPropertyList::Remove; + XLineEndEntry* Remove(long nIndex); + using XPropertyList::Get; + XLineEndEntry* GetLineEnd(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI(long nIndex, BOOL bDelete = TRUE); +}; + +// -------------------- +// class XDashTable +// -------------------- + +class XDashTable : public XPropertyTable +{ +public: + XDashTable( const String& rPath, + XOutdevItemPool* pXPool = NULL, + USHORT nInitSize = 16, + USHORT nReSize = 16 ); + virtual ~XDashTable(); + + using XPropertyTable::Replace; + XDashEntry* Replace(long nIndex, XDashEntry* pEntry ); + using XPropertyTable::Remove; + XDashEntry* Remove(long nIndex); + using XPropertyTable::Get; + XDashEntry* GetDash(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI( long nIndex, BOOL bDelete = TRUE ); +}; + +// ------------------- +// class XDashList +// ------------------- +class impXDashList; + +class SVX_DLLPUBLIC XDashList : public XPropertyList +{ +private: + impXDashList* mpData; + + void impCreate(); + void impDestroy(); + +public: + XDashList(const String& rPath, XOutdevItemPool* pXPool = 0, sal_uInt16 nInitSize = 16, sal_uInt16 nReSize = 16); + virtual ~XDashList(); + + using XPropertyList::Replace; + XDashEntry* Replace(XDashEntry* pEntry, long nIndex); + using XPropertyList::Remove; + XDashEntry* Remove(long nIndex); + using XPropertyList::Get; + XDashEntry* GetDash(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI(long nIndex, BOOL bDelete = TRUE); +}; + +// -------------------- +// class XHatchTable +// -------------------- + +class XHatchTable : public XPropertyTable +{ +public: + XHatchTable( const String& rPath, + XOutdevItemPool* pXPool = NULL, + USHORT nInitSize = 16, + USHORT nReSize = 16 ); + virtual ~XHatchTable(); + + using XPropertyTable::Replace; + XHatchEntry* Replace(long nIndex, XHatchEntry* pEntry ); + using XPropertyTable::Remove; + XHatchEntry* Remove(long nIndex); + using XPropertyTable::Get; + XHatchEntry* GetHatch(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI( long nIndex, BOOL bDelete = TRUE ); +}; + +// ------------------- +// class XHatchList +// ------------------- +class impXHatchList; + +class SVX_DLLPUBLIC XHatchList : public XPropertyList +{ +private: + impXHatchList* mpData; + + void impCreate(); + void impDestroy(); + +public: + XHatchList(const String& rPath, XOutdevItemPool* pXPool = 0, sal_uInt16 nInitSize = 16, sal_uInt16 nReSize = 16); + ~XHatchList(); + + using XPropertyList::Replace; + XHatchEntry* Replace(XHatchEntry* pEntry, long nIndex); + using XPropertyList::Remove; + XHatchEntry* Remove(long nIndex); + using XPropertyList::Get; + XHatchEntry* GetHatch(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI(long nIndex, BOOL bDelete = TRUE); +}; + +// --------------------- +// class XGradientTable +// --------------------- + +class XGradientTable : public XPropertyTable +{ +public: + XGradientTable( const String& rPath, + XOutdevItemPool* pXPool = NULL, + USHORT nInitSize = 16, + USHORT nReSize = 16 ); + virtual ~XGradientTable(); + + using XPropertyTable::Replace; + XGradientEntry* Replace(long nIndex, XGradientEntry* pEntry ); + using XPropertyTable::Remove; + XGradientEntry* Remove(long nIndex); + using XPropertyTable::Get; + XGradientEntry* GetGradient(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI( long nIndex, BOOL bDelete = TRUE ); +}; + +// ------------------- +// class XGradientList +// ------------------- +class impXGradientList; + +class SVX_DLLPUBLIC XGradientList : public XPropertyList +{ +private: + impXGradientList* mpData; + + void impCreate(); + void impDestroy(); + +public: + XGradientList(const String& rPath, XOutdevItemPool* pXPool = 0, sal_uInt16 nInitSize = 16, sal_uInt16 nReSize = 16); + virtual ~XGradientList(); + + using XPropertyList::Replace; + XGradientEntry* Replace(XGradientEntry* pEntry, long nIndex); + using XPropertyList::Remove; + XGradientEntry* Remove(long nIndex); + using XPropertyList::Get; + XGradientEntry* GetGradient(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI(long nIndex, BOOL bDelete = TRUE); +}; + +// --------------------- +// class XBitmapTable +// --------------------- + +class XBitmapTable : public XPropertyTable +{ +public: + XBitmapTable( const String& rPath, + XOutdevItemPool* pXPool = NULL, + USHORT nInitSize = 16, + USHORT nReSize = 16 ); + virtual ~XBitmapTable(); + + using XPropertyTable::Replace; + XBitmapEntry* Replace(long nIndex, XBitmapEntry* pEntry ); + using XPropertyTable::Remove; + XBitmapEntry* Remove(long nIndex); + using XPropertyTable::Get; + XBitmapEntry* GetBitmap(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI( long nIndex, BOOL bDelete = TRUE ); +}; + +// ------------------- +// class XBitmapList +// ------------------- + +class SVX_DLLPUBLIC XBitmapList : public XPropertyList +{ +public: + XBitmapList( const String& rPath, + XOutdevItemPool* pXPool = NULL, + USHORT nInitSize = 16, + USHORT nReSize = 16 ); + virtual ~XBitmapList(); + + using XPropertyList::Replace; + XBitmapEntry* Replace(XBitmapEntry* pEntry, long nIndex ); + using XPropertyList::Remove; + XBitmapEntry* Remove(long nIndex); + using XPropertyList::Get; + XBitmapEntry* GetBitmap(long nIndex) const; + + virtual BOOL Load(); + virtual BOOL Save(); + virtual BOOL Create(); + virtual BOOL CreateBitmapsForUI(); + virtual Bitmap* CreateBitmapForUI( long nIndex, BOOL bDelete = TRUE ); +}; + +#endif // _XTABLE_HXX diff --git a/svx/inc/svx/xtextit.hxx b/svx/inc/svx/xtextit.hxx new file mode 100644 index 000000000000..3cc0fbccc152 --- /dev/null +++ b/svx/inc/svx/xtextit.hxx @@ -0,0 +1,51 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xtextit.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XTEXTITEM_HXX +#define _SVX_XTEXTITEM_HXX + +#include <svx/xenum.hxx> +#include <svl/metitem.hxx> +#include <svl/eitem.hxx> +#include <svx/xit.hxx> +#include <svx/xcolit.hxx> + +#include <svx/xftadit.hxx> +#include <svx/xftdiit.hxx> +#include <svx/xftstit.hxx> +#include <svx/xftmrit.hxx> +#include <svx/xftouit.hxx> +#include <svx/xftshit.hxx> +#include <svx/xftshcit.hxx> +#include <svx/xftshxy.hxx> +#include <svx/xftsfit.hxx> + +#endif + diff --git a/svx/inc/svx/xtextit0.hxx b/svx/inc/svx/xtextit0.hxx new file mode 100644 index 000000000000..3edf5114e8f9 --- /dev/null +++ b/svx/inc/svx/xtextit0.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xtextit0.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_TEXTIT0_HXX +#define _SVX_TEXTIT0_HXX + +#include <svx/xenum.hxx> +#include <svl/eitem.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* FormText-StyleItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextStyleItem : public SfxEnumItem +{ +public: + TYPEINFO(); + XFormTextStyleItem(XFormTextStyle = XFT_NONE); + XFormTextStyleItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + virtual USHORT GetValueCount() const; + XFormTextStyle GetValue() const { return (XFormTextStyle) SfxEnumItem::GetValue(); } + // #FontWork# + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +/************************************************************************* +|* +|* FormText-HideFormItem +|* +\************************************************************************/ + +class SVX_DLLPUBLIC XFormTextHideFormItem : public SfxBoolItem +{ +public: + TYPEINFO(); + XFormTextHideFormItem(BOOL bHide = FALSE); + XFormTextHideFormItem(SvStream& rIn); + virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; +}; + +#endif diff --git a/svx/inc/svx/zoomitem.hxx b/svx/inc/svx/zoomitem.hxx new file mode 100644 index 000000000000..75aafc540ee3 --- /dev/null +++ b/svx/inc/svx/zoomitem.hxx @@ -0,0 +1,94 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: zoomitem.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ZOOMITEM_HXX +#define _SVX_ZOOMITEM_HXX + +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include "svx/svxdllapi.h" + +//------------------------------------------------------------------------- + +enum SvxZoomType +{ + SVX_ZOOM_PERCENT, // GetValue() ist kein besonderer prozentualer Wert + SVX_ZOOM_OPTIMAL, // GetValue() entspricht der optimalen Gr"o\se + SVX_ZOOM_WHOLEPAGE, // GetValue() entspricht der ganzen Seite + SVX_ZOOM_PAGEWIDTH, // GetValue() entspricht der Seitenbreite + SVX_ZOOM_PAGEWIDTH_NOBORDER // GetValue() pagewidth without border +}; + +//------------------------------------------------------------------------- + +class SVX_DLLPUBLIC SvxZoomItem: public SfxUInt16Item +{ + USHORT nValueSet; // erlaubte Werte (siehe #defines unten) + SvxZoomType eType; + +public: + TYPEINFO(); + + SvxZoomItem( SvxZoomType eZoomType = SVX_ZOOM_PERCENT, + USHORT nVal = 0, USHORT nWhich = SID_ATTR_ZOOM ); + SvxZoomItem( const SvxZoomItem& ); + ~SvxZoomItem(); + + void SetValueSet( USHORT nValues ) { nValueSet = nValues; } + USHORT GetValueSet() const { return nValueSet; } + FASTBOOL IsValueAllowed( USHORT nValue ) const + { return nValue == ( nValue & nValueSet ); } + + SvxZoomType GetType() const { return eType; } + void SetType( SvxZoomType eNewType ) + { eType = eNewType; } + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStrm, USHORT nVersion ) const; + virtual SvStream& Store( SvStream& rStrm , USHORT nItemVersion ) const; + virtual int operator==( const SfxPoolItem& ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; + +//------------------------------------------------------------------------ + +#define SVX_ZOOM_ENABLE_50 0x0001 +#define SVX_ZOOM_ENABLE_75 0x0002 +#define SVX_ZOOM_ENABLE_100 0x0004 +#define SVX_ZOOM_ENABLE_150 0x0008 +#define SVX_ZOOM_ENABLE_200 0x0010 +#define SVX_ZOOM_ENABLE_OPTIMAL 0x1000 +#define SVX_ZOOM_ENABLE_WHOLEPAGE 0x2000 +#define SVX_ZOOM_ENABLE_PAGEWIDTH 0x4000 +#define SVX_ZOOM_ENABLE_ALL 0x701F + +#endif diff --git a/svx/inc/svx/zoomsliderctrl.hxx b/svx/inc/svx/zoomsliderctrl.hxx new file mode 100644 index 000000000000..d7406bd0a4e0 --- /dev/null +++ b/svx/inc/svx/zoomsliderctrl.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: zoomsliderctrl.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _ZOOMSLIDER_STBCONTRL_HXX +#define _ZOOMSLIDER_STBCONTRL_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/stbitem.hxx> +#include "svx/svxdllapi.h" + +// class SvxZoomSliderControl ---------------------------------------- + +class SVX_DLLPUBLIC SvxZoomSliderControl : public SfxStatusBarControl +{ +private: + + struct SvxZoomSliderControl_Impl; + SvxZoomSliderControl_Impl* mpImpl; + + USHORT Offset2Zoom( long nOffset ) const; + long Zoom2Offset( USHORT nZoom ) const; + +public: + + SFX_DECL_STATUSBAR_CONTROL(); + + SvxZoomSliderControl( USHORT _nSlotId, USHORT _nId, StatusBar& _rStb ); + ~SvxZoomSliderControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void Paint( const UserDrawEvent& rEvt ); + virtual BOOL MouseButtonDown( const MouseEvent & ); + virtual BOOL MouseMove( const MouseEvent & rEvt ); +}; + +#endif + diff --git a/svx/inc/svx/zoomslideritem.hxx b/svx/inc/svx/zoomslideritem.hxx new file mode 100644 index 000000000000..c58cd255ae8d --- /dev/null +++ b/svx/inc/svx/zoomslideritem.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: zoomslideritem.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ZOOMSLIDERITEM_HXX +#define _SVX_ZOOMSLIDERITEM_HXX + +#include <svl/intitem.hxx> +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif +#include <com/sun/star/uno/Sequence.hxx> +#include "svx/svxdllapi.h" + +//------------------------------------------------------------------------- + +class SVX_DLLPUBLIC SvxZoomSliderItem: public SfxUInt16Item +{ + com::sun::star::uno::Sequence < sal_Int32 > maValues; + USHORT mnMinZoom; + USHORT mnMaxZoom; + +public: + TYPEINFO(); + + SvxZoomSliderItem( USHORT nCurrentZoom = 100, USHORT nMinZoom = 20, USHORT nMaxZoom = 600, USHORT nWhich = SID_ATTR_ZOOMSLIDER ); + SvxZoomSliderItem( const SvxZoomSliderItem& ); + ~SvxZoomSliderItem(); + + void AddSnappingPoint( sal_Int32 nNew ); + const com::sun::star::uno::Sequence < sal_Int32 >& GetSnappingPoints() const; + USHORT GetMinZoom() const {return mnMinZoom;} + USHORT GetMaxZoom() const {return mnMaxZoom;} + + // "pure virtual Methoden" vom SfxPoolItem + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStrm, USHORT nVersion ) const; // leer + virtual SvStream& Store( SvStream& rStrm , USHORT nItemVersion ) const; // leer + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; // leer + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); // leer +}; + +//------------------------------------------------------------------------ + +#endif diff --git a/svx/inc/svxempty.hxx b/svx/inc/svxempty.hxx new file mode 100644 index 000000000000..e2f507c444e7 --- /dev/null +++ b/svx/inc/svxempty.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxempty.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVXEMPTY_HXX +#define _SVXEMPTY_HXX + + +#include <tools/string.hxx> + +#ifndef ICC +extern XubString& rImplEmptyStr; +inline const XubString& GetEmptyStr() { return rImplEmptyStr; } +#define GetEmptySStr GetEmptyStr +#else +// CSET stellt rImplEmptyStr nicht in items.lib (?) +const XubString& GetEmptyStr(); +#define GetEmptySStr GetEmptyStr +#endif + + +#endif + diff --git a/svx/inc/svxerr.hxx b/svx/inc/svxerr.hxx new file mode 100644 index 000000000000..6904cab57e46 --- /dev/null +++ b/svx/inc/svxerr.hxx @@ -0,0 +1,111 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxerr.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVXERR_HXX +#define _SVXERR_HXX + +// include --------------------------------------------------------------- + +#include <tools/errcode.hxx> + +// define ---------------------------------------------------------------- + +#define ERRCODE_SVX_LINGU_THESAURUSNOTEXISTS (1UL | ERRCODE_AREA_SVX | \ + ERRCODE_CLASS_NOTEXISTS) + +#define ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS (2UL | ERRCODE_AREA_SVX) + +#define ERRCODE_SVX_LINGU_LINGUNOTEXISTS (3UL | ERRCODE_AREA_SVX | \ + ERRCODE_CLASS_NOTEXISTS ) +#define ERRCODE_SVX_LINGU_HYPHENNOTEXISTS (4UL | ERRCODE_AREA_SVX | \ + ERRCODE_CLASS_NOTEXISTS ) +#define ERRCODE_SVX_LINGU_DICT_NOTREADABLE (5UL | ERRCODE_AREA_SVX | \ + ERRCODE_CLASS_READ ) +#define ERRCODE_SVX_LINGU_DICT_NOTWRITEABLE (6UL | ERRCODE_AREA_SVX | \ + ERRCODE_CLASS_WRITE ) + +#define ERRCODE_SVX_GRAPHIC_NOTREADABLE (7UL | ERRCODE_AREA_SVX | \ + ERRCODE_CLASS_READ ) +#define ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT (8UL | ERRCODE_AREA_SVX | \ + ERRCODE_CLASS_READ ) +#define ERRCODE_SVX_LINGU_NOLANGUAGE (9UL | ERRCODE_AREA_SVX | \ + ERRCODE_CLASS_NOTEXISTS ) +#define ERRCODE_SVX_FORMS_NOIOSERVICES (10UL | ERRCODE_AREA_SVX ) +#define ERRCODE_SVX_FORMS_READWRITEFAILED (11UL | ERRCODE_AREA_SVX ) + +#define ERRCODE_SVX_BULLETITEM_NOBULLET (12UL | ERRCODE_AREA_SVX ) + +#define ERRCODE_SVX_MODIFIED_VBASIC_STORAGE (13UL | ERRCODE_AREA_SVX \ + | ERRCODE_WARNING_MASK \ + | ERRCODE_CLASS_WRITE ) + +#define ERRCODE_SVX_VBASIC_STORAGE_EXIST (14UL | ERRCODE_AREA_SVX \ + | ERRCODE_WARNING_MASK \ + | ERRCODE_CLASS_WRITE ) + +/** Error message: "Wrong password." */ +#define ERRCODE_SVX_WRONGPASS (15UL | ERRCODE_AREA_SVX | ERRCODE_CLASS_NONE) + +/** Error message: "Read error. Unsupported encryption method." */ +#define ERRCODE_SVX_READ_FILTER_CRYPT (16UL | ERRCODE_AREA_SVX | ERRCODE_CLASS_READ) + +/** Error message: "Read error. Passwort encrypted Powerpoint documents..." */ +#define ERRCODE_SVX_READ_FILTER_PPOINT (17UL | ERRCODE_AREA_SVX | ERRCODE_CLASS_READ) + +/** Error message: "Warning. Passwort protection is not suppported when ..." */ +#define ERRCODE_SVX_EXPORT_FILTER_CRYPT (18UL | ERRCODE_AREA_SVX | ERRCODE_CLASS_EXPORT | ERRCODE_WARNING_MASK) + + +// both codes will be used twice : with ERRCODE_CLASS_READ- and ERRCODE_CLASS_WRITE-bits +#define ERRCTX_SVX_LINGU_THESAURUS 1 +#define ERRCTX_SVX_LINGU_SPELLING 2 +#define ERRCTX_SVX_LINGU_HYPHENATION 3 +#define ERRCTX_SVX_LINGU_DICTIONARY 4 +#define ERRCTX_SVX_BACKGROUND 5 +#define ERRCTX_SVX_IMPORT_GRAPHIC 6 + +// class SvxErrorHandler ------------------------------------------------- + +#ifndef __RSC + +#include <svtools/ehdl.hxx> +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC SvxErrorHandler : private SfxErrorHandler +{ + public: + SvxErrorHandler(); + static void Get(); +}; + +#endif + + +#endif + diff --git a/svx/inc/svxgrahicitem.hxx b/svx/inc/svxgrahicitem.hxx new file mode 100644 index 000000000000..9e2dca690d94 --- /dev/null +++ b/svx/inc/svxgrahicitem.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxgrahicitem.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_GRAPHICITEM_HXX +#define _SVX_GRAPHICITEM_HXX + + +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + +#include <vcl/graph.hxx> + +class SVX_DLLPUBLIC SvxGraphicItem: public SfxPoolItem +{ + Graphic aGraphic; + +public: + TYPEINFO(); + SvxGraphicItem(); + SvxGraphicItem( USHORT nWhich ,const Graphic& rGraphic); + SvxGraphicItem( const SvxGraphicItem& ); + + + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + + Graphic GetGraphic() const { return aGraphic; } + +}; + +#endif diff --git a/svx/inc/svxrtf.hxx b/svx/inc/svxrtf.hxx new file mode 100644 index 000000000000..7dfa141b259a --- /dev/null +++ b/svx/inc/svxrtf.hxx @@ -0,0 +1,481 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxrtf.hxx,v $ + * $Revision: 1.24.208.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVXRTF_HXX +#define _SVXRTF_HXX + +#ifndef _TABLE_HXX //autogen +#include <tools/table.hxx> +#endif +#include <tools/string.hxx> +#include <svl/itemset.hxx> +#include <svtools/parrtf.hxx> + +#define _SVSTDARR_USHORTS +#include <svl/svstdarr.hxx> +#include "svx/svxdllapi.h" + + +class Font; +class Color; +class Graphic; +class DateTime; +struct SvxRTFStyleType; +class SvxRTFItemStackType; +class SvxRTFItemStackList; + +namespace com { namespace sun { namespace star { + namespace document { + class XDocumentProperties; + } + namespace util { + struct DateTime; + } +} } } + + +// Mapper-Klassen fuer die verschiedenen Anforderungen an Doc-Positionen +// Swg - NodePosition ist ein SwIndex, der intern veraendert wird +// EditEngine - ULONG auf Liste von Absaetzen +// ..... + +class SvxNodeIdx +{ +public: + virtual ~SvxNodeIdx() {} + virtual ULONG GetIdx() const = 0; + virtual SvxNodeIdx* Clone() const = 0; // erzeuge von sich eine Kopie +}; + +class SvxPosition +{ +public: + virtual ~SvxPosition() {} + + virtual ULONG GetNodeIdx() const = 0; + virtual xub_StrLen GetCntIdx() const = 0; + + virtual SvxPosition* Clone() const = 0; // erzeuge von sich eine Kopie + virtual SvxNodeIdx* MakeNodeIdx() const = 0; // erzeuge vom NodeIndex eine Kopie +}; + + +typedef Color* ColorPtr; +SV_DECL_PTRARR( SvxRTFColorTbl, ColorPtr, 16, 4 ) +DECLARE_TABLE( SvxRTFFontTbl, Font* ) +DECLARE_TABLE( SvxRTFStyleTbl, SvxRTFStyleType* ) +typedef SvxRTFItemStackType* SvxRTFItemStackTypePtr; +SV_DECL_PTRARR_DEL( SvxRTFItemStackList, SvxRTFItemStackTypePtr, 1, 1 ) +SV_DECL_PTRARR_STACK( SvxRTFItemStack, SvxRTFItemStackTypePtr, 0, 1 ) + +// einige Hilfsklassen fuer den RTF-Parser +struct SvxRTFStyleType +{ + SfxItemSet aAttrSet; // die Attribute vom Style (+Ableitung!) + String sName; + USHORT nBasedOn, nNext; + BOOL bBasedOnIsSet; //$flr #117411# + BYTE nOutlineNo; + BOOL bIsCharFmt; + + SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange ); +}; + + +// Bitmap - Mode + +struct SVX_DLLPUBLIC SvxRTFPictureType +{ + // Format der Bitmap + enum RTF_BMPSTYLE + { + RTF_BITMAP, // Bitmap, die Planes sind in den Pict.Daten + WIN_METAFILE, // in den Pict.Daten steht ein Window-Metafile + MAC_QUICKDRAW, // in den Pict.Daten steht ein Mac-QuickDraw + OS2_METAFILE, // in den Pict.Daten steht ein OS2-Metafile + RTF_DI_BMP, // Device Independent Bitmap + ENHANCED_MF, // in den Pict.Daten steht ein Enhanced-Metafile + RTF_PNG, // in den Pict.Daten steht ein PNG file + RTF_JPG // in den Pict.Daten steht ein JPG file + } eStyle; + + enum RTF_BMPMODE + { + BINARY_MODE, + HEX_MODE + } nMode; + + USHORT nType; + sal_uInt32 uPicLen; + USHORT nWidth, nHeight; + USHORT nGoalWidth, nGoalHeight; + USHORT nBitsPerPixel; + USHORT nPlanes; + USHORT nWidthBytes; + USHORT nScalX, nScalY; + short nCropT, nCropB, nCropL, nCropR; + + SvxRTFPictureType() { ResetValues(); } + // alle Werte auf default; wird nach einlesen der Bitmap aufgerufen ! + void ResetValues(); +}; + +// Hier sind die Ids fuer alle Charakter-Attribute, die vom SvxParser +// erkannt und in einem SfxItemSet gesetzt werden koennen. +// Die Ids werden ueber die SlotIds vom POOL richtig gesetzt. +struct RTFPlainAttrMapIds +{ + USHORT nCaseMap, + nBgColor, + nColor, + nContour, + nCrossedOut, + nEscapement, + nFont, + nFontHeight, + nKering, + nLanguage, + nPosture, + nShadowed, + nUnderline, + nOverline, + nWeight, + nWordlineMode, + nAutoKerning, + nCJKFont, + nCJKFontHeight, + nCJKLanguage, + nCJKPosture, + nCJKWeight, + nCTLFont, + nCTLFontHeight, + nCTLLanguage, + nCTLPosture, + nCTLWeight, + nEmphasis, + nTwoLines, + nCharScaleX, + nHorzVert, + nRuby, + nRelief, + nHidden + ; + RTFPlainAttrMapIds( const SfxItemPool& rPool ); +}; + +// Hier sind die Ids fuer alle Paragraph-Attribute, die vom SvxParser +// erkannt und in einem SfxItemSet gesetzt werden koennen. +// Die Ids werden ueber die SlotIds vom POOL richtig gesetzt. +struct RTFPardAttrMapIds +{ + USHORT nLinespacing, + nAdjust, + nTabStop, + nHyphenzone, + nLRSpace, + nULSpace, + nBrush, + nBox, + nShadow, + nOutlineLvl, + nSplit, + nKeep, + nFontAlign, + nScriptSpace, + nHangPunct, + nForbRule, + nDirection + ; + RTFPardAttrMapIds( const SfxItemPool& rPool ); +}; + + + +// ----------------------------------------------------------------------- + + +class SVX_DLLPUBLIC SvxRTFParser : public SvRTFParser +{ + SvStream &rStrm; + SvxRTFColorTbl aColorTbl; + SvxRTFFontTbl aFontTbl; + SvxRTFStyleTbl aStyleTbl; + SvxRTFItemStack aAttrStack; + SvxRTFItemStackList aAttrSetList; + + SvUShorts aPlainMap; + SvUShorts aPardMap; + SvUShorts aWhichMap; + String sBaseURL; + + SvxPosition* pInsPos; + SfxItemPool* pAttrPool; + Color* pDfltColor; + Font* pDfltFont; + ::com::sun::star::uno::Reference< + ::com::sun::star::document::XDocumentProperties> m_xDocProps; + SfxItemSet *pRTFDefaults; + + long nVersionNo; + int nDfltFont; + + BOOL bNewDoc : 1; // FALSE - in ein bestehendes lesen + BOOL bNewGroup : 1; // TRUE - es gab eine oeffnende Klammer + BOOL bIsSetDfltTab : 1; // TRUE - DefTab wurde eingelesen + BOOL bChkStyleAttr : 1; // TRUE - StyleSheets werden ausgewertet + BOOL bCalcValue : 1; // TRUE - Twipwerte an APP anpassen + BOOL bPardTokenRead : 1; // TRUE - Token \pard wurde erkannt + BOOL bReadDocInfo : 1; // TRUE - DocInfo mit einlesen + BOOL bIsLeftToRightDef : 1; // TRUE - in LeftToRight char run def. + // FALSE - in RightToLeft char run def. + BOOL bIsInReadStyleTab : 1; // TRUE - in ReadStyleTable + + void ClearColorTbl(); + void ClearFontTbl(); + void ClearStyleTbl(); + void ClearAttrStack(); + + SvxRTFItemStackTypePtr _GetAttrSet( int bCopyAttr=FALSE ); // neue ItemStackType anlegen + void _ClearStyleAttr( SvxRTFItemStackType& rStkType ); + + // setzt alle Attribute, die unterschiedlich zum aktuellen sind + void SetAttrSet( SfxItemSet& rAttrSet, SvxPosition& rSttPos ); + void SetAttrSet( SvxRTFItemStackType &rSet ); + void SetDefault( int nToken, int nValue ); + + // pard / plain abarbeiten + void RTFPardPlain( int bPard, SfxItemSet** ppSet ); + + void BuildWhichTbl(); + + enum RTF_CharTypeDef + { + NOTDEF_CHARTYPE, + LOW_CHARTYPE, + HIGH_CHARTYPE, + DOUBLEBYTE_CHARTYPE + }; + + // set latin/asian/complex character attributes + void SetScriptAttr( + RTF_CharTypeDef eType, SfxItemSet& rSet, SfxPoolItem& rItem ); + +protected: + virtual void EnterEnvironment(); + virtual void LeaveEnvironment(); + virtual void ResetPard(); + virtual void InsertPara() = 0; + + + String& DelCharAtEnd( String& rStr, const sal_Unicode cDel ); + + // wird fuer jedes Token gerufen, das in CallParser erkannt wird + virtual void NextToken( int nToken ); + + virtual void ReadBitmapData(); + virtual void ReadOLEData(); + + void ReadStyleTable(); + void ReadColorTable(); + void ReadFontTable(); + void ReadAttr( int nToken, SfxItemSet* pSet ); + void ReadTabAttr( int nToken, SfxItemSet& rSet ); + + // Dokument-Info lesen + ::com::sun::star::util::DateTime GetDateTimeStamp( ); + String& GetTextToEndGroup( String& rStr ); + virtual void ReadInfo( const sal_Char* pChkForVerNo = 0 ); + + inline SfxItemSet& GetAttrSet(); + // wurde noch kein Text eingefuegt ? (SttPos vom obersten StackEintrag!) + int IsAttrSttPos(); + void AttrGroupEnd(); // den akt. Bearbeiten, vom Stack loeschen + void SetAllAttrOfStk(); // end all Attr. and set it into doc + + + virtual void InsertText() = 0; + virtual void MovePos( int bForward = TRUE ) = 0; + virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, + xub_StrLen& rCntPos )=0; + virtual void SetAttrInDoc( SvxRTFItemStackType &rSet ); + // fuer Tokens, die im ReadAttr nicht ausgewertet werden + virtual void UnknownAttrToken( int nToken, SfxItemSet* pSet ); + + // falls jemand keine Twips haben moechte + virtual void CalcValue(); + + SvxRTFParser( SfxItemPool& rAttrPool, + SvStream& rIn, + ::com::sun::star::uno::Reference< + ::com::sun::star::document::XDocumentProperties> i_xDocProps, + int bReadNewDoc = TRUE ); + virtual ~SvxRTFParser(); + + int IsNewDoc() const { return bNewDoc; } + void SetNewDoc( int bFlag ) { bNewDoc = bFlag; } + int IsNewGroup() const { return bNewGroup; } + void SetNewGroup( int bFlag ) { bNewGroup = bFlag; } + int IsChkStyleAttr() const { return bChkStyleAttr; } + void SetChkStyleAttr( int bFlag ) { bChkStyleAttr = bFlag; } + int IsCalcValue() const { return bCalcValue; } + void SetCalcValue( int bFlag ) { bCalcValue = bFlag; } + int IsPardTokenRead() const { return bPardTokenRead; } + void SetPardTokenRead( int bFlag ) { bPardTokenRead = bFlag; } + int IsReadDocInfo() const { return bReadDocInfo; } + void SetReadDocInfo( int bFlag ) { bReadDocInfo = bFlag; } + + // erfrage/setze die aktuelle Einfuegeposition + SvxPosition& GetInsPos() const { return *pInsPos; } + void SetInsPos( const SvxPosition& rNew ); + + long GetVersionNo() const { return nVersionNo; } + + // erfrage/setze die Mapping-Ids fuer die Pard/Plain Attribute + // (Set: es werden sich die Pointer gemerkt, also keine Kopie erzeugt!!! ) + void AddPardAttr( USHORT nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); } + void AddPlainAttr( USHORT nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); } + + SvxRTFStyleTbl& GetStyleTbl() { return aStyleTbl; } + SvxRTFItemStack& GetAttrStack() { return aAttrStack; } + SvxRTFColorTbl& GetColorTbl() { return aColorTbl; } + SvxRTFFontTbl& GetFontTbl() { return aFontTbl; } + + const String& GetBaseURL() const { return sBaseURL; } + + // lesen die GrafikDaten und fuelle damit die Grafik und die + // die PicDaten. + // Return - TRUE: die Grafik ist gueltig + BOOL ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ); + // wandel die ASCII-HexCodes in binaere Zeichen um. Werden + // ungueltige Daten gefunden (Zeichen ausser 0-9|a-f|A-F, so + // wird USHRT_MAX returnt, ansonsten die Anzahl der umgewandelten Ze. + xub_StrLen HexToBin( String& rToken ); + +public: + + virtual SvParserState CallParser(); // Aufruf des Parsers + + inline const Color& GetColor( USHORT nId ) const; + const Font& GetFont( USHORT nId ); // aendert den dflt Font + + virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const = 0; + + // um einen anderen Attribut-Pool setzen zukoennen. Darf nur vorm + // CallParser erfolgen!! Die Maps werden nicht neu erzeugt! + void SetAttrPool( SfxItemPool* pNewPool ) { pAttrPool = pNewPool; } + // um andere WhichIds fuer einen anderen Pool zusetzen. + RTFPardAttrMapIds& GetPardMap() + { return (RTFPardAttrMapIds&)*aPardMap.GetData(); } + RTFPlainAttrMapIds& GetPlainMap() + { return (RTFPlainAttrMapIds&)*aPlainMap.GetData(); } + // um diese von aussen z.B. Tabellenzellen zuordnen zu koennen + void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE ); + void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE ); + + // fuers asynchrone lesen aus dem SvStream + virtual void Continue( int nToken ); + + // get RTF default ItemSets. Must be used by pard/plain tokens or in + // reset of Style-Items + const SfxItemSet& GetRTFDefaults(); + virtual bool UncompressableStackEntry(const SvxRTFItemStackType &rSet) const; +}; + +// der Stack fuer die Attribute: +// diese Klasse darf nur vom SvxRTFParser benutzt werden! +class SVX_DLLPUBLIC SvxRTFItemStackType +{ + friend class SvxRTFParser; + friend class SvxRTFItemStackList; + + SfxItemSet aAttrSet; + SvxNodeIdx *pSttNd, *pEndNd; + xub_StrLen nSttCnt, nEndCnt; + SvxRTFItemStackList* pChildList; + USHORT nStyleNo; + + SvxRTFItemStackType( SfxItemPool&, const USHORT* pWhichRange, + const SvxPosition& ); + ~SvxRTFItemStackType(); + + void Add( SvxRTFItemStackTypePtr ); + void Compress( const SvxRTFParser& ); + +public: + SvxRTFItemStackType( const SvxRTFItemStackType&, const SvxPosition&, + int bCopyAttr = FALSE ); + //cmc, I'm very suspicios about SetStartPos, it doesn't change + //its children's starting position, and the implementation looks + //bad, consider this deprecated. + void SetStartPos( const SvxPosition& rPos ); + + void MoveFullNode(const SvxNodeIdx &rOldNode, + const SvxNodeIdx &rNewNode); + + ULONG GetSttNodeIdx() const { return pSttNd->GetIdx(); } + ULONG GetEndNodeIdx() const { return pEndNd->GetIdx(); } + + const SvxNodeIdx& GetSttNode() const { return *pSttNd; } + const SvxNodeIdx& GetEndNode() const { return *pEndNd; } + + xub_StrLen GetSttCnt() const { return nSttCnt; } + xub_StrLen GetEndCnt() const { return nEndCnt; } + + SfxItemSet& GetAttrSet() { return aAttrSet; } + const SfxItemSet& GetAttrSet() const { return aAttrSet; } + + USHORT StyleNo() const { return nStyleNo; } + + void SetRTFDefaults( const SfxItemSet& rDefaults ); +}; + + +// ----------- Inline Implementierungen -------------- + +inline const Color& SvxRTFParser::GetColor( USHORT nId ) const +{ + ColorPtr pColor = (ColorPtr)pDfltColor; + if( nId < aColorTbl.Count() ) + pColor = aColorTbl[ nId ]; + return *pColor; +} + +inline SfxItemSet& SvxRTFParser::GetAttrSet() +{ + SvxRTFItemStackTypePtr pTmp; + if( bNewGroup || 0 == ( pTmp = aAttrStack.Top()) ) + pTmp = _GetAttrSet(); + return pTmp->aAttrSet; +} + + +#endif + //_SVXRTF_HXX + diff --git a/svx/inc/swframeexample.hxx b/svx/inc/swframeexample.hxx new file mode 100644 index 000000000000..642d030c19bc --- /dev/null +++ b/svx/inc/swframeexample.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: swframeexample.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVXSWFRAMEEXAMPLE_HXX +#define _SVXSWFRAMEEXAMPLE_HXX + +#include <vcl/window.hxx> +#include <tools/color.hxx> +#include <tools/gen.hxx> +#include "svx/svxdllapi.h" + +// class SwFrmPagePreview ------------------------------------------------------- + +class SVX_DLLPUBLIC SvxSwFrameExample : public Window +{ + Color m_aTransColor; // transparency + Color m_aBgCol; // background + Color m_aFrameColor; // graphic frame + Color m_aAlignColor; // align anchor + Color m_aBorderCol; // frame of doc + Color m_aPrintAreaCol; // frame of printable area of doc + Color m_aTxtCol; // symbolised text + Color m_aBlankCol; // area of symbol for blank + Color m_aBlankFrameCol; // frame of symbol for blank + + Rectangle aPage; + Rectangle aPagePrtArea; + Rectangle aTextLine; + Rectangle aPara; + Rectangle aParaPrtArea; + Rectangle aFrameAtFrame; + Rectangle aDrawObj; + Rectangle aAutoCharFrame; + Size aFrmSize; + + short nHAlign; + short nHRel; + + short nVAlign; + short nVRel; + + short nWrap; + short nAnchor; + BOOL bTrans; + + Point aRelPos; + + void InitColors_Impl( void ); + void InitAllRects_Impl(); + void CalcBoundRect_Impl(Rectangle &rRect); + Rectangle DrawInnerFrame_Impl(const Rectangle &rRect, const Color &rFillColor, const Color &rBorderColor); + + void DrawRect_Impl(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor); + virtual void Paint(const Rectangle&); +protected: + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +public: + + SvxSwFrameExample(Window* pParent, const ResId& rResID); + ~SvxSwFrameExample(); + + inline void SetWrap(USHORT nW) { nWrap = nW; } + + inline void SetHAlign(short nH) { nHAlign = nH; } + inline void SetHoriRel(short nR) { nHRel = nR; } + + inline void SetVAlign(short nV) { nVAlign = nV; } + inline void SetVertRel(short nR) { nVRel = nR; } + + inline void SetTransparent(BOOL bT) { bTrans = bT; } + inline void SetAnchor(short nA) { nAnchor = nA; } + + void SetRelPos(const Point& rP); +}; + + +#endif // _SVXSWFRAMEEXAMPLE_HXX diff --git a/svx/inc/swframeposstrings.hxx b/svx/inc/swframeposstrings.hxx new file mode 100644 index 000000000000..a7918f0db633 --- /dev/null +++ b/svx/inc/swframeposstrings.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: swframeposstrings.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVXSWFRAMEPOSSTRINGS_HXX +#define _SVXSWFRAMEPOSSTRINGS_HXX + +#include <tools/string.hxx> +#include "svx/svxdllapi.h" + +/* -----------------04.03.2004 12:58----------------- + contains strings needed for positioning dialogs + of frames and drawing in Writer + --------------------------------------------------*/ +class SvxSwFramePosString_Impl; +class SVX_DLLPUBLIC SvxSwFramePosString +{ + SvxSwFramePosString_Impl* pImpl; +public: + SvxSwFramePosString(); + ~SvxSwFramePosString(); + enum StringId + { + LEFT , + RIGHT , + FROMLEFT , + MIR_LEFT , + MIR_RIGHT , + MIR_FROMLEFT , + FRAME , + PRTAREA , + REL_PG_LEFT , + REL_PG_RIGHT , + REL_FRM_LEFT , + REL_FRM_RIGHT , + MIR_REL_PG_LEFT , + MIR_REL_PG_RIGHT , + MIR_REL_FRM_LEFT , + MIR_REL_FRM_RIGHT , + REL_PG_FRAME , + REL_PG_PRTAREA , + REL_BASE , + REL_CHAR , + REL_ROW , + REL_BORDER , + REL_PRTAREA , + FLY_REL_PG_LEFT , + FLY_REL_PG_RIGHT , + FLY_REL_PG_FRAME , + FLY_REL_PG_PRTAREA , + FLY_MIR_REL_PG_LEFT , + FLY_MIR_REL_PG_RIGHT , + TOP, + BOTTOM, + CENTER_HORI, + CENTER_VERT, + FROMTOP, + FROMBOTTOM, + BELOW, + FROMRIGHT, + REL_PG_TOP, + REL_PG_BOTTOM, + REL_FRM_TOP, + REL_FRM_BOTTOM, + REL_LINE, + + STR_MAX + }; + const String& GetString(StringId eId); +}; +#endif + diff --git a/svx/inc/swframevalidation.hxx b/svx/inc/swframevalidation.hxx new file mode 100644 index 000000000000..bef91f64c1f1 --- /dev/null +++ b/svx/inc/swframevalidation.hxx @@ -0,0 +1,90 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile$ + * $Revision$ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVXSWFRAMEVALIDATION_HXX +#define _SVXSWFRAMEVALIDATION_HXX +#include <sal/types.h> +#include <tools/gen.hxx> +#include <limits.h> + +/* -----------------03.03.2004 16:31----------------- + struct to determine min/max values for fly frame positioning in Writer + --------------------------------------------------*/ +struct SvxSwFrameValidation +{ + sal_Int16 nAnchorType; //com::sun::star::text::TextContentAnchorType + sal_Int16 nHoriOrient; //com::sun::star::text::HoriOrientation + sal_Int16 nVertOrient; //com::sun::star::text::VertOrientation + sal_Int16 nHRelOrient; //com::sun::star::text::RelOrientation + sal_Int16 nVRelOrient; //com::sun::star::text::RelOrientation + bool bAutoHeight; + bool bAutoWidth; + bool bMirror; + bool bFollowTextFlow; + + sal_Int32 nHPos; + sal_Int32 nMaxHPos; + sal_Int32 nMinHPos; + + sal_Int32 nVPos; + sal_Int32 nMaxVPos; + sal_Int32 nMinVPos; + + sal_Int32 nWidth; + sal_Int32 nMinWidth; + sal_Int32 nMaxWidth; + + sal_Int32 nHeight; + sal_Int32 nMinHeight; + sal_Int32 nMaxHeight; + + Size aPercentSize; // Size fuer 100%-Wert + + SvxSwFrameValidation() : + bAutoHeight(false), + bAutoWidth(false), + bMirror(false), + bFollowTextFlow( false ), + nHPos(0), + nMaxHPos(SAL_MAX_INT32), + nMinHPos(0), + nVPos(0), + nMaxVPos(SAL_MAX_INT32), + nMinVPos(0), + nWidth( 283 * 4 ), //2.0 cm + nMinWidth(0), + nMaxWidth(SAL_MAX_INT32), + nHeight( 283 ), //0.5 cm + nMaxHeight(SAL_MAX_INT32) + { + } +}; + +#endif + diff --git a/svx/inc/tbunocontroller.hxx b/svx/inc/tbunocontroller.hxx new file mode 100644 index 000000000000..95f17a495318 --- /dev/null +++ b/svx/inc/tbunocontroller.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tbunocontroller.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __TBUNOCONTROLLER_HXX_ +#define __TBUNOCONTROLLER_HXX_ + +#include <svtools/toolboxcontroller.hxx> +#include <com/sun/star/awt/FontDescriptor.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> + +namespace svx +{ + +class SvxFontSizeBox_Impl; +class FontHeightToolBoxControl : public svt::ToolboxController, + public ::com::sun::star::lang::XServiceInfo +{ + public: + FontHeightToolBoxControl( + const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + ~FontHeightToolBoxControl(); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); + + static ::rtl::OUString getImplementationName_Static() throw() + { + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.FontHeightToolBoxController" )); + } + + static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); + + // XComponent + virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); + + // XStatusListener + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException); + + void dispatchCommand( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ); + + private: + SvxFontSizeBox_Impl* m_pBox; + ::com::sun::star::awt::FontDescriptor m_aCurrentFont; +}; + +::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL FontHeightToolBoxControl_createInstance( const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr ); + +} + +#endif // __TBUNOCONTROLLER_HXX_ diff --git a/svx/inc/tbxalign.hxx b/svx/inc/tbxalign.hxx new file mode 100644 index 000000000000..13fb4c8ae107 --- /dev/null +++ b/svx/inc/tbxalign.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tbxalign.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _TBXALIGN_HXX +#define _TBXALIGN_HXX + +#include <sfx2/tbxctrl.hxx> +#include "svx/svxdllapi.h" + + +class SVX_DLLPUBLIC SvxTbxCtlAlign: public SfxToolBoxControl +{ +public: + virtual ::sal_Bool SAL_CALL opensSubToolbar() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getSubToolbarName() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL functionSelected( const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateImage() throw (::com::sun::star::uno::RuntimeException); + + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); + + SFX_DECL_TOOLBOX_CONTROL(); + + SvxTbxCtlAlign( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxTbxCtlAlign() {} +private: + rtl::OUString m_aSubTbName; + rtl::OUString m_aSubTbResName; + rtl::OUString m_aCommand; +}; +#endif diff --git a/svx/inc/tbxcolor.hxx b/svx/inc/tbxcolor.hxx new file mode 100644 index 000000000000..db04cfbf7119 --- /dev/null +++ b/svx/inc/tbxcolor.hxx @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tbxcolor.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TBXCOLOR_HXX +#define _SVX_TBXCOLOR_HXX + +#include <com/sun/star/frame/XLayoutManager.hpp> +#include "svx/svxdllapi.h" + +//........................................................................ +namespace svx +{ +//........................................................................ + + //==================================================================== + //= ToolboxAccess + //==================================================================== + class SVX_DLLPUBLIC ToolboxAccess + { + private: + bool m_bDocking; + ::rtl::OUString m_sToolboxResName; + ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XLayoutManager > m_xLayouter; + + public: + ToolboxAccess( const ::rtl::OUString& rToolboxName ); + + public: + /** toggles the toolbox + */ + void toggleToolbox() const; + + /** determines whether the toolbox is currently visible + */ + bool isToolboxVisible() const; + + /** forces that the toolbox is docked + */ + inline void forceDocking() { m_bDocking = true; } + }; + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // #ifndef _SVX_TBXCOLOR_HXX + diff --git a/svx/inc/tbxctl.hxx b/svx/inc/tbxctl.hxx new file mode 100644 index 000000000000..44e72b455b48 --- /dev/null +++ b/svx/inc/tbxctl.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tbxctl.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _TBXCTL_HXX +#define _TBXCTL_HXX + +#include <sfx2/tbxctrl.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* Klasse f"ur SwToolbox +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxTbxCtlDraw : public SfxToolBoxControl +{ +private: + ::rtl::OUString m_sToolboxName; + + void toggleToolbox(); + +protected: + using SfxToolBoxControl::Select; + +public: + SvxTbxCtlDraw( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxTbxCtlDraw() {} + + SFX_DECL_TOOLBOX_CONTROL(); + + virtual void Select( BOOL bMod1 = FALSE ); + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; +}; + +#endif + diff --git a/svx/inc/tbxcustomshapes.hxx b/svx/inc/tbxcustomshapes.hxx new file mode 100644 index 000000000000..324de17b75d5 --- /dev/null +++ b/svx/inc/tbxcustomshapes.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tbxcustomshapes.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TBXCUSTOMSHAPES_HXX +#define _SVX_TBXCUSTOMSHAPES_HXX + +#include <sfx2/tbxctrl.hxx> +#include "svx/svxdllapi.h" + +/************************************************************************* +|* +|* SvxTbxCtlCustomShapes +|* +\************************************************************************/ + +class SVX_DLLPUBLIC SvxTbxCtlCustomShapes : public SfxToolBoxControl +{ +public: + using SfxToolBoxControl::Select; + virtual void Select( BOOL bMod1 = FALSE ); + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); + + SFX_DECL_TOOLBOX_CONTROL(); + + SvxTbxCtlCustomShapes( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxTbxCtlCustomShapes() {} + + //interface XSubToolbarController: + virtual ::sal_Bool SAL_CALL opensSubToolbar() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getSubToolbarName() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL functionSelected( const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateImage() throw (::com::sun::star::uno::RuntimeException); + +private: + rtl::OUString m_aSubTbName; + rtl::OUString m_aSubTbxResName; + rtl::OUString m_aCommand; +}; + + +#endif + diff --git a/svx/inc/tbxdraw.hxx b/svx/inc/tbxdraw.hxx new file mode 100644 index 000000000000..6bfa49349573 --- /dev/null +++ b/svx/inc/tbxdraw.hxx @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: tbxdraw.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _TBXDRAW_HXX +#define _TBXDRAW_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/tbxctrl.hxx> + +// class SvxPopupWindowTbxMgr -------------------------------------------- + +class SvxPopupWindowTbxMgr : public SfxPopupWindow +{ + void* pNiemalsDenPointerAufDieErzeugendeToolBoxMerken; // MI! + ResId aRIdWinTemp; + ResId aRIdTbxTemp; + + Link aTbxClickHdl; + + + DECL_LINK( TbxSelectHdl, ToolBox*); + DECL_LINK( TbxClickHdl, ToolBox*); + +protected: + using SfxPopupWindow::StateChanged; + +public: + SvxPopupWindowTbxMgr( USHORT nId, + SfxToolBoxControl* pTbxCtl, + ResId aRIdWin, + ResId aRIdTbx ); + SvxPopupWindowTbxMgr( USHORT nId, + WindowAlign eAlign, + ResId aRIdWin, + ResId aRIdTbx ); + ~SvxPopupWindowTbxMgr(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState); + virtual SfxPopupWindow* Clone() const; + virtual void PopupModeEnd(); + + void StartSelection(); + + // toolbox click or execute may chage the default selection in the tools toolbox + virtual void UserEvent( ULONG nEvent, void* pEventData ); +}; + + +#endif // _TBX_DRAW_HXX + diff --git a/svx/inc/textconv.hxx b/svx/inc/textconv.hxx new file mode 100644 index 000000000000..afd539d97c38 --- /dev/null +++ b/svx/inc/textconv.hxx @@ -0,0 +1,125 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: textconv.hxx,v $ + * $Revision: 1.12 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _TEXTCONV_HXX +#define _TEXTCONV_HXX + +#include <svx/splwrap.hxx> +#include <svx/svxacorr.hxx> +#include <com/sun/star/uno/Reference.h> +#include <com/sun/star/uno/Sequence.hxx> +#include <svx/hangulhanja.hxx> + +class EditView; +class ImpEditEngine; +class ContentNode; + +class TextConvWrapper : public svx::HangulHanjaConversion +{ + rtl::OUString aConvText; // convertible text part found last time + LanguageType nConvTextLang; // language of aConvText + USHORT nLastPos; // starting position of the last found text portion (word) + USHORT nUnitOffset; // offset of current unit in the current text portion (word) + + ESelection aConvSel; // selection to be converted if + // 'HasRange' is true, other conversion + // starts from the cursor position + + EditView * pEditView; + Window * pWin; + + sal_Bool bStartChk; + sal_Bool bStartDone; + sal_Bool bEndDone; + sal_Bool bAllowChange; // storage for _bAllowImplicitChangesForNotConvertibleText + // paramters value of function GetNextPortion. + // used to transport the value to where it is needed. + + + // from SvxSpellWrapper copied and modified + sal_Bool ConvNext_impl(); // former SpellNext + sal_Bool FindConvText_impl(); // former FindSpellError + sal_Bool ConvMore_impl(); // former SpellMore + + // from EditSpellWrapper copied and modified + void ConvStart_impl( SvxSpellArea eSpell ); // former SpellStart + void ConvEnd_impl(); // former SpellEnd + sal_Bool ConvContinue_impl(); // former SpellContinue + + void SelectNewUnit_impl( const sal_Int32 nUnitStart, + const sal_Int32 nUnitEnd ); + + void ChangeText( const String &rNewText, + const ::rtl::OUString& rOrigText, + const ::com::sun::star::uno::Sequence< sal_Int32 > *pOffsets, + ESelection *pESelection ); + void ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes ); + + // Forbidden and not implemented. + TextConvWrapper (const TextConvWrapper &); + TextConvWrapper & operator= (const TextConvWrapper &); + +protected: + virtual void GetNextPortion( ::rtl::OUString& /* [out] */ rNextPortion, + LanguageType& /* [out] */ rLangOfPortion, + sal_Bool /* [in] */ _bAllowImplicitChangesForNotConvertibleText ); + virtual void HandleNewUnit( const sal_Int32 nUnitStart, + const sal_Int32 nUnitEnd ); + virtual void ReplaceUnit( + const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd, + const ::rtl::OUString& rOrigText, + const ::rtl::OUString& rReplaceWith, + const ::com::sun::star::uno::Sequence< sal_Int32 > &rOffsets, + ReplacementAction eAction, + LanguageType *pNewUnitLanguage ); + + virtual sal_Bool HasRubySupport() const; + + void SetLanguageAndFont( const ESelection &rESel, + LanguageType nLang, USHORT nLangWhichId, + const Font *pFont, USHORT nFontWhichId ); + + +public: + TextConvWrapper( Window* pWindow, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF, + const ::com::sun::star::lang::Locale& rSourceLocale, + const ::com::sun::star::lang::Locale& rTargetLocale, + const Font* pTargetFont, + INT32 nOptions, + sal_Bool bIsInteractive, + BOOL bIsStart, EditView* pView ); + + virtual ~TextConvWrapper(); + + void Convert(); +}; + +#endif + diff --git a/svx/inc/txencbox.hxx b/svx/inc/txencbox.hxx new file mode 100644 index 000000000000..b956c9b47fe0 --- /dev/null +++ b/svx/inc/txencbox.hxx @@ -0,0 +1,130 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: txencbox.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TXENCBOX_HXX +#define _SVX_TXENCBOX_HXX + +// include --------------------------------------------------------------- + +#ifndef _LSTBOX_HXX //autogen +#include <vcl/lstbox.hxx> +#endif +#include <rtl/textenc.h> +#include "svx/svxdllapi.h" + +class SvxTextEncodingTable; + +class SVX_DLLPUBLIC SvxTextEncodingBox : public ListBox +{ +private: + const SvxTextEncodingTable* m_pEncTable; + + SVX_DLLPRIVATE USHORT EncodingToPos_Impl( rtl_TextEncoding nEnc ) const; + +public: + SvxTextEncodingBox( Window* pParent, const ResId& rResId ); + ~SvxTextEncodingBox(); + + /** Fill with all known encodings but exclude those matching one or more + given flags as defined in rtl/tencinfo.h + + <p> If nButIncludeInfoFlags is given, encodings are included even if they + match nExcludeInfoFlags. Thus it is possible to exclude 16/32-bit + Unicode with RTL_TEXTENCODING_INFO_UNICODE but to include UTF7 and UTF8 + with RTL_TEXTENCODING_INFO_MIME </p> + + @param bExcludeImportSubsets + If <TRUE/>, some specific encodings are not listed, as they are a + subset of another encoding. This is the case for + RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_GBK, + RTL_TEXTENCODING_MS_936, which are covered by + RTL_TEXTENCODING_GB_18030. Normally, this flag should be set to + <TRUE/> whenever the box is used in import dialogs. */ + void FillFromTextEncodingTable( + sal_Bool bExcludeImportSubsets = FALSE, + sal_uInt32 nExcludeInfoFlags = 0, + sal_uInt32 nButIncludeInfoFlags = 0 + ); + + /** Fill with all encodings known to the dbtools::OCharsetMap but exclude + those matching one or more given flags as defined in rtl/tencinfo.h + + <p> If nButIncludeInfoFlags is given, encodings are included even if they + match nExcludeInfoFlags. Thus it is possible to exclude 16/32-bit + Unicode with RTL_TEXTENCODING_INFO_UNICODE but to include UTF7 and UTF8 + with RTL_TEXTENCODING_INFO_MIME </p> + + @param bExcludeImportSubsets + If <TRUE/>, some specific encodings are not listed, as they are a + subset of another encoding. This is the case for + RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_GBK, + RTL_TEXTENCODING_MS_936, which are covered by + RTL_TEXTENCODING_GB_18030. Normally, this flag should be set to + <TRUE/> whenever the box is used in import dialogs. */ + void FillFromDbTextEncodingMap( + sal_Bool bExcludeImportSubsets = FALSE, + sal_uInt32 nExcludeInfoFlags = 0, + sal_uInt32 nButIncludeInfoFlags = 0 + ); + + /** Fill with all known MIME encodings and select the best according to + <method>GetBestMimeEncoding</method> + */ + void FillWithMimeAndSelectBest(); + + /** Get the best MIME encoding matching the system locale, or if that isn't + determinable one that matches the UI locale, or UTF8 if everything else + fails. + */ + static rtl_TextEncoding GetBestMimeEncoding(); + + const SvxTextEncodingTable* GetTextEncodingTable() const + { return m_pEncTable; } + + void InsertTextEncoding( const rtl_TextEncoding nEnc, + USHORT nPos = LISTBOX_APPEND ); + + void InsertTextEncoding( const rtl_TextEncoding nEnc, + const String& rEntry, + USHORT nPos = LISTBOX_APPEND ); + + void RemoveTextEncoding( const rtl_TextEncoding nEnc ); + + void SelectTextEncoding( const rtl_TextEncoding nEnc, + BOOL bSelect = TRUE ); + + rtl_TextEncoding GetSelectTextEncoding() const; + + const String& GetSelectTextString() const; + + BOOL IsTextEncodingSelected( const rtl_TextEncoding nEnc ) const; +}; + +#endif + diff --git a/svx/inc/txenctab.hxx b/svx/inc/txenctab.hxx new file mode 100644 index 000000000000..324d8b469192 --- /dev/null +++ b/svx/inc/txenctab.hxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: txenctab.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_TXENCTAB_HXX +#define _SVX_TXENCTAB_HXX + +// include --------------------------------------------------------------- + +#ifndef _RESARY_HXX //autogen +#include <tools/resary.hxx> +#endif +#include <rtl/textenc.h> +#include "svx/svxdllapi.h" + + +//======================================================================== +// class SvxTextEncodingTable +//======================================================================== + +class SVX_DLLPUBLIC SvxTextEncodingTable : public ResStringArray +{ +public: + SvxTextEncodingTable(); + ~SvxTextEncodingTable(); + + const String& GetTextString( const rtl_TextEncoding nEnc ) const; + rtl_TextEncoding GetTextEncoding( const String& rStr ) const; +}; + + +#endif + diff --git a/svx/inc/txtrange.hxx b/svx/inc/txtrange.hxx new file mode 100644 index 000000000000..1b7a05c1f9e5 --- /dev/null +++ b/svx/inc/txtrange.hxx @@ -0,0 +1,121 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: txtrange.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _MyTXTRANGE_HXX +#define _MyTXTRANGE_HXX + +#ifndef _TXTRANGE_HXX +#define _SVSTDARR_BOOLS +#define _SVSTDARR_LONGS +#include <svl/svstdarr.hxx> +#endif +#include "svx/svxdllapi.h" + +class PolyPolygon; +class Range; +class Rectangle; + +namespace basegfx { + class B2DPolyPolygon; +} + +typedef SvLongs* SvLongsPtr; + +/************************************************************************* +|* +|* class TextRanger +|* +|* Beschreibung +|* Ersterstellung 20.01.97 +|* Letzte Aenderung AMA 20.01.97 +|* +*************************************************************************/ +class SVX_DLLPUBLIC TextRanger +{ + Range *pRangeArr; + SvLongsPtr *pCache; + PolyPolygon *mpPolyPolygon; // Flaechenpolygon + PolyPolygon *mpLinePolyPolygon; // Linienpolygon + Rectangle *pBound; // Umfassendes Rechteck + USHORT nCacheSize; // Cache-Size + USHORT nCacheIdx; // Cache-Index + USHORT nRight; // Abstand Kontur-Text + USHORT nLeft; // Abstand Text-Kontur + USHORT nUpper; // Abstand Kontur-Text + USHORT nLower; // Abstand Text-Kontur + sal_uInt32 nPointCount; // Anzahl der Polygonpunkte + BOOL bSimple : 1; // Nur Aussenkante + BOOL bInner : 1; // TRUE: Objekt beschriften (EditEngine); + // FALSE: Objekt umfliessen (StarWriter); + BOOL bVertical :1; // for vertical writing mode + BOOL bFlag3 :1; + BOOL bFlag4 :1; + BOOL bFlag5 :1; + BOOL bFlag6 :1; + BOOL bFlag7 :1; + TextRanger( const TextRanger& ); // not implemented + const Rectangle& _GetBoundRect(); +public: + TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon, + USHORT nCacheSize, USHORT nLeft, USHORT nRight, + BOOL bSimple, BOOL bInner, BOOL bVert = sal_False ); + ~TextRanger(); + SvLongsPtr GetTextRanges( const Range& rRange ); + USHORT GetRight() const { return nRight; } + USHORT GetLeft() const { return nLeft; } + USHORT GetUpper() const { return nUpper; } + USHORT GetLower() const { return nLower; } + sal_uInt32 GetPointCount() const { return nPointCount; } + BOOL IsSimple() const { return bSimple; } + BOOL IsInner() const { return bInner; } + BOOL IsVertical() const { return bVertical; } + BOOL HasBorder() const { return nRight || nLeft; } + const PolyPolygon& GetPolyPolygon() const { return *mpPolyPolygon; } + const PolyPolygon* GetLinePolygon() const { return mpLinePolyPolygon; } + const Rectangle& GetBoundRect() + { return pBound ? static_cast< const Rectangle& >(*pBound) : _GetBoundRect(); } + void SetUpper( USHORT nNew ){ nUpper = nNew; } + void SetLower( USHORT nNew ){ nLower = nNew; } + void SetVertical( BOOL bNew ); + BOOL IsFlag3() const { return bFlag3; } + void SetFlag3( BOOL bNew ) { bFlag3 = bNew; } + BOOL IsFlag4() const { return bFlag4; } + void SetFlag4( BOOL bNew ) { bFlag4 = bNew; } + BOOL IsFlag5() const { return bFlag5; } + void SetFlag5( BOOL bNew ) { bFlag5 = bNew; } + BOOL IsFlag6() const { return bFlag6; } + void SetFlag6( BOOL bNew ) { bFlag6 = bNew; } + BOOL IsFlag7() const { return bFlag7; } + void SetFlag7( BOOL bNew ) { bFlag7 = bNew; } +}; + + + +#endif // _TXTRANGE_HXX diff --git a/svx/inc/uiks.hxx b/svx/inc/uiks.hxx new file mode 100644 index 000000000000..5a332c0ecb92 --- /dev/null +++ b/svx/inc/uiks.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: uiks.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_UIKS_HXX +#define _SVX_UIKS_HXX + +#ifndef _USR_UIKS_HXX +#include <usr/uiks.hxx> +#endif + +// DBENGINE + +#define UIK_XDATABASEENGINE UIK_DATABASE(00) +#define UIK_XDATABASEFAVORITES UIK_DATABASE(01) +#define UIK_XDATABASE UIK_DATABASE(02) +#define UIK_XDATABASECONNECTION UIK_DATABASE(03) +#define UIK_XTRANSACTIONSUPPORT UIK_DATABASE(04) +#define UIK_XDATABASECURSOR UIK_DATABASE(05) +#define UIK_XDATABASETABLE UIK_DATABASE(06) +#define UIK_XDATABASETABLES UIK_DATABASE(07) +#define UIK_XDATABASEQUERY UIK_DATABASE(08) +#define UIK_XDATABASEQUERIES UIK_DATABASE(09) +#define UIK_XDATABASERELATION UIK_DATABASE(0a) +#define UIK_XDATABASERELATIONS UIK_DATABASE(0b) +#define UIK_XDATABASEFIELD UIK_DATABASE(0c) +#define UIK_XDATABASEFIELDS UIK_DATABASE(0d) +#define UIK_XDATABASEINDEX UIK_DATABASE(0e) +#define UIK_XDATABASEINDEXES UIK_DATABASE(0f) +#define UIK_XDATABASEDOCUMENT UIK_DATABASE(10) +#define UIK_XDATABASEDOCUMENTS UIK_DATABASE(11) +#define UIK_XDATABASEWORKSPACE UIK_DATABASE(12) +#define UIK_XDATABASEWORKSPACES UIK_DATABASE(13) +#define UIK_XDATABASEITERATOR UIK_DATABASE(14) +#define UIK_XPREPAREDDATABASECURSOR UIK_DATABASE(15) + + +// DBENGINE + +// FORMS + +#define UIK_XFORM UIK_FORMS(01) +#define UIK_XFORMS UIK_FORMS(02) +#define UIK_XFORMCONTROL UIK_FORMS(03) + +#define UIK_XHTMLFORM UIK_FORMS(05) +#define UIK_XHTMLFORMLISTENER UIK_FORMS(06) +#define UIK_XDATABASEFORM UIK_FORMS(07) +#define UIK_XBOUNDCONTROL UIK_FORMS(08) +#define UIK_XINSERTRECORDLISTENER UIK_FORMS(09) +#define UIK_XUPDATERECORDLISTENER UIK_FORMS(0a) +#define UIK_XDESTROYRECORDLISTENER UIK_FORMS(0b) +#define UIK_XCURRENTRECORDLISTENER UIK_FORMS(0c) +#define UIK_XBOUNDCONTROLLISTENER UIK_FORMS(0d) +#define UIK_XLOADLISTENER UIK_FORMS(0e) +#define UIK_XERRORLISTENER UIK_FORMS(0f) + +#define UIK_XFORMCONTROLFACTORY UIK_FORMS(10) +#define UIK_XFORMCONTROLLER UIK_FORMS(11) +#define UIK_XFORMCONTROLLERLISTENER UIK_FORMS(12) + +// FORMS + + + +#endif + diff --git a/svx/inc/unoapi.hxx b/svx/inc/unoapi.hxx new file mode 100644 index 000000000000..0ea3585d173a --- /dev/null +++ b/svx/inc/unoapi.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoapi.hxx,v $ + * $Revision: 1.12 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOAPI_HXX_ +#define _SVX_UNOAPI_HXX_ + +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/drawing/XDrawPage.hpp> +#include <sal/types.h> +#include <goodies/grfmgr.hxx> +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + +class SvxShape; +class SdrObject; +class SdrPage; +class SvxNumBulletItem; +class SfxItemPool; +class String; + +/** creates a StarOffice API wrapper with the given type and inventor + Deprecated: This will be replaced with a function returning XShape. +*/ +SVX_DLLPUBLIC SvxShape* CreateSvxShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor ) throw(); + +/** returns a StarOffice API wrapper for the given SdrObject */ +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw (); + +/** returns the SdrObject from the given StarOffice API wrapper */ +SVX_DLLPUBLIC SdrObject* GetSdrObjectFromXShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) throw() ; + +/** returns a StarOffice API wrapper for the given SdrPage */ +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > GetXDrawPageForSdrPage( SdrPage* pPage ) throw (); + +/** returns the SdrPage from the given StarOffice API wrapper */ +SVX_DLLPUBLIC SdrPage* GetSdrPageFromXDrawPage( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > xDrawPage ) throw() ; + +/** returns a GraphicObject for this URL */ +SVX_DLLPUBLIC GraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw() ; + +/** returns the SvxNumBulletItem with the given name from the pool or a null if there is no item + with that name +*/ +SvxNumBulletItem* SvxGetNumBulletItemByName( SfxItemPool* pPool, const ::rtl::OUString& aName ) throw(); + +/** maps the API constant MeasureUnit to a vcl MapUnit enum. + Returns false if conversion is not supported. + + @cl: for warnings01 I found out that this method never worked so I thin + it is not used at all +sal_Bool SvxMeasureUnitToMapUnit( const short eApi, short& nVcl ) throw(); +*/ + +/** maps the vcl MapUnit enum to a API constant MeasureUnit. + Returns false if conversion is not supported. +*/ +SVX_DLLPUBLIC sal_Bool SvxMapUnitToMeasureUnit( const short nVcl, short& eApi ) throw(); + +/** maps the API constant MeasureUnit to a vcl MapUnit enum. + Returns false if conversion is not supported. +*/ +SVX_DLLPUBLIC sal_Bool SvxMeasureUnitToFieldUnit( const short eApi, short& nVcl ) throw(); + +/** maps the vcl MapUnit enum to a API constant MeasureUnit. + Returns false if conversion is not supported. +*/ +SVX_DLLPUBLIC sal_Bool SvxFieldUnitToMeasureUnit( const short nVcl, short& eApi ) throw(); + +/** if the given name is a predefined name for the current language it is replaced by + the corresponding api name. +*/ +SVX_DLLPUBLIC void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalName, rtl::OUString& rApiName ) throw(); + +/** if the given name is a predefined api name it is replaced by the predefined name + for the current language. +*/ +SVX_DLLPUBLIC void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& rApiName, String& rInternalName ) throw(); + +/** returns the which id for the given property name. This only works for + properties of shapes (map SVXMAP_SHAPE is used for searching) + + Note: As this function has no access to SvxItemPropertySet but only to + SfxItemPropertyMap, the search in the map is not done via bsearch, but by + linear search. + */ +// os: unused function +//SVX_DLLPUBLIC sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName ); + +/** converts the given any with a metric to 100th/mm if needed */ +SVX_DLLPUBLIC void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, com::sun::star::uno::Any & rMetric ) throw(); + +/** converts the given any with a metric from 100th/mm to the given metric if needed */ +SVX_DLLPUBLIC void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, com::sun::star::uno::Any & rMetric ) throw(); + +#endif // _SVX_UNOAPI_HXX_ + diff --git a/svx/inc/unoedhlp.hxx b/svx/inc/unoedhlp.hxx new file mode 100644 index 000000000000..317b9c9c7ab2 --- /dev/null +++ b/svx/inc/unoedhlp.hxx @@ -0,0 +1,192 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoedhlp.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOEDHLP_HXX +#define _SVX_UNOEDHLP_HXX + +#include <memory> +#include <tools/solar.h> +#include <svtools/textdata.hxx> +#include <svl/hint.hxx> +#include <tools/gen.hxx> +#include "svx/svxdllapi.h" + +struct EENotify; +class EditEngine; + +#define EDITSOURCE_HINT_PARASMOVED 20 +#define EDITSOURCE_HINT_SELECTIONCHANGED 21 + +/** Extends TextHint by two additional parameters which are necessary + for the EDITSOURCE_HINT_PARASMOVED hint. TextHint's value in this + case denotes the destination position, the two parameters the + start and the end of the moved paragraph range. + */ +class SVX_DLLPUBLIC SvxEditSourceHint : public TextHint +{ +private: + ULONG mnStart; + ULONG mnEnd; + +public: + TYPEINFO(); + SvxEditSourceHint( ULONG nId ); + SvxEditSourceHint( ULONG nId, ULONG nValue, ULONG nStart=0, ULONG nEnd=0 ); + + ULONG GetValue() const; + ULONG GetStartValue() const; + ULONG GetEndValue() const; + void SetValue( ULONG n ); + void SetStartValue( ULONG n ); + void SetEndValue( ULONG n ); +}; + +/** Helper class for common functionality in edit sources + */ +class SVX_DLLPUBLIC SvxEditSourceHelper +{ +public: + + /** Translates EditEngine notifications into broadcastable hints + + @param aNotify + Notification object send by the EditEngine. + + @return the translated hint + */ + static ::std::auto_ptr<SfxHint> EENotification2Hint( EENotify* aNotify ); + + /** Calculate attribute run for EditEngines + + Please note that the range returned is half-open: [nStartIndex,nEndIndex) + + @param nStartIndex + Herein, the start index of the range of similar attributes is returned + + @param nEndIndex + Herein, the end index (exclusive) of the range of similar attributes is returned + + @param rEE + The EditEngine to query for attributes + + @param nPara + The paragraph the following index value is to be interpreted in + + @param nIndex + The character index from which the range of similar attributed characters is requested + + @return sal_True, if the range has been successfully determined + */ + static sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, const EditEngine& rEE, USHORT nPara, USHORT nIndex ); + + /** Convert point from edit engine to user coordinate space + + As the edit engine internally keeps vertical text unrotated, + all internal edit engine methods return their stuff unrotated, + too. This method rotates and shifts given point appropriately, + if vertical writing is on. + + @param rPoint + Point to transform + + @param rEESize + Paper size of the edit engine + + @param bIsVertical + Whether output text is vertical or not + + @return the possibly transformed point + */ + static Point EEToUserSpace( const Point& rPoint, const Size& rEESize, bool bIsVertical ); + + /** Convert point from user to edit engine coordinate space + + As the edit engine internally keeps vertical text unrotated, + all internal edit engine methods return their stuff unrotated, + too. This method rotates and shifts given point appropriately, + if vertical writing is on. + + @param rPoint + Point to transform + + @param rEESize + Paper size of the edit engine + + @param bIsVertical + Whether output text is vertical or not + + @return the possibly transformed point + */ + static Point UserSpaceToEE( const Point& rPoint, const Size& rEESize, bool bIsVertical ); + + /** Convert rect from edit engine to user coordinate space + + As the edit engine internally keeps vertical text unrotated, + all internal edit engine methods return their stuff unrotated, + too. This method rotates and shifts given rect appropriately, + if vertical writing is on. + + @param rRect + Rectangle to transform + + @param rEESize + Paper size of the edit engine + + @param bIsVertical + Whether output text is vertical or not + + @return the possibly transformed rect + */ + static Rectangle EEToUserSpace( const Rectangle& rRect, const Size& rEESize, bool bIsVertical ); + + /** Convert rect from user to edit engine coordinate space + + As the edit engine internally keeps vertical text unrotated, + all internal edit engine methods return their stuff unrotated, + too. This method rotates and shifts given rect appropriately, + if vertical writing is on. + + @param rRect + Rectangle to transform + + @param rEESize + Paper size of the edit engine + + @param bIsVertical + Whether output text is vertical or not + + @return the possibly transformed rect + */ + static Rectangle UserSpaceToEE( const Rectangle& rRect, const Size& rEESize, bool bIsVertical ); + +}; + +#endif + diff --git a/svx/inc/unofdesc.hxx b/svx/inc/unofdesc.hxx new file mode 100644 index 000000000000..d434b090ad75 --- /dev/null +++ b/svx/inc/unofdesc.hxx @@ -0,0 +1,57 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unofdesc.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_UNOFDESC_HXX +#define SVX_UNOFDESC_HXX + +#include <com/sun/star/awt/FontDescriptor.hpp> +#include <com/sun/star/beans/PropertyState.hpp> +#include <svl/itemset.hxx> +#include <vcl/font.hxx> +#include "svx/svxdllapi.h" + +class SVX_DLLPUBLIC SvxUnoFontDescriptor +{ +public: + static void ConvertToFont( const ::com::sun::star::awt::FontDescriptor& rDesc, Font& rFont ); + static void ConvertFromFont( const Font& rFont, ::com::sun::star::awt::FontDescriptor& rDesc ); + + static void FillItemSet( const ::com::sun::star::awt::FontDescriptor& rDesc, SfxItemSet& rSet ); + static void FillFromItemSet( const SfxItemSet& rSet, ::com::sun::star::awt::FontDescriptor& rDesc ); + + static com::sun::star::beans::PropertyState getPropertyState( const SfxItemSet& rSet ); + static void setPropertyToDefault( SfxItemSet& rSet ); + static ::com::sun::star::uno::Any getPropertyDefault( SfxItemPool* pPool ); + +}; + + +#endif + diff --git a/svx/inc/unofill.hxx b/svx/inc/unofill.hxx new file mode 100644 index 000000000000..4d54d69b8af0 --- /dev/null +++ b/svx/inc/unofill.hxx @@ -0,0 +1,47 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unofill.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOFILL_HXX_ +#define _SVX_UNOFILL_HXX_ + +#include <com/sun/star/uno/XInterface.hpp> +#include "svx/svxdllapi.h" + +class SdrModel; + +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoGradientTable_createInstance( SdrModel* pModel ); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoHatchTable_createInstance( SdrModel* pModel ); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoBitmapTable_createInstance( SdrModel* pModel ); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoTransGradientTable_createInstance( SdrModel* pModel ); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoMarkerTable_createInstance( SdrModel* pModel ); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoDashTable_createInstance( SdrModel* pModel ); + +#endif // _SVX_UNOFILL_HXX_ + diff --git a/svx/inc/unolingu.hxx b/svx/inc/unolingu.hxx new file mode 100644 index 000000000000..c2ba7aa60565 --- /dev/null +++ b/svx/inc/unolingu.hxx @@ -0,0 +1,239 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unolingu.hxx,v $ + * $Revision: 1.17 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _UNO_LINGU_HXX +#define _UNO_LINGU_HXX + +#include <i18npool/lang.h> +#include <tools/string.hxx> +#include <vos/refernce.hxx> +#include <com/sun/star/util/Language.hpp> +#include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/linguistic2/XLinguServiceManager.hpp> +#include <com/sun/star/linguistic2/XSpellChecker1.hpp> +#include <com/sun/star/linguistic2/XHyphenator.hpp> +#include <com/sun/star/linguistic2/XThesaurus.hpp> +#include <com/sun/star/linguistic2/XDictionaryList.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include "svx/svxdllapi.h" + +class LinguMgrExitLstnr; + +class Window; + +/////////////////////////////////////////////////////////////////////////// +// SvxLinguConfigUpdate +// class to update configuration items when (before!) the linguistic is used. +// +// This class is called by all the dummy implementations to update all of the +// configuration (list of used/available services) when the linguistic is +// accessed for the first time. + +class SvxLinguConfigUpdate +{ + static INT32 nCurrentDataFilesChangedCheckValue; + static INT16 nNeedUpdating; // n == -1 => needs to be checked + // n == 0 => already updated, nothing to be done + // n == 1 => needs to be updated + + static INT32 CalcDataFilesChangedCheckValue(); + +public: + + SVX_DLLPUBLIC static void UpdateAll( sal_Bool bForceCheck = sal_False ); + static BOOL IsNeedUpdateAll( sal_Bool bForceCheck = sal_False ); +}; + +/////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC LinguMgr +{ + friend class LinguMgrExitLstnr; + + //static ::VOS::ORefCount aRefCount; + + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XLinguServiceManager > xLngSvcMgr; + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > xSpell; + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > xHyph; + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XThesaurus > xThes; + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > xDicList; + static ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > xProp; + + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > xIgnoreAll; + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > xChangeAll; + + static LinguMgrExitLstnr *pExitLstnr; + static sal_Bool bExiting; + + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > GetSpell(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > GetHyph(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XThesaurus > GetThes(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > GetDicList(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > GetProp(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > GetStandard(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > GetIgnoreAll(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > GetChangeAll(); + + // disallow access to copy-constructor and assignment-operator + LinguMgr(const LinguMgr &); + LinguMgr & operator = (const LinguMgr &); + +public: + + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > GetSpellChecker(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > GetHyphenator(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XThesaurus > GetThesaurus(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > GetDictionaryList(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > GetLinguPropertySet(); + + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XLinguServiceManager > GetLngSvcMgr(); + + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > GetStandardDic(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > GetIgnoreAllList(); + static ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > GetChangeAllList(); + + // update all configuration entries + static void UpdateAll(); +}; + +/////////////////////////////////////////////////////////////////////////// + +namespace com { namespace sun { namespace star { namespace linguistic2 { + class XHyphenatedWord; +}}}} + + +struct SvxAlternativeSpelling +{ + String aReplacement; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord; + INT16 nChangedPos, + nChangedLength; + BOOL bIsAltSpelling; + + inline SvxAlternativeSpelling(); +}; + +inline SvxAlternativeSpelling::SvxAlternativeSpelling() : + nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(FALSE) +{ +} + + +SVX_DLLPUBLIC SvxAlternativeSpelling SvxGetAltSpelling( + const ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenatedWord > & rHyphWord ); + + +/////////////////////////////////////////////////////////////////////////// + +class SVX_DLLPUBLIC SvxDicListChgClamp +{ +private: + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > xDicList; + + // disallow access to copy-constructor and assignment-operator + SVX_DLLPRIVATE SvxDicListChgClamp(const SvxDicListChgClamp &); + SVX_DLLPRIVATE SvxDicListChgClamp & operator = (const SvxDicListChgClamp &); + +public: + SvxDicListChgClamp( ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > &rxDicList ); + ~SvxDicListChgClamp(); +}; + +/////////////////////////////////////////////////////////////////////////// + +//TL:TODO: remove those functions or make them inline +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > SvxGetSpellChecker(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > SvxGetHyphenator(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XThesaurus > SvxGetThesaurus(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > SvxGetDictionaryList(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > SvxGetLinguPropertySet(); +//TL:TODO: remove argument or provide SvxGetIgnoreAllList with the same one +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > SvxGetOrCreatePosDic( + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > xDicList ); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > SvxGetIgnoreAllList(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > SvxGetChangeAllList(); + +/////////////////////////////////////////////////////////////////////////// +// misc functions +// + +SVX_DLLPUBLIC LanguageType SvxLocaleToLanguage( + const ::com::sun::star::lang::Locale& rLocale ); +SVX_DLLPUBLIC ::com::sun::star::lang::Locale& SvxLanguageToLocale( + ::com::sun::star::lang::Locale& rLocale, LanguageType eLang ); +SVX_DLLPUBLIC ::com::sun::star::lang::Locale SvxCreateLocale( LanguageType eLang ); + + +SVX_DLLPUBLIC short SvxDicError( Window *pParent, sal_Int16 nError ); + + +#endif + + + diff --git a/svx/inc/unomaster.hxx b/svx/inc/unomaster.hxx new file mode 100644 index 000000000000..6704bfa6f173 --- /dev/null +++ b/svx/inc/unomaster.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unomaster.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOMASTER_HXX +#define _SVX_UNOMASTER_HXX + +#include <com/sun/star/uno/Type.h> +#include <com/sun/star/uno/Any.h> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/beans/XPropertyState.hpp> + +/** this abstract class is the interface for an instance that likes to enhance + the functionality of components implemented with derivations from SvxShape + + @see SvxShape::setMaster +*/ +class SvxShapeMaster +{ +public: + virtual sal_Bool queryAggregation( const com::sun::star::uno::Type & rType, com::sun::star::uno::Any& aAny ) = 0; + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) = 0; + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0; + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0; + + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) = 0; + virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) = 0; + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0; + + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException) = 0; + + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) = 0; + + virtual void dispose() = 0; + + virtual void modelChanged( SdrModel* pNewModel ) = 0; + virtual void pageChanged( SdrPage* pNewPage ) = 0; + virtual void objectChanged( SdrObject* pNewObj ) = 0; +}; + +#endif + diff --git a/svx/inc/unomlstr.hxx b/svx/inc/unomlstr.hxx new file mode 100644 index 000000000000..6e80340ed475 --- /dev/null +++ b/svx/inc/unomlstr.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unomlstr.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_UNOMLSTR_HXX +#define _SVX_UNOMLSTR_HXX + +#include <com/sun/star/util/XModifyListener.hpp> + +#include <cppuhelper/implbase1.hxx> + +class SdrObject; + +class SvxUnoShapeModifyListener : public ::cppu::WeakAggImplHelper1< ::com::sun::star::util::XModifyListener > +{ + SdrObject* mpObj; + +public: + SvxUnoShapeModifyListener( SdrObject* pObj ) throw(); + virtual ~SvxUnoShapeModifyListener() throw(); + + // ::com::sun::star::util::XModifyListener + virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException); + + // internal + void invalidate() throw(); +}; + + +#endif + + diff --git a/svx/inc/unonrule.hxx b/svx/inc/unonrule.hxx new file mode 100644 index 000000000000..70ae33c75d84 --- /dev/null +++ b/svx/inc/unonrule.hxx @@ -0,0 +1,49 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unonrule.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNONRULE_HXX +#define _SVX_UNONRULE_HXX + +#include <com/sun/star/container/XIndexReplace.hpp> +#include <com/sun/star/ucb/XAnyCompare.hpp> +#include "svx/svxdllapi.h" + +class SdrModel; +class SvxNumRule; + +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SvxCreateNumRule( const SvxNumRule* pRule ) throw(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SvxCreateNumRule( SdrModel* pModel ) throw(); +const SvxNumRule& SvxGetNumRule( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > xRule ) throw( ::com::sun::star::lang::IllegalArgumentException ); +bool SvxGetNumRule( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > xRule, SvxNumRule& rNumRule ); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XAnyCompare > SvxCreateNumRuleCompare() throw(); + +#endif + + diff --git a/svx/inc/unopool.hxx b/svx/inc/unopool.hxx new file mode 100644 index 000000000000..6330097d3a71 --- /dev/null +++ b/svx/inc/unopool.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unopool.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_UNOPOOL_HXX_ +#define _SVX_UNOPOOL_HXX_ + +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <comphelper/propertysethelper.hxx> +#include <cppuhelper/implbase4.hxx> +#include "svx/svxdllapi.h" + +class SdrModel; +class SfxItemPool; + +/** This class implements the service com.sun.star.drawing.Defaults. + It works on the SfxItemPool from the given model and the global + draw object item pool. + The class can work in a read only mode without a model. Derivated + classes can set a model on demand by overiding getModelPool(). +*/ +class SVX_DLLPUBLIC SvxUnoDrawPool : public ::cppu::OWeakAggObject, + public ::com::sun::star::lang::XServiceInfo, + public ::com::sun::star::lang::XTypeProvider, + public comphelper::PropertySetHelper +{ +public: + SvxUnoDrawPool( SdrModel* pModel, sal_Int32 nServiceId ) throw(); + + /** deprecated */ + SvxUnoDrawPool( SdrModel* pModel ) throw(); + virtual ~SvxUnoDrawPool() throw(); + + /** This returns the item pool from the given model, or the default pool if there is no model and bReadOnly is true. + If bReadOnly is false and there is no model the default implementation returns NULL. + */ + virtual SfxItemPool* getModelPool( sal_Bool bReadOnly ) throw(); + + // overiden helpers from comphelper::PropertySetHelper + virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const ::com::sun::star::uno::Any* pValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); + virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, ::com::sun::star::uno::Any* pValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); + + virtual void _getPropertyStates( const comphelper::PropertyMapEntry** ppEntries, ::com::sun::star::beans::PropertyState* pStates ) throw(::com::sun::star::beans::UnknownPropertyException ); + virtual void _setPropertyToDefault( const comphelper::PropertyMapEntry* pEntry ) throw(::com::sun::star::beans::UnknownPropertyException ); + virtual ::com::sun::star::uno::Any _getPropertyDefault( const comphelper::PropertyMapEntry* pEntry ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); + +protected: + void init(); + + virtual void getAny( SfxItemPool* pPool, const comphelper::PropertyMapEntry* pEntry, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException); + virtual void putAny( SfxItemPool* pPool, const comphelper::PropertyMapEntry* pEntry, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException); + +protected: + SdrModel* mpModel; + SfxItemPool* mpDefaultsPool; +}; + +#endif diff --git a/svx/inc/unoshcol.hxx b/svx/inc/unoshcol.hxx new file mode 100644 index 000000000000..eda96d6775e6 --- /dev/null +++ b/svx/inc/unoshcol.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: unoshcol.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_UNOSHGRP_HXX +#define _SVX_UNOSHGRP_HXX + +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/drawing/XShapes.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <osl/mutex.hxx> +#include <cppuhelper/interfacecontainer.hxx> + +#include <cppuhelper/implbase3.hxx> +#include "svx/svxdllapi.h" + +class XShapeList; + +class SvxShapeCollectionMutex +{ +public: + ::osl::Mutex maMutex; +}; + +SVX_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SvxShapeCollection_NewInstance() throw(); + +/*********************************************************************** +* * +***********************************************************************/ +class SVX_DLLPUBLIC SvxShapeCollection : public ::cppu::WeakAggImplHelper3< + ::com::sun::star::drawing::XShapes, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::lang::XComponent + >, + public SvxShapeCollectionMutex +{ +private: + cppu::OInterfaceContainerHelper maShapeContainer; + + cppu::OBroadcastHelper mrBHelper; + + SVX_DLLPRIVATE virtual void disposing() throw(); + +public: + SvxShapeCollection() throw(); + virtual ~SvxShapeCollection() throw(); + + // XInterface + virtual void SAL_CALL release() throw(); + + // XComponent + virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ; + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); + + // XShapes + virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(); + static ::rtl::OUString getImplementationName_Static(); +}; + +::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxShapeCollection_createInstance( const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr ); +#endif + + diff --git a/svx/inc/verttexttbxctrl.hxx b/svx/inc/verttexttbxctrl.hxx new file mode 100644 index 000000000000..02185e9b1e23 --- /dev/null +++ b/svx/inc/verttexttbxctrl.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: verttexttbxctrl.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_VERT_TEXT_TBXCTRL_HXX +#define _SVX_VERT_TEXT_TBXCTRL_HXX + +#include <sfx2/tbxctrl.hxx> +#include "svx/svxdllapi.h" + +/* -----------------------------27.04.01 15:38-------------------------------- + control to remove/insert cjk settings dependent vertical text toolbox item + ---------------------------------------------------------------------------*/ +class SvxVertCTLTextTbxCtrl : public SfxToolBoxControl +{ + sal_Bool bCheckVertical; //determines whether vertical mode or CTL mode has to be checked +public: + SvxVertCTLTextTbxCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~SvxVertCTLTextTbxCtrl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + void SetVert(sal_Bool bSet) {bCheckVertical = bSet;} + +}; +/* -----------------------------12.09.2002 11:50------------------------------ + + ---------------------------------------------------------------------------*/ +class SVX_DLLPUBLIC SvxCTLTextTbxCtrl : public SvxVertCTLTextTbxCtrl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxCTLTextTbxCtrl(USHORT nSlotId, USHORT nId, ToolBox& rTbx ); +}; +/* -----------------------------12.09.2002 11:50------------------------------ + + ---------------------------------------------------------------------------*/ +class SVX_DLLPUBLIC SvxVertTextTbxCtrl : public SvxVertCTLTextTbxCtrl +{ +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxVertTextTbxCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); +}; + +#endif diff --git a/svx/inc/wrapfield.hxx b/svx/inc/wrapfield.hxx new file mode 100644 index 000000000000..62a797aeda57 --- /dev/null +++ b/svx/inc/wrapfield.hxx @@ -0,0 +1,61 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: wrapfield.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVX_WRAPFIELD_HXX +#define SVX_WRAPFIELD_HXX + +#include <vcl/field.hxx> +#include "svx/svxdllapi.h" + +namespace svx { + +// ============================================================================ + +/** A numeric spin field that wraps around the value on limits. + @descr Note: Use type "NumericField" in resources. */ +class SVX_DLLPUBLIC WrapField : public NumericField +{ +public: + explicit WrapField( Window* pParent, WinBits nWinStyle ); + explicit WrapField( Window* pParent, const ResId& rResId ); + +protected: + /** Up event with wrap-around functionality. */ + virtual void Up(); + /** Down event with wrap-around functionality. */ + virtual void Down(); +}; + +// ============================================================================ + +} // namespace svx + +#endif + diff --git a/svx/inc/xattr.hxx b/svx/inc/xattr.hxx new file mode 100644 index 000000000000..bbd14abf0c99 --- /dev/null +++ b/svx/inc/xattr.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xattr.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _XATTR_HXX +#define _XATTR_HXX + +// include --------------------------------------------------------------- + +#ifndef _XDEF_HXX +//#include <svx/xdef.hxx> +#endif +#ifndef _XENUM_HXX +//#include <svx/xenum.hxx> +#endif +#ifndef _XPOLY_HXX +//#include <svx/xpoly.hxx> +#endif +#ifndef _SVX_RECTENUM_HXX +//#include <svx/rectenum.hxx> +#endif + +class XColorTable; +class XDashTable; +class XLineEndTable; +class XHatchTable; +class XBitmapTable; +class XGradientTable; + +#include <svx/xit.hxx> +#include <svx/xcolit.hxx> +#include <svx/xgrad.hxx> +#include <svx/xhatch.hxx> +#include <svx/xlineit.hxx> +#include <svx/xfillit.hxx> +#include <svx/xtextit.hxx> +#include <svx/xlineit0.hxx> +#include <svx/xfillit0.hxx> +#include <svx/xtextit0.hxx> +#include <svx/xsetit.hxx> +#include <svx/xlinjoit.hxx> + + +#endif // _XATTR_HXX + diff --git a/svx/inc/xexch.hxx b/svx/inc/xexch.hxx new file mode 100644 index 000000000000..4042303be3ae --- /dev/null +++ b/svx/inc/xexch.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xexch.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XEXCH_HXX +#define _SVX_XEXCH_HXX + + +#include <tools/stream.hxx> +#include "svx/svxdllapi.h" + +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// Clipboard-Format fuer XOutDev-Fuellattribute +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +class XFillAttrSetItem; +class SfxItemPool; + + + +class SVX_DLLPUBLIC XFillExchangeData +{ +private: + XFillAttrSetItem* pXFillAttrSetItem; + SfxItemPool* pPool; + +public: + TYPEINFO(); + + XFillExchangeData(); + XFillExchangeData(const XFillAttrSetItem rXFillAttrSetItem); + virtual ~XFillExchangeData(); + + // Zuweisungsoperator + XFillExchangeData& operator=( const XFillExchangeData& rXFillExchangeData ); + + SVX_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStm, const XFillExchangeData& rXFillExchangeData ); + SVX_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStm, XFillExchangeData& rXFillExchangeData ); + + static ULONG RegisterClipboardFormatName(); + XFillAttrSetItem* GetXFillAttrSetItem() { return pXFillAttrSetItem; } +}; + +#endif // _SVX_XEXCH_HXX diff --git a/svx/inc/xmlcnitm.hxx b/svx/inc/xmlcnitm.hxx new file mode 100644 index 000000000000..22b6e02955a0 --- /dev/null +++ b/svx/inc/xmlcnitm.hxx @@ -0,0 +1,94 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xmlcnitm.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XMLCNITM_HXX +#define _SVX_XMLCNITM_HXX + +#include <svl/poolitem.hxx> +#include "svx/svxdllapi.h" + +class SvXMLNamespaceMap; +namespace rtl { class OUString; } + +//============================================================================ + +class SvXMLAttrContainerData; + +class SVX_DLLPUBLIC SvXMLAttrContainerItem: public SfxPoolItem +{ + SvXMLAttrContainerData *pImpl; + +public: + TYPEINFO(); + + SvXMLAttrContainerItem( sal_uInt16 nWhich = 0 ); + SvXMLAttrContainerItem( const SvXMLAttrContainerItem& ); + virtual ~SvXMLAttrContainerItem(); + + virtual int operator==( const SfxPoolItem& ) const; + using SfxPoolItem::Compare; + virtual int Compare( const SfxPoolItem &rWith ) const; + + virtual SfxItemPresentation GetPresentation( + SfxItemPresentation ePresentation, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresentationMetric, + XubString &rText, + const IntlWrapper *pIntlWrapper = 0 ) const; + + virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; + + virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + + virtual SfxPoolItem *Clone( SfxItemPool * = 0) const + { return new SvXMLAttrContainerItem( *this ); } + + sal_Bool AddAttr( const ::rtl::OUString& rLName, + const ::rtl::OUString& rValue ); + sal_Bool AddAttr( const ::rtl::OUString& rPrefix, + const ::rtl::OUString& rNamespace, + const ::rtl::OUString& rLName, + const ::rtl::OUString& rValue ); + + sal_uInt16 GetAttrCount() const; + ::rtl::OUString GetAttrNamespace( sal_uInt16 i ) const; + ::rtl::OUString GetAttrPrefix( sal_uInt16 i ) const; + const ::rtl::OUString& GetAttrLName( sal_uInt16 i ) const; + const ::rtl::OUString& GetAttrValue( sal_uInt16 i ) const; + + sal_uInt16 GetFirstNamespaceIndex() const; + sal_uInt16 GetNextNamespaceIndex( sal_uInt16 nIdx ) const; + const ::rtl::OUString& GetNamespace( sal_uInt16 i ) const; + const ::rtl::OUString& GetPrefix( sal_uInt16 i ) const; +}; + +#endif // _SVX_XMLCNITM_HXX + diff --git a/svx/inc/xmleohlp.hxx b/svx/inc/xmleohlp.hxx new file mode 100644 index 000000000000..3c7a06b57ada --- /dev/null +++ b/svx/inc/xmleohlp.hxx @@ -0,0 +1,152 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xmleohlp.hxx,v $ + * $Revision: 1.14 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _XMLEOHLP_HXX +#define _XMLEOHLP_HXX + +#include <cppuhelper/compbase2.hxx> +#include <osl/mutex.hxx> +#include <sot/storage.hxx> +#include <map> +#include <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/document/XEmbeddedObjectResolver.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/embed/XEmbeddedObject.hpp> +#include "svx/svxdllapi.h" + +// ----------------------------- +// - SvXMLEmbeddedObjectHelper - +// ----------------------------- + +enum SvXMLEmbeddedObjectHelperMode +{ + EMBEDDEDOBJECTHELPER_MODE_READ = 0, + EMBEDDEDOBJECTHELPER_MODE_WRITE = 1 +}; + +// ----------------------------- +// - SvXMLEmbeddedObjectHelper - +// ----------------------------- + +namespace comphelper { +class IEmbeddedHelper; +} +class SvGlobalName; +struct OUStringLess; +class OutputStorageWrapper_Impl; + +class SVX_DLLPUBLIC SvXMLEmbeddedObjectHelper : public ::cppu::WeakComponentImplHelper2< + ::com::sun::star::document::XEmbeddedObjectResolver, + ::com::sun::star::container::XNameAccess > +{ + typedef ::std::map< ::rtl::OUString, OutputStorageWrapper_Impl*, + OUStringLess > SvXMLEmbeddedObjectHelper_Impl; +private: + + ::osl::Mutex maMutex; + + const ::rtl::OUString maReplacementGraphicsContainerStorageName; + const ::rtl::OUString maReplacementGraphicsContainerStorageName60; + ::rtl::OUString maCurContainerStorageName; + + + com::sun::star::uno::Reference < com::sun::star::embed::XStorage > mxRootStorage; // package + ::comphelper::IEmbeddedHelper* mpDocPersist; + com::sun::star::uno::Reference < com::sun::star::embed::XStorage > mxContainerStorage; // container sub package for + com::sun::star::uno::Reference < com::sun::star::embed::XStorage > mxTempStorage; // package + // objects + SvXMLEmbeddedObjectHelperMode meCreateMode; + SvXMLEmbeddedObjectHelper_Impl *mpStreamMap; + + SVX_DLLPRIVATE sal_Bool ImplGetStorageNames( + const ::rtl::OUString& rURLStr, + ::rtl::OUString& rContainerStorageName, + ::rtl::OUString& rObjectStorageName, + sal_Bool bInternalToExternal, + sal_Bool *pGraphicRepl=0, + sal_Bool *pOasisFormat=0 ) const; + + SVX_DLLPRIVATE com::sun::star::uno::Reference < com::sun::star::embed::XStorage > ImplGetContainerStorage( + const ::rtl::OUString& rStorageName ); + + SVX_DLLPRIVATE String ImplGetUniqueName( ::comphelper::IEmbeddedHelper*, const sal_Char* p ) const; + SVX_DLLPRIVATE sal_Bool ImplReadObject( + const ::rtl::OUString& rContainerStorageName, + ::rtl::OUString& rObjName, + const SvGlobalName *pClassId, + SvStream* pTemp ); + + SVX_DLLPRIVATE ::rtl::OUString ImplInsertEmbeddedObjectURL( + const ::rtl::OUString& rURLStr ); + + SVX_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > ImplGetReplacementImage( + const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj ); + +protected: + + SvXMLEmbeddedObjectHelper(); + ~SvXMLEmbeddedObjectHelper(); + void Init( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, + ::comphelper::IEmbeddedHelper& rDocPersist, + SvXMLEmbeddedObjectHelperMode eCreateMode ); + + virtual void SAL_CALL disposing(); + +public: + SvXMLEmbeddedObjectHelper( + ::comphelper::IEmbeddedHelper& rDocPersist, + SvXMLEmbeddedObjectHelperMode eCreateMode ); + + static SvXMLEmbeddedObjectHelper* Create( + const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, + ::comphelper::IEmbeddedHelper& rDocPersist, + SvXMLEmbeddedObjectHelperMode eCreateMode, + sal_Bool bDirect = sal_True ); + static SvXMLEmbeddedObjectHelper* Create( + ::comphelper::IEmbeddedHelper& rDocPersist, + SvXMLEmbeddedObjectHelperMode eCreateMode ); + static void Destroy( SvXMLEmbeddedObjectHelper* pSvXMLEmbeddedObjectHelper ); + + void Flush(); + + // XEmbeddedObjectResolver + virtual ::rtl::OUString SAL_CALL resolveEmbeddedObjectURL( const ::rtl::OUString& aURL ) throw(::com::sun::star::uno::RuntimeException); + + // XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + + // XNameAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException); +}; + +#endif diff --git a/svx/inc/xmlexchg.hxx b/svx/inc/xmlexchg.hxx new file mode 100644 index 000000000000..4debd9ba6822 --- /dev/null +++ b/svx/inc/xmlexchg.hxx @@ -0,0 +1,107 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xmlexchg.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_XMLEXCHG_HXX_ +#define _SVX_XMLEXCHG_HXX_ + +#include <svtools/transfer.hxx> +#include "svx/svxdllapi.h" + +namespace com { + namespace sun { + namespace star { + namespace beans { + class SAL_NO_VTABLE XPropertySet; + } + } + } +} + +//........................................................................ +namespace svx +{ +//........................................................................ + + + //==================================================================== + //= OXFormsDescriptor + //==================================================================== + + struct SVX_DLLPUBLIC OXFormsDescriptor { + + String szName; + String szServiceName; + ::com::sun::star::uno::Reference + < ::com::sun::star::beans::XPropertySet > + xPropSet; + + inline OXFormsDescriptor( void ) {} + inline OXFormsDescriptor( const OXFormsDescriptor &rhs ) { *this=rhs; } + inline OXFormsDescriptor &operator = ( const OXFormsDescriptor &rhs ) { + szName = rhs.szName; + szServiceName = rhs.szServiceName; + xPropSet = rhs.xPropSet; + return (*this); + } + }; + + //==================================================================== + //= OXFormsTransferable + //==================================================================== + class SVX_DLLPUBLIC OXFormsTransferable : public TransferableHelper { + + protected: + + // TransferableHelper overridables + virtual void AddSupportedFormats(); + virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + + static sal_uInt32 getDescriptorFormatId(); + + OXFormsDescriptor m_aDescriptor; + + public: + + /** construct the transferable + */ + OXFormsTransferable( const OXFormsDescriptor &rhs ); + + /** extracts an xform descriptor from the transferable given + */ + static const OXFormsDescriptor &extractDescriptor( const TransferableDataHelper& _rData ); + }; + + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // _SVX_XMLEXCHG_HXX_ + diff --git a/svx/inc/xmlgrhlp.hxx b/svx/inc/xmlgrhlp.hxx new file mode 100644 index 000000000000..77e6eb0be322 --- /dev/null +++ b/svx/inc/xmlgrhlp.hxx @@ -0,0 +1,166 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xmlgrhlp.hxx,v $ + * $Revision: 1.17 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _XMLGRHLP_HXX +#define _XMLGRHLP_HXX + +#include <cppuhelper/compbase2.hxx> +#include <osl/mutex.hxx> +#include <goodies/grfmgr.hxx> +#include <vector> +#include <set> +#include <utility> +#include <com/sun/star/document/XGraphicObjectResolver.hpp> +#include <com/sun/star/document/XBinaryStreamResolver.hpp> +#include <com/sun/star/embed/XStorage.hpp> +#include "svx/svxdllapi.h" + +// ---------------------- +// - SvXMLGraphicHelper - +// ---------------------- + +enum SvXMLGraphicHelperMode +{ + GRAPHICHELPER_MODE_READ = 0, + GRAPHICHELPER_MODE_WRITE = 1 +}; + +// ---------------------- +// - SvXMLGraphicHelper - +// ---------------------- +struct SvxGraphicHelperStream_Impl +{ + ::com::sun::star::uno::Reference < ::com::sun::star::embed::XStorage > xStorage; + ::com::sun::star::uno::Reference < ::com::sun::star::io::XStream > xStream; +}; + +class SVX_DLLPUBLIC SvXMLGraphicHelper : public ::cppu::WeakComponentImplHelper2< ::com::sun::star::document::XGraphicObjectResolver, + ::com::sun::star::document::XBinaryStreamResolver > +{ +private: + + typedef ::std::pair< ::rtl::OUString, ::rtl::OUString > URLPair; + typedef ::std::vector< URLPair > URLPairVector; + typedef ::std::vector< GraphicObject > GraphicObjectVector; + typedef ::std::set< ::rtl::OUString > URLSet; + typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > > GraphicOutputStreamVector; + + ::osl::Mutex maMutex; + ::com::sun::star::uno::Reference < ::com::sun::star::embed::XStorage > mxRootStorage; + ::rtl::OUString maCurStorageName; + URLPairVector maGrfURLs; + GraphicObjectVector maGrfObjs; + GraphicOutputStreamVector maGrfStms; + URLSet maURLSet; + SvXMLGraphicHelperMode meCreateMode; + sal_Bool mbDirect; + + SVX_DLLPRIVATE sal_Bool ImplGetStreamNames( const ::rtl::OUString& rURLStr, + ::rtl::OUString& rPictureStorageName, + ::rtl::OUString& rPictureStreamName ); + SVX_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::embed::XStorage > ImplGetGraphicStorage( const ::rtl::OUString& rPictureStorageName ); + SVX_DLLPRIVATE SvxGraphicHelperStream_Impl ImplGetGraphicStream( const ::rtl::OUString& rPictureStorageName, + const ::rtl::OUString& rPictureStreamName, + BOOL bTruncate ); + SVX_DLLPRIVATE String ImplGetGraphicMimeType( const String& rFileName ) const; + SVX_DLLPRIVATE Graphic ImplReadGraphic( const ::rtl::OUString& rPictureStorageName, + const ::rtl::OUString& rPictureStreamName ); + SVX_DLLPRIVATE sal_Bool ImplWriteGraphic( const ::rtl::OUString& rPictureStorageName, + const ::rtl::OUString& rPictureStreamName, + const ::rtl::OUString& rGraphicId ); + SVX_DLLPRIVATE void ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos, rtl::OUString& rRequestedFileName ); + +protected: + SvXMLGraphicHelper(); + ~SvXMLGraphicHelper(); + void Init( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XStorage >& xXMLStorage, + SvXMLGraphicHelperMode eCreateMode, + BOOL bDirect ); + + virtual void SAL_CALL disposing(); + +public: + SvXMLGraphicHelper( SvXMLGraphicHelperMode eCreateMode ); + + static SvXMLGraphicHelper* Create( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XStorage >& rXMLStorage, + SvXMLGraphicHelperMode eCreateMode, + BOOL bDirect = TRUE ); + static SvXMLGraphicHelper* Create( SvXMLGraphicHelperMode eCreateMode ); + + static void Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper ); + +public: + + // XGraphicObjectResolver + virtual ::rtl::OUString SAL_CALL resolveGraphicObjectURL( const ::rtl::OUString& aURL ) throw(::com::sun::star::uno::RuntimeException); + + // XBinaryStreamResolver + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getInputStream( const ::rtl::OUString& rURL ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > SAL_CALL createOutputStream( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL resolveOutputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rxBinaryStream ) throw (::com::sun::star::uno::RuntimeException); +}; + + +// for instantiation via service manager +namespace svx +{ +/** Create this with createInstanceWithArguments. service name + "com.sun.star.comp.Svx.GraphicImportHelper", one argument which is the + XStorage. Without arguments no helper class is created. With an empty + argument the helper class is created and initialized like in the CTOR to + SvXMLGraphicHelper that only gets the create mode. + + You should call dispose after you no longer need this component. + + uses eCreateMode == GRAPHICHELPER_MODE_READ, bDirect == TRUE in + SvXMLGraphicHelper + */ +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicImportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); +SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames() throw(); +SVX_DLLPUBLIC ::rtl::OUString SAL_CALL SvXMLGraphicImportHelper_getImplementationName() throw(); + +/** Create this with createInstanceWithArguments. service name + "com.sun.star.comp.Svx.GraphicExportHelper", one argument which is the + XStorage. Without arguments no helper class is created. With an empty + argument the helper class is created and initialized like in the CTOR to + SvXMLGraphicHelper that only gets the create mode + + To write the Pictures stream, you have to call dispose at this component. + Make sure you call dipose before you commit the parent storage. + + uses eCreateMode == GRAPHICHELPER_MODE_WRITE, bDirect == TRUE in + SvXMLGraphicHelper + */ +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicExportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); +SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServiceNames() throw(); +SVX_DLLPUBLIC ::rtl::OUString SAL_CALL SvXMLGraphicExportHelper_getImplementationName() throw(); +} + +#endif diff --git a/svx/inc/xmlsecctrl.hxx b/svx/inc/xmlsecctrl.hxx new file mode 100644 index 000000000000..67d58b08e3c1 --- /dev/null +++ b/svx/inc/xmlsecctrl.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xmlsecctrl.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _XMLSECURITY_STBCONTRL_HXX +#define _XMLSECURITY_STBCONTRL_HXX + +#include <sfx2/stbitem.hxx> +#include "svx/svxdllapi.h" + + +class SvxSizeItem; + +// class SvxPosSizeToolBoxControl ---------------------------------------- + +class SVX_DLLPUBLIC XmlSecStatusBarControl : public SfxStatusBarControl +{ +private: + struct XmlSecStatusBarControl_Impl; + + XmlSecStatusBarControl_Impl* mpImpl; + +public: + SFX_DECL_STATUSBAR_CONTROL(); + + XmlSecStatusBarControl( USHORT _nSlotId, USHORT _nId, StatusBar& _rStb ); + ~XmlSecStatusBarControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void Paint( const UserDrawEvent& rEvt ); + virtual void Command( const CommandEvent& rCEvt ); + static long GetDefItemWidth( StatusBar& _rStatusBar ); +}; + +#endif + diff --git a/svx/inc/xoutbmp.hxx b/svx/inc/xoutbmp.hxx new file mode 100644 index 000000000000..6bbbb0b1073a --- /dev/null +++ b/svx/inc/xoutbmp.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xoutbmp.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _XOUTBMP_HXX +#define _XOUTBMP_HXX + +#include <vcl/graph.hxx> +#include <com/sun/star/uno/Sequence.h> +#include <com/sun/star/beans/PropertyValue.hpp> +#include "svx/svxdllapi.h" + +// ----------- +// - Defines - +// ----------- + +#define XOUTBMP_MIRROR_HORZ 0x00000001L +#define XOUTBMP_MIRROR_VERT 0x00000010L + +#define XOUTBMP_CONTOUR_HORZ 0x00000001L +#define XOUTBMP_CONTOUR_VERT 0x00000002L +#define XOUTBMP_CONTOUR_EDGEDETECT 0x00000004L + +#define XOUTBMP_DONT_EXPAND_FILENAME 0x10000000L +#define XOUTBMP_USE_GIF_IF_POSSIBLE 0x20000000L +#define XOUTBMP_USE_GIF_IF_SENSIBLE 0x40000000L +#define XOUTBMP_USE_NATIVE_IF_POSSIBLE 0x80000000L + +// -------------- +// - XOutBitmap - +// -------------- + +class GraphicFilter; +class VirtualDevice; +class INetURLObject; +class Polygon; + +class SVX_DLLPUBLIC XOutBitmap +{ +public: + + static GraphicFilter* pGrfFilter; + + static BitmapEx CreateQuickDrawBitmapEx( const Graphic& rGraphic, const OutputDevice& rCompDev, + const MapMode& rMapMode, const Size& rLogSize, + const Point& rPoint, const Size& rSize ); + static Graphic MirrorGraphic( const Graphic& rGraphic, const ULONG nMirrorFlags ); + static Animation MirrorAnimation( const Animation& rAnimation, BOOL bHMirr, BOOL bVMirr ); + static USHORT WriteGraphic( const Graphic& rGraphic, String& rFileName, + const String& rFilterName, const ULONG nFlags = 0L, + const Size* pMtfSize_100TH_MM = NULL ); + static void DrawQuickDrawBitmapEx( OutputDevice* pOutDev, const Point& rPt, + const Size& rSize, const BitmapEx& rBmpEx ); + static void DrawTiledBitmapEx( OutputDevice* pOutDev, const Point& rStartPt, const Size& rGrfSize, + const Rectangle& rTileRect, const BitmapEx& rBmpEx ); + + static USHORT ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL, + GraphicFilter& rFilter, const USHORT nFormat, + const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL ); + + static Bitmap DetectEdges( const Bitmap& rBmp, const BYTE cThreshold ); + + static Polygon GetCountour( const Bitmap& rBmp, const ULONG nContourFlags, + const BYTE cEdgeDetectThreshold = 50, + const Rectangle* pWorkRect = NULL ); +}; + +// ---------------- +// - DitherBitmap - +// ---------------- + +SVX_DLLPUBLIC BOOL DitherBitmap( Bitmap& rBitmap ); + +#endif // _XOUTBMP_HXX diff --git a/svx/inc/xpolyimp.hxx b/svx/inc/xpolyimp.hxx new file mode 100644 index 000000000000..acc13be87c74 --- /dev/null +++ b/svx/inc/xpolyimp.hxx @@ -0,0 +1,109 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xpolyimp.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _XPOLYIMP_HXX +#define _XPOLYIMP_HXX + +#include <tools/gen.hxx> +#include <svx/xpoly.hxx> + +/************************************************************************* +|* +|* class ImpXPolygon +|* +|* Beschreibung +|* Ersterstellung 08.11.94 +|* Letzte Aenderung Joe 26.09.95 +|* +*************************************************************************/ +class ImpXPolygon +{ +public: + Point* pPointAry; + BYTE* pFlagAry; + Point* pOldPointAry; + BOOL bDeleteOldPoints; + USHORT nSize; + USHORT nResize; + USHORT nPoints; + USHORT nRefCount; + + ImpXPolygon( USHORT nInitSize = 16, USHORT nResize=16 ); + ImpXPolygon( const ImpXPolygon& rImpXPoly ); + ~ImpXPolygon(); + + bool operator==(const ImpXPolygon& rImpXPoly) const; + bool operator!=(const ImpXPolygon& rImpXPoly) const { return !operator==(rImpXPoly); } + + void CheckPointDelete() + { + if ( bDeleteOldPoints ) + { + delete[] (char*)pOldPointAry; + bDeleteOldPoints = FALSE; + } + } + + void Resize( USHORT nNewSize, BOOL bDeletePoints = TRUE ); + void InsertSpace( USHORT nPos, USHORT nCount ); + void Remove( USHORT nPos, USHORT nCount ); +}; + + +/************************************************************************* +|* +|* class ImpXPolyPolygon +|* +|* Beschreibung +|* Ersterstellung 08.11.94 +|* Letzte Aenderung Joe 26-09-1995 +|* +*************************************************************************/ +DECLARE_LIST( XPolygonList, XPolygon* ) + +class ImpXPolyPolygon +{ +public: + XPolygonList aXPolyList; + USHORT nRefCount; + + ImpXPolyPolygon( USHORT nInitSize = 16, USHORT nResize = 16 ) : + aXPolyList( 1024, nInitSize, nResize ) + { nRefCount = 1; } + ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ); + ~ImpXPolyPolygon(); + + bool operator==(const ImpXPolyPolygon& rImpXPolyPoly) const; + bool operator!=(const ImpXPolyPolygon& rImpXPolyPoly) const { return !operator==(rImpXPolyPoly); } +}; + + + +#endif // _XPOLYIMP_HXX diff --git a/svx/inc/zoom_def.hxx b/svx/inc/zoom_def.hxx new file mode 100644 index 000000000000..7788bb1023f1 --- /dev/null +++ b/svx/inc/zoom_def.hxx @@ -0,0 +1,8 @@ +#ifndef _SVX_ZOOM_DEF_HXX +#define _SVX_ZOOM_DEF_HXX + +#define ZOOMBTN_OPTIMAL ((USHORT)0x0001) +#define ZOOMBTN_PAGEWIDTH ((USHORT)0x0002) +#define ZOOMBTN_WHOLEPAGE ((USHORT)0x0004) + +#endif diff --git a/svx/inc/zoomctrl.hxx b/svx/inc/zoomctrl.hxx new file mode 100644 index 000000000000..9dac61f4ec50 --- /dev/null +++ b/svx/inc/zoomctrl.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: zoomctrl.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_ZOOMCTRL_HXX +#define _SVX_ZOOMCTRL_HXX + +// include --------------------------------------------------------------- + +#include <sfx2/stbitem.hxx> +#include "svx/svxdllapi.h" + +// class SvxZoomToolBoxControl ------------------------------------------- + +class SVX_DLLPUBLIC SvxZoomStatusBarControl : public SfxStatusBarControl +{ +private: + USHORT nZoom; + USHORT nValueSet; + +public: + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual void Paint( const UserDrawEvent& rEvt ); + virtual void Command( const CommandEvent& rCEvt ); + + SFX_DECL_STATUSBAR_CONTROL(); + + SvxZoomStatusBarControl( USHORT nSlotId, USHORT nId, StatusBar& rStb ); + + static ULONG GetDefItemWidth(const StatusBar& rStb); + +}; + + +#endif + |