diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-01-06 19:26:54 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-01-06 19:26:54 +0100 |
commit | aed3f1817f4de6314285efed1e48dc7c305e4f67 (patch) | |
tree | fd4f5447a3388f5256bb06dc73708577d217e1c4 /editeng/inc | |
parent | 62b69e958ced6717e908f541cc84a83ec94242f3 (diff) |
#i107450#: move code from svx to new module editeng
Diffstat (limited to 'editeng/inc')
125 files changed, 19948 insertions, 0 deletions
diff --git a/editeng/inc/editeng.hrc b/editeng/inc/editeng.hrc new file mode 100644 index 000000000000..dfc490f45a50 --- /dev/null +++ b/editeng/inc/editeng.hrc @@ -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: editeng.hrc,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 _EDITENG_HRC +#define _EDITENG_HRC + +#ifndef _SOLAR_HRC +#include <svl/solar.hrc> +#endif + +#define RID_EDITUNDO_DEL ( RID_EDIT_START + 0 ) +#define RID_EDITUNDO_MOVE ( RID_EDIT_START + 1 ) +#define RID_EDITUNDO_INSERT ( RID_EDIT_START + 2 ) +#define RID_EDITUNDO_REPLACE ( RID_EDIT_START + 3 ) +#define RID_EDITUNDO_SETATTRIBS ( RID_EDIT_START + 4 ) +#define RID_EDITUNDO_SETSTYLE ( RID_EDIT_START + 5 ) +#define RID_EDITUNDO_RESETATTRIBS ( RID_EDIT_START + 6 ) +#define RID_EDITUNDO_INDENT ( RID_EDIT_START + 7 ) +#define RID_EDITUNDO_TRANSLITERATE ( RID_EDIT_START + 8 ) + +#define RID_MENU_SPELL ( RID_EDIT_START + 10 ) +#define RID_STR_PARAGRAPH ( RID_EDIT_START + 11 ) +#define RID_STR_WORD ( RID_EDIT_START + 12 ) + +#define RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION (RID_EDIT_START + 13) +#define RID_SVXSTR_A11Y_IMAGEBULLET_NAME (RID_EDIT_START + 14) + +#define MN_SPELLING 1 +#define MN_INSERT 2 +#define MN_IGNORE 3 +#define MN_AUTOCORR 4 +#define MN_WORDLANGUAGE 5 +#define MN_PARALANGUAGE 6 + +#define MN_ALTSTART 1000 +#define MN_AUTOSTART 2000 +#define MN_DICTSTART 3000 + + +#endif // _EDITENG_HRC diff --git a/editeng/inc/editeng/AccessibleComponentBase.hxx b/editeng/inc/editeng/AccessibleComponentBase.hxx new file mode 100644 index 000000000000..f2b25e607eea --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/AccessibleContextBase.hxx b/editeng/inc/editeng/AccessibleContextBase.hxx new file mode 100644 index 000000000000..188bf7dd53c7 --- /dev/null +++ b/editeng/inc/editeng/AccessibleContextBase.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: 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 <editeng/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> +#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp> +#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 <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/AccessibleSelectionBase.hxx b/editeng/inc/editeng/AccessibleSelectionBase.hxx new file mode 100644 index 000000000000..c46187abe351 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/AccessibleStaticTextBase.hxx b/editeng/inc/editeng/AccessibleStaticTextBase.hxx new file mode 100644 index 000000000000..9a6eb7fd0752 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.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 EDITENG_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 + EDITENG_DLLPRIVATE AccessibleStaticTextBase( const AccessibleStaticTextBase& ); + // declared, but not defined + EDITENG_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 "editeng/editengdllapi.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 EDITENG_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 + EDITENG_DLLPRIVATE AccessibleStaticTextBase( const AccessibleStaticTextBase& ); + // declared, but not defined + EDITENG_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/editeng/inc/editeng/AccessibleStringWrap.hxx b/editeng/inc/editeng/AccessibleStringWrap.hxx new file mode 100644 index 000000000000..9d736d799d9b --- /dev/null +++ b/editeng/inc/editeng/AccessibleStringWrap.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: AccessibleStringWrap.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 _ACCESSIBLESTRINGWRAP_HXX +#define _ACCESSIBLESTRINGWRAP_HXX + +#include <sal/types.h> +#include <tools/string.hxx> + +#include <editeng/editengdllapi.h> + +class OutputDevice; +class SvxFont; +class Rectangle; +class Point; + +//------------------------------------------------------------------------ +// +// AccessibleStringWrap declaration +// +//------------------------------------------------------------------------ + +class AccessibleStringWrap +{ +public: + + EDITENG_DLLPUBLIC AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, const String& rText ); + + EDITENG_DLLPUBLIC sal_Bool GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ); + EDITENG_DLLPUBLIC sal_Int32 GetIndexAtPoint( const Point& rPoint ); + +private: + + OutputDevice& mrDev; + SvxFont& mrFont; + String maText; +}; + +#endif /* _ACCESSIBLESTRINGWRAP_HXX */ diff --git a/editeng/inc/editeng/SpellPortions.hxx b/editeng/inc/editeng/SpellPortions.hxx new file mode 100644 index 000000000000..97c79998a536 --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/UnoForbiddenCharsTable.hxx b/editeng/inc/editeng/UnoForbiddenCharsTable.hxx new file mode 100644 index 000000000000..98c5563249c3 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +class SvxForbiddenCharactersTable; + +class EDITENG_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/editeng/inc/editeng/acorrcfg.hxx b/editeng/inc/editeng/acorrcfg.hxx new file mode 100644 index 000000000000..6e6e2b3fdd11 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" +#include <unotools/configitem.hxx> +/* -----------------------------12.10.00 11:40-------------------------------- + + ---------------------------------------------------------------------------*/ +class SvxAutoCorrect; +class SvxAutoCorrCfg; +class EDITENG_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 EDITENG_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 EDITENG_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/editeng/inc/editeng/adjitem.hxx b/editeng/inc/editeng/adjitem.hxx new file mode 100644 index 000000000000..baf55e5531ab --- /dev/null +++ b/editeng/inc/editeng/adjitem.hxx @@ -0,0 +1,146 @@ +/************************************************************************* + * + * DO NOT 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 <editeng/svxenum.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxAdjustItem --------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt die Zeilenausrichtung. +*/ +#define ADJUST_LASTBLOCK_VERSION ((USHORT)0x0001) + +class EDITENG_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/editeng/inc/editeng/akrnitem.hxx b/editeng/inc/editeng/akrnitem.hxx new file mode 100644 index 000000000000..4e0290003f4b --- /dev/null +++ b/editeng/inc/editeng/akrnitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxAutoKernItem ------------------------------------------------- + +/* + [Beschreibung] + Attribut fuer Pair-Kerning. +*/ + +class EDITENG_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/editeng/inc/editeng/blnkitem.hxx b/editeng/inc/editeng/blnkitem.hxx new file mode 100644 index 000000000000..426e14797e96 --- /dev/null +++ b/editeng/inc/editeng/blnkitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxBlinkItem ------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt, ob geblinkt werden soll. +*/ + +class EDITENG_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/editeng/inc/editeng/bolnitem.hxx b/editeng/inc/editeng/bolnitem.hxx new file mode 100644 index 000000000000..8110c986ee34 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + + + +// class SvxLineItem ----------------------------------------------------- + + +/* +[Beschreibung] +Dieses Item transportiert eine SvxBorderLine. +*/ + +class SvxBorderLine; + +class EDITENG_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/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx new file mode 100644 index 000000000000..8ae8d7e6416b --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/boxitem.hxx b/editeng/inc/editeng/boxitem.hxx new file mode 100644 index 000000000000..468d7b6a04a6 --- /dev/null +++ b/editeng/inc/editeng/boxitem.hxx @@ -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: 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 <editeng/borderline.hxx> +#include <editeng/editengdllapi.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 EDITENG_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 EDITENG_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/editeng/inc/editeng/brkitem.hxx b/editeng/inc/editeng/brkitem.hxx new file mode 100644 index 000000000000..1affe04f006f --- /dev/null +++ b/editeng/inc/editeng/brkitem.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: 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 <editeng/svxenum.hxx> +#include <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/brshitem.hxx b/editeng/inc/editeng/brshitem.hxx new file mode 100644 index 000000000000..9ef1627dcbd6 --- /dev/null +++ b/editeng/inc/editeng/brshitem.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: 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> +#include <vcl/wall.hxx> +#include <tools/link.hxx> +#include <editeng/editengdllapi.h> + +// class SvxBrushItem ---------------------------------------------------- + +class Graphic; +class GraphicObject; +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 EDITENG_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() const; + const GraphicObject* GetGraphicObject() 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 SvxGraphicPosition WallpaperStyle2GraphicPos( WallpaperStyle eStyle ); + static WallpaperStyle GraphicPos2WallpaperStyle( SvxGraphicPosition ePos ); + CntWallpaperItem* CreateCntWallpaperItem() const; +}; + +#endif // #ifndef _SVX_BRSHITEM_HXX + diff --git a/editeng/inc/editeng/bulitem.hxx b/editeng/inc/editeng/bulitem.hxx new file mode 100644 index 000000000000..f8247e497c36 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.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 <svtools/grfmgr.hxx> + +// class SvxBulletItem --------------------------------------------------- + +class EDITENG_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/editeng/inc/editeng/charhiddenitem.hxx b/editeng/inc/editeng/charhiddenitem.hxx new file mode 100644 index 000000000000..a6f318a471cf --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +// class SvxCharHiddenItem ------------------------------------------------- +/* + [Description] + This item marks text as hidden +*/ + +class EDITENG_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/editeng/inc/editeng/charreliefitem.hxx b/editeng/inc/editeng/charreliefitem.hxx new file mode 100644 index 000000000000..e20a6425fb3e --- /dev/null +++ b/editeng/inc/editeng/charreliefitem.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: 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> +#include <editeng/editengdllapi.h> + +// class SvxCharRotateItem ---------------------------------------------- + +/* [Description] + + This item defines a character relief and has currently the values + emboss, relief. + +*/ + +class EDITENG_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/editeng/inc/editeng/charrotateitem.hxx b/editeng/inc/editeng/charrotateitem.hxx new file mode 100644 index 000000000000..9b42154400b4 --- /dev/null +++ b/editeng/inc/editeng/charrotateitem.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: 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> +#include <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/charscaleitem.hxx b/editeng/inc/editeng/charscaleitem.hxx new file mode 100644 index 000000000000..0b663653b129 --- /dev/null +++ b/editeng/inc/editeng/charscaleitem.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: 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 --------------------------------------------------------------- + +#include <svl/intitem.hxx> +#include <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/cmapitem.hxx b/editeng/inc/editeng/cmapitem.hxx new file mode 100644 index 000000000000..871f68baef75 --- /dev/null +++ b/editeng/inc/editeng/cmapitem.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: 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 <editeng/svxenum.hxx> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxCaseMapItem -------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt die Schrift-Ausrichtung (Versalien, Kapitaelchen,...). +*/ + +class EDITENG_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/editeng/inc/editeng/cntritem.hxx b/editeng/inc/editeng/cntritem.hxx new file mode 100644 index 000000000000..6439ea55bc11 --- /dev/null +++ b/editeng/inc/editeng/cntritem.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: 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> +#include <editeng/editengdllapi.h> + +// class SvxContourItem -------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt, ob Konturschrift eingestellt ist. +*/ + +class EDITENG_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/editeng/inc/editeng/colritem.hxx b/editeng/inc/editeng/colritem.hxx new file mode 100644 index 000000000000..fe36674a28a9 --- /dev/null +++ b/editeng/inc/editeng/colritem.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: 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> +#include <tools/color.hxx> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxColorItem ---------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt eine Farbe. +*/ + +#define VERSION_USEAUTOCOLOR 1 + +class EDITENG_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/editeng/inc/editeng/crsditem.hxx b/editeng/inc/editeng/crsditem.hxx new file mode 100644 index 000000000000..fb43334ca97d --- /dev/null +++ b/editeng/inc/editeng/crsditem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxCrossedOutItem ----------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt, ob und wie durchstrichen ist. +*/ + +class EDITENG_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/editeng/inc/editeng/cscoitem.hxx b/editeng/inc/editeng/cscoitem.hxx new file mode 100644 index 000000000000..1353337262eb --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/colritem.hxx> +#include <editeng/editengdllapi.h> + +// class SvxCharSetColorItem --------------------------------------------- + +/* [Beschreibung] + + PB: wird nur intern im Reader des Writers benoetigt +*/ + +class EDITENG_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/editeng/inc/editeng/editdata.hxx b/editeng/inc/editeng/editdata.hxx new file mode 100644 index 000000000000..1af3d1190c9b --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.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 EDITENG_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, EDITENG_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/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx new file mode 100644 index 000000000000..2728cd0544bb --- /dev/null +++ b/editeng/inc/editeng/editeng.hxx @@ -0,0 +1,489 @@ +/************************************************************************* + * + * DO NOT 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 <editeng/editdata.hxx> +#endif +#include <i18npool/lang.h> +#include "editeng/editengdllapi.h" + +#include <tools/rtti.hxx> // wegen typedef TypeId + +#include <editeng/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 EDITENG_DLLPUBLIC EditEngine +{ + friend class EditView; + friend class ImpEditView; + friend class EditDbg; + friend class Outliner; + +private: + ImpEditEngine* pImpEditEngine; + + EDITENG_DLLPRIVATE EditEngine( const EditEngine& ); + EDITENG_DLLPRIVATE EditEngine& operator=( const EditEngine& ); + +//#if 0 // _SOLAR__PRIVATE + EDITENG_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 SfxItemPool& GetGlobalItemPool(); + 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/editeng/inc/editeng/editengdllapi.h b/editeng/inc/editeng/editengdllapi.h new file mode 100644 index 000000000000..ec4b02f07e6a --- /dev/null +++ b/editeng/inc/editeng/editengdllapi.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: editengdllapi.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_EDITENGDLLAPI_H +#define INCLUDED_EDITENGDLLAPI_H + +#include "sal/types.h" + +#if defined(EDITENG_DLLIMPLEMENTATION) +#define EDITENG_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define EDITENG_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif +#define EDITENG_DLLPRIVATE SAL_DLLPRIVATE + +#endif diff --git a/editeng/inc/editeng/editids.hrc b/editeng/inc/editeng/editids.hrc new file mode 100644 index 000000000000..475c84ca3cb8 --- /dev/null +++ b/editeng/inc/editeng/editids.hrc @@ -0,0 +1,1151 @@ +/************************************************************************* + * + * DO NOT 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 _EDIT_SVXIDS_HRC +#define _EDIT_SVXIDS_HRC + +// include ------------------------------------------------------------------ + +#include <svl/memberid.hrc> +#include <svl/solar.hrc> +#include <tools/errcode.hxx> + +#define ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS (2UL | ERRCODE_AREA_SVX) + +#define ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT (8UL | ERRCODE_AREA_SVX | \ + ERRCODE_CLASS_READ ) + +#define SID_PARA_VERTALIGN ( SID_SVX_START + 925 ) +#define SID_ATTR_BORDER_OUTER ( SID_SVX_START + 24 ) +#define SID_ATTR_BORDER_SHADOW ( SID_SVX_START + 25 ) +#define SID_ATTR_BRUSH ( SID_SVX_START + 1 ) +#define SID_ATTR_BRUSH_CHAR ( SID_SVX_START + 591 ) +#define SID_ATTR_NUMBERING_RULE ( SID_SVX_START + 855 ) +#define SID_ATTR_TABSTOP ( SID_SVX_START + 2 ) +#define SID_FIELD ( SID_SVX_START + 363 ) +#define SID_ATTR_FRAMEDIRECTION ( SID_SVX_START + 944 ) +#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_ATTR_PARA_BULLET ( SID_SVX_START + 250 ) +#define SID_ATTR_PARA_OUTLLEVEL ( SID_SVX_START + 300 ) +#define SID_ATTR_PARA_REGISTER ( SID_SVX_START + 413 ) +#define SID_ATTR_PARA_PAGENUM ( SID_SVX_START + 457 ) +#define SID_ATTR_PARA_NUMRULE ( SID_SVX_START + 587 ) +#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_ATTR_PARA_SNAPTOGRID ( SID_SVX_START + 945 ) +#define SID_ATTR_PARA_LRSPACE_VERTICAL ( SID_SVX_START + 947 ) +#define SID_ATTR_PARA_LEFT_TO_RIGHT ( SID_SVX_START + 950 ) +#define SID_ATTR_PARA_RIGHT_TO_LEFT ( SID_SVX_START + 951 ) +#define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092) +#define SID_ATTR_PARA_ADJUST_RIGHT ( SID_SVX_START + 29 ) +#define SID_ATTR_PARA_ADJUST_CENTER ( SID_SVX_START + 30 ) +#define SID_ATTR_PARA_ADJUST_BLOCK ( SID_SVX_START + 31 ) +#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_PARA_MODEL ( SID_SVX_START + 65 ) +#define SID_ATTR_PARA_KEEP ( SID_SVX_START + 66 ) +#define SID_ATTR_NUMBERING_RULE ( SID_SVX_START + 855 ) +#define SID_ATTR_LRSPACE ( SID_SVX_START + 48 ) +#define SID_ATTR_ULSPACE ( SID_SVX_START + 49 ) +#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) +#define SID_ATTR_CHAR_FONT (SID_SVX_START + 7) +#define SID_ATTR_CHAR_POSTURE (SID_SVX_START + 8) +#define SID_ATTR_CHAR_WEIGHT (SID_SVX_START + 9) +#define SID_ATTR_CHAR_SHADOWED (SID_SVX_START + 10) +#define SID_ATTR_CHAR_WORDLINEMODE (SID_SVX_START + 11) +#define SID_ATTR_CHAR_CONTOUR (SID_SVX_START + 12) +#define SID_ATTR_CHAR_STRIKEOUT (SID_SVX_START + 13) +#define SID_ATTR_CHAR_UNDERLINE (SID_SVX_START + 14) +#define SID_ATTR_CHAR_FONTHEIGHT (SID_SVX_START + 15) +#define SID_ATTR_CHAR_PROPSIZE (SID_SVX_START + 16) +#define SID_ATTR_CHAR_COLOR (SID_SVX_START + 17) +#define SID_ATTR_CHAR_KERNING (SID_SVX_START + 18) +#define SID_ATTR_CHAR_CASEMAP (SID_SVX_START + 19) +#define SID_ATTR_CHAR_LANGUAGE (SID_SVX_START + 20) +#define SID_ATTR_CHAR_ESCAPEMENT (SID_SVX_START + 21) +#define SID_ATTR_CHAR_FONTLIST (SID_SVX_START + 22) +#define SID_ATTR_CHAR_MAPTYPE (SID_SVX_START + 64) +#define SID_ATTR_CHAR_AUTOKERN (SID_SVX_START + 67) +#define SID_ATTR_CHAR_OVERLINE (SID_SVX_START + 68) +#define SID_ATTR_CHAR_CHARSETCOLOR ( SID_SVX_START + 877 ) +#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_CHAR_VERTICAL ( SID_SVX_START + 905 ) + +#define SID_ATTR_CHAR_ROTATED ( SID_SVX_START + 910 ) +#define SID_ATTR_CHAR_SCALEWIDTH ( SID_SVX_START + 911 ) +#define SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ( SID_SVX_START + 919 ) +#define SID_ATTR_CHAR_RELIEF ( SID_SVX_START + 920 ) +#define SID_ATTR_CHAR_HIDDEN ( SID_SVX_START + 989 ) +#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_TEXT_ALIGNLEFT SID_ATTR_PARA_ADJUST_LEFT +#define SID_TEXT_ALIGNRIGHT SID_ATTR_PARA_ADJUST_RIGHT +#define SID_TEXT_ALIGNCENTER SID_ATTR_PARA_ADJUST_CENTER +#define SID_TEXT_ALIGNBLOCK SID_ATTR_PARA_ADJUST_BLOCK + + +#if 0 +// -------------------------------------------------------------------------- +// 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 + + +// -------------------------------------------------------------------------- +// Svx-Id's +// -------------------------------------------------------------------------- + +#define SID_ATTR_ZOOM ( SID_SVX_START + 0 ) +#define SID_ATTR_BRUSH ( SID_SVX_START + 1 ) +#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_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_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_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_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_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_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_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_LINEEND_STYLE ( SID_SVX_START + 301 ) +#define SID_ATTR_TRANSFORM_SLANT ( SID_SVX_START + 302 ) // !!! +#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_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_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_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_COLL_CLEAR ( SID_SVX_START + 536 ) +#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_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_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_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_ASIAN_DLG ( SID_SVX_START + 904 ) +#define SID_DRAW_TEXT_VERTICAL SID_ATTR_CHAR_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_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_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_TABSTOP_VERTICAL ( SID_SVX_START + 946 ) +#define SID_RULER_BORDERS_VERTICAL ( SID_SVX_START + 948 ) +#define SID_ATTR_ALIGN_ASIANVERTICAL ( SID_SVX_START + 949 ) +#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_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_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_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 + +#endif // #ifndef _SVX_SVXIDS_HRC + +// ******************************************************************* EOF + diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx new file mode 100644 index 000000000000..f9b8aaf72a6d --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/eeitem.hxx> +#include "editeng/editengdllapi.h" + +DBG_NAMEEX( EE_EditTextObject ) + +class SfxItemPool; +class SfxStyleSheetPool; +class SvxFieldItem; +class EECharAttribArray; + +#define EDTOBJ_SETTINGS_ULITEMSUMMATION 0x00000001 +#define EDTOBJ_SETTINGS_ULITEMFIRSTPARA 0x00000002 + +class EDITENG_DLLPUBLIC EditTextObject +{ +private: + USHORT nWhich; + EDITENG_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/editeng/inc/editeng/editrids.hrc b/editeng/inc/editeng/editrids.hrc new file mode 100644 index 000000000000..392151e781aa --- /dev/null +++ b/editeng/inc/editeng/editrids.hrc @@ -0,0 +1,420 @@ +/************************************************************************* + * + * DO NOT 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 _EDIT_RIDS_HRC +#define _EDIT_RIDS_HRC + +// include ------------------------------------------------------------------ + +#include <svl/solar.hrc> + +// strings also used in cui +#define RID_SVXSTR_PAPERBIN_SETTINGS (RID_SVX_START + 149) +#define RID_SVXSTR_PAPERBIN (RID_SVX_START + 145) + +// outliner +#ifndef RID_OUTL_START +#define RID_OUTL_START ( RID_EDIT_END + 100 ) +#endif + +#define RID_OUTLUNDO_DEPTH ( RID_OUTL_START + 0 ) +#define RID_OUTLUNDO_HEIGHT ( RID_OUTL_START + 1 ) +#define RID_OUTLUNDO_EXPAND ( RID_OUTL_START + 2 ) +#define RID_OUTLUNDO_COLLAPSE ( RID_OUTL_START + 3 ) +#define RID_OUTLUNDO_ATTR ( RID_OUTL_START + 4 ) +#define RID_OUTLUNDO_INSERT ( RID_OUTL_START + 5 ) + + +// strings for items + +#define RID_SVXITEMS_TRUE (RID_SVXITEMS_START + 0) +#define RID_SVXITEMS_FALSE (RID_SVXITEMS_START + 1) + +#define RID_SVXITEMS_FRMDIR_BEGIN (RID_EDITITEMS_START + 570) +#define RID_SVXITEMS_FRMDIR_HORI_LEFT_TOP (RID_EDITITEMS_START + 570) +#define RID_SVXITEMS_FRMDIR_HORI_RIGHT_TOP (RID_EDITITEMS_START + 571) +#define RID_SVXITEMS_FRMDIR_VERT_TOP_RIGHT (RID_EDITITEMS_START + 572) +#define RID_SVXITEMS_FRMDIR_VERT_TOP_LEFT (RID_EDITITEMS_START + 573) +#define RID_SVXITEMS_FRMDIR_ENVIRONMENT (RID_EDITITEMS_START + 574) +#define RID_SVXITEMS_FRMDIR_END (RID_EDITITEMS_START + 574) + +#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_BORDER_NONE (RID_SVXITEMS_START + 528) + +#define RID_SVXITEMS_TRANSPARENT_TRUE (RID_SVXITEMS_START + 441) +#define RID_SVXITEMS_TRANSPARENT_FALSE (RID_SVXITEMS_START + 442) + +#define RID_SVXITEMS_OPAQUE_TRUE (RID_SVXITEMS_START + 429) +#define RID_SVXITEMS_OPAQUE_FALSE (RID_SVXITEMS_START + 430) + +#define RID_SVXITEMS_SHADOW_COMPLETE (RID_SVXITEMS_START + 489) +#define RID_SVXITEMS_GRAPHIC (RID_SVXITEMS_START + 526) +#define RID_SVXITEMS_LINES (RID_SVXITEMS_START + 511) +#define RID_SVXITEMS_ORPHANS_COMPLETE (RID_SVXITEMS_START + 513) +#define RID_SVXITEMS_WIDOWS_COMPLETE (RID_SVXITEMS_START + 512) +#define RID_SVXITEMS_PAGEMODEL_COMPLETE (RID_SVXITEMS_START + 517) + +#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_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_PRINT_TRUE (RID_SVXITEMS_START + 427) +#define RID_SVXITEMS_PRINT_FALSE (RID_SVXITEMS_START + 428) +#define RID_SVXITEMS_PROT_POS_TRUE (RID_SVXITEMS_START + 439) +#define RID_SVXITEMS_PROT_POS_FALSE (RID_SVXITEMS_START + 440) +#define RID_SVXITEMS_PROT_SIZE_TRUE (RID_SVXITEMS_START + 437) +#define RID_SVXITEMS_PROT_SIZE_FALSE (RID_SVXITEMS_START + 438) +#define RID_SVXITEMS_PROT_CONTENT_TRUE (RID_SVXITEMS_START + 435) +#define RID_SVXITEMS_PROT_CONTENT_FALSE (RID_SVXITEMS_START + 436) +#define RID_SVXITEMS_ULSPACE_UPPER (RID_SVXITEMS_START + 496) +#define RID_SVXITEMS_ULSPACE_LOWER (RID_SVXITEMS_START + 497) +#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_SIZE_WIDTH (RID_SVXITEMS_START + 484) +#define RID_SVXITEMS_SIZE_HEIGHT (RID_SVXITEMS_START + 485) +#define RID_SVXITEMS_PAGE_END_TRUE (RID_SVXITEMS_START + 451) +#define RID_SVXITEMS_PAGE_END_FALSE (RID_SVXITEMS_START + 452) +#define RID_SVXITEMS_HYPHEN_TRUE (RID_SVXITEMS_START + 449) +#define RID_SVXITEMS_HYPHEN_FALSE (RID_SVXITEMS_START + 450) +#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_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_SCRPTSPC_OFF (RID_SVXITEMS_START + 550) +#define RID_SVXITEMS_SCRPTSPC_ON (RID_SVXITEMS_START + 551) +#define RID_SVXITEMS_CHARSCALE_OFF (RID_SVXITEMS_START + 559) +#define RID_SVXITEMS_CHARSCALE (RID_SVXITEMS_START + 560) +#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_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_ATTR_CHAR_EMPHASISMARK (RID_ATTR_BEGIN + 899) + +// 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) + +// 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 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) + +#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_BLINK_TRUE (RID_SVXITEMS_START + 453) +#define RID_SVXITEMS_BLINK_FALSE (RID_SVXITEMS_START + 454) + +#define RID_SVXITEMS_TWOLINES_OFF (RID_SVXITEMS_START + 545) +#define RID_SVXITEMS_TWOLINES (RID_SVXITEMS_START + 546) + +// 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 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 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 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) + +// 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) + +// 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 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) + +#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) + +// 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) + +// 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 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) + + +#define RID_SVXITEMS_PARASNAPTOGRID_ON (RID_SVXITEMS_START + 575) +#define RID_SVXITEMS_PARASNAPTOGRID_OFF (RID_SVXITEMS_START + 576) + +#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_CHARHIDDEN_FALSE (RID_SVXITEMS_START + 577) +#define RID_SVXITEMS_CHARHIDDEN_TRUE (RID_SVXITEMS_START + 578) + +// 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) + +// HM_ERR +#define RID_SVXSTR_HMERR_THESAURUS (RID_SVX_START + 150) + +// ResIds fuer HM-QueryBoxen und Error-Strings +#define RID_SVXQB_BW_CONTINUE (RID_SVX_START + 39) +#define RID_SVXQB_CONTINUE (RID_SVX_START + 34) + +#endif + +// ******************************************************************* EOF + diff --git a/editeng/inc/editeng/editstat.hxx b/editeng/inc/editeng/editstat.hxx new file mode 100644 index 000000000000..71f65dbe6657 --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/editund2.hxx b/editeng/inc/editeng/editund2.hxx new file mode 100644 index 000000000000..7bb2f926df2d --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" +#include <svl/undo.hxx> + +class ImpEditEngine; + +class EDITENG_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 EDITENG_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/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx new file mode 100644 index 000000000000..7a357f8df00a --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/editdata.hxx> +#endif +#include <com/sun/star/uno/Reference.h> +#include "editeng/editengdllapi.h" + +namespace com { +namespace sun { +namespace star { +namespace datatransfer { + class XTransferable; +}}}} + +class EDITENG_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; + + EDITENG_DLLPRIVATE EditView( const EditView& ); + EDITENG_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/editeng/inc/editeng/edtdlg.hxx b/editeng/inc/editeng/edtdlg.hxx new file mode 100644 index 000000000000..9cef6a377e40 --- /dev/null +++ b/editeng/inc/editeng/edtdlg.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: abstdlg.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 _EDT_ABSTDLG_HXX +#define _EDT_ABSTDLG_HXX + +// include --------------------------------------------------------------- + +#include <tools/solar.h> +#include <tools/string.hxx> +#include <editeng/editengdllapi.h> +#include <i18npool/lang.h> +#include <com/sun/star/uno/Reference.hxx> +#include <vcl/abstdlg.hxx> +#include <editeng/hangulhanja.hxx> + +namespace com { namespace sun { namespace star { namespace linguistic2 +{ + class XThesaurus; + class XHyphenator; +} } } } + +class Window; +class ResId; +class Link; +class SvxSpellWrapper; + +class AbstractThesaurusDialog : public VclAbstractDialog +{ +public: + virtual String GetWord() = 0; + virtual sal_uInt16 GetLanguage() const = 0; + virtual Window* GetWindow() = 0; +}; + +class AbstractHyphenWordDialog : public VclAbstractDialog +{ +public: + virtual void SelLeft() = 0; + virtual void SelRight() = 0; + virtual Window* GetWindow() = 0; +}; + +class AbstractHangulHanjaConversionDialog : public VclAbstractTerminatedDialog +{ + public: + virtual void EnableRubySupport( sal_Bool _bVal ) = 0; + virtual void SetByCharacter( sal_Bool _bByCharacter ) = 0; + virtual void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) = 0; + virtual void SetConversionFormat( editeng::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 editeng::HangulHanjaConversion::ConversionDirection GetDirection( editeng::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 editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const =0; + virtual void FocusSuggestion( )= 0; + virtual String GetCurrentSuggestion( ) const =0; +}; + +class EDITENG_DLLPUBLIC EditAbstractDialogFactory +{ +public: + static EditAbstractDialogFactory* Create(); + virtual AbstractThesaurusDialog* CreateThesaurusDialog( Window*, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus, + const String &rWord, sal_Int16 nLanguage ) = 0; + + virtual AbstractHyphenWordDialog* CreateHyphenWordDialog( Window*, + const String &rWord, LanguageType nLang, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ) = 0; + virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( Window* _pParent, + editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) = 0; +}; + +#endif + diff --git a/editeng/inc/editeng/eedata.hxx b/editeng/inc/editeng/eedata.hxx new file mode 100644 index 000000000000..33e542746d56 --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/eeitem.hxx b/editeng/inc/editeng/eeitem.hxx new file mode 100644 index 000000000000..53202b795170 --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/eeitemid.hxx b/editeng/inc/editeng/eeitemid.hxx new file mode 100644 index 000000000000..7b93f7f49798 --- /dev/null +++ b/editeng/inc/editeng/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 <editing/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/editeng/inc/editeng/eerdll.hxx b/editeng/inc/editeng/eerdll.hxx new file mode 100644 index 000000000000..d7ad1a9d6397 --- /dev/null +++ b/editeng/inc/editeng/eerdll.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: 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() + +#define EE_RESSTR(x) String( EditResId(x) ) + +#endif //_EERDLL_HXX diff --git a/editeng/inc/editeng/emphitem.hxx b/editeng/inc/editeng/emphitem.hxx new file mode 100644 index 000000000000..5a2bf2335105 --- /dev/null +++ b/editeng/inc/editeng/emphitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxEmphasisMarkItem ---------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt die Font-Betonung. +*/ + +class EDITENG_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/editeng/inc/editeng/escpitem.hxx b/editeng/inc/editeng/escpitem.hxx new file mode 100644 index 000000000000..03d43916ea42 --- /dev/null +++ b/editeng/inc/editeng/escpitem.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: 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> +#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/editeng/inc/editeng/fhgtitem.hxx b/editeng/inc/editeng/fhgtitem.hxx new file mode 100644 index 000000000000..9a91e9f7431e --- /dev/null +++ b/editeng/inc/editeng/fhgtitem.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: 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> +#include <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx new file mode 100644 index 000000000000..a154f37dd8c1 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +class SvNumberFormatter; +class MetaAction; + +// class SvxFieldItem --------------------------------------------------- + + + +class EDITENG_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 EDITENG_DLLPUBLIC SvxFieldItem : public SfxPoolItem +{ +private: + SvxFieldData* pField; + + EDITENG_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 EDITENG_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 EDITENG_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 EDITENG_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 EDITENG_DLLPUBLIC SvxPagesField : public SvxFieldData +{ +public: + SV_DECL_PERSIST1( SvxPagesField, SvxFieldData, SVX_PAGESFIELD ) + SvxPagesField() {} + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; +}; + +class EDITENG_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 EDITENG_DLLPUBLIC SvxFileField : public SvxFieldData +{ +public: + SV_DECL_PERSIST1( SvxFileField, SvxFieldData, SVX_FILEFIELD ) + SvxFileField() {} + virtual SvxFieldData* Clone() const; + virtual int operator==( const SvxFieldData& ) const; +}; + +class EDITENG_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 EDITENG_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 EDITENG_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 EDITENG_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 EDITENG_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 EDITENG_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 EDITENG_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/editeng/inc/editeng/flstitem.hxx b/editeng/inc/editeng/flstitem.hxx new file mode 100644 index 000000000000..c0978ee4cc7a --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +// class SvxFontListItem ------------------------------------------------- + +class FontList; + +/* + [Beschreibung] + + Dieses Item dient als Transport-Medium fuer eine FontListe. + Die Fontliste wird nicht kopiert und nicht geloescht! +*/ + +class EDITENG_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/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx new file mode 100644 index 000000000000..1f4a82991be4 --- /dev/null +++ b/editeng/inc/editeng/fontitem.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: 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> +#include <vcl/font.hxx> +#include "editeng/editengdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxFontItem ----------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt einen Font. +*/ + +class EDITENG_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 ); + +}; + +EDITENG_DLLPUBLIC void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, + SvxFontItem& rComplex ); + +#endif // #ifndef _SVX_FONTITEM_HXX + + diff --git a/editeng/inc/editeng/forbiddencharacterstable.hxx b/editeng/inc/editeng/forbiddencharacterstable.hxx new file mode 100644 index 000000000000..ed52f5e31742 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/forbiddenruleitem.hxx b/editeng/inc/editeng/forbiddenruleitem.hxx new file mode 100644 index 000000000000..a999fa8a8a34 --- /dev/null +++ b/editeng/inc/editeng/forbiddenruleitem.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: 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> +#include <editeng/editengdllapi.h> + +// class SvxForbiddenRuleItem ----------------------------------------- + +/* [Description] + + This item describe how to handle the last character of a line. +*/ + +class EDITENG_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/editeng/inc/editeng/frmdir.hxx b/editeng/inc/editeng/frmdir.hxx new file mode 100644 index 000000000000..04cdcc78ee23 --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/frmdiritem.hxx b/editeng/inc/editeng/frmdiritem.hxx new file mode 100644 index 000000000000..59bccca85d20 --- /dev/null +++ b/editeng/inc/editeng/frmdiritem.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: 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 <editeng/frmdir.hxx> +#include <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/fwdtitem.hxx b/editeng/inc/editeng/fwdtitem.hxx new file mode 100644 index 000000000000..8a02474f525c --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/hangulhanja.hxx b/editeng/inc/editeng/hangulhanja.hxx new file mode 100644 index 000000000000..d3f10d084a40 --- /dev/null +++ b/editeng/inc/editeng/hangulhanja.hxx @@ -0,0 +1,305 @@ +/************************************************************************* + * + * DO NOT 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 <memory> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/uno/Sequence.hxx> +#include "editeng/editengdllapi.h" + +//............................................................................. +namespace editeng +{ +//............................................................................. + + 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 EDITENG_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/editeng/inc/editeng/hngpnctitem.hxx b/editeng/inc/editeng/hngpnctitem.hxx new file mode 100644 index 000000000000..e2d949f171a8 --- /dev/null +++ b/editeng/inc/editeng/hngpnctitem.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: 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> +#include <editeng/editengdllapi.h> + +// class SvxHangingPunctuationItem ----------------------------------------- + +/* [Description] + + This item describe how to handle the last character of a line. +*/ + +class EDITENG_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/editeng/inc/editeng/hyznitem.hxx b/editeng/inc/editeng/hyznitem.hxx new file mode 100644 index 000000000000..b343747ef575 --- /dev/null +++ b/editeng/inc/editeng/hyznitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxHyphenZoneItem ----------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt ein Silbentrennungsattribut (Automatisch?, Anzahl der +Zeichen am Zeilenende und -anfang). +*/ + +class EDITENG_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/editeng/inc/editeng/itemtype.hxx b/editeng/inc/editeng/itemtype.hxx new file mode 100644 index 000000000000..a8ef74778d33 --- /dev/null +++ b/editeng/inc/editeng/itemtype.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: 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 --------------------------------------------------------------- + +#include <editeng/editrids.hrc> +#include <editeng/eerdll.hxx> + +// forward --------------------------------------------------------------- +#include <tools/string.hxx> +#include <tools/resid.hxx> +#include <tools/bigint.hxx> +#include <svl/poolitem.hxx> +#include <tools/shl.hxx> +#include "editeng/editengdllapi.h" + +class Color; +class XColorTable; +class IntlWrapper; +// static and prototypes ------------------------------------------------- + +static const sal_Unicode cDelim = ','; +static const sal_Unicode cpDelim[] = { ',' , ' ', '\0' }; + +EDITENG_DLLPUBLIC String GetSvxString( USHORT nId ); +EDITENG_DLLPUBLIC String GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, const IntlWrapper * pIntl ); +String GetColorString( const Color& rCol ); +EDITENG_DLLPUBLIC USHORT GetMetricId( SfxMapUnit eUnit ); + +// ----------------------------------------------------------------------- + +inline String GetBoolString( BOOL bVal ) +{ + return String( EditResId( bVal ? RID_SVXITEMS_TRUE : RID_SVXITEMS_FALSE ) ); +} + +// ----------------------------------------------------------------------- + +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/editeng/inc/editeng/keepitem.hxx b/editeng/inc/editeng/keepitem.hxx new file mode 100644 index 000000000000..a4c68fb150b9 --- /dev/null +++ b/editeng/inc/editeng/keepitem.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: 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> +#include <editeng/editengdllapi.h> + +namespace rtl +{ + class OUString; +} + +// class SvxFmtKeepItem ------------------------------------------------ + +/* +[Beschreibung] +Dieses Item beschreibt eine logische Variable "Absaetze zusammenhalten?". +*/ + +class EDITENG_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/editeng/inc/editeng/kernitem.hxx b/editeng/inc/editeng/kernitem.hxx new file mode 100644 index 000000000000..c9e71282a447 --- /dev/null +++ b/editeng/inc/editeng/kernitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxKerningItem -------------------------------------------------- + +// Achtung: Twips-Werte +// Twips: 0 = kein Kerning + +/* [Beschreibung] + + Dieses Item beschreibt die Schrift-Laufweite. +*/ + +class EDITENG_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/editeng/inc/editeng/langitem.hxx b/editeng/inc/editeng/langitem.hxx new file mode 100644 index 000000000000..0c3a9d5c3dd3 --- /dev/null +++ b/editeng/inc/editeng/langitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxLanguageItem ------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt eine Sprache. +*/ + +class EDITENG_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/editeng/inc/editeng/lcolitem.hxx b/editeng/inc/editeng/lcolitem.hxx new file mode 100644 index 000000000000..72185becfbc0 --- /dev/null +++ b/editeng/inc/editeng/lcolitem.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: 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 <editeng/colritem.hxx> +#include <editeng/editengdllapi.h> + +/* + * dummy-Item fuer ToolBox-Controller: + * + */ + +class EDITENG_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/editeng/inc/editeng/lrspitem.hxx b/editeng/inc/editeng/lrspitem.hxx new file mode 100644 index 000000000000..feff7938cf5c --- /dev/null +++ b/editeng/inc/editeng/lrspitem.hxx @@ -0,0 +1,182 @@ +/************************************************************************* + * + * DO NOT 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> +#include <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/lspcitem.hxx b/editeng/inc/editeng/lspcitem.hxx new file mode 100644 index 000000000000..db14574b1102 --- /dev/null +++ b/editeng/inc/editeng/lspcitem.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: 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 <editeng/svxenum.hxx> +#include <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/memberids.hrc b/editeng/inc/editeng/memberids.hrc new file mode 100644 index 000000000000..1af5300bd33d --- /dev/null +++ b/editeng/inc/editeng/memberids.hrc @@ -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: 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 _EDT_UNOMID_HXX +#define _EDT_UNOMID_HXX + +#define MID_LOCATION 0x3c +#define MID_TRANSPARENT 0x4b +#define MID_BG_COLOR 0x22 +#define MID_FLAGS 0x2e +#define MID_DISTANCE 0x29 +#define MID_FG_COLOR 0x2c +#define MID_OUTER_WIDTH 0x41 +#define MID_INNER_WIDTH 0x35 +#define MID_LINESPACE 0x3b + +//NameOrIndex +#define MID_NAME 16 +#define MID_GRAFURL 32 + +// SvxPageModelItem +#define MID_AUTO 1 + +// SvxTabStop +#define MID_TABSTOPS 0 +#define MID_STD_TAB 1 + +//SvxHyphenZoneItem +#define MID_IS_HYPHEN 0 +#define MID_HYPHEN_MIN_LEAD 1 +#define MID_HYPHEN_MIN_TRAIL 2 +#define MID_HYPHEN_MAX_HYPHENS 3 + +// SvxSizeItem +#define MID_SIZE_SIZE 0 +#define MID_SIZE_WIDTH 1 +#define MID_SIZE_HEIGHT 2 + +// SvxBoxInfoItem +#define MID_HORIZONTAL 1 +#define MID_VERTICAL 2 +#define MID_VALIDFLAGS 4 + +//AdjustItem +#define MID_PARA_ADJUST 0 +#define MID_LAST_LINE_ADJUST 1 +#define MID_EXPAND_SINGLE 2 + +//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 + +// SvxCharReliefItem +#define MID_RELIEF 0 + +//SvxCharRotateItem +#define MID_ROTATE 0 +#define MID_FITTOLINE 1 + +//SvxExcapementItem +#define MID_ESC 0 +#define MID_ESC_HEIGHT 1 +#define MID_AUTO_ESC 2 + +//SvxFontWidthItem +#define MID_FONTWIDTH 0 +#define MID_FONTWIDTH_PROP 1 + +//SvxFontHeightItem +#define MID_FONTHEIGHT 1 +#define MID_FONTHEIGHT_PROP 2 +#define MID_FONTHEIGHT_DIFF 3 + +//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 + +//SvxPostureItem +#define MID_ITALIC 0 +#define MID_POSTURE 1 + +//SvxBoolItem +#define MID_BOLD 0 +#define MID_WEIGHT 1 + +//SvxLanguageItem +#define MID_LANG_INT 0 +#define MID_LANG_LOCALE 1 + +//SvxEmphasisMarkItem +#define MID_EMPHASIS 0 + +//SvxTwoLinesItem +#define MID_TWOLINES 0 +#define MID_START_BRACKET 1 +#define MID_END_BRACKET 2 + +//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 + +//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 + +//ProtectItem +#define MID_PROTECT_CONTENT 0 +#define MID_PROTECT_SIZE 1 +#define MID_PROTECT_POSITION 2 + +//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 + +//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 + +//SvxFmtBreakItem +#define MID_BREAK_BEFORE 0 +#define MID_BREAK_AFTER 1 + +//SvxCaseMapItem +#define MID_CASEMAP_VARIANT 0 +#define MID_CASEMAP_TRANS 1 + + + +#endif diff --git a/editeng/inc/editeng/mutxhelp.hxx b/editeng/inc/editeng/mutxhelp.hxx new file mode 100644 index 000000000000..559eed80914f --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/nhypitem.hxx b/editeng/inc/editeng/nhypitem.hxx new file mode 100644 index 000000000000..8cf0d157da37 --- /dev/null +++ b/editeng/inc/editeng/nhypitem.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: 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> +#include <editeng/editengdllapi.h> + +// class SvxNoHyphenItem ------------------------------------------------- + +/* [Beschreibung] + + PB: ??? +*/ + +class EDITENG_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/editeng/inc/editeng/nlbkitem.hxx b/editeng/inc/editeng/nlbkitem.hxx new file mode 100644 index 000000000000..5622b870a8e5 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +// class SvxNoLinebreakItem ---------------------------------------------- + + +/* [Beschreibung] + + PB: ??? +*/ + +class EDITENG_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/editeng/inc/editeng/numdef.hxx b/editeng/inc/editeng/numdef.hxx new file mode 100644 index 000000000000..72e5edcde5b7 --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx new file mode 100644 index 000000000000..9ce86427743c --- /dev/null +++ b/editeng/inc/editeng/numitem.hxx @@ -0,0 +1,398 @@ +/************************************************************************* + * + * DO NOT 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 <editeng/svxenum.hxx> +#include <tools/gen.hxx> +#include <editeng/numdef.hxx> +#include <tools/color.hxx> +#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 <editeng/editengdllapi.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 EDITENG_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 EDITENG_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 EDITENG_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 EDITENG_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/editeng/inc/editeng/opaqitem.hxx b/editeng/inc/editeng/opaqitem.hxx new file mode 100644 index 000000000000..d05a0f183d0b --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxOpaqueItem --------------------------------------------------- + + +/* +[Beschreibung] +Dieses Item beschreibt eine logische Variable "Undurchsichtig ja oder nein". +*/ + +class EDITENG_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/editeng/inc/editeng/orphitem.hxx b/editeng/inc/editeng/orphitem.hxx new file mode 100644 index 000000000000..e648fd57b11f --- /dev/null +++ b/editeng/inc/editeng/orphitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxOrphansItem -------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt die Anzahl der Zeilen fuer die Schusterjungenregelung. +*/ + +class EDITENG_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/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx new file mode 100644 index 000000000000..39384b56f70e --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/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 "editeng/editengdllapi.h" + +#include <svtools/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 <editeng/svxfont.hxx> +#include <editeng/eedata.hxx> +#include <editeng/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 EDITENG_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 + + EDITENG_DLLPRIVATE void ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand ); + + EDITENG_DLLPRIVATE ULONG ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget); + EDITENG_DLLPRIVATE void ImpToggleExpand( Paragraph* pParentPara ); + EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds ); + EDITENG_DLLPRIVATE void ImpHideDDCursor(); + EDITENG_DLLPRIVATE void ImpShowDDCursor(); + EDITENG_DLLPRIVATE void ImpPaintDDCursor(); + + EDITENG_DLLPRIVATE void ImpDragScroll( const Point& rPosPix ); + EDITENG_DLLPRIVATE void ImpScrollLeft(); + EDITENG_DLLPRIVATE void ImpScrollRight(); + EDITENG_DLLPRIVATE void ImpScrollUp(); + EDITENG_DLLPRIVATE void ImpScrollDown(); + + EDITENG_DLLPRIVATE ULONG ImpGetInsertionPara( const Point& rPosPixel ); + EDITENG_DLLPRIVATE Point ImpGetDocPos( const Point& rPosPixel ); + EDITENG_DLLPRIVATE Pointer ImpGetMousePointer( MouseTarget eTarget ); + EDITENG_DLLPRIVATE USHORT ImpInitPaste( ULONG& rStart ); + EDITENG_DLLPRIVATE void ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize); + EDITENG_DLLPRIVATE USHORT ImpCalcSelectedPages( BOOL bIncludeFirstSelected ); + EDITENG_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 EDITENG_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 EDITENG_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 EDITENG_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 EDITENG_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/editeng/inc/editeng/outlobj.hxx b/editeng/inc/editeng/outlobj.hxx new file mode 100644 index 000000000000..eb67c49e2b0b --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/paragraphdata.hxx> +#include "editeng/editengdllapi.h" + +class EditTextObject; +class ImplOutlinerParaObject; + +////////////////////////////////////////////////////////////////////////////// + +class EDITENG_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/editeng/inc/editeng/paperinf.hxx b/editeng/inc/editeng/paperinf.hxx new file mode 100644 index 000000000000..6b3aba54f881 --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/svxenum.hxx> +#include "editeng/editengdllapi.h" + +// forward --------------------------------------------------------------- + +class Printer; +class Size; +class String; + +// class SvxPaperInfo ----------------------------------------------------- + +class EDITENG_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/editeng/inc/editeng/paragraphdata.hxx b/editeng/inc/editeng/paragraphdata.hxx new file mode 100644 index 000000000000..ddd98a15e176 --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/paravertalignitem.hxx b/editeng/inc/editeng/paravertalignitem.hxx new file mode 100644 index 000000000000..f70a44e43df8 --- /dev/null +++ b/editeng/inc/editeng/paravertalignitem.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: 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> +#include <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/pbinitem.hxx b/editeng/inc/editeng/pbinitem.hxx new file mode 100644 index 000000000000..db69da17f4e3 --- /dev/null +++ b/editeng/inc/editeng/pbinitem.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: 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> +#include <editeng/editengdllapi.h> + +// define ---------------------------------------------------------------- + +#define PAPERBIN_PRINTER_SETTINGS ((BYTE)0xFF) + +// class SvxPaperBinItem ------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt die Auswahl eines Papierschachts des Drucker. +*/ + +class EDITENG_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/editeng/inc/editeng/pgrditem.hxx b/editeng/inc/editeng/pgrditem.hxx new file mode 100644 index 000000000000..75d655aca554 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +// class SvxParaGridItem ------------------------------------------------- + + +/* + [Beschreibung] + Paragraph snap to grid +*/ + +class EDITENG_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/editeng/inc/editeng/pmdlitem.hxx b/editeng/inc/editeng/pmdlitem.hxx new file mode 100644 index 000000000000..39900ef7650e --- /dev/null +++ b/editeng/inc/editeng/pmdlitem.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: 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> +#include <editeng/editengdllapi.h> + +// class SvxPageModelItem ------------------------------------------------ + +/* +[Beschreibung] +Dieses Item enthaelt einen Namen einer Seitenvorlage. +*/ + +class EDITENG_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/editeng/inc/editeng/postitem.hxx b/editeng/inc/editeng/postitem.hxx new file mode 100644 index 000000000000..356e6ea44b35 --- /dev/null +++ b/editeng/inc/editeng/postitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxPostureItem -------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt die Font-Stellung (Italic) +*/ + +class EDITENG_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/editeng/inc/editeng/prntitem.hxx b/editeng/inc/editeng/prntitem.hxx new file mode 100644 index 000000000000..4f9605547d91 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + + + +// class SvxPrintItem ---------------------------------------------------- + + +/* +[Beschreibung] +Dieses Item beschreibt eine logische Variable "Drucken ja oder nein". +*/ + + +class EDITENG_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/editeng/inc/editeng/protitem.hxx b/editeng/inc/editeng/protitem.hxx new file mode 100644 index 000000000000..246a0cb963a9 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxProtectItem -------------------------------------------------- + + +/* +[Beschreibung] +Dieses Item beschreibt, ob Inhalt, Groesse oder Position geschuetzt werden +sollen. +*/ + +class EDITENG_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/editeng/inc/editeng/prszitem.hxx b/editeng/inc/editeng/prszitem.hxx new file mode 100644 index 000000000000..bcf12c876c4c --- /dev/null +++ b/editeng/inc/editeng/prszitem.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: 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> +#include <editeng/editengdllapi.h> + +// class SvxPropSizeItem ------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt die relative Schriftgroesse. +*/ + +class EDITENG_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/editeng/inc/editeng/scriptspaceitem.hxx b/editeng/inc/editeng/scriptspaceitem.hxx new file mode 100644 index 000000000000..5f46e26d2fdd --- /dev/null +++ b/editeng/inc/editeng/scriptspaceitem.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: 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> +#include <editeng/editengdllapi.h> + +// class SvxScriptSpaceItem ---------------------------------------------- + +/* [Description] + + This item describe the scriptype of the selected text and is only + used for the user interface. +*/ + +class EDITENG_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/editeng/inc/editeng/scripttypeitem.hxx b/editeng/inc/editeng/scripttypeitem.hxx new file mode 100644 index 000000000000..d4214eb5072d --- /dev/null +++ b/editeng/inc/editeng/scripttypeitem.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: 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> +#include <svl/languageoptions.hxx> +#include <editeng/editengdllapi.h> + +// class SvxScriptTypeItem ---------------------------------------------- + +/* [Description] + + This item describe the scriptype of the selected text and is only + used for the user interface. +*/ + +EDITENG_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 EDITENG_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/editeng/inc/editeng/shaditem.hxx b/editeng/inc/editeng/shaditem.hxx new file mode 100644 index 000000000000..dd79068a67b8 --- /dev/null +++ b/editeng/inc/editeng/shaditem.hxx @@ -0,0 +1,114 @@ +/************************************************************************* + * + * DO NOT 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 <editeng/svxenum.hxx> +#include <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/shdditem.hxx b/editeng/inc/editeng/shdditem.hxx new file mode 100644 index 000000000000..96053ac4606b --- /dev/null +++ b/editeng/inc/editeng/shdditem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxShadowedItem ------------------------------------------------- + +/* + [Beschreibung] + Dieses Item beschreibt, ob und wie schattiert ist. +*/ + +class EDITENG_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/editeng/inc/editeng/sizeitem.hxx b/editeng/inc/editeng/sizeitem.hxx new file mode 100644 index 000000000000..f9b2abacc7c2 --- /dev/null +++ b/editeng/inc/editeng/sizeitem.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: 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> +#include <editeng/editengdllapi.h> + +// class SvxSizeItem ----------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt eine zweidimensionale Groesse (Size). +*/ + +class EDITENG_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/editeng/inc/editeng/spltitem.hxx b/editeng/inc/editeng/spltitem.hxx new file mode 100644 index 000000000000..72c47ce1058d --- /dev/null +++ b/editeng/inc/editeng/spltitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxFmtSplitItem ------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt eine logische Variable "Absatz trennen ja oder nein". +*/ + +class EDITENG_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/editeng/inc/editeng/splwrap.hxx b/editeng/inc/editeng/splwrap.hxx new file mode 100644 index 000000000000..9a4582f3b25d --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/svxenum.hxx> +#include <tools/string.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include "editeng/editengdllapi.h" + +// forward --------------------------------------------------------------- + +namespace com { namespace sun { namespace star { namespace linguistic2 { + class XDictionary; + class XSpellChecker1; + class XHyphenator; +}}}} + +class Window; + +// misc functions --------------------------------------------------------------- + +void EDITENG_DLLPUBLIC SvxPrepareAutoCorrect( String &rOldText, String &rNewText ); + +/*-------------------------------------------------------------------- + Beschreibung: Der SpellWrapper + --------------------------------------------------------------------*/ + +class EDITENG_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. + + EDITENG_DLLPRIVATE sal_Bool SpellNext(); // naechsten Bereich anwaehlen + 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/editeng/inc/editeng/svdfield.hxx b/editeng/inc/editeng/svdfield.hxx new file mode 100644 index 000000000000..90736f1b9550 --- /dev/null +++ b/editeng/inc/editeng/svdfield.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: 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 <editeng/eeitem.hxx> + +#ifndef _FLDITEM_HXX +#ifndef ITEMID_FIELD +#ifndef _EDITDATA_HXX +#include <editeng/editdata.hxx> /* das include wird wg. EE_FEATURE_FIELD benoetigt */ +#endif +#define ITEMID_FIELD EE_FEATURE_FIELD /* wird fuer #include <editeng/flditem.hxx> benoetigt */ +#endif +#include <editeng/flditem.hxx> +#endif +#include "editeng/editengdllapi.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Do not remove this, it is still used in src536a! +void EDITENG_DLLPUBLIC SdrRegisterFieldClasses(); +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#define SDR_MEASUREFIELD 50 + +class SdrMeasureObj; + +enum SdrMeasureFieldKind {SDRMEASUREFIELD_VALUE,SDRMEASUREFIELD_UNIT,SDRMEASUREFIELD_ROTA90BLANCS}; + +class EDITENG_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; } +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif //_SVDFIELD_HXX + diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx new file mode 100644 index 000000000000..fe8cf1196593 --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/swafopt.hxx> +#include "editeng/editengdllapi.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 EDITENG_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 EDITENG_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 , EDITENG_DLLPUBLIC) + +class EDITENG_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 EDITENG_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/editeng/inc/editeng/svxenum.hxx b/editeng/inc/editeng/svxenum.hxx new file mode 100644 index 000000000000..01a7d80d1351 --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/svxfont.hxx b/editeng/inc/editeng/svxfont.hxx new file mode 100644 index 000000000000..3bb10ad2b395 --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/svxenum.hxx> +#include <i18npool/lang.h> +#include <vcl/font.hxx> +#include "editeng/editengdllapi.h" + +class SvxDoCapitals; +class OutputDevice; +class Printer; + +class EDITENG_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/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx new file mode 100644 index 000000000000..9758af2b5d72 --- /dev/null +++ b/editeng/inc/editeng/svxrtf.hxx @@ -0,0 +1,478 @@ +/************************************************************************* + * + * DO NOT 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 + +#include <tools/table.hxx> +#include <tools/string.hxx> +#include <svl/itemset.hxx> +#include <svtools/parrtf.hxx> + +#define _SVSTDARR_USHORTS +#include <svl/svstdarr.hxx> +#include <editeng/editengdllapi.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 EDITENG_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 EDITENG_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 EDITENG_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/editeng/inc/editeng/swafopt.hxx b/editeng/inc/editeng/swafopt.hxx new file mode 100644 index 000000000000..2cb67ee2b43b --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +class SvStringsISortDtor; +class SmartTagMgr; + +// Klasse fuer Optionen vom Autoformat +struct EDITENG_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/editeng/inc/editeng/tstpitem.hxx b/editeng/inc/editeng/tstpitem.hxx new file mode 100644 index 000000000000..6608b79fcb4b --- /dev/null +++ b/editeng/inc/editeng/tstpitem.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: 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 <editeng/svxenum.hxx> +#include <editeng/editengdllapi.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 EDITENG_DLLPUBLIC SvxTabStop +{ +private: + long nTabPos; + + SvxTabAdjust eAdjustment; + mutable sal_Unicode m_cDecimal; + sal_Unicode cFill; + + EDITENG_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, EDITENG_DLLPUBLIC ) + +/* +[Beschreibung] +Dieses Item beschreibt eine Liste von TabStops. +*/ + +class EDITENG_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/editeng/inc/editeng/twolinesitem.hxx b/editeng/inc/editeng/twolinesitem.hxx new file mode 100644 index 000000000000..dd3fa79e24d8 --- /dev/null +++ b/editeng/inc/editeng/twolinesitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +class EDITENG_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/editeng/inc/editeng/txtrange.hxx b/editeng/inc/editeng/txtrange.hxx new file mode 100644 index 000000000000..21273db2959f --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/udlnitem.hxx b/editeng/inc/editeng/udlnitem.hxx new file mode 100644 index 000000000000..61de81da19c1 --- /dev/null +++ b/editeng/inc/editeng/udlnitem.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: 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> +#include <vcl/vclenum.hxx> +#include <tools/color.hxx> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxTextLineItem ------------------------------------------------ + +/* Value container for underline and overline font effects */ + +class EDITENG_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 EDITENG_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 EDITENG_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/editeng/inc/editeng/ulspitem.hxx b/editeng/inc/editeng/ulspitem.hxx new file mode 100644 index 000000000000..1b9a22eb6e9e --- /dev/null +++ b/editeng/inc/editeng/ulspitem.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: 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> +#include <editeng/editengdllapi.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 EDITENG_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/editeng/inc/editeng/unoedhlp.hxx b/editeng/inc/editeng/unoedhlp.hxx new file mode 100644 index 000000000000..5ca1b3f94ec2 --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.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 EDITENG_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 EDITENG_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/editeng/inc/editeng/unoedsrc.hxx b/editeng/inc/editeng/unoedsrc.hxx new file mode 100644 index 000000000000..f2754b86d48c --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.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 EDITENG_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 EDITENG_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 EDITENG_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/editeng/inc/editeng/unofdesc.hxx b/editeng/inc/editeng/unofdesc.hxx new file mode 100644 index 000000000000..47a8a779b7ec --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +class EDITENG_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/editeng/inc/editeng/unofield.hxx b/editeng/inc/editeng/unofield.hxx new file mode 100644 index 000000000000..d702280d980b --- /dev/null +++ b/editeng/inc/editeng/unofield.hxx @@ -0,0 +1,140 @@ +/************************************************************************* + * + * DO NOT 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 "editeng/editengdllapi.h" + +#include <comphelper/servicehelper.hxx> + +#include <editeng/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; + +com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxUnoTextCreateTextField( + const ::rtl::OUString& ServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + +class EDITENG_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/editeng/inc/editeng/unofored.hxx b/editeng/inc/editeng/unofored.hxx new file mode 100644 index 000000000000..915ca905bacb --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/editeng.hxx> +#include <editeng/unoedsrc.hxx> +#include "editeng/editengdllapi.h" + +// SvxEditEngineForwarder - SvxTextForwarder fuer EditEngine + +class EDITENG_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/editeng/inc/editeng/unoforou.hxx b/editeng/inc/editeng/unoforou.hxx new file mode 100644 index 000000000000..f3f30a10d43e --- /dev/null +++ b/editeng/inc/editeng/unoforou.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: 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 <editeng/unoedsrc.hxx> +#include "editeng/editengdllapi.h" + +#include <editeng/editdata.hxx> + +class Outliner; + +// SvxOutlinerForwarder - SvxTextForwarder fuer Outliner + +class EDITENG_DLLPUBLIC SvxOutlinerForwarder : public SvxTextForwarder +{ +private: + Outliner& rOutliner; + BOOL bOutlinerText; + + /** 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, BOOL bOutlText = FALSE ); + 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/editeng/inc/editeng/unoipset.hxx b/editeng/inc/editeng/unoipset.hxx new file mode 100644 index 000000000000..24c77f08be5b --- /dev/null +++ b/editeng/inc/editeng/unoipset.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: 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 "editeng/editengdllapi.h" +#include <svl/itemprop.hxx> + +class SvxIDPropertyCombineList; +class SdrItemPool; +class SfxItemSet; +class SvxShape; + +#define SFX_METRIC_ITEM (0x40) + +class EDITENG_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; + SfxItemPool& mrItemPool; + +public: + SvxItemPropertySet( const SfxItemPropertyMapEntry *pMap, SfxItemPool& rPool, 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, bool bSearchInParent, bool bConvert ) const; + void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet, bool bConvert ) 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; + + 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 ); +}; + +/** converts the given any with a metric to 100th/mm if needed */ +EDITENG_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 */ +EDITENG_DLLPUBLIC void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, com::sun::star::uno::Any & rMetric ) throw(); + +#endif // _SVX_UNOIPSET_HXX_ + diff --git a/editeng/inc/editeng/unolingu.hxx b/editeng/inc/editeng/unolingu.hxx new file mode 100644 index 000000000000..58098397684c --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.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: + + EDITENG_DLLPUBLIC static void UpdateAll( sal_Bool bForceCheck = sal_False ); + static BOOL IsNeedUpdateAll( sal_Bool bForceCheck = sal_False ); +}; + +/////////////////////////////////////////////////////////////////////////// + +class EDITENG_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) +{ +} + + +EDITENG_DLLPUBLIC SvxAlternativeSpelling SvxGetAltSpelling( + const ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenatedWord > & rHyphWord ); + + +/////////////////////////////////////////////////////////////////////////// + +class EDITENG_DLLPUBLIC SvxDicListChgClamp +{ +private: + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > xDicList; + + // disallow access to copy-constructor and assignment-operator + EDITENG_DLLPRIVATE SvxDicListChgClamp(const SvxDicListChgClamp &); + EDITENG_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 +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > SvxGetSpellChecker(); +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > SvxGetHyphenator(); +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XThesaurus > SvxGetThesaurus(); +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > SvxGetDictionaryList(); +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > SvxGetLinguPropertySet(); +//TL:TODO: remove argument or provide SvxGetIgnoreAllList with the same one +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > SvxGetOrCreatePosDic( + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > xDicList ); +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > SvxGetIgnoreAllList(); +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionary > SvxGetChangeAllList(); + +/////////////////////////////////////////////////////////////////////////// +// misc functions +// + +EDITENG_DLLPUBLIC LanguageType SvxLocaleToLanguage( + const ::com::sun::star::lang::Locale& rLocale ); +EDITENG_DLLPUBLIC ::com::sun::star::lang::Locale& SvxLanguageToLocale( + ::com::sun::star::lang::Locale& rLocale, LanguageType eLang ); +EDITENG_DLLPUBLIC ::com::sun::star::lang::Locale SvxCreateLocale( LanguageType eLang ); + + +EDITENG_DLLPUBLIC short SvxDicError( Window *pParent, sal_Int16 nError ); + + +#endif + + + diff --git a/editeng/inc/editeng/unonrule.hxx b/editeng/inc/editeng/unonrule.hxx new file mode 100644 index 000000000000..edac46a1c1f6 --- /dev/null +++ b/editeng/inc/editeng/unonrule.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: 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 "editeng/editengdllapi.h" +#include <cppuhelper/implbase5.hxx> +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/util/XCloneable.hpp> +#include <editeng/numitem.hxx> +#include <comphelper/servicehelper.hxx> +#include <com/sun/star/beans/PropertyValue.hpp> + +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SvxCreateNumRule( const SvxNumRule* pRule ) throw(); +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SvxCreateNumRule() 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 ); +EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XAnyCompare > SvxCreateNumRuleCompare() throw(); + +class SvxUnoNumberingRules : public ::cppu::WeakAggImplHelper5< com::sun::star::container::XIndexReplace, com::sun::star::ucb::XAnyCompare, + com::sun::star::lang::XUnoTunnel, com::sun::star::util::XCloneable, com::sun::star::lang::XServiceInfo > +{ +private: + SvxNumRule maRule; +public: + SvxUnoNumberingRules( const SvxNumRule& rRule ) throw(); + virtual ~SvxUnoNumberingRules() throw(); + + UNO3_GETIMPLEMENTATION_DECL( SvxUnoNumberingRules ) + + //XIndexReplace + virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const com::sun::star::uno::Any& Element ) throw( + com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::IndexOutOfBoundsException, com::sun::star::lang::WrappedTargetException, 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); + + // XAnyCompare + virtual sal_Int16 SAL_CALL compare( const com::sun::star::uno::Any& Any1, const com::sun::star::uno::Any& Any2 ) throw(com::sun::star::uno::RuntimeException); + + // XCloneable + virtual com::sun::star::uno::Reference< com::sun::star::util::XCloneable > SAL_CALL createClone( ) 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); + + // intern + com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> getNumberingRuleByIndex( sal_Int32 nIndex) const throw(); + void setNumberingRuleByIndex( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rProperties, sal_Int32 nIndex) throw( com::sun::star::uno::RuntimeException, com::sun::star::lang::IllegalArgumentException ); + + static sal_Int16 Compare( const com::sun::star::uno::Any& rAny1, const com::sun::star::uno::Any& rAny2 ); + + const SvxNumRule& getNumRule() const { return maRule; } +}; + + +#endif + + diff --git a/editeng/inc/editeng/unopracc.hxx b/editeng/inc/editeng/unopracc.hxx new file mode 100644 index 000000000000..5db1d3ff8b8d --- /dev/null +++ b/editeng/inc/editeng/unopracc.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: unopracc.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_UNOPRACC_HXX +#define _SVX_UNOPRACC_HXX + +#include <editeng/unotext.hxx> + + +class SvxEditSource; + +/** Wraps SvxUnoTextRangeBase and provides us with the text properties + + Inherits from SvxUnoTextRangeBase and provides XPropertySet and + XMultiPropertySet interfaces. Just set the selection to the + required text range and return a reference to a XPropertySet. + */ +class SvxAccessibleTextPropertySet : public SvxUnoTextRangeBase, + public ::com::sun::star::lang::XTypeProvider, + public ::cppu::OWeakObject +{ +public: + SvxAccessibleTextPropertySet( const SvxEditSource*, const SvxItemPropertySet* ); + virtual ~SvxAccessibleTextPropertySet() throw(); + + // XTextRange + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException); + + // 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(); + + // lang::XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException); + + // 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); + + // XServiceName + ::rtl::OUString SAL_CALL getServiceName() throw (::com::sun::star::uno::RuntimeException); +}; + +#endif + diff --git a/editeng/inc/editeng/unoprnms.hxx b/editeng/inc/editeng/unoprnms.hxx new file mode 100644 index 000000000000..7f28e5677043 --- /dev/null +++ b/editeng/inc/editeng/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/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx new file mode 100644 index 000000000000..99b4f2b69503 --- /dev/null +++ b/editeng/inc/editeng/unotext.hxx @@ -0,0 +1,678 @@ +/************************************************************************* + * + * DO NOT 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 <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/text/XTextRange.hpp> +#include <com/sun/star/text/XText.hpp> +#include <com/sun/star/container/XEnumerationAccess.hpp> +#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/lang/XServiceInfo.hpp> +#include <com/sun/star/beans/PropertyAttribute.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 <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 <cppuhelper/weak.hxx> +#include <cppuhelper/weakagg.hxx> +#include <osl/mutex.hxx> +#include <comphelper/servicehelper.hxx> +#include <tools/link.hxx> +#include <svl/itemprop.hxx> +#include <svl/itemset.hxx> +#include <svl/itempool.hxx> +#include <svl/solar.hrc> +#include <editeng/editdata.hxx> +#include <editeng/unoedsrc.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/editengdllapi.h> +#include <editeng/memberids.hrc> + +class SvxItemPropertySet; + +#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 WID_FONTDESC OWN_ATTR_VALUE_START +#define WID_NUMLEVEL OWN_ATTR_VALUE_START+1 +#define WID_PORTIONTYPE OWN_ATTR_VALUE_START+2 +#define WID_NUMBERINGSTARTVALUE OWN_ATTR_VALUE_START+3 +#define WID_PARAISNUMBERINGRESTART OWN_ATTR_VALUE_START+4 + +#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; + +EDITENG_DLLPUBLIC void GetSelection( struct ESelection& rSel, SvxTextForwarder* pForwarder ) throw(); +EDITENG_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 EDITENG_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, SvxEditSource* 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, SvxEditSource* 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 EDITENG_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 EDITENG_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 EDITENG_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 EDITENG_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); + +}; + +EDITENG_DLLPUBLIC const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet(); +EDITENG_DLLPUBLIC const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap(); +EDITENG_DLLPUBLIC const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet(); +EDITENG_DLLPUBLIC const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap(); + +#endif diff --git a/editeng/inc/editeng/unoviwed.hxx b/editeng/inc/editeng/unoviwed.hxx new file mode 100644 index 000000000000..679e0110e2f1 --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/unoedsrc.hxx> + +#include <editeng/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/editeng/inc/editeng/unoviwou.hxx b/editeng/inc/editeng/unoviwou.hxx new file mode 100644 index 000000000000..bc2fef611ad0 --- /dev/null +++ b/editeng/inc/editeng/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 <editeng/editengdllapi.h> + +class OutlinerView; + +/// Specialization for Draw/Impress +class EDITENG_DLLPUBLIC SvxDrawOutlinerViewForwarder : public SvxEditViewForwarder +{ +private: + OutlinerView& mrOutlinerView; + Point maTextShapeTopLeft; + + EDITENG_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/editeng/inc/editeng/wghtitem.hxx b/editeng/inc/editeng/wghtitem.hxx new file mode 100644 index 000000000000..7f7d24dc76c1 --- /dev/null +++ b/editeng/inc/editeng/wghtitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxWeightItem --------------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt die Font-Staerke. +*/ + +class EDITENG_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/editeng/inc/editeng/widwitem.hxx b/editeng/inc/editeng/widwitem.hxx new file mode 100644 index 000000000000..25dd15783d21 --- /dev/null +++ b/editeng/inc/editeng/widwitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxWidowsItem --------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt die Anzahl der Zeilen fuer die Hurenkinderregelung. +*/ + +class EDITENG_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/editeng/inc/editeng/writingmodeitem.hxx b/editeng/inc/editeng/writingmodeitem.hxx new file mode 100644 index 000000000000..7cbb4cfc172e --- /dev/null +++ b/editeng/inc/editeng/writingmodeitem.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: 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 "editeng/editengdllapi.h" + +// class SvxWritingModeItem ---------------------------------------------- + +class EDITENG_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/editeng/inc/editeng/wrlmitem.hxx b/editeng/inc/editeng/wrlmitem.hxx new file mode 100644 index 000000000000..1deb300b1b9a --- /dev/null +++ b/editeng/inc/editeng/wrlmitem.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: 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> +#include <editeng/editengdllapi.h> + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +// class SvxWordLineModeItem --------------------------------------------- + +/* [Beschreibung] + + Dieses Item beschreibt, ob Unterstrichen und Durchgestrichen auf + Wortgrenzen beschraenkt ist. +*/ + +class EDITENG_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/editeng/inc/editeng/xmlcnitm.hxx b/editeng/inc/editeng/xmlcnitm.hxx new file mode 100644 index 000000000000..d3e762dc761d --- /dev/null +++ b/editeng/inc/editeng/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 "editeng/editengdllapi.h" + +class SvXMLNamespaceMap; +namespace rtl { class OUString; } + +//============================================================================ + +class SvXMLAttrContainerData; + +class EDITENG_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/editeng/inc/editxml.hxx b/editeng/inc/editxml.hxx new file mode 100644 index 000000000000..d6d09382395e --- /dev/null +++ b/editeng/inc/editxml.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: editxml.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_EDITXML_HXX +#define _SVX_EDITXML_HXX + +class EditEngine; +class SvStream; +struct ESelection; + +/** this function exports the selected content of an edit engine into a xml stream*/ +extern void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& rSel ); + +/** this function imports xml from the stream into the selected of an edit engine */ +extern void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& rSel ); + +#endif + + diff --git a/editeng/inc/helpid.hrc b/editeng/inc/helpid.hrc new file mode 100644 index 000000000000..c4cc03bb4213 --- /dev/null +++ b/editeng/inc/helpid.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: 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 _EDITENG_HELPID_HRC +#define _EDITENG_HELPID_HRC + +// include --------------------------------------------------------------- + +#include <svl/solar.hrc> + +// Help-Ids -------------------------------------------------------------- +#define HID_EDITENG_SPELLER_WORDLANGUAGE (HID_SVX_START + 36) +#define HID_EDITENG_SPELLER_PARALANGUAGE (HID_SVX_START + 34) +#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_START (HID_SVX_START + 35) + +#define HID_AUTOCORR_HELP_END (HID_SVX_START + 2) +#define HID_AUTOCORR_HELP_START (HID_SVX_START + 3) + +// 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/editeng/inc/makefile.mk b/editeng/inc/makefile.mk new file mode 100644 index 000000000000..6ecb444e03eb --- /dev/null +++ b/editeng/inc/makefile.mk @@ -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: 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=editeng +TARGET=inc + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# --- Files -------------------------------------------------------- + +.INCLUDE : target.mk + +.IF "$(ENABLE_PCH)"!="" +ALLTAR : \ + $(SLO)$/precompiled.pch \ + $(SLO)$/precompiled_ex.pch + +.ENDIF # "$(ENABLE_PCH)"!="" + diff --git a/editeng/inc/pch/precompiled_editeng.cxx b/editeng/inc/pch/precompiled_editeng.cxx new file mode 100644 index 000000000000..1b18cce1697c --- /dev/null +++ b/editeng/inc/pch/precompiled_editeng.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_editeng.hxx" + diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx new file mode 100644 index 000000000000..d82ecc6cb6b5 --- /dev/null +++ b/editeng/inc/pch/precompiled_editeng.hxx @@ -0,0 +1,897 @@ +/************************************************************************* + * + * DO NOT 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 "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/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 "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 "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 "svl/srchdefs.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 "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" +//---MARKER--- +#endif + diff --git a/editeng/inc/unoedprx.hxx b/editeng/inc/unoedprx.hxx new file mode 100644 index 000000000000..e93d6a47aef6 --- /dev/null +++ b/editeng/inc/unoedprx.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: unoedprx.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_UNOEDPRX_HXX +#define _SVX_UNOEDPRX_HXX + +#include <memory> +#include <svl/brdcst.hxx> +#include <editeng/unoedsrc.hxx> + +#include <editeng/editdata.hxx> + + +class SvxAccessibleTextAdapter : public SvxTextForwarder +{ +public: + SvxAccessibleTextAdapter(); + virtual ~SvxAccessibleTextAdapter(); + + 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; + + 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 + // (not needed for accessibility, only for new import API) + virtual void AppendParagraph(); + virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + + //XTextCopy + virtual void CopyText(const SvxTextForwarder& rSource); + + void SetForwarder( SvxTextForwarder& ); + sal_Bool HaveImageBullet( USHORT nPara ) const; + sal_Bool HaveTextBullet( USHORT nPara ) const; + + /** Query whether all text in given selection is editable + + @return sal_True if every character in the given selection can + be changed, and sal_False if e.g. a field or a bullet is + contained therein. + */ + sal_Bool IsEditable( const ESelection& rSelection ); + +private: + SvxTextForwarder* mrTextForwarder; +}; + +class SvxAccessibleTextEditViewAdapter : public SvxEditViewForwarder +{ +public: + + SvxAccessibleTextEditViewAdapter(); + virtual ~SvxAccessibleTextEditViewAdapter(); + + // SvxViewForwarder interface + 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; + + // SvxEditViewForwarder interface + 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(); + + void SetForwarder( SvxEditViewForwarder&, SvxAccessibleTextAdapter& ); + +private: + SvxEditViewForwarder* mrViewForwarder; + SvxAccessibleTextAdapter* mrTextForwarder; +}; + +class SvxEditSourceAdapter : public SvxEditSource +{ +public: + SvxEditSourceAdapter(); + ~SvxEditSourceAdapter(); + + virtual SvxEditSource* Clone() const; + virtual SvxTextForwarder* GetTextForwarder(); + SvxAccessibleTextAdapter* GetTextForwarderAdapter(); // covariant return types don't work on MSVC + virtual SvxViewForwarder* GetViewForwarder(); + virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate = sal_False ); + SvxAccessibleTextEditViewAdapter* GetEditViewForwarderAdapter( sal_Bool bCreate = sal_False ); // covariant return types don't work on MSVC + virtual void UpdateData(); + virtual SfxBroadcaster& GetBroadcaster() const; + + void SetEditSource( ::std::auto_ptr< SvxEditSource > pAdaptee ); + sal_Bool IsValid() const; + +private: + // declared, but not defined + SvxEditSourceAdapter( const SvxEditSourceAdapter& ); + SvxEditSourceAdapter& operator= ( const SvxEditSourceAdapter& ); + + ::std::auto_ptr< SvxEditSource > mpAdaptee; + + SvxAccessibleTextAdapter maTextAdapter; + SvxAccessibleTextEditViewAdapter maEditViewAdapter; + + mutable SfxBroadcaster maDummyBroadcaster; + + sal_Bool mbEditSourceValid; +}; + +#endif |