diff options
Diffstat (limited to 'svx/inc')
151 files changed, 12077 insertions, 0 deletions
diff --git a/svx/inc/AccessibleTableShape.hxx b/svx/inc/AccessibleTableShape.hxx new file mode 100644 index 000000000..45138030e --- /dev/null +++ b/svx/inc/AccessibleTableShape.hxx @@ -0,0 +1,216 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_ACCESSIBLETABLESHAPE_HXX +#define INCLUDED_SVX_INC_ACCESSIBLETABLESHAPE_HXX + +#include <com/sun/star/accessibility/XAccessibleTable.hpp> + +#include <rtl/ref.hxx> + +#include <cppuhelper/implbase.hxx> + +#include <svx/AccessibleShape.hxx> +#include <com/sun/star/view/XSelectionChangeListener.hpp> +#include <com/sun/star/accessibility/XAccessibleTableSelection.hpp> + +namespace sdr::table { class SvxTableController; } + +namespace accessibility +{ + class AccessibleTableShapeImpl; + class AccessibleCell; + + typedef ::cppu::ImplInheritanceHelper< AccessibleShape, + css::accessibility::XAccessibleTable, + css::view::XSelectionChangeListener + > AccessibleTableShape_Base; +class AccessibleTableShape final : public AccessibleTableShape_Base, public css::accessibility::XAccessibleTableSelection +{ + sal_Int32 mnPreviousSelectionCount; +public: + AccessibleTableShape( const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo ); + virtual ~AccessibleTableShape( ) override; + AccessibleTableShape(const AccessibleTableShape&) = delete; + AccessibleTableShape& operator=(const AccessibleTableShape&) = delete; + + virtual void Init() override; + + // XInterface + virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override; + virtual void SAL_CALL acquire( ) throw () override; + virtual void SAL_CALL release( ) throw () override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) override; + virtual sal_Int16 SAL_CALL getAccessibleRole() override; + + // XAccessibleTable + virtual sal_Int32 SAL_CALL getAccessibleRowCount() override; + virtual sal_Int32 SAL_CALL getAccessibleColumnCount( ) override; + virtual OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) override; + virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) override; + virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override; + virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override; + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders( ) override; + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders( ) override; + virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows( ) override; + virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns( ) override; + virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) override; + virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption( ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary( ) override; + virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) override; + virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) override; + virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) override; + virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) override; + + // XAccessibleSelection + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) override; + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) override; + virtual void SAL_CALL clearAccessibleSelection( ) override; + virtual void SAL_CALL selectAllAccessibleChildren( ) override; + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) override; + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) override; + // XAccessibleTableSelection + virtual sal_Bool SAL_CALL selectRow( sal_Int32 row ) override ; + virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column ) override ; + virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row ) override ; + virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column ) override ; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName( ) override; + + // XComponent + virtual void SAL_CALL disposing( ) override; + + // XSelectionChangeListener + virtual void SAL_CALL + disposing (const css::lang::EventObject& Source) override; + virtual void SAL_CALL + selectionChanged (const css::lang::EventObject& rEvent) override; + using AccessibleShape::disposing; + friend class AccessibleTableHeaderShape; + + /// @throws css::lang::IndexOutOfBoundsException + void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ); + // overwrite the SetState & ResetState to do special operation for table cell's internal text + virtual bool SetState (sal_Int16 aState) override; + virtual bool ResetState (sal_Int16 aState) override; + // The following two methods are used to set state directly on table object, instead of the internal cell or paragraph. + bool SetStateDirectly (sal_Int16 aState); + bool ResetStateDirectly (sal_Int16 aState); + // Get the currently active cell which is text editing + AccessibleCell* GetActiveAccessibleCell(); + +private: + virtual OUString CreateAccessibleBaseName() override; + + sdr::table::SvxTableController* getTableController(); + + /// @throws css::lang::IndexOutOfBoundsException + void checkCellPosition( sal_Int32 nCol, sal_Int32 nRow ); + + rtl::Reference< AccessibleTableShapeImpl > mxImpl; + sal_Int32 GetIndexOfSelectedChild( sal_Int32 nSelectedChildIndex ) const; +}; + +typedef ::cppu::WeakImplHelper< + css::accessibility::XAccessible, + css::accessibility::XAccessibleComponent, + css::accessibility::XAccessibleContext, + css::accessibility::XAccessibleTable, + css::accessibility::XAccessibleTableSelection > + AccessibleTableHeaderShape_BASE; + +class AccessibleTableHeaderShape : public MutexOwner, + public AccessibleTableHeaderShape_BASE +{ +public: + // bRow, true means rowheader, false means columnheader + AccessibleTableHeaderShape( AccessibleTableShape* pTable, bool bRow ); + virtual ~AccessibleTableHeaderShape() override; + AccessibleTableHeaderShape(const AccessibleTableHeaderShape&) = delete; + AccessibleTableHeaderShape& operator=(const AccessibleTableHeaderShape&) = delete; + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext( ) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) override; + virtual OUString SAL_CALL getAccessibleDescription( ) override; + virtual OUString SAL_CALL getAccessibleName( ) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) override; + virtual css::lang::Locale SAL_CALL getLocale( ) override; + + //XAccessibleComponent + virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) override; + virtual css::awt::Rectangle SAL_CALL getBounds( ) override; + virtual css::awt::Point SAL_CALL getLocation( ) override; + virtual css::awt::Point SAL_CALL getLocationOnScreen( ) override; + virtual css::awt::Size SAL_CALL getSize( ) override; + virtual sal_Int32 SAL_CALL getForeground( ) override; + virtual sal_Int32 SAL_CALL getBackground( ) override; + virtual void SAL_CALL grabFocus( ) override; + + // XAccessibleTable + virtual sal_Int32 SAL_CALL getAccessibleRowCount() override; + virtual sal_Int32 SAL_CALL getAccessibleColumnCount( ) override; + virtual OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) override; + virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) override; + virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override; + virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override; + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders( ) override; + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders( ) override; + virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows( ) override; + virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns( ) override; + virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) override; + virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleCaption( ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleSummary( ) override; + virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) override; + virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) override; + virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) override; + virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) override; + + // XAccessibleTableSelection + virtual sal_Bool SAL_CALL selectRow( sal_Int32 row ) override ; + virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column ) override ; + virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row ) override ; + virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column ) override ; +private: + bool mbRow; + rtl::Reference< AccessibleTableShape > mpTable; +}; + +} // end of namespace accessibility + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/AffineMatrixItem.hxx b/svx/inc/AffineMatrixItem.hxx new file mode 100644 index 000000000..7d1c48a53 --- /dev/null +++ b/svx/inc/AffineMatrixItem.hxx @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include <com/sun/star/geometry/AffineMatrix2D.hpp> +#include <sal/types.h> +#include <svl/poolitem.hxx> + +class SfxItemPool; + +class AffineMatrixItem final : public SfxPoolItem +{ +private: + css::geometry::AffineMatrix2D maMatrix; + +public: + AffineMatrixItem(const css::geometry::AffineMatrix2D* pMatrix); + AffineMatrixItem(const AffineMatrixItem&); + virtual ~AffineMatrixItem() override; + + virtual bool operator==(const SfxPoolItem&) const override; + virtual AffineMatrixItem* Clone( SfxItemPool* pPool = nullptr ) const override; + + virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; + virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/CommonStylePreviewRenderer.hxx b/svx/inc/CommonStylePreviewRenderer.hxx new file mode 100644 index 000000000..5dfd41faa --- /dev/null +++ b/svx/inc/CommonStylePreviewRenderer.hxx @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include <memory> + +#include <sfx2/objsh.hxx> +#include <sfx2/StylePreviewRenderer.hxx> +#include <rtl/ustring.hxx> +#include <tools/color.hxx> +#include <tools/gen.hxx> + +class OutputDevice; +class SfxStyleSheetBase; +class SvxFont; + +namespace svx +{ +class CommonStylePreviewRenderer final : public sfx2::StylePreviewRenderer +{ + std::unique_ptr<SvxFont> m_pFont; + Color maFontColor; + Color maBackgroundColor; + Size maPixelSize; + OUString maStyleName; + + Size getRenderSize() const; + +public: + CommonStylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& rOutputDev, + SfxStyleSheetBase* pStyle, long nMaxHeight); + virtual ~CommonStylePreviewRenderer() override; + + virtual bool recalculate() override; + virtual bool render(const tools::Rectangle& aRectangle, + RenderAlign eRenderAlign = RenderAlign::CENTER) override; +}; + +} // end namespace svx + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/DescriptionGenerator.hxx b/svx/inc/DescriptionGenerator.hxx new file mode 100644 index 000000000..c1407a769 --- /dev/null +++ b/svx/inc/DescriptionGenerator.hxx @@ -0,0 +1,134 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#pragma once + +#include <com/sun/star/uno/Reference.hxx> +#include <rtl/ustrbuf.hxx> + +namespace com::sun::star::beans { class XPropertySet; } +namespace com::sun::star::drawing { class XShape; } + + +namespace accessibility { + +/** This class creates description strings for shapes. + <p>Initialized with a given shape additional calls to the + <member>addProperty</member> method will build a descriptive string that + starts with a general shape description and the shapes style. Appended + are all the specified property names and values that differ from the + default values in the style.</p> +*/ +class DescriptionGenerator +{ +public: + enum class PropertyType { + Color, + Integer + }; + + /** Creates a new description generator with an empty description + string. Usually you will want to call initialize next to specify + a general description of the shape. + @param xShape + The shape from which properties will be extracted by later calls + to <member>addProperty</member>. + */ + DescriptionGenerator (const css::uno::Reference< + css::drawing::XShape>& xShape); + + ~DescriptionGenerator(); + + /** Initialize the description with the given prefix followed by the + shape style in parentheses and a colon. + @param sPrefix + An introductory description of the shape that is made more + specific by later calls to <member>addProperty</member>. + */ + void Initialize (const OUString& sPrefix); + + /** Initialize the description with the specified string from the + resource followed by the shape style in parentheses and a colon. + @param pResourceId + A resource id the specifies the introductory description of the + shape that is made more specific by later calls to + <member>addProperty</member>. + */ + void Initialize(const char* pResourceId); + + /** Returns the description string and then resets it. Usually called + as last method before destroying the object. + @return + The description string in its current form. + */ + OUString operator() (void); + + /** Add the given property name and its associated value to the + description string. If the property value does not differ from the + default value of the shape's style then the description string is + not modified. + @param sPropertyName + The Name of the property to append. + @param aType + Type of the property's value. It controls the transformation + into the value's string representation. + @param sLocalizedName + Localized name of the property. An empty string tells the + method to use the property name instead. + */ + void AddProperty (const OUString& sPropertyName, + PropertyType aType); + + /** Append the given string as is to the current description. + @param sString + String to append to the current description. It is not modified + in any way. + */ + void AppendString (const OUString& sString); + +private: + /// Reference to the shape from which the properties are extracted. + css::uno::Reference< css::drawing::XShape> mxShape; + + /// Reference to the shape's property set. + css::uno::Reference< css::beans::XPropertySet> mxSet; + + /// The description string that is build. + OUStringBuffer msDescription; + + /** This flag is used to determine whether to insert a separator e.g. a + comma before the next property. + */ + bool mbIsFirstProperty; + + /** Add a property value formatted as color to the description string. + */ + void AddColor (const OUString& sPropertyName); + + /** Add a property value formatted as integer to the description string. + */ + void AddInteger (const OUString& sPropertyName); +}; + + +} // end of namespace accessibility + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/GalleryControl.hxx b/svx/inc/GalleryControl.hxx new file mode 100644 index 000000000..5b40f4bc8 --- /dev/null +++ b/svx/inc/GalleryControl.hxx @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_GALLERYCONTROL_HXX +#define INCLUDED_SVX_INC_GALLERYCONTROL_HXX + +#include <config_options.h> +#include <sfx2/sidebar/PanelLayout.hxx> +#include <svx/svxdllapi.h> + +class SfxBindings; + +class Gallery; +class GalleryBrowser1; +class GalleryBrowser2; +class FmFormModel; +class Splitter; + +namespace svx::sidebar { + + +class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) GalleryControl final : public PanelLayout +{ +public: + GalleryControl( vcl::Window* pParentWindow ); + +private: + Gallery* mpGallery; + std::unique_ptr<GalleryBrowser1> mxBrowser1; + std::unique_ptr<GalleryBrowser2> mxBrowser2; + + virtual void GetFocus() override; + + virtual ~GalleryControl() override; + virtual void dispose() override; +}; + +} // end of namespace svx::sidebar + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/XPropertyTable.hxx b/svx/inc/XPropertyTable.hxx new file mode 100644 index 000000000..87015e2f1 --- /dev/null +++ b/svx/inc/XPropertyTable.hxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <com/sun/star/uno/XInterface.hpp> +#include <svx/xtable.hxx> + +// FIXME: should have a single factory method with an enumeration here [!] + +css::uno::Reference< css::uno::XInterface > SvxUnoXColorTable_createInstance( XPropertyList* pList ) throw(); +css::uno::Reference< css::uno::XInterface > SvxUnoXLineEndTable_createInstance( XPropertyList* pList ) throw(); +css::uno::Reference< css::uno::XInterface > SvxUnoXDashTable_createInstance( XPropertyList* pList ) throw(); +css::uno::Reference< css::uno::XInterface > SvxUnoXHatchTable_createInstance( XPropertyList* pList ) throw(); +css::uno::Reference< css::uno::XInterface > SvxUnoXGradientTable_createInstance( XPropertyList* pList ) throw(); +css::uno::Reference< css::uno::XInterface > SvxUnoXBitmapTable_createInstance( XPropertyList* pList ) throw(); + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/bitmaps.hlst b/svx/inc/bitmaps.hlst new file mode 100644 index 000000000..fdb60807e --- /dev/null +++ b/svx/inc/bitmaps.hlst @@ -0,0 +1,291 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_SVX_INC_BITMAPS_HRC +#define INCLUDED_SVX_INC_BITMAPS_HRC + +#define RID_SVXCTRL_RECTBTNS "svx/res/rectbtns.png" + +#define RID_SVXBMP_FRMSEL_ARROW1 "svx/res/frmsel1.png" +#define RID_SVXBMP_FRMSEL_ARROW2 "svx/res/frmsel2.png" +#define RID_SVXBMP_FRMSEL_ARROW3 "svx/res/frmsel3.png" +#define RID_SVXBMP_FRMSEL_ARROW4 "svx/res/frmsel4.png" +#define RID_SVXBMP_FRMSEL_ARROW5 "svx/res/frmsel5.png" +#define RID_SVXBMP_FRMSEL_ARROW6 "svx/res/frmsel6.png" +#define RID_SVXBMP_FRMSEL_ARROW7 "svx/res/frmsel7.png" +#define RID_SVXBMP_FRMSEL_ARROW8 "svx/res/frmsel8.png" +#define RID_SVXBMP_FRMSEL_ARROW9 "svx/res/frmsel9.png" +#define RID_SVXBMP_FRMSEL_ARROW10 "svx/res/frmsel10.png" +#define RID_SVXBMP_FRMSEL_ARROW11 "svx/res/frmsel11.png" +#define RID_SVXBMP_FRMSEL_ARROW12 "svx/res/frmsel12.png" +#define RID_SVXBMP_FRMSEL_ARROW13 "svx/res/frmsel13.png" +#define RID_SVXBMP_FRMSEL_ARROW14 "svx/res/frmsel14.png" +#define RID_SVXBMP_FRMSEL_ARROW15 "svx/res/frmsel15.png" +#define RID_SVXBMP_FRMSEL_ARROW16 "svx/res/frmsel16.png" + +#define RID_SVXBMP_NOTCHECKED "svx/res/notcheck.png" +#define RID_SVXBMP_CHECKED "svx/res/lngcheck.png" + +#define RID_SVXBMP_GREENCHECK "svx/res/nu01.png" +#define RID_SVXBMP_YELLOWCHECK "svx/res/nu04.png" +#define RID_SVXBMP_REDCROSS "svx/res/nu02.png" +#define RID_SVXBMP_SHADOW_ANGLE "svx/res/fw018.png" +#define RID_SVXBMP_SHADOW_SIZE "svx/res/fw019.png" +#define RID_SVXBMP_SHADOW_XDIST "svx/res/fw016.png" +#define RID_SVXBMP_SHADOW_YDIST "svx/res/fw017.png" + +#define RID_SVXBMP_DIRECTION_DIRECTION_NW "svx/res/directionnorthwest_22.png" +#define RID_SVXBMP_DIRECTION_DIRECTION_N "svx/res/directionnorth_22.png" +#define RID_SVXBMP_DIRECTION_DIRECTION_NE "svx/res/directionnortheast_22.png" +#define RID_SVXBMP_DIRECTION_DIRECTION_W "svx/res/directionwest_22.png" +#define RID_SVXBMP_DIRECTION_DIRECTION_NONE "svx/res/directionstraight_22.png" +#define RID_SVXBMP_DIRECTION_DIRECTION_E "svx/res/directioneast_22.png" +#define RID_SVXBMP_DIRECTION_DIRECTION_SW "svx/res/directionsouthwest_22.png" +#define RID_SVXBMP_DIRECTION_DIRECTION_S "svx/res/directionsouth_22.png" +#define RID_SVXBMP_DIRECTION_DIRECTION_SE "svx/res/directionsoutheast_22.png" +#define RID_SVXBMP_LIGHT_OFF_FROM_TOP_LEFT "svx/res/lightofffromtopleft_22.png" +#define RID_SVXBMP_LIGHT_OFF_FROM_TOP "svx/res/lightofffromtop_22.png" +#define RID_SVXBMP_LIGHT_OFF_FROM_TOP_RIGHT "svx/res/lightofffromtopright_22.png" +#define RID_SVXBMP_LIGHT_OFF_FROM_LEFT "svx/res/lightofffromleft_22.png" +#define RID_SVXBMP_LIGHT_OFF_FROM_RIGHT "svx/res/lightofffromright_22.png" +#define RID_SVXBMP_LIGHT_OFF_FROM_BOTTOM_LEFT "svx/res/lightofffrombottomleft_22.png" +#define RID_SVXBMP_LIGHT_OFF_FROM_BOTTOM "svx/res/lightofffrombottom_22.png" +#define RID_SVXBMP_LIGHT_OFF_FROM_BOTTOM_RIGHT "svx/res/lightofffrombottomright_22.png" +#define RID_SVXBMP_LIGHT_ON_FROM_TOP_LEFT "svx/res/lightonfromtopleft_22.png" +#define RID_SVXBMP_LIGHT_ON_FROM_TOP "svx/res/lightonfromtop_22.png" +#define RID_SVXBMP_LIGHT_ON_FROM_TOP_RIGHT "svx/res/lightonfromtopright_22.png" +#define RID_SVXBMP_LIGHT_ON_FROM_LEFT "svx/res/lightonfromleft_22.png" +#define RID_SVXBMP_LIGHT_ON_FROM_RIGHT "svx/res/lightonfromright_22.png" +#define RID_SVXBMP_LIGHT_ON_FROM_BOTTOM_LEFT "svx/res/lightonfrombottomleft_22.png" +#define RID_SVXBMP_LIGHT_ON_FROM_BOTTOM "svx/res/lightonfrombottom_22.png" +#define RID_SVXBMP_LIGHT_ON_FROM_BOTTOM_RIGHT "svx/res/lightonfrombottomright_22.png" +#define RID_SVXBMP_LIGHT_PREVIEW_FROM_TOP_LEFT "svx/res/lightfromtopleft_22.png" +#define RID_SVXBMP_LIGHT_PREVIEW_FROM_TOP "svx/res/lightfromtop_22.png" +#define RID_SVXBMP_LIGHT_PREVIEW_FROM_TOP_RIGHT "svx/res/lightfromtopright_22.png" +#define RID_SVXBMP_LIGHT_PREVIEW_FROM_LEFT "svx/res/lightfromleft_22.png" +#define RID_SVXBMP_LIGHT_PREVIEW_FROM_RIGHT "svx/res/lightfromright_22.png" +#define RID_SVXBMP_LIGHT_PREVIEW_FROM_FRONT "svx/res/lightfromfront_22.png" +#define RID_SVXBMP_LIGHT_PREVIEW_FROM_BOTTOM_LEFT "svx/res/lightfrombottomleft_22.png" +#define RID_SVXBMP_LIGHT_PREVIEW_FROM_BOTTOM "svx/res/lightfrombottom_22.png" +#define RID_SVXBMP_LIGHT_PREVIEW_FROM_BOTTOM_RIGHT "svx/res/lightfrombottomright_22.png" + +#define RID_SVXBMP_LAMP_ON "svx/res/lighton.png" +#define RID_SVXBMP_LAMP_OFF "svx/res/light.png" + +#define RID_SVXBMP_ADD "res/tb01.png" +#define RID_SVXBMP_ADD_ELEMENT "res/tb02.png" +#define RID_SVXBMP_ADD_ATTRIBUTE "res/tb03.png" +#define RID_SVXBMP_EDIT "res/tb04.png" +#define RID_SVXBMP_REMOVE "res/tb05.png" +#define RID_SVXBMP_ELEMENT "res/da03.png" +#define RID_SVXBMP_ATTRIBUTE "res/da04.png" +#define RID_SVXBMP_TEXT "res/da05.png" +#define RID_SVXBMP_OTHER "res/da06.png" + +#define RID_SVXBMP_FORM "res/sx10593.png" +#define RID_SVXBMP_CONTROL "res/sx10144.png" +#define RID_SVXBMP_COLLAPSEDNODE "res/sx18002.png" +#define RID_SVXBMP_EXPANDEDNODE "res/sx18003.png" +#define RID_SVXBMP_BUTTON "res/sx10594.png" +#define RID_SVXBMP_RADIOBUTTON "res/sx10595.png" +#define RID_SVXBMP_CHECKBOX "res/sx10596.png" +#define RID_SVXBMP_FIXEDTEXT "res/sx10597.png" +#define RID_SVXBMP_GROUPBOX "res/sx10598.png" +#define RID_SVXBMP_EDITBOX "res/sx10599.png" +#define RID_SVXBMP_LISTBOX "res/sx10600.png" +#define RID_SVXBMP_COMBOBOX "res/sx10600.png" +#define RID_SVXBMP_FORMS "res/sx18013.png" +#define RID_SVXBMP_IMAGEBUTTON "res/sx10604.png" +#define RID_SVXBMP_IMAGECONTROL "res/sx10710.png" +#define RID_SVXBMP_FILECONTROL "res/sx10605.png" +#define RID_SVXBMP_DATEFIELD "res/sx10704.png" +#define RID_SVXBMP_TIMEFIELD "res/sx10705.png" +#define RID_SVXBMP_NUMERICFIELD "res/sx10706.png" +#define RID_SVXBMP_CURRENCYFIELD "res/sx10707.png" +#define RID_SVXBMP_PATTERNFIELD "res/sx10708.png" +#define RID_SVXBMP_HIDDEN "res/sx18022.png" +#define RID_SVXBMP_GRID "res/sx10603.png" +#define RID_SVXBMP_FORMATTEDFIELD "res/sx10728.png" +#define RID_SVXBMP_FILTER "res/sx10715.png" +#define RID_SVXBMP_DATE_N_TIME_FIELDS "res/sx10757.png" +#define RID_SVXBMP_FIELD "res/sx18027.png" +#define RID_SVXBMP_SCROLLBAR "res/sx10768.png" +#define RID_SVXBMP_SPINBUTTON "res/sx10769.png" +#define RID_SVXBMP_NAVIGATIONBAR "res/sx10607.png" + +#define RID_SVXBMP_THEME_NORMAL "svx/res/galnors.png" +#define RID_SVXBMP_THEME_READONLY "svx/res/galrdos.png" +#define RID_SVXBMP_THEME_DEFAULT "svx/res/galdefs.png" +#define RID_SVXBMP_GALLERY_MEDIA "svx/res/galmedia.png" +#define RID_SVXBMP_GALLERY_SOUND_1 "svx/res/galsnd1.png" +#define RID_SVXBMP_GALLERY_SOUND_2 "svx/res/galsnd2.png" +#define RID_SVXBMP_GALLERY_SOUND_3 "svx/res/galsnd3.png" +#define RID_SVXBMP_GALLERY_SOUND_4 "svx/res/galsnd4.png" +#define RID_SVXBMP_GALLERY_SOUND_5 "svx/res/galsnd5.png" +#define RID_SVXBMP_GALLERY_SOUND_6 "svx/res/galsnd6.png" +#define RID_SVXBMP_GALLERY_SOUND_7 "svx/res/galsnd7.png" + +#define BMP_NONE_ICON "svx/res/symphony/blank.png" +#define BMP_WIDTH1_ICON "svx/res/symphony/width1.png" +#define BMP_WIDTH2_ICON "svx/res/symphony/width2.png" +#define BMP_WIDTH3_ICON "svx/res/symphony/width3.png" +#define BMP_WIDTH4_ICON "svx/res/symphony/width4.png" +#define BMP_WIDTH5_ICON "svx/res/symphony/width5.png" +#define BMP_WIDTH6_ICON "svx/res/symphony/width6.png" +#define BMP_WIDTH7_ICON "svx/res/symphony/width7.png" +#define BMP_WIDTH8_ICON "svx/res/symphony/width8.png" +#define RID_SVXBMP_WIDTH_CUSTOM "svx/res/symphony/last_custom_common.png" +#define RID_SVXBMP_WIDTH_CUSTOM_GRAY "svx/res/symphony/last_custom_common_grey.png" + +#define BMP_AXIAL "svx/res/symphony/axial.png" +#define BMP_ELLI "svx/res/symphony/ellipsoid.png" +#define BMP_QUAD "svx/res/symphony/Quadratic.png" +#define BMP_RADIAL "svx/res/symphony/radial.png" +#define BMP_SQUARE "svx/res/symphony/Square.png" +#define BMP_LINEAR "svx/res/symphony/linear.png" + +#define RID_SVXBMP_SELECTION "svx/res/selection_10x22.png" +#define RID_SVXBMP_POSITION "res/sc10223.png" +#define RID_SVXBMP_SIZE "res/sc10224.png" +#define RID_SVXBMP_SIGNET "svx/res/signet_11x16.png" +#define RID_SVXBMP_SIGNET_BROKEN "svx/res/caution_11x16.png" +#define RID_SVXBMP_SIGNET_NOTVALIDATED "svx/res/notcertificate_16.png" +#define RID_SVXBMP_SLIDERBUTTON "svx/res/slidezoombutton_10.png" +#define RID_SVXBMP_SLIDERDECREASE "svx/res/slidezoomout_10.png" +#define RID_SVXBMP_SLIDERINCREASE "svx/res/slidezoomin_10.png" +#define RID_SVXBMP_DOC_MODIFIED_YES "svx/res/doc_modified_yes_14.png" +#define RID_SVXBMP_DOC_MODIFIED_NO "svx/res/doc_modified_no_14.png" +#define RID_SVXBMP_DOC_MODIFIED_FEEDBACK "svx/res/doc_modified_feedback.png" +#define RID_SVXBMP_ZOOM_PAGE "svx/res/zoom_page_statusbar.png" + +#define BMAP_GrafikEi "res/grafikei.png" +#define SIP_SA_PAGESHADOW35X35 "svx/res/pageshadow35x35.png" +#define SIP_SA_MARKERS "svx/res/markers.png" +#define BMP_SVXOLEOBJ "res/oleobj.png" +#define SIP_SA_CROP_MARKERS "svx/res/cropmarkers.png" +#define BMP_MARKER_ANCHOR "svx/res/marker-anchor.png" +#define BMP_MARKER_ANCHOR_PRESSED "svx/res/marker-anchor-pressed.png" +#define BMP_MARKER_CIRC7_1 "svx/res/marker-circ7-1.png" +#define BMP_MARKER_CIRC7_2 "svx/res/marker-circ7-2.png" +#define BMP_MARKER_CIRC7_3 "svx/res/marker-circ7-3.png" +#define BMP_MARKER_CIRC7_4 "svx/res/marker-circ7-4.png" +#define BMP_MARKER_CIRC7_5 "svx/res/marker-circ7-5.png" +#define BMP_MARKER_CIRC7_6 "svx/res/marker-circ7-6.png" +#define BMP_MARKER_CIRC9_1 "svx/res/marker-circ9-1.png" +#define BMP_MARKER_CIRC9_2 "svx/res/marker-circ9-2.png" +#define BMP_MARKER_CIRC9_3 "svx/res/marker-circ9-3.png" +#define BMP_MARKER_CIRC9_4 "svx/res/marker-circ9-4.png" +#define BMP_MARKER_CIRC9_5 "svx/res/marker-circ9-5.png" +#define BMP_MARKER_CIRC9_6 "svx/res/marker-circ9-6.png" +#define BMP_MARKER_CIRC11_1 "svx/res/marker-circ11-1.png" +#define BMP_MARKER_CIRC11_2 "svx/res/marker-circ11-2.png" +#define BMP_MARKER_CIRC11_3 "svx/res/marker-circ11-3.png" +#define BMP_MARKER_CIRC11_4 "svx/res/marker-circ11-4.png" +#define BMP_MARKER_CIRC11_5 "svx/res/marker-circ11-5.png" +#define BMP_MARKER_CIRC11_6 "svx/res/marker-circ11-6.png" +#define BMP_MARKER_CROSS "svx/res/marker-cross.png" +#define BMP_MARKER_ELLI7x9_1 "svx/res/marker-elli7x9-1.png" +#define BMP_MARKER_ELLI7x9_2 "svx/res/marker-elli7x9-2.png" +#define BMP_MARKER_ELLI7x9_3 "svx/res/marker-elli7x9-3.png" +#define BMP_MARKER_ELLI7x9_4 "svx/res/marker-elli7x9-4.png" +#define BMP_MARKER_ELLI7x9_5 "svx/res/marker-elli7x9-5.png" +#define BMP_MARKER_ELLI7x9_6 "svx/res/marker-elli7x9-6.png" +#define BMP_MARKER_ELLI9x7_1 "svx/res/marker-elli9x7-1.png" +#define BMP_MARKER_ELLI9x7_2 "svx/res/marker-elli9x7-2.png" +#define BMP_MARKER_ELLI9x7_3 "svx/res/marker-elli9x7-3.png" +#define BMP_MARKER_ELLI9x7_4 "svx/res/marker-elli9x7-4.png" +#define BMP_MARKER_ELLI9x7_5 "svx/res/marker-elli9x7-5.png" +#define BMP_MARKER_ELLI9x7_6 "svx/res/marker-elli9x7-6.png" +#define BMP_MARKER_ELLI9x11_1 "svx/res/marker-elli9x11-1.png" +#define BMP_MARKER_ELLI9x11_2 "svx/res/marker-elli9x11-2.png" +#define BMP_MARKER_ELLI9x11_3 "svx/res/marker-elli9x11-3.png" +#define BMP_MARKER_ELLI9x11_4 "svx/res/marker-elli9x11-4.png" +#define BMP_MARKER_ELLI9x11_5 "svx/res/marker-elli9x11-5.png" +#define BMP_MARKER_ELLI9x11_6 "svx/res/marker-elli9x11-6.png" +#define BMP_MARKER_ELLI11x9_1 "svx/res/marker-elli11x9-1.png" +#define BMP_MARKER_ELLI11x9_2 "svx/res/marker-elli11x9-2.png" +#define BMP_MARKER_ELLI11x9_3 "svx/res/marker-elli11x9-3.png" +#define BMP_MARKER_ELLI11x9_4 "svx/res/marker-elli11x9-4.png" +#define BMP_MARKER_ELLI11x9_5 "svx/res/marker-elli11x9-5.png" +#define BMP_MARKER_ELLI11x9_6 "svx/res/marker-elli11x9-6.png" +#define BMP_MARKER_GLUE_SELECTED "svx/res/marker-glue-selected.png" +#define BMP_MARKER_GLUE_UNSELECTED "svx/res/marker-glue-unselected.png" +#define BMP_MARKER_RECT7_1 "svx/res/marker-rect7-1.png" +#define BMP_MARKER_RECT7_2 "svx/res/marker-rect7-2.png" +#define BMP_MARKER_RECT7_3 "svx/res/marker-rect7-3.png" +#define BMP_MARKER_RECT7_4 "svx/res/marker-rect7-4.png" +#define BMP_MARKER_RECT7_5 "svx/res/marker-rect7-5.png" +#define BMP_MARKER_RECT7_6 "svx/res/marker-rect7-6.png" +#define BMP_MARKER_RECT9_1 "svx/res/marker-rect9-1.png" +#define BMP_MARKER_RECT9_2 "svx/res/marker-rect9-2.png" +#define BMP_MARKER_RECT9_3 "svx/res/marker-rect9-3.png" +#define BMP_MARKER_RECT9_4 "svx/res/marker-rect9-4.png" +#define BMP_MARKER_RECT9_5 "svx/res/marker-rect9-5.png" +#define BMP_MARKER_RECT9_6 "svx/res/marker-rect9-6.png" +#define BMP_MARKER_RECT11_1 "svx/res/marker-rect11-1.png" +#define BMP_MARKER_RECT11_2 "svx/res/marker-rect11-2.png" +#define BMP_MARKER_RECT11_3 "svx/res/marker-rect11-3.png" +#define BMP_MARKER_RECT11_4 "svx/res/marker-rect11-4.png" +#define BMP_MARKER_RECT11_5 "svx/res/marker-rect11-5.png" +#define BMP_MARKER_RECT11_6 "svx/res/marker-rect11-6.png" +#define BMP_MARKER_RECT13_1 "svx/res/marker-rect13-1.png" +#define BMP_MARKER_RECT13_2 "svx/res/marker-rect13-2.png" +#define BMP_MARKER_RECT13_3 "svx/res/marker-rect13-3.png" +#define BMP_MARKER_RECT13_4 "svx/res/marker-rect13-4.png" +#define BMP_MARKER_RECT13_5 "svx/res/marker-rect13-5.png" +#define BMP_MARKER_RECT13_6 "svx/res/marker-rect13-6.png" +#define BMP_MARKER_RECTPLUS7_1 "svx/res/marker-rectplus7-1.png" +#define BMP_MARKER_RECTPLUS7_2 "svx/res/marker-rectplus7-2.png" +#define BMP_MARKER_RECTPLUS7_3 "svx/res/marker-rectplus7-3.png" +#define BMP_MARKER_RECTPLUS7_4 "svx/res/marker-rectplus7-4.png" +#define BMP_MARKER_RECTPLUS7_5 "svx/res/marker-rectplus7-5.png" +#define BMP_MARKER_RECTPLUS7_6 "svx/res/marker-rectplus7-6.png" +#define BMP_MARKER_RECTPLUS9_1 "svx/res/marker-rectplus9-1.png" +#define BMP_MARKER_RECTPLUS9_2 "svx/res/marker-rectplus9-2.png" +#define BMP_MARKER_RECTPLUS9_3 "svx/res/marker-rectplus9-3.png" +#define BMP_MARKER_RECTPLUS9_4 "svx/res/marker-rectplus9-4.png" +#define BMP_MARKER_RECTPLUS9_5 "svx/res/marker-rectplus9-5.png" +#define BMP_MARKER_RECTPLUS9_6 "svx/res/marker-rectplus9-6.png" +#define BMP_MARKER_RECTPLUS11_1 "svx/res/marker-rectplus11-1.png" +#define BMP_MARKER_RECTPLUS11_2 "svx/res/marker-rectplus11-2.png" +#define BMP_MARKER_RECTPLUS11_3 "svx/res/marker-rectplus11-3.png" +#define BMP_MARKER_RECTPLUS11_4 "svx/res/marker-rectplus11-4.png" +#define BMP_MARKER_RECTPLUS11_5 "svx/res/marker-rectplus11-5.png" +#define BMP_MARKER_RECTPLUS11_6 "svx/res/marker-rectplus11-6.png" + +/* + * Bitmaps for SvxFrameWindow + */ +#define RID_SVXBMP_FRAME1 "svx/res/fr01.png" +#define RID_SVXBMP_FRAME2 "svx/res/fr02.png" +#define RID_SVXBMP_FRAME3 "svx/res/fr03.png" +#define RID_SVXBMP_FRAME4 "svx/res/fr04.png" +#define RID_SVXBMP_FRAME5 "svx/res/fr05.png" +#define RID_SVXBMP_FRAME6 "svx/res/fr06.png" +#define RID_SVXBMP_FRAME7 "svx/res/fr07.png" +#define RID_SVXBMP_FRAME8 "svx/res/fr08.png" +#define RID_SVXBMP_FRAME9 "svx/res/fr09.png" +#define RID_SVXBMP_FRAME10 "svx/res/fr010.png" +#define RID_SVXBMP_FRAME11 "svx/res/fr011.png" +#define RID_SVXBMP_FRAME12 "svx/res/fr012.png" +#define RID_SVXBMP_GRAF_RED "res/sc10865.png" +#define RID_SVXBMP_GRAF_GREEN "res/sc10866.png" +#define RID_SVXBMP_GRAF_BLUE "res/sc10867.png" +#define RID_SVXBMP_GRAF_LUMINANCE "res/sc10863.png" +#define RID_SVXBMP_GRAF_CONTRAST "res/sc10864.png" +#define RID_SVXBMP_GRAF_GAMMA "res/sc10868.png" +#define RID_SVXBMP_GRAF_TRANSPARENCE "res/sc10869.png" + +#define RID_UNODRAW_OBJECTS "svx/res/objects.png" +#define RID_UNODRAW_OLE2 "svx/res/ole.png" +#define RID_UNODRAW_GRAPHICS "svx/res/graphic.png" + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/svx/inc/colrctrl.hxx b/svx/inc/colrctrl.hxx new file mode 100644 index 000000000..012f00855 --- /dev/null +++ b/svx/inc/colrctrl.hxx @@ -0,0 +1,102 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include <sal/types.h> +#include <sfx2/dockwin.hxx> +#include <svl/lstner.hxx> +#include <svx/SvxColorValueSet.hxx> +#include <svx/xtable.hxx> +#include <tools/gen.hxx> +#include <tools/link.hxx> +#include <vcl/vclptr.hxx> +#include <com/sun/star/drawing/FillStyle.hpp> + +namespace vcl { class Window; } + +class SfxBindings; +class SfxBroadcaster; +class SfxChildWindow; +class SfxHint; +class SvxColorValueSetData; + +/************************************************************************* +|* +|* SvxColorValueSet_docking +|* +\************************************************************************/ + +class SAL_WARN_UNUSED SvxColorValueSet_docking final : public SvxColorValueSet +{ + rtl::Reference<SvxColorValueSetData> m_xHelper; + bool mbLeftButton; + + // ValueSet + virtual bool MouseButtonDown(const MouseEvent& rMEvt) override; + virtual bool MouseButtonUp(const MouseEvent& rMEvt) override; + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; + + virtual bool StartDrag() override; + +public: + SvxColorValueSet_docking(std::unique_ptr<weld::ScrolledWindow> pWindow); + + bool IsLeftButton() const { return mbLeftButton; } +}; + +/************************************************************************* +|* +|* SvxColorDockingWindow +|* +\************************************************************************/ + +class SAL_WARN_UNUSED SvxColorDockingWindow final : public SfxDockingWindow, public SfxListener +{ +friend class SvxColorChildWindow; + +private: + XColorListRef pColorList; + std::unique_ptr<SvxColorValueSet_docking> xColorSet; + std::unique_ptr<weld::CustomWeld> xColorSetWin; + + void FillValueSet(); + + DECL_LINK(SelectHdl, ValueSet*, void); + + /** This function is called when the window gets the focus. It grabs + the focus to the color value set so that it can be controlled with + the keyboard. + */ + virtual void GetFocus() override; + + virtual bool Close() override; + +public: + SvxColorDockingWindow(SfxBindings* pBindings, + SfxChildWindow *pCW, + vcl::Window* pParent); + virtual ~SvxColorDockingWindow() override; + virtual void dispose() override; + + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; + + virtual bool EventNotify( NotifyEvent& rNEvt ) override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/dbcharsethelper.hxx b/svx/inc/dbcharsethelper.hxx new file mode 100644 index 000000000..207d89fb2 --- /dev/null +++ b/svx/inc/dbcharsethelper.hxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <rtl/textenc.h> + +#include <vector> + +namespace svxform::charset_helper +{ + + /** enumerates all supported charsets + @return the number of charsets supported + */ + sal_Int32 getSupportedTextEncodings( ::std::vector< rtl_TextEncoding >& _rEncs ); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/dragmt3d.hxx b/svx/inc/dragmt3d.hxx new file mode 100644 index 000000000..d174d966c --- /dev/null +++ b/svx/inc/dragmt3d.hxx @@ -0,0 +1,122 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_DRAGMT3D_HXX +#define INCLUDED_SVX_INC_DRAGMT3D_HXX + +#include <svx/def3d.hxx> +#include <svx/svddrgmt.hxx> +#include <svx/view3d.hxx> +#include <basegfx/polygon/b3dpolypolygon.hxx> +#include <basegfx/matrix/b3dhommatrix.hxx> + +// Parameters for the interaction of a 3D object +class E3dDragMethodUnit +{ +public: + E3dObject& mr3DObj; + basegfx::B3DPolyPolygon maWireframePoly; + basegfx::B3DHomMatrix maDisplayTransform; + basegfx::B3DHomMatrix maInvDisplayTransform; + basegfx::B3DHomMatrix maInitTransform; + basegfx::B3DHomMatrix maTransform; + sal_Int32 mnStartAngle; + sal_Int32 mnLastAngle; + + E3dDragMethodUnit(E3dObject& r3DObj) + : mr3DObj(r3DObj), + maWireframePoly(), + maDisplayTransform(), + maInvDisplayTransform(), + maInitTransform(), + maTransform(), + mnStartAngle(0), + mnLastAngle(0) + { + } +}; + +// Derivative of SdrDragMethod for 3D objects +class E3dDragMethod : public SdrDragMethod +{ +protected: + ::std::vector< E3dDragMethodUnit > maGrp; + E3dDragConstraint meConstraint; + Point maLastPos; + tools::Rectangle maFullBound; + bool mbMoveFull; + bool mbMovedAtAll; + +public: + E3dDragMethod( + SdrDragView &rView, + const SdrMarkList& rMark, + E3dDragConstraint eConstr, + bool bFull); + + virtual OUString GetSdrDragComment() const override; + virtual bool BeginSdrDrag() override; + virtual void MoveSdrDrag(const Point& rPnt) override; + virtual void CancelSdrDrag() override; + virtual bool EndSdrDrag(bool bCopy) override; + + // for migration from XOR to overlay + virtual void CreateOverlayGeometry( + sdr::overlay::OverlayManager& rOverlayManager, + const sdr::contact::ObjectContact& rObjectContact) override; +}; + +// Derivative of SdrDragMethod for spinning 3D objects +class E3dDragRotate final : public E3dDragMethod +{ + basegfx::B3DPoint maGlobalCenter; + +public: + E3dDragRotate( + SdrDragView &rView, + const SdrMarkList& rMark, + E3dDragConstraint eConstr, + bool bFull); + + virtual void MoveSdrDrag(const Point& rPnt) override; + virtual PointerStyle GetSdrDragPointer() const override; +}; + +// Derivative of SdrDragMethod for moving 3D sub-objects +class E3dDragMove final : public E3dDragMethod +{ + SdrHdlKind meWhatDragHdl; + Point maScaleFixPos; + +public: + E3dDragMove( + SdrDragView &rView, + const SdrMarkList& rMark, + SdrHdlKind eDrgHdl, + E3dDragConstraint eConstr, + bool bFull); + + virtual void MoveSdrDrag(const Point& rPnt) override; + virtual PointerStyle GetSdrDragPointer() const override; +}; + + +#endif // INCLUDED_SVX_INC_DRAGMT3D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/extrud3d.hxx b/svx/inc/extrud3d.hxx new file mode 100644 index 000000000..8b6d99d9e --- /dev/null +++ b/svx/inc/extrud3d.hxx @@ -0,0 +1,114 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <config_options.h> +#include <svl/intitem.hxx> +#include <svl/itemset.hxx> +#include <svx/obj3d.hxx> +#include <svx/svxdllapi.h> +#include <svx/svddef.hxx> +#include <svx/svx3ditems.hxx> + +class E3dDefaultAttributes; + +/************************************************************************* +|* +|* 3D extrusion object created from the provided 2D polygon +|* +\************************************************************************/ + +class SAL_WARN_UNUSED UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) E3dExtrudeObj final : public E3dCompoundObject +{ +private: + // to allow sdr::properties::E3dExtrudeProperties access to SetGeometryValid() + friend class sdr::properties::E3dExtrudeProperties; + + // geometry, which determines the object + basegfx::B2DPolyPolygon maExtrudePolygon; + + virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override; + virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override; + void SetDefaultAttributes(const E3dDefaultAttributes& rDefault); + +private: + // protected destructor - due to final, make private + virtual ~E3dExtrudeObj() override; + +public: + E3dExtrudeObj( + SdrModel& rSdrModel, + const E3dDefaultAttributes& rDefault, + const basegfx::B2DPolyPolygon& rPP, + double fDepth); + E3dExtrudeObj(SdrModel& rSdrModel); + + // PercentDiagonal: 0..100, before 0.0..0.5 + sal_uInt16 GetPercentDiagonal() const + { return GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL).GetValue(); } + + // BackScale: 0..100, before 0.0..1.0 + sal_uInt16 GetPercentBackScale() const + { return GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE).GetValue(); } + + // BackScale: 0..100, before 0.0..1.0 + sal_uInt32 GetExtrudeDepth() const + { return GetObjectItemSet().Get(SDRATTR_3DOBJ_DEPTH).GetValue(); } + + // #107245# GetSmoothNormals() for bExtrudeSmoothed + bool GetSmoothNormals() const + { return GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_NORMALS).GetValue(); } + + // #107245# GetSmoothLids() for bExtrudeSmoothFrontBack + bool GetSmoothLids() const + { return GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_LIDS).GetValue(); } + + // #107245# GetCharacterMode() for bExtrudeCharacterMode + bool GetCharacterMode() const + { return GetObjectItemSet().Get(SDRATTR_3DOBJ_CHARACTER_MODE).GetValue(); } + + // #107245# GetCloseFront() for bExtrudeCloseFront + bool GetCloseFront() const + { return GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_FRONT).GetValue(); } + + // #107245# GetCloseBack() for bExtrudeCloseBack + bool GetCloseBack() const + { return GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK).GetValue(); } + + virtual sal_uInt16 GetObjIdentifier() const override; + + virtual E3dExtrudeObj* CloneSdrObject(SdrModel& rTargetModel) const override; + + // implemented mainly for the purposes of Clone() + E3dExtrudeObj& operator=(const E3dExtrudeObj& rObj); + + // TakeObjName...() is for the display in the UI (for example "3 frames selected") + virtual OUString TakeObjNameSingul() const override; + virtual OUString TakeObjNamePlural() const override; + + // set/get local parameters with geometry regeneration + void SetExtrudePolygon(const basegfx::B2DPolyPolygon &rNew); + const basegfx::B2DPolyPolygon &GetExtrudePolygon() const { return maExtrudePolygon; } + + virtual bool IsBreakObjPossible() override; + virtual std::unique_ptr<SdrAttrObj,SdrObjectFreeOp> GetBreakObj() override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/extrusiondepthdialog.hxx b/svx/inc/extrusiondepthdialog.hxx new file mode 100644 index 000000000..e7f2e07a5 --- /dev/null +++ b/svx/inc/extrusiondepthdialog.hxx @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_EXTRUSIONDEPTHDIALOG_HXX +#define INCLUDED_SVX_INC_EXTRUSIONDEPTHDIALOG_HXX + +#include <vcl/weld.hxx> + +namespace svx { + +class ExtrusionDepthDialog final : public weld::GenericDialogController +{ + std::unique_ptr<weld::MetricSpinButton> m_xMtrDepth; + +public: + ExtrusionDepthDialog(weld::Window* pParent, double fDepth, FieldUnit eDefaultUnit); + virtual ~ExtrusionDepthDialog() override; + + double getDepth() const; +}; + +} + +#endif // INCLUDED_SVX_INC_EXTRUSIONDEPTHDIALOG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/fieldunit.hrc b/svx/inc/fieldunit.hrc new file mode 100644 index 000000000..f16238550 --- /dev/null +++ b/svx/inc/fieldunit.hrc @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_PAGE_HRC +#define INCLUDED_SVX_INC_PAGE_HRC + +#include <tools/fldunit.hxx> +#include <utility> + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +const std::pair<const char*, FieldUnit> RID_SVXSTR_FIELDUNIT_TABLE[] = +{ + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Millimeter") , FieldUnit::MM }, + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Centimeter") , FieldUnit::CM }, + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Meter") , FieldUnit::M }, + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Kilometer") , FieldUnit::KM }, + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Inch") , FieldUnit::INCH }, + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Foot") , FieldUnit::FOOT }, + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Miles") , FieldUnit::MILE }, + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Pica") , FieldUnit::PICA }, + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Point") , FieldUnit::POINT }, + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Char") , FieldUnit::CHAR }, + { NC_("RID_SVXSTR_FIELDUNIT_TABLE", "Line") , FieldUnit::LINE }, +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/fmstring.hrc b/svx/inc/fmstring.hrc new file mode 100644 index 000000000..7a78d0ae2 --- /dev/null +++ b/svx/inc/fmstring.hrc @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_FMSTRING_HRC +#define INCLUDED_SVX_INC_FMSTRING_HRC + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +const char* RID_RSC_SQL_INTERNATIONAL[] = +{ + NC_("RID_RSC_SQL_INTERNATIONAL", "LIKE"), + NC_("RID_RSC_SQL_INTERNATIONAL", "NOT"), + NC_("RID_RSC_SQL_INTERNATIONAL", "EMPTY"), + NC_("RID_RSC_SQL_INTERNATIONAL", "TRUE"), + NC_("RID_RSC_SQL_INTERNATIONAL", "FALSE"), + NC_("RID_RSC_SQL_INTERNATIONAL", "IS"), + NC_("RID_RSC_SQL_INTERNATIONAL", "BETWEEN"), + NC_("RID_RSC_SQL_INTERNATIONAL", "OR"), + NC_("RID_RSC_SQL_INTERNATIONAL", "AND"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Average"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Count"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Maximum"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Minimum"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Sum"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Every"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Any"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Some"), + NC_("RID_RSC_SQL_INTERNATIONAL", "STDDEV_POP"), + NC_("RID_RSC_SQL_INTERNATIONAL", "STDDEV_SAMP"), + NC_("RID_RSC_SQL_INTERNATIONAL", "VAR_SAMP"), + NC_("RID_RSC_SQL_INTERNATIONAL", "VAR_POP"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Collect"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Fusion"), + NC_("RID_RSC_SQL_INTERNATIONAL", "Intersection") +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/frmsel.hrc b/svx/inc/frmsel.hrc new file mode 100644 index 000000000..da3c258b2 --- /dev/null +++ b/svx/inc/frmsel.hrc @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_FRMSEL_HRC +#define INCLUDED_SVX_INC_FRMSEL_HRC + +#include <utility> + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +std::pair<const char*, sal_uInt16> RID_SVXSTR_FRMSEL_TEXTS[] = +{ + { NC_("RID_SVXSTR_FRMSEL_TEXTS", "Border setting") , 0 }, + { NC_("RID_SVXSTR_FRMSEL_TEXTS", "Left border line") , 1 }, + { NC_("RID_SVXSTR_FRMSEL_TEXTS", "Right border line") , 2 }, + { NC_("RID_SVXSTR_FRMSEL_TEXTS", "Top border line") , 3 }, + { NC_("RID_SVXSTR_FRMSEL_TEXTS", "Bottom border line") , 4 }, + { NC_("RID_SVXSTR_FRMSEL_TEXTS", "Horizontal border line") , 5 }, + { NC_("RID_SVXSTR_FRMSEL_TEXTS", "Vertical border line") , 6 }, + { NC_("RID_SVXSTR_FRMSEL_TEXTS", "Diagonal border line from top left to bottom right") , 7 }, + { NC_("RID_SVXSTR_FRMSEL_TEXTS", "Diagonal border line from bottom left to top right") , 8 }, +}; + +std::pair<const char*, sal_uInt16> RID_SVXSTR_FRMSEL_DESCRIPTIONS[] = +{ + { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Border setting") , 0 }, + { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Left border line") , 1 }, + { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Right border line") , 2 }, + { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Top border line") , 3 }, + { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Bottom border line") , 4 }, + { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Horizontal border line") , 5 }, + { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Vertical border line") , 6 }, + { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Diagonal border line from top left to bottom right") , 7 }, + { NC_("RID_SVXSTR_FRMSEL_DESCRIPTIONS", "Diagonal border line from bottom left to top right") , 8 }, +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx new file mode 100644 index 000000000..d77f4a785 --- /dev/null +++ b/svx/inc/galbrws2.hxx @@ -0,0 +1,186 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_GALBRWS2_HXX +#define INCLUDED_SVX_INC_GALBRWS2_HXX + +#include <vcl/transfer.hxx> +#include <svl/lstner.hxx> +#include <svx/galctrl.hxx> +#include <svtools/miscopt.hxx> + +#include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/util/XURLTransformer.hpp> + + +enum GalleryBrowserMode +{ + GALLERYBROWSERMODE_NONE = 0, + GALLERYBROWSERMODE_ICON = 1, + GALLERYBROWSERMODE_LIST = 2, + GALLERYBROWSERMODE_PREVIEW = 3 +}; + + +enum class GalleryBrowserTravel +{ + First, Last, Previous, Next +}; + +enum class GalleryItemFlags { + Title = 0x0002, + Path = 0x0004 +}; +namespace o3tl +{ + template<> struct typed_flags<GalleryItemFlags> : is_typed_flags<GalleryItemFlags, 0x0006> {}; +} + + +class Gallery; +class GalleryDragDrop; +class GalleryTheme; +class GalleryIconView; +class GalleryListView; +class GalleryPreview; +class GalleryTransferable; +class Menu; +class SgaObject; +struct DispatchInfo; + +namespace svx::sidebar { class GalleryControl; } + +class GalleryBrowser2 : public SfxListener +{ + friend class GalleryBrowser; + friend class svx::sidebar::GalleryControl; + +private: + + Gallery* mpGallery; + GalleryTheme* mpCurTheme; + std::unique_ptr<GalleryIconView> mxIconView; + std::unique_ptr<weld::CustomWeld> mxIconViewWin; + std::unique_ptr<weld::TreeView> mxListView; + std::unique_ptr<GalleryDragDrop> mxDragDropTargetHelper; + std::unique_ptr<GalleryPreview> mxPreview; + std::unique_ptr<weld::CustomWeld> mxPreviewWin; + std::unique_ptr<weld::ToggleButton> mxIconButton; + std::unique_ptr<weld::ToggleButton> mxListButton; + std::unique_ptr<weld::Label> mxInfoBar; + VclPtr<VirtualDevice> mxDev; + Size maPreviewSize; + rtl::Reference<GalleryTransferable> m_xHelper; + sal_uInt32 mnCurActionPos; + GalleryBrowserMode meMode; + GalleryBrowserMode meLastMode; + + css::uno::Reference< css::uno::XComponentContext > m_xContext; + css::uno::Reference< css::util::XURLTransformer > m_xTransformer; + + void ImplUpdateViews( sal_uInt16 nSelectionId ); + void ImplUpdateInfoBar(); + sal_uInt32 ImplGetSelectedItemId( const Point* pSelPosPixel, Point& rSelPos ); + void ImplSelectItemId(sal_uInt32 nItemId); + void ImplUpdateSelection(); + void UpdateRows(bool bVisibleOnly); + + // SfxListener + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; + + DECL_LINK( SelectObjectHdl, weld::TreeView&, void ); + DECL_LINK( SelectObjectValueSetHdl, ValueSet*, void ); + DECL_LINK( SelectTbxHdl, weld::ToggleButton&, void ); + DECL_LINK( PopupMenuHdl, const CommandEvent&, bool ); + DECL_LINK( KeyInputHdl, const KeyEvent&, bool ); + DECL_LINK( RowActivatedHdl, weld::TreeView&, bool ); + DECL_LINK( DragBeginHdl, bool&, bool ); + DECL_LINK( VisRowsScrolledHdl, weld::TreeView&, void ); + DECL_LINK( SizeAllocHdl, const Size&, void ); + +private: + + static GalleryBrowserMode meInitMode; + +public: + + static OUString GetItemText( const SgaObject& rObj, GalleryItemFlags nItemTextFlags ); + +public: + + GalleryBrowser2(weld::Builder& rBuilder, Gallery* pGallery); + ~GalleryBrowser2(); + + void SelectTheme( const OUString& rThemeName ); + + GalleryBrowserMode GetMode() const { return meMode; } + void SetMode( GalleryBrowserMode eMode ); + + weld::Widget* GetViewWindow() const; + + void Travel( GalleryBrowserTravel eTravel ); + + INetURLObject GetURL() const; + OUString GetFilterName() const; + + sal_Int8 AcceptDrop( DropTargetHelper& rTarget ); + sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); + bool StartDrag(); + void TogglePreview(); + void ShowContextMenu(const CommandEvent& rCEvt); + bool KeyInput(const KeyEvent& rEvt); + bool ViewBoxHasFocus() const; + + static css::uno::Reference< css::frame::XFrame > GetFrame(); + const css::uno::Reference< css::util::XURLTransformer >& GetURLTransformer() const { return m_xTransformer; } + + void Execute(const OString &rIdent); + void DispatchAdd(const css::uno::Reference<css::frame::XDispatch> &rxDispatch, + const css::util::URL &rURL); + + DECL_STATIC_LINK( GalleryBrowser2, AsyncDispatch_Impl, void*, void ); +}; + +class GalleryDragDrop : public DropTargetHelper +{ +private: + GalleryBrowser2* m_pParent; + + virtual sal_Int8 AcceptDrop(const AcceptDropEvent& /*rEvt*/) override + { + return m_pParent->AcceptDrop(*this); + } + + virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent& rEvt) override + { + return m_pParent->ExecuteDrop(rEvt); + } + +public: + GalleryDragDrop(GalleryBrowser2* pParent, const css::uno::Reference<css::datatransfer::dnd::XDropTarget>& rDropTarget) + : DropTargetHelper(rDropTarget) + , m_pParent(pParent) + { + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/galobj.hxx b/svx/inc/galobj.hxx new file mode 100644 index 000000000..77869d28a --- /dev/null +++ b/svx/inc/galobj.hxx @@ -0,0 +1,174 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_GALOBJ_HXX +#define INCLUDED_SVX_INC_GALOBJ_HXX + +#include <config_options.h> +#include <tools/urlobj.hxx> +#include <vcl/graph.hxx> +#include <vcl/gdimtf.hxx> +#include <svx/galmisc.hxx> + +#define S_THUMB 80 + + +enum GalSoundType +{ + SOUND_STANDARD = 0, + SOUND_COMPUTER = 1, + SOUND_MISC = 2, + SOUND_MUSIC = 3, + SOUND_NATURE = 4, + SOUND_SPEECH = 5, + SOUND_TECHNIC = 6, + SOUND_ANIMAL = 7 +}; + +class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SgaObject +{ + friend class GalleryTheme; + +private: + + void ImplUpdateURL( const INetURLObject& rNewURL ) { aURL = rNewURL; } + +protected: + + BitmapEx aThumbBmp; // Allow transparence to survive + GDIMetaFile aThumbMtf; + INetURLObject aURL; + OUString aTitle; + bool bIsValid; + bool bIsThumbBmp; + + virtual void WriteData( SvStream& rOut, const OUString& rDestDir ) const; + virtual void ReadData( SvStream& rIn, sal_uInt16& rReadVersion ); + + bool CreateThumb( const Graphic& rGraphic ); + +public: + SgaObject(); + virtual ~SgaObject() {}; + + virtual SgaObjKind GetObjKind() const = 0; + virtual sal_uInt16 GetVersion() const = 0; + + virtual BitmapEx GetThumbBmp() const { return aThumbBmp; } + const GDIMetaFile& GetThumbMtf() const { return aThumbMtf; } + const INetURLObject& GetURL() const { return aURL; } + bool IsValid() const { return bIsValid; } + bool IsThumbBitmap() const { return bIsThumbBmp; } + + OUString const & GetTitle() const; + void SetTitle( const OUString& rTitle ); + + friend SvStream& WriteSgaObject( SvStream& rOut, const SgaObject& rObj ); + friend SvStream& ReadSgaObject( SvStream& rIn, SgaObject& rObj ); + + BitmapEx createPreviewBitmapEx(const Size& rSizePixel) const; +}; + +class SgaObjectSound final : public SgaObject +{ +private: + + GalSoundType eSoundType; + + virtual void WriteData( SvStream& rOut, const OUString& rDestDir ) const override; + virtual void ReadData( SvStream& rIn, sal_uInt16& rReadVersion ) override; + + virtual sal_uInt16 GetVersion() const override { return 6; } + +public: + + SgaObjectSound(); + SgaObjectSound( const INetURLObject& rURL ); + virtual ~SgaObjectSound() override; + + virtual SgaObjKind GetObjKind() const override { return SgaObjKind::Sound; } + virtual BitmapEx GetThumbBmp() const override; +}; + +class FmFormModel; + +class SgaObjectSvDraw final : public SgaObject +{ + using SgaObject::CreateThumb; + +private: + + bool CreateThumb( const FmFormModel& rModel ); + + virtual void WriteData( SvStream& rOut, const OUString& rDestDir ) const override; + virtual void ReadData( SvStream& rIn, sal_uInt16& rReadVersion ) override; + + virtual sal_uInt16 GetVersion() const override { return 5; } + +public: + + SgaObjectSvDraw(); + SgaObjectSvDraw( const FmFormModel& rModel, const INetURLObject& rURL ); + SgaObjectSvDraw( SvStream& rIStm, const INetURLObject& rURL ); + + virtual SgaObjKind GetObjKind() const override { return SgaObjKind::SvDraw; } +}; + +class SgaObjectBmp: public SgaObject +{ +private: + + void Init( const Graphic& rGraphic, const INetURLObject& rURL ); + + virtual void WriteData( SvStream& rOut, const OUString& rDestDir ) const override; + virtual void ReadData( SvStream& rIn, sal_uInt16& rReadVersion ) override; + + virtual sal_uInt16 GetVersion() const override { return 5; } + +public: + + SgaObjectBmp(); + SgaObjectBmp( const INetURLObject& rURL ); + SgaObjectBmp( const Graphic& rGraphic, const INetURLObject& rURL ); + + virtual SgaObjKind GetObjKind() const override { return SgaObjKind::Bitmap; } +}; + +class SgaObjectAnim : public SgaObjectBmp +{ +public: + + SgaObjectAnim(); + SgaObjectAnim( const Graphic& rGraphic, const INetURLObject& rURL ); + + virtual SgaObjKind GetObjKind() const override { return SgaObjKind::Animation; } +}; + +class SgaObjectINet final : public SgaObjectAnim +{ +public: + + SgaObjectINet(); + SgaObjectINet( const Graphic& rGraphic, const INetURLObject& rURL ); + + virtual SgaObjKind GetObjKind() const override { return SgaObjKind::Inet; } +}; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/getallcharpropids.hxx b/svx/inc/getallcharpropids.hxx new file mode 100644 index 000000000..c52d41b68 --- /dev/null +++ b/svx/inc/getallcharpropids.hxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_GETALLCHARPROPIDS_HXX +#define INCLUDED_SVX_INC_GETALLCHARPROPIDS_HXX + +#include <sal/config.h> + +#include <vector> + +#include <sal/types.h> + +class SfxItemSet; + +std::vector<sal_uInt16> GetAllCharPropIds(const SfxItemSet& rSet); + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/helpids.h b/svx/inc/helpids.h new file mode 100644 index 000000000..c6693c822 --- /dev/null +++ b/svx/inc/helpids.h @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_HELPIDS_H +#define INCLUDED_SVX_INC_HELPIDS_H + +#define HID_BMPMASK_CTL_QCOL_1 "SVX_HID_BMPMASK_CTL_QCOL_1" +#define HID_COLOR_CTL_COLORS "SVX_HID_COLOR_CTL_COLORS" +#define HID_CTRL3D_HSCROLL "SVX_HID_CTRL3D_HSCROLL" +#define HID_CTRL3D_SWITCHER "SVX_HID_CTRL3D_SWITCHER" +#define HID_CTRL3D_VSCROLL "SVX_HID_CTRL3D_VSCROLL" +#define HID_CTRL_COLOR "SVX_HID_CTRL_COLOR" +#define HID_GALLERY_ICONVIEW "SVX_HID_GALLERY_ICONVIEW" +#define HID_GALLERY_LISTVIEW "SVX_HID_GALLERY_LISTVIEW" +#define HID_GALLERY_NEWTHEME "SVX_HID_GALLERY_NEWTHEME" +#define HID_GALLERY_THEMELIST "SVX_HID_GALLERY_THEMELIST" +#define HID_GALLERY_WINDOW "SVX_HID_GALLERY_WINDOW" +#define HID_POPUP_COLOR "SVX_HID_POPUP_COLOR" +#define HID_POPUP_COLOR_CTRL "SVX_HID_POPUP_COLOR_CTRL" +#define HID_POPUP_FRAME "SVX_HID_POPUP_FRAME" +#define HID_POPUP_LINE "SVX_HID_POPUP_LINE" +#define HID_POPUP_LINEEND "SVX_HID_POPUP_LINEEND" +#define HID_POPUP_LINEEND_CTRL "SVX_HID_POPUP_LINEEND_CTRL" +#define HID_STYLE_LISTBOX "SVX_HID_STYLE_LISTBOX" +#define HID_VALUESET_EXTRUSION_LIGHTING "SVX_HID_VALUESET_EXTRUSION_LIGHTING" +#define HID_UNDERLINE_BTN "SVX_HID_UNDERLINE_BTN" +#define HID_SPACING_MB_KERN "SVX_HID_SPACING_MB_KERN" + +#define HID_FORM_NAVIGATOR "SVX_HID_FORM_NAVIGATOR" +#define HID_FORM_NAVIGATOR_WIN "SVX_HID_FORM_NAVIGATOR_WIN" +#define HID_FIELD_SEL "SVX_HID_FIELD_SEL" +#define HID_FIELD_SEL_WIN "SVX_HID_FIELD_SEL_WIN" +#define HID_FILTER_NAVIGATOR "SVX_HID_FILTER_NAVIGATOR" +#define HID_FILTER_NAVIGATOR_WIN "SVX_HID_FILTER_NAVIGATOR_WIN" +#define HID_GRID_TRAVEL_FIRST "SVX_HID_GRID_TRAVEL_FIRST" +#define HID_GRID_TRAVEL_PREV "SVX_HID_GRID_TRAVEL_PREV" +#define HID_GRID_TRAVEL_NEXT "SVX_HID_GRID_TRAVEL_NEXT" +#define HID_GRID_TRAVEL_LAST "SVX_HID_GRID_TRAVEL_LAST" +#define HID_GRID_TRAVEL_NEW "SVX_HID_GRID_TRAVEL_NEW" +#define HID_GRID_TRAVEL_ABSOLUTE "SVX_HID_GRID_TRAVEL_ABSOLUTE" +#define HID_GRID_NUMBEROFRECORDS "SVX_HID_GRID_NUMBEROFRECORDS" + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/numberingtype.hrc b/svx/inc/numberingtype.hrc new file mode 100644 index 000000000..37cdbbd3c --- /dev/null +++ b/svx/inc/numberingtype.hrc @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_NUMBERINGTYPE_HRC +#define INCLUDED_SVX_INC_NUMBERINGTYPE_HRC + +#include <utility> + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +const std::pair<const char*, int> RID_SVXSTRARY_NUMBERINGTYPE[] = +{ + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "None") , 5 /* SVX_NUM_NUMBER_NONE */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Bullet") , 6 /* SVX_NUM_CHAR_SPECIAL */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Graphics") , 8 /* SVX_NUM_BITMAP */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Linked graphics") , 136 /* SVX_NUM_BITMAP|0x80 */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "1, 2, 3, ...") , 4 /* SVX_NUM_ARABIC */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "A, B, C, ...") , 0 /* SVX_NUM_CHARS_UPPER_LETTER */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "a, b, c, ...") , 1 /* SVX_NUM_CHARS_LOWER_LETTER */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "I, II, III, ...") , 2 /* SVX_NUM_ROMAN_UPPER */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "i, ii, iii, ...") , 3 /* SVX_NUM_ROMAN_LOWER */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "1st, 2nd, 3rd, ...") , 60 /* TEXT_NUMBER */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "One, Two, Three, ...") , 61 /* TEXT_CARDINAL */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "First, Second, Third, ...") , 62 /* TEXT_ORDINAL */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "A, .., AA, .., AAA, ...") , 9 /* SVX_NUM_CHARS_UPPER_LETTER_N */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "a, .., aa, .., aaa, ...") , 10 /* SVX_NUM_CHARS_LOWER_LETTER_N */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "*, †, ‡, §, **, ††, ...") , 63 /* SYMBOL_CHICAGO */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Native Numbering") , 12 /* NATIVE_NUMBERING */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "А, Б, .., Аа, Аб, ... (Bulgarian)") , 38 /* CHARS_CYRILLIC_UPPER_LETTER_BG */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "а, б, .., аа, аб, ... (Bulgarian)") , 39 /* CHARS_CYRILLIC_LOWER_LETTER_BG */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "А, Б, .., Аа, Бб, ... (Bulgarian)") , 40 /* CHARS_CYRILLIC_UPPER_LETTER_N_BG */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "а, б, .., аа, бб, ... (Bulgarian)") , 41 /* CHARS_CYRILLIC_LOWER_LETTER_N_BG */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "А, Б, .., Аа, Аб, ... (Russian)") , 42 /* CHARS_CYRILLIC_UPPER_LETTER_RU */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "а, б, .., аа, аб, ... (Russian)") , 43 /* CHARS_CYRILLIC_LOWER_LETTER_RU */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "А, Б, .., Аа, Бб, ... (Russian)") , 44 /* CHARS_CYRILLIC_UPPER_LETTER_N_RU */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "а, б, .., аа, бб, ... (Russian)") , 45 /* CHARS_CYRILLIC_LOWER_LETTER_N_RU */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "А, Б, .., Аа, Аб, ... (Serbian)") , 48 /* CHARS_CYRILLIC_UPPER_LETTER_SR */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "а, б, .., аа, аб, ... (Serbian)") , 49 /* CHARS_CYRILLIC_LOWER_LETTER_SR */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "А, Б, .., Аа, Бб, ... (Serbian)") , 50 /* CHARS_CYRILLIC_UPPER_LETTER_N_SR */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "а, б, .., аа, бб, ... (Serbian)") , 51 /* CHARS_CYRILLIC_LOWER_LETTER_N_SR */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Α, Β, Γ, ... (Greek Upper Letter)"), 52 /* CHARS_GREEK_UPPER_LETTER */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "α, β, γ, ... (Greek Lower Letter)"), 53 /* CHARS_GREEK_LOWER_LETTER */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "א...י, יא...כ, ...") , 56 /* NUMBER_HEBREW */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "א...ת, אא...תת, ...") , 33 /* CHARS_HEBREW */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "١, ٢, ٣, ٤, ... (Arabic)"), 57 /* NUMBER_ARABIC_INDIC */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "۱, ۲, ۳, ۴, ... (Farsi)"), 58 /* NUMBER_EAST_ARABIC_INDIC */ }, + { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "१, २, ३, ..."), 59 /* NUMBER_INDIC_DEVANAGARI */ }, +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/palettes.hxx b/svx/inc/palettes.hxx new file mode 100644 index 000000000..9469659d2 --- /dev/null +++ b/svx/inc/palettes.hxx @@ -0,0 +1,97 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_PALETTE_HXX +#define INCLUDED_SVX_INC_PALETTE_HXX + +#include <svx/Palette.hxx> +#include <svx/SvxColorValueSet.hxx> +#include <svx/xtable.hxx> + +class SvFileStream; + +typedef std::vector< NamedColor > ColorList; + +// ASE = Adobe Swatch Exchange + +class PaletteASE final : public Palette +{ + bool mbValidPalette; + OUString maFPath; + OUString maASEPaletteName; + ColorList maColors; + + void LoadPalette(); +public: + PaletteASE( const OUString &rFPath, const OUString &rFName ); + virtual ~PaletteASE() override; + + virtual const OUString& GetName() override; + virtual const OUString& GetPath() override; + virtual void LoadColorSet(SvxColorValueSet& rColorSet) override; + + virtual bool IsValid() override; +}; + +// GPL - this is *not* GNU Public License, but is the Gimp PaLette + +class PaletteGPL final : public Palette +{ + bool mbLoadedPalette; + bool mbValidPalette; + OUString maFName; + OUString maFPath; + OUString maGPLPaletteName; + ColorList maColors; + + bool ReadPaletteHeader(SvFileStream& rFileStream); + void LoadPaletteHeader(); + void LoadPalette(); +public: + PaletteGPL( const OUString &rFPath, const OUString &rFName ); + virtual ~PaletteGPL() override; + + virtual const OUString& GetName() override; + virtual const OUString& GetPath() override; + virtual void LoadColorSet(SvxColorValueSet& rColorSet) override; + + virtual bool IsValid() override; +}; + +// SOC - Star Office Color-table + +class PaletteSOC final : public Palette +{ + bool mbLoadedPalette; + OUString maFPath; + OUString maSOCPaletteName; + XColorListRef mpColorList; +public: + PaletteSOC( const OUString &rFPath, const OUString &rFName ); + virtual ~PaletteSOC() override; + + virtual const OUString& GetName() override; + virtual const OUString& GetPath() override; + virtual void LoadColorSet(SvxColorValueSet& rColorSet) override; + + virtual bool IsValid() override; +}; + +#endif // INCLUDED_SVX_INC_PALETTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/pch/precompiled_svx.cxx b/svx/inc/pch/precompiled_svx.cxx new file mode 100644 index 000000000..a05a248ab --- /dev/null +++ b/svx/inc/pch/precompiled_svx.cxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "precompiled_svx.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx new file mode 100644 index 000000000..7a73d1b51 --- /dev/null +++ b/svx/inc/pch/precompiled_svx.hxx @@ -0,0 +1,454 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such + manual changes will be rewritten by the next run of update_pch.sh (which presumably + also fixes all possible problems, so it's usually better to use it). + + Generated on 2020-05-21 16:43:20 using: + ./bin/update_pch svx svx --cutoff=3 --exclude:system --exclude:module --include:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./svx/inc/pch/precompiled_svx.hxx "make svx.build" --find-conflicts +*/ + +#if PCH_LEVEL >= 1 +#include <algorithm> +#include <array> +#include <cassert> +#include <climits> +#include <cstddef> +#include <deque> +#include <functional> +#include <iomanip> +#include <limits.h> +#include <map> +#include <memory> +#include <optional> +#include <ostream> +#include <set> +#include <stddef.h> +#include <type_traits> +#include <unordered_map> +#include <utility> +#include <vector> +#include <boost/property_tree/json_parser.hpp> +#include <boost/property_tree/ptree.hpp> +#include <boost/property_tree/ptree_fwd.hpp> +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#include <osl/diagnose.h> +#include <osl/doublecheckedlocking.h> +#include <osl/endian.h> +#include <osl/file.hxx> +#include <osl/getglobalmutex.hxx> +#include <osl/interlck.h> +#include <osl/mutex.hxx> +#include <osl/thread.h> +#include <rtl/alloc.h> +#include <rtl/bootstrap.hxx> +#include <rtl/instance.hxx> +#include <rtl/math.hxx> +#include <rtl/ref.hxx> +#include <rtl/string.hxx> +#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/log.hxx> +#include <sal/macros.h> +#include <sal/saldllapi.h> +#include <sal/types.h> +#include <sal/typesizes.h> +#include <vcl/BitmapFilter.hxx> +#include <vcl/EnumContext.hxx> +#include <vcl/GraphicObject.hxx> +#include <vcl/InterimItemWindow.hxx> +#include <vcl/Scanline.hxx> +#include <vcl/alpha.hxx> +#include <vcl/bitmapex.hxx> +#include <vcl/builder.hxx> +#include <vcl/commandevent.hxx> +#include <vcl/commandinfoprovider.hxx> +#include <vcl/ctrl.hxx> +#include <vcl/customweld.hxx> +#include <vcl/dllapi.h> +#include <vcl/errcode.hxx> +#include <vcl/errinf.hxx> +#include <vcl/event.hxx> +#include <vcl/fieldvalues.hxx> +#include <vcl/font.hxx> +#include <vcl/gdimtf.hxx> +#include <vcl/graph.hxx> +#include <vcl/idle.hxx> +#include <vcl/image.hxx> +#include <vcl/imap.hxx> +#include <vcl/imapobj.hxx> +#include <vcl/menu.hxx> +#include <vcl/metric.hxx> +#include <vcl/outdev.hxx> +#include <vcl/ptrstyle.hxx> +#include <vcl/settings.hxx> +#include <vcl/status.hxx> +#include <vcl/svapp.hxx> +#include <vcl/task.hxx> +#include <vcl/timer.hxx> +#include <vcl/toolbox.hxx> +#include <vcl/transfer.hxx> +#include <vcl/treelistbox.hxx> +#include <vcl/vclptr.hxx> +#include <vcl/virdev.hxx> +#include <vcl/weld.hxx> +#include <vcl/window.hxx> +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include <basegfx/basegfxdllapi.h> +#include <basegfx/color/bcolor.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <basegfx/matrix/b3dhommatrix.hxx> +#include <basegfx/point/b2dpoint.hxx> +#include <basegfx/point/b2ipoint.hxx> +#include <basegfx/point/b3dpoint.hxx> +#include <basegfx/polygon/b2dpolygontools.hxx> +#include <basegfx/polygon/b2dpolypolygontools.hxx> +#include <basegfx/range/b2irectangle.hxx> +#include <basegfx/tuple/b2dtuple.hxx> +#include <basegfx/vector/b2enums.hxx> +#include <basegfx/vector/b3dvector.hxx> +#include <com/sun/star/accessibility/AccessibleEventId.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/XAccessible.hpp> +#include <com/sun/star/accessibility/XAccessibleComponent.hpp> +#include <com/sun/star/accessibility/XAccessibleContext.hpp> +#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp> +#include <com/sun/star/awt/GradientStyle.hpp> +#include <com/sun/star/awt/Point.hpp> +#include <com/sun/star/awt/Rectangle.hpp> +#include <com/sun/star/awt/XControl.hpp> +#include <com/sun/star/awt/XControlContainer.hpp> +#include <com/sun/star/beans/NamedValue.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/beans/XPropertyChangeListener.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/datatransfer/DataFlavor.hpp> +#include <com/sun/star/datatransfer/XTransferable2.hpp> +#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp> +#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp> +#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp> +#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp> +#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp> +#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> +#include <com/sun/star/drawing/FillStyle.hpp> +#include <com/sun/star/drawing/LineCap.hpp> +#include <com/sun/star/drawing/TextFitToSizeType.hpp> +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/embed/Aspects.hpp> +#include <com/sun/star/form/XForm.hpp> +#include <com/sun/star/form/XFormComponent.hpp> +#include <com/sun/star/frame/XController.hpp> +#include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/frame/XDispatchProvider.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XLayoutManager.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> +#include <com/sun/star/frame/XTerminateListener.hpp> +#include <com/sun/star/frame/XToolbarController.hpp> +#include <com/sun/star/i18n/BreakIterator.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/XComponent.hpp> +#include <com/sun/star/lang/XEventListener.hpp> +#include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/sdbc/XResultSet.hpp> +#include <com/sun/star/sdbcx/XColumnsSupplier.hpp> +#include <com/sun/star/sdbcx/XRowLocate.hpp> +#include <com/sun/star/style/NumberingType.hpp> +#include <com/sun/star/style/XStyle.hpp> +#include <com/sun/star/text/DefaultNumberingProvider.hpp> +#include <com/sun/star/text/WritingMode2.hpp> +#include <com/sun/star/text/textfield/Type.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/Type.hxx> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/uno/XInterface.hpp> +#include <com/sun/star/uno/XWeak.hpp> +#include <com/sun/star/uno/genfunc.hxx> +#include <com/sun/star/util/NumberFormat.hpp> +#include <com/sun/star/util/URLTransformer.hpp> +#include <com/sun/star/util/XModifyListener.hpp> +#include <com/sun/star/util/XUpdatable.hpp> +#include <com/sun/star/view/XSelectionChangeListener.hpp> +#include <com/sun/star/view/XSelectionSupplier.hpp> +#include <comphelper/broadcasthelper.hxx> +#include <comphelper/comphelperdllapi.h> +#include <comphelper/lok.hxx> +#include <comphelper/processfactory.hxx> +#include <comphelper/proparrhlp.hxx> +#include <comphelper/propertycontainer.hxx> +#include <comphelper/propertysequence.hxx> +#include <comphelper/sequence.hxx> +#include <comphelper/servicehelper.hxx> +#include <comphelper/string.hxx> +#include <comphelper/types.hxx> +#include <comphelper/weak.hxx> +#include <cppu/cppudllapi.h> +#include <cppu/unotype.hxx> +#include <cppuhelper/basemutex.hxx> +#include <cppuhelper/compbase.hxx> +#include <cppuhelper/compbase_ex.hxx> +#include <cppuhelper/cppuhelperdllapi.h> +#include <cppuhelper/implbase.hxx> +#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/interfacecontainer.h> +#include <cppuhelper/interfacecontainer.hxx> +#include <cppuhelper/propshlp.hxx> +#include <cppuhelper/queryinterface.hxx> +#include <cppuhelper/supportsservice.hxx> +#include <cppuhelper/weak.hxx> +#include <cppuhelper/weakagg.hxx> +#include <cppuhelper/weakref.hxx> +#include <drawinglayer/drawinglayerdllapi.h> +#include <drawinglayer/geometry/viewinformation2d.hxx> +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <editeng/borderline.hxx> +#include <editeng/brushitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editengdllapi.h> +#include <editeng/editstat.hxx> +#include <editeng/eedata.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/frmdir.hxx> +#include <editeng/lrspitem.hxx> +#include <editeng/numdef.hxx> +#include <editeng/numitem.hxx> +#include <editeng/outliner.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/paragraphdata.hxx> +#include <editeng/postitem.hxx> +#include <editeng/sizeitem.hxx> +#include <editeng/svxenum.hxx> +#include <editeng/svxfont.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/unoedhlp.hxx> +#include <editeng/unoedsrc.hxx> +#include <editeng/wghtitem.hxx> +#include <i18nlangtag/lang.h> +#include <i18nlangtag/languagetag.hxx> +#include <i18nlangtag/mslangid.hxx> +#include <o3tl/cow_wrapper.hxx> +#include <o3tl/deleter.hxx> +#include <o3tl/safeint.hxx> +#include <o3tl/typed_flags_set.hxx> +#include <o3tl/underlyingenumvalue.hxx> +#include <officecfg/Office/Common.hxx> +#include <salhelper/simplereferenceobject.hxx> +#include <sfx2/app.hxx> +#include <sfx2/basedlgs.hxx> +#include <sfx2/bindings.hxx> +#include <sfx2/chalign.hxx> +#include <sfx2/childwin.hxx> +#include <sfx2/ctrlitem.hxx> +#include <sfx2/dialoghelper.hxx> +#include <sfx2/dispatch.hxx> +#include <sfx2/dllapi.h> +#include <sfx2/dockwin.hxx> +#include <sfx2/lokhelper.hxx> +#include <sfx2/module.hxx> +#include <sfx2/objsh.hxx> +#include <sfx2/request.hxx> +#include <sfx2/sidebar/PanelLayout.hxx> +#include <sfx2/stbitem.hxx> +#include <sfx2/tabdlg.hxx> +#include <sfx2/tbxctrl.hxx> +#include <sfx2/viewfrm.hxx> +#include <sfx2/viewsh.hxx> +#include <sfx2/weldutils.hxx> +#include <sot/exchange.hxx> +#include <sot/formats.hxx> +#include <sot/sotdllapi.h> +#include <svl/SfxBroadcaster.hxx> +#include <svl/cenumitm.hxx> +#include <svl/eitem.hxx> +#include <svl/hint.hxx> +#include <svl/intitem.hxx> +#include <svl/itempool.hxx> +#include <svl/itemset.hxx> +#include <svl/languageoptions.hxx> +#include <svl/lstner.hxx> +#include <svl/metitem.hxx> +#include <svl/nfkeytab.hxx> +#include <svl/ondemand.hxx> +#include <svl/poolitem.hxx> +#include <svl/srchitem.hxx> +#include <svl/stritem.hxx> +#include <svl/style.hxx> +#include <svl/stylesheetuser.hxx> +#include <svl/svldllapi.h> +#include <svl/typedwhich.hxx> +#include <svl/undo.hxx> +#include <svl/zforlist.hxx> +#include <svtools/colorcfg.hxx> +#include <svtools/ehdl.hxx> +#include <svtools/popupwindowcontroller.hxx> +#include <svtools/svtdllapi.h> +#include <svtools/svtresid.hxx> +#include <svtools/toolbarmenu.hxx> +#include <svtools/toolboxcontroller.hxx> +#include <svtools/unitconv.hxx> +#include <svtools/valueset.hxx> +#include <toolkit/helper/vclunohelper.hxx> +#include <tools/UnitConversion.hxx> +#include <tools/color.hxx> +#include <tools/date.hxx> +#include <tools/datetime.hxx> +#include <tools/debug.hxx> +#include <tools/diagnose_ex.h> +#include <tools/fldunit.hxx> +#include <tools/fontenum.hxx> +#include <tools/fract.hxx> +#include <tools/gen.hxx> +#include <tools/globname.hxx> +#include <tools/helpers.hxx> +#include <tools/link.hxx> +#include <tools/mapunit.hxx> +#include <tools/poly.hxx> +#include <tools/resary.hxx> +#include <tools/solar.h> +#include <tools/stream.hxx> +#include <tools/time.hxx> +#include <tools/toolsdllapi.h> +#include <tools/urlobj.hxx> +#include <uno/data.h> +#include <uno/sequence2.h> +#include <unotools/accessiblerelationsethelper.hxx> +#include <unotools/accessiblestatesethelper.hxx> +#include <unotools/configitem.hxx> +#include <unotools/fontcvt.hxx> +#include <unotools/localedatawrapper.hxx> +#include <unotools/options.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/unotoolsdllapi.h> +#include <unotools/viewoptions.hxx> +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#include <cell.hxx> +#include <charmapacc.hxx> +#include <fmprop.hxx> +#include <fmservs.hxx> +#include <helpids.h> +#include <svx/AccessibleControlShape.hxx> +#include <svx/AccessibleShape.hxx> +#include <svx/AccessibleShapeInfo.hxx> +#include <svx/AccessibleTextHelper.hxx> +#include <svx/IAccessibleViewForwarder.hxx> +#include <svx/ShapeTypeHandler.hxx> +#include <svx/SvxShapeTypes.hxx> +#include <svx/algitem.hxx> +#include <svx/charmap.hxx> +#include <svx/colorbox.hxx> +#include <svx/deflt3d.hxx> +#include <svx/dialmgr.hxx> +#include <svx/dlgctrl.hxx> +#include <svx/dlgutil.hxx> +#include <svx/drawitem.hxx> +#include <svx/e3ditem.hxx> +#include <svx/fmmodel.hxx> +#include <svx/fmshell.hxx> +#include <svx/fmtools.hxx> +#include <svx/framebordertype.hxx> +#include <svx/galmisc.hxx> +#include <svx/itemwin.hxx> +#include <svx/itextprovider.hxx> +#include <svx/labelitemwindow.hxx> +#include <svx/obj3d.hxx> +#include <svx/pageitem.hxx> +#include <svx/rotmodit.hxx> +#include <svx/rulritem.hxx> +#include <svx/sdmetitm.hxx> +#include <svx/sdooitm.hxx> +#include <svx/sdprcitm.hxx> +#include <svx/sdrpaintwindow.hxx> +#include <svx/sdshitm.hxx> +#include <svx/sdtaditm.hxx> +#include <svx/sdtaitm.hxx> +#include <svx/sdtakitm.hxx> +#include <svx/srchdlg.hxx> +#include <svx/strarray.hxx> +#include <svx/svddef.hxx> +#include <svx/svditer.hxx> +#include <svx/svdmodel.hxx> +#include <svx/svdoashp.hxx> +#include <svx/svdoattr.hxx> +#include <svx/svdobj.hxx> +#include <svx/svdopath.hxx> +#include <svx/svdorect.hxx> +#include <svx/svdotable.hxx> +#include <svx/svdotext.hxx> +#include <svx/svdpage.hxx> +#include <svx/svdpagv.hxx> +#include <svx/svdtext.hxx> +#include <svx/svdtrans.hxx> +#include <svx/svdview.hxx> +#include <svx/svx3ditems.hxx> +#include <svx/svxdlg.hxx> +#include <svx/svxdllapi.h> +#include <svx/unoapi.hxx> +#include <svx/unomid.hxx> +#include <svx/unoshtxt.hxx> +#include <svx/view3d.hxx> +#include <svx/viewpt3d.hxx> +#include <svx/xcolit.hxx> +#include <svx/xdef.hxx> +#include <svx/xenum.hxx> +#include <svx/xfillit0.hxx> +#include <svx/xflclit.hxx> +#include <svx/xflftrit.hxx> +#include <svx/xfltrit.hxx> +#include <svx/xgrad.hxx> +#include <svx/xit.hxx> +#include <svx/xlineit0.hxx> +#include <svx/xlnclit.hxx> +#include <svx/xlntrit.hxx> +#include <svx/xlnwtit.hxx> +#include <svx/xtable.hxx> +#endif // PCH_LEVEL >= 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/pch/precompiled_svxcore.cxx b/svx/inc/pch/precompiled_svxcore.cxx new file mode 100644 index 000000000..0848af1b6 --- /dev/null +++ b/svx/inc/pch/precompiled_svxcore.cxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "precompiled_svxcore.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx new file mode 100644 index 000000000..cc1635c0e --- /dev/null +++ b/svx/inc/pch/precompiled_svxcore.hxx @@ -0,0 +1,526 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such + manual changes will be rewritten by the next run of update_pch.sh (which presumably + also fixes all possible problems, so it's usually better to use it). + + Generated on 2020-04-25 20:55:34 using: + ./bin/update_pch svx svxcore --cutoff=7 --exclude:system --include:module --exclude:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./svx/inc/pch/precompiled_svxcore.hxx "make svx.build" --find-conflicts +*/ + +#if PCH_LEVEL >= 1 +#include <algorithm> +#include <cassert> +#include <cmath> +#include <cstddef> +#include <cstring> +#include <deque> +#include <float.h> +#include <functional> +#include <initializer_list> +#include <iomanip> +#include <limits.h> +#include <limits> +#include <list> +#include <map> +#include <math.h> +#include <memory> +#include <new> +#include <optional> +#include <ostream> +#include <set> +#include <stack> +#include <stddef.h> +#include <string.h> +#include <string> +#include <string_view> +#include <type_traits> +#include <typeinfo> +#include <unordered_map> +#include <utility> +#include <vector> +#include <boost/property_tree/json_parser.hpp> +#include <boost/property_tree/ptree.hpp> +#include <boost/property_tree/ptree_fwd.hpp> +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#include <osl/diagnose.h> +#include <osl/diagnose.hxx> +#include <osl/doublecheckedlocking.h> +#include <osl/endian.h> +#include <osl/file.hxx> +#include <osl/getglobalmutex.hxx> +#include <osl/interlck.h> +#include <osl/mutex.hxx> +#include <osl/thread.h> +#include <osl/time.h> +#include <rtl/alloc.h> +#include <rtl/character.hxx> +#include <rtl/instance.hxx> +#include <rtl/locale.h> +#include <rtl/math.h> +#include <rtl/math.hxx> +#include <rtl/ref.hxx> +#include <rtl/strbuf.h> +#include <rtl/string.h> +#include <rtl/string.hxx> +#include <rtl/stringconcat.hxx> +#include <rtl/stringutils.hxx> +#include <rtl/textcvt.h> +#include <rtl/textenc.h> +#include <rtl/unload.h> +#include <rtl/ustrbuf.hxx> +#include <rtl/ustring.h> +#include <rtl/ustring.hxx> +#include <rtl/uuid.h> +#include <sal/config.h> +#include <sal/log.hxx> +#include <sal/macros.h> +#include <sal/saldllapi.h> +#include <sal/types.h> +#include <sal/typesizes.h> +#include <vcl/AccessibleBrowseBoxObjType.hxx> +#include <vcl/EnumContext.hxx> +#include <vcl/GraphicExternalLink.hxx> +#include <vcl/NotebookBarAddonsMerger.hxx> +#include <vcl/Scanline.hxx> +#include <vcl/alpha.hxx> +#include <vcl/animate/Animation.hxx> +#include <vcl/animate/AnimationBitmap.hxx> +#include <vcl/bitmap.hxx> +#include <vcl/bitmapex.hxx> +#include <vcl/builder.hxx> +#include <vcl/canvastools.hxx> +#include <vcl/checksum.hxx> +#include <vcl/commandevent.hxx> +#include <vcl/ctrl.hxx> +#include <vcl/customweld.hxx> +#include <vcl/dllapi.h> +#include <vcl/dndhelp.hxx> +#include <vcl/dockwin.hxx> +#include <vcl/edit.hxx> +#include <vcl/errcode.hxx> +#include <vcl/event.hxx> +#include <vcl/floatwin.hxx> +#include <vcl/fntstyle.hxx> +#include <vcl/font.hxx> +#include <vcl/gdimtf.hxx> +#include <vcl/gfxlink.hxx> +#include <vcl/graph.hxx> +#include <vcl/graphicfilter.hxx> +#include <vcl/headbar.hxx> +#include <vcl/idle.hxx> +#include <vcl/image.hxx> +#include <vcl/keycod.hxx> +#include <vcl/keycodes.hxx> +#include <vcl/mapmod.hxx> +#include <vcl/menu.hxx> +#include <vcl/outdev.hxx> +#include <vcl/ptrstyle.hxx> +#include <vcl/region.hxx> +#include <vcl/scopedbitmapaccess.hxx> +#include <vcl/settings.hxx> +#include <vcl/spinfld.hxx> +#include <vcl/svapp.hxx> +#include <vcl/syswin.hxx> +#include <vcl/task.hxx> +#include <vcl/textfilter.hxx> +#include <vcl/timer.hxx> +#include <vcl/toolbox.hxx> +#include <vcl/transfer.hxx> +#include <vcl/vclenum.hxx> +#include <vcl/vclevent.hxx> +#include <vcl/vclptr.hxx> +#include <vcl/vclreferencebase.hxx> +#include <vcl/vectorgraphicdata.hxx> +#include <vcl/virdev.hxx> +#include <vcl/weld.hxx> +#include <vcl/window.hxx> +#include <vcl/windowstate.hxx> +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include <basegfx/basegfxdllapi.h> +#include <basegfx/color/bcolor.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <basegfx/matrix/b2dhommatrixtools.hxx> +#include <basegfx/matrix/b3dhommatrix.hxx> +#include <basegfx/numeric/ftools.hxx> +#include <basegfx/point/b2dpoint.hxx> +#include <basegfx/point/b2ipoint.hxx> +#include <basegfx/point/b3dpoint.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> +#include <basegfx/polygon/b2dpolygontools.hxx> +#include <basegfx/polygon/b2dpolypolygon.hxx> +#include <basegfx/polygon/b2dpolypolygontools.hxx> +#include <basegfx/polygon/b3dpolypolygon.hxx> +#include <basegfx/range/b2drange.hxx> +#include <basegfx/range/b3drange.hxx> +#include <basegfx/range/basicrange.hxx> +#include <basegfx/tuple/b2dtuple.hxx> +#include <basegfx/tuple/b2ituple.hxx> +#include <basegfx/tuple/b3dtuple.hxx> +#include <basegfx/utils/common.hxx> +#include <basegfx/vector/b2dsize.hxx> +#include <basegfx/vector/b2dvector.hxx> +#include <basegfx/vector/b2enums.hxx> +#include <basegfx/vector/b2ivector.hxx> +#include <basegfx/vector/b3dvector.hxx> +#include <basic/basicdllapi.h> +#include <basic/sbxcore.hxx> +#include <basic/sbxdef.hxx> +#include <com/sun/star/awt/Key.hpp> +#include <com/sun/star/awt/KeyGroup.hpp> +#include <com/sun/star/awt/XBitmap.hpp> +#include <com/sun/star/awt/XControl.hpp> +#include <com/sun/star/beans/Property.hpp> +#include <com/sun/star/beans/PropertyAttribute.hpp> +#include <com/sun/star/beans/PropertyState.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/beans/XFastPropertySet.hpp> +#include <com/sun/star/beans/XMultiPropertySet.hpp> +#include <com/sun/star/beans/XPropertiesChangeListener.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/XPropertySetOption.hpp> +#include <com/sun/star/beans/XPropertyState.hpp> +#include <com/sun/star/beans/XVetoableChangeListener.hpp> +#include <com/sun/star/container/XChild.hpp> +#include <com/sun/star/container/XContainerListener.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/datatransfer/DataFlavor.hpp> +#include <com/sun/star/datatransfer/XTransferable2.hpp> +#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp> +#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp> +#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp> +#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp> +#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp> +#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> +#include <com/sun/star/drawing/LineCap.hpp> +#include <com/sun/star/drawing/NormalsKind.hpp> +#include <com/sun/star/drawing/TextureKind2.hpp> +#include <com/sun/star/drawing/TextureMode.hpp> +#include <com/sun/star/drawing/TextureProjectionMode.hpp> +#include <com/sun/star/embed/Aspects.hpp> +#include <com/sun/star/embed/XEmbeddedObject.hpp> +#include <com/sun/star/form/FormComponentType.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> +#include <com/sun/star/frame/XTerminateListener.hpp> +#include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/graphic/XPrimitive2D.hpp> +#include <com/sun/star/graphic/XPrimitive3D.hpp> +#include <com/sun/star/i18n/Calendar2.hpp> +#include <com/sun/star/i18n/CharacterIteratorMode.hpp> +#include <com/sun/star/i18n/WordType.hpp> +#include <com/sun/star/lang/DisposedException.hpp> +#include <com/sun/star/lang/EventObject.hpp> +#include <com/sun/star/lang/IndexOutOfBoundsException.hpp> +#include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/lang/XEventListener.hpp> +#include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/style/NumberingType.hpp> +#include <com/sun/star/text/textfield/Type.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/Type.hxx> +#include <com/sun/star/uno/TypeClass.hdl> +#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/XWeak.hpp> +#include <com/sun/star/uno/genfunc.h> +#include <com/sun/star/uno/genfunc.hxx> +#include <com/sun/star/util/Date.hpp> +#include <com/sun/star/util/DateTime.hpp> +#include <com/sun/star/util/Time.hpp> +#include <com/sun/star/util/XAccounting.hpp> +#include <com/sun/star/xml/sax/XFastAttributeList.hpp> +#include <com/sun/star/xml/sax/XFastTokenHandler.hpp> +#include <comphelper/broadcasthelper.hxx> +#include <comphelper/comphelperdllapi.h> +#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/lok.hxx> +#include <comphelper/processfactory.hxx> +#include <comphelper/propagg.hxx> +#include <comphelper/proparrhlp.hxx> +#include <comphelper/property.hxx> +#include <comphelper/propertycontainer.hxx> +#include <comphelper/propertycontainerhelper.hxx> +#include <comphelper/propstate.hxx> +#include <comphelper/sequence.hxx> +#include <comphelper/servicehelper.hxx> +#include <comphelper/string.hxx> +#include <comphelper/types.hxx> +#include <comphelper/uno3.hxx> +#include <connectivity/dbtools.hxx> +#include <connectivity/dbtoolsdllapi.hxx> +#include <cppu/cppudllapi.h> +#include <cppu/unotype.hxx> +#include <cppuhelper/basemutex.hxx> +#include <cppuhelper/compbase.hxx> +#include <cppuhelper/compbase_ex.hxx> +#include <cppuhelper/cppuhelperdllapi.h> +#include <cppuhelper/implbase.hxx> +#include <cppuhelper/implbase_ex.hxx> +#include <cppuhelper/implbase_ex_post.hxx> +#include <cppuhelper/implbase_ex_pre.hxx> +#include <cppuhelper/interfacecontainer.h> +#include <cppuhelper/propshlp.hxx> +#include <cppuhelper/supportsservice.hxx> +#include <cppuhelper/weak.hxx> +#include <cppuhelper/weakagg.hxx> +#include <cppuhelper/weakref.hxx> +#include <drawinglayer/attribute/fillgradientattribute.hxx> +#include <drawinglayer/attribute/sdrallattribute3d.hxx> +#include <drawinglayer/attribute/sdrfillattribute.hxx> +#include <drawinglayer/attribute/sdrlineattribute.hxx> +#include <drawinglayer/attribute/sdrlinestartendattribute.hxx> +#include <drawinglayer/attribute/sdrobjectattribute3d.hxx> +#include <drawinglayer/attribute/sdrshadowattribute.hxx> +#include <drawinglayer/drawinglayerdllapi.h> +#include <drawinglayer/geometry/viewinformation2d.hxx> +#include <drawinglayer/primitive2d/CommonTypes.hxx> +#include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx> +#include <drawinglayer/primitive2d/Primitive2DContainer.hxx> +#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx> +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <drawinglayer/primitive2d/groupprimitive2d.hxx> +#include <drawinglayer/primitive2d/polygonprimitive2d.hxx> +#include <drawinglayer/primitive2d/primitivetools2d.hxx> +#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx> +#include <drawinglayer/primitive2d/transformprimitive2d.hxx> +#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx> +#include <drawinglayer/primitive3d/baseprimitive3d.hxx> +#include <drawinglayer/primitive3d/sdrextrudelathetools3d.hxx> +#include <drawinglayer/processor2d/baseprocessor2d.hxx> +#include <drawinglayer/processor2d/processor2dtools.hxx> +#include <editeng/colritem.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editengdllapi.h> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/eedata.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/svxenum.hxx> +#include <i18nlangtag/i18nlangtagdllapi.h> +#include <i18nlangtag/lang.h> +#include <libxml/xmlwriter.h> +#include <o3tl/cow_wrapper.hxx> +#include <o3tl/deleter.hxx> +#include <o3tl/safeint.hxx> +#include <o3tl/strong_int.hxx> +#include <o3tl/typed_flags_set.hxx> +#include <o3tl/underlyingenumvalue.hxx> +#include <salhelper/salhelperdllapi.h> +#include <salhelper/simplereferenceobject.hxx> +#include <salhelper/singletonref.hxx> +#include <salhelper/thread.hxx> +#include <sax/fastattribs.hxx> +#include <sax/saxdllapi.h> +#include <sfx2/basedlgs.hxx> +#include <sfx2/dispatch.hxx> +#include <sfx2/dllapi.h> +#include <sfx2/objsh.hxx> +#include <sfx2/shell.hxx> +#include <sfx2/viewfrm.hxx> +#include <sfx2/viewsh.hxx> +#include <sot/exchange.hxx> +#include <sot/formats.hxx> +#include <sot/sotdllapi.h> +#include <svl/SfxBroadcaster.hxx> +#include <svl/cenumitm.hxx> +#include <svl/cintitem.hxx> +#include <svl/eitem.hxx> +#include <svl/hint.hxx> +#include <svl/intitem.hxx> +#include <svl/itempool.hxx> +#include <svl/itemset.hxx> +#include <svl/languageoptions.hxx> +#include <svl/lstner.hxx> +#include <svl/poolitem.hxx> +#include <svl/style.hxx> +#include <svl/svldllapi.h> +#include <svl/typedwhich.hxx> +#include <svl/undo.hxx> +#include <svl/whiter.hxx> +#include <svtools/colorcfg.hxx> +#include <svtools/optionsdrawinglayer.hxx> +#include <svtools/svtdllapi.h> +#include <svtools/valueset.hxx> +#include <toolkit/helper/vclunohelper.hxx> +#include <tools/bigint.hxx> +#include <tools/color.hxx> +#include <tools/date.hxx> +#include <tools/datetime.hxx> +#include <tools/debug.hxx> +#include <tools/diagnose_ex.h> +#include <tools/fldunit.hxx> +#include <tools/fontenum.hxx> +#include <tools/gen.hxx> +#include <tools/globname.hxx> +#include <tools/helpers.hxx> +#include <tools/lineend.hxx> +#include <tools/link.hxx> +#include <tools/mapunit.hxx> +#include <tools/ref.hxx> +#include <tools/solar.h> +#include <tools/stream.hxx> +#include <tools/time.hxx> +#include <tools/toolsdllapi.h> +#include <tools/urlobj.hxx> +#include <tools/wintypes.hxx> +#include <typelib/typeclass.h> +#include <typelib/typedescription.h> +#include <typelib/uik.h> +#include <uno/any2.h> +#include <uno/data.h> +#include <uno/sequence2.h> +#include <unotools/configitem.hxx> +#include <unotools/configmgr.hxx> +#include <unotools/localedatawrapper.hxx> +#include <unotools/options.hxx> +#include <unotools/resmgr.hxx> +#include <unotools/syslocale.hxx> +#include <unotools/ucbstreamhelper.hxx> +#include <unotools/unotoolsdllapi.h> +#include <xmloff/dllapi.h> +#include <xmloff/families.hxx> +#include <xmloff/xmltoken.hxx> +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#include <cell.hxx> +#include <fmobj.hxx> +#include <fmpgeimp.hxx> +#include <fmprop.hxx> +#include <fmservs.hxx> +#include <fmundo.hxx> +#include <svx/dialmgr.hxx> +#include <svx/e3dsceneupdater.hxx> +#include <svx/fmmodel.hxx> +#include <svx/fmpage.hxx> +#include <svx/fmshell.hxx> +#include <svx/fmtools.hxx> +#include <svx/fmview.hxx> +#include <svx/gallery1.hxx> +#include <svx/galmisc.hxx> +#include <svx/galtheme.hxx> +#include <svx/globl3d.hxx> +#include <svx/ipolypolygoneditorcontroller.hxx> +#include <svx/lathe3d.hxx> +#include <svx/obj3d.hxx> +#include <svx/scene3d.hxx> +#include <svx/sdmetitm.hxx> +#include <svx/sdooitm.hxx> +#include <svx/sdr/animation/scheduler.hxx> +#include <svx/sdr/contact/displayinfo.hxx> +#include <svx/sdr/contact/objectcontact.hxx> +#include <svx/sdr/contact/viewcontact.hxx> +#include <svx/sdr/contact/viewcontactofe3dscene.hxx> +#include <svx/sdr/contact/viewobjectcontact.hxx> +#include <svx/sdr/overlay/overlaymanager.hxx> +#include <svx/sdr/overlay/overlayobject.hxx> +#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx> +#include <svx/sdrhittesthelper.hxx> +#include <svx/sdrobjectuser.hxx> +#include <svx/sdrpagewindow.hxx> +#include <svx/sdrpaintwindow.hxx> +#include <svx/sdtfchim.hxx> +#include <svx/sdynitm.hxx> +#include <svx/selectioncontroller.hxx> +#include <svx/svddef.hxx> +#include <svx/svddrag.hxx> +#include <svx/svdedtv.hxx> +#include <svx/svdetc.hxx> +#include <svx/svdhdl.hxx> +#include <svx/svdhlpln.hxx> +#include <svx/svditer.hxx> +#include <svx/svdlayer.hxx> +#include <svx/svdmark.hxx> +#include <svx/svdmodel.hxx> +#include <svx/svdmrkv.hxx> +#include <svx/svdoashp.hxx> +#include <svx/svdobj.hxx> +#include <svx/svdocapt.hxx> +#include <svx/svdoedge.hxx> +#include <svx/svdograf.hxx> +#include <svx/svdogrp.hxx> +#include <svx/svdoole2.hxx> +#include <svx/svdopath.hxx> +#include <svx/svdorect.hxx> +#include <svx/svdotable.hxx> +#include <svx/svdotext.hxx> +#include <svx/svdouno.hxx> +#include <svx/svdoutl.hxx> +#include <svx/svdpage.hxx> +#include <svx/svdpagv.hxx> +#include <svx/svdpntv.hxx> +#include <svx/svdpoev.hxx> +#include <svx/svdpool.hxx> +#include <svx/svdsnpv.hxx> +#include <svx/svdsob.hxx> +#include <svx/svdtrans.hxx> +#include <svx/svdtypes.hxx> +#include <svx/svdundo.hxx> +#include <svx/svdview.hxx> +#include <svx/svx3ditems.hxx> +#include <svx/svxdlg.hxx> +#include <svx/svxdllapi.h> +#include <svx/unoapi.hxx> +#include <svx/unofill.hxx> +#include <svx/unomid.hxx> +#include <svx/unopage.hxx> +#include <svx/unoshape.hxx> +#include <svx/unoshprp.hxx> +#include <svx/xbtmpit.hxx> +#include <svx/xdef.hxx> +#include <svx/xfillit0.hxx> +#include <svx/xflbmtit.hxx> +#include <svx/xflbstit.hxx> +#include <svx/xflclit.hxx> +#include <svx/xflftrit.hxx> +#include <svx/xflgrit.hxx> +#include <svx/xflhtit.hxx> +#include <svx/xfltrit.hxx> +#include <svx/xlineit0.hxx> +#include <svx/xlnclit.hxx> +#include <svx/xlndsit.hxx> +#include <svx/xlnedit.hxx> +#include <svx/xlnedwit.hxx> +#include <svx/xlnstit.hxx> +#include <svx/xlnstwit.hxx> +#include <svx/xlntrit.hxx> +#include <svx/xlnwtit.hxx> +#include <svx/xpoly.hxx> +#include <svx/xtable.hxx> +#include <tablemodel.hxx> +#endif // PCH_LEVEL >= 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/polygn3d.hxx b/svx/inc/polygn3d.hxx new file mode 100644 index 000000000..a97104cc4 --- /dev/null +++ b/svx/inc/polygn3d.hxx @@ -0,0 +1,69 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <config_options.h> +#include <svx/obj3d.hxx> +#include <svx/svxdllapi.h> + +class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) E3dPolygonObj final : public E3dCompoundObject +{ + // parameters + basegfx::B3DPolyPolygon aPolyPoly3D; + basegfx::B3DPolyPolygon aPolyNormals3D; + basegfx::B2DPolyPolygon aPolyTexture2D; + bool bLineOnly; + + SVX_DLLPRIVATE void CreateDefaultNormals(); + SVX_DLLPRIVATE void CreateDefaultTexture(); + + virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override; + + // protected destructor + virtual ~E3dPolygonObj() override; + +public: + void SetPolyPolygon3D(const basegfx::B3DPolyPolygon& rNewPolyPoly3D); + void SetPolyNormals3D(const basegfx::B3DPolyPolygon& rNewPolyPoly3D); + void SetPolyTexture2D(const basegfx::B2DPolyPolygon& rNewPolyPoly2D); + + E3dPolygonObj( + SdrModel& rSdrModel, + const basegfx::B3DPolyPolygon& rPolyPoly3D); + E3dPolygonObj(SdrModel& rSdrModel); + + const basegfx::B3DPolyPolygon& GetPolyPolygon3D() const { return aPolyPoly3D; } + const basegfx::B3DPolyPolygon& GetPolyNormals3D() const { return aPolyNormals3D; } + const basegfx::B2DPolyPolygon& GetPolyTexture2D() const { return aPolyTexture2D; } + + virtual sal_uInt16 GetObjIdentifier() const override; + virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override; + + virtual E3dPolygonObj* CloneSdrObject(SdrModel& rTargetModel) const override; + + // implemented mainly for the purposes of Clone() + E3dPolygonObj& operator=(const E3dPolygonObj& rObj); + + // LineOnly? + bool GetLineOnly() const { return bLineOnly; } + void SetLineOnly(bool bNew); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/rotationstrings.hrc b/svx/inc/rotationstrings.hrc new file mode 100644 index 000000000..229f2bee5 --- /dev/null +++ b/svx/inc/rotationstrings.hrc @@ -0,0 +1,26 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_SVX_INC_ROTATIONSTRINGS_HRC +#define INCLUDED_SVX_INC_ROTATIONSTRINGS_HRC + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +const char* RID_SVXITEMS_ROTATE_MODE[] = +{ + // enum SvxRotateMode ---------------------------------------------------- + NC_("RID_SVXITEMS_ROTATE_MODE_STANDARD", "Rotation only within cell"), + NC_("RID_SVXITEMS_ROTATE_MODE_TOP", "From upper cell edge"), + NC_("RID_SVXITEMS_ROTATE_MODE_CENTER", "From vertical middle cell"), + NC_("RID_SVXITEMS_ROTATE_MODE_BOTTOM", "From lower cell edge"), +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/samecontent.hrc b/svx/inc/samecontent.hrc new file mode 100644 index 000000000..b4a6bc8d6 --- /dev/null +++ b/svx/inc/samecontent.hrc @@ -0,0 +1,26 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef INCLUDED_SVX_INC_SPACING_HRC +#define INCLUDED_SVX_INC_SPACING_HRC + +#include <utility> + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +const std::pair<const char*, int> RID_SVXSTRARY_SAMECONTENT[] = +{ + { NC_("RID_SVXSTRARY_SAMECONTENT", "All Pages"), 0 }, + { NC_("RID_SVXSTRARY_SAMECONTENT", "First Page"), 1 }, + { NC_("RID_SVXSTRARY_SAMECONTENT", "Left and Right Pages"), 2 }, + { NC_("RID_SVXSTRARY_SAMECONTENT", "First, Left and Right Pages"), 3 } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/svx/inc/sdgcoitm.hxx b/svx/inc/sdgcoitm.hxx new file mode 100644 index 000000000..7d77643ae --- /dev/null +++ b/svx/inc/sdgcoitm.hxx @@ -0,0 +1,69 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <config_options.h> +#include <svx/sdprcitm.hxx> +#include <svx/svddef.hxx> +#include <svx/svxdllapi.h> + + +// SdrGrafRedItem - + + +class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SdrGrafRedItem : public SdrSignedPercentItem +{ +public: + + + SdrGrafRedItem( short nRedPercent = 0 ) : SdrSignedPercentItem( SDRATTR_GRAFRED, nRedPercent ) {} + + virtual SdrGrafRedItem* Clone( SfxItemPool* pPool = nullptr ) const override; +}; + + +// SdrGrafGreenItem - + + +class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SdrGrafGreenItem : public SdrSignedPercentItem +{ +public: + + + SdrGrafGreenItem( short nGreenPercent = 0 ) : SdrSignedPercentItem( SDRATTR_GRAFGREEN, nGreenPercent ) {} + + virtual SdrGrafGreenItem* Clone( SfxItemPool* pPool = nullptr ) const override; +}; + + +// SdrGrafBlueItem - + + +class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SdrGrafBlueItem : public SdrSignedPercentItem +{ +public: + + + SdrGrafBlueItem( short nBluePercent = 0 ) : SdrSignedPercentItem( SDRATTR_GRAFBLUE, nBluePercent ) {} + + virtual SdrGrafBlueItem* Clone( SfxItemPool* pPool = nullptr ) const override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdginitm.hxx b/svx/inc/sdginitm.hxx new file mode 100644 index 000000000..ef5ef1a02 --- /dev/null +++ b/svx/inc/sdginitm.hxx @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svx/sdooitm.hxx> +#include <svx/svddef.hxx> + + +// SdrGrafInvertItem - + + +class SdrGrafInvertItem : public SdrOnOffItem +{ +public: + + + SdrGrafInvertItem( bool bInvert = false ) : SdrOnOffItem( SDRATTR_GRAFINVERT, bInvert ) {} + + virtual SdrGrafInvertItem* Clone( SfxItemPool* pPool = nullptr ) const override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdgtritm.hxx b/svx/inc/sdgtritm.hxx new file mode 100644 index 000000000..001e30e7d --- /dev/null +++ b/svx/inc/sdgtritm.hxx @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <config_options.h> +#include <svx/sdprcitm.hxx> +#include <svx/svddef.hxx> +#include <svx/svxdllapi.h> + + +// SdrGrafTransparenceItem - + + +class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SdrGrafTransparenceItem : public SdrPercentItem +{ +public: + + SdrGrafTransparenceItem( sal_uInt16 nTransparencePercent = 0 ) : SdrPercentItem( SDRATTR_GRAFTRANSPARENCE, nTransparencePercent ) {} + + virtual SdrGrafTransparenceItem* Clone( SfxItemPool* pPool = nullptr ) const override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdreffectstextattribute.hxx b/svx/inc/sdr/attribute/sdreffectstextattribute.hxx new file mode 100644 index 000000000..7a209c739 --- /dev/null +++ b/svx/inc/sdr/attribute/sdreffectstextattribute.hxx @@ -0,0 +1,69 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <drawinglayer/attribute/sdrshadowattribute.hxx> +#include <sdr/attribute/sdrtextattribute.hxx> +#include <drawinglayer/attribute/sdrglowattribute.hxx> + + +namespace drawinglayer +{ + namespace attribute + { + class SdrEffectsTextAttribute + { + // shadow and text attributes + SdrShadowAttribute maShadow; // shadow attributes (if used) + SdrTextAttribute maTextAttribute; // text and text attributes (if used) + + // glow effect + SdrGlowAttribute maGlow; + + // soft edge + sal_Int32 mnSoftEdgeRadius = 0; + + public: + SdrEffectsTextAttribute( + const SdrShadowAttribute& rShadow, + const SdrTextAttribute& rTextAttribute, + const SdrGlowAttribute& rGlow, + sal_Int32 nSoftEdgeRadius); + SdrEffectsTextAttribute(); + SdrEffectsTextAttribute(const SdrEffectsTextAttribute& rCandidate); + SdrEffectsTextAttribute& operator=(const SdrEffectsTextAttribute& rCandidate); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrEffectsTextAttribute& rCandidate) const; + + // data access + const SdrShadowAttribute& getShadow() const { return maShadow; } + const SdrTextAttribute& getText() const { return maTextAttribute; } + const SdrGlowAttribute& getGlow() const { return maGlow; } + sal_Int32 getSoftEdgeRadius() const { return mnSoftEdgeRadius; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrfilltextattribute.hxx b/svx/inc/sdr/attribute/sdrfilltextattribute.hxx new file mode 100644 index 000000000..bef9d5430 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrfilltextattribute.hxx @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFILLTEXTATTRIBUTE_HXX +#define INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFILLTEXTATTRIBUTE_HXX + +#include <drawinglayer/attribute/sdrfillattribute.hxx> +#include <drawinglayer/attribute/fillgradientattribute.hxx> +#include <sdr/attribute/sdrtextattribute.hxx> + + +namespace drawinglayer +{ + namespace attribute + { + class SdrFillTextAttribute + { + // shadow and text attributes + SdrFillAttribute maFill; // fill attributes (if used) + FillGradientAttribute maFillFloatTransGradient; // fill float transparence gradient (if used) + SdrTextAttribute maTextAttribute; // text and text attributes (if used) + + public: + SdrFillTextAttribute( + const SdrFillAttribute& rFill, + const FillGradientAttribute& rFillFloatTransGradient, + const SdrTextAttribute& rTextAttribute); + SdrFillTextAttribute(); + SdrFillTextAttribute(const SdrFillTextAttribute& rCandidate); + SdrFillTextAttribute& operator=(const SdrFillTextAttribute& rCandidate); + + // compare operator + bool operator==(const SdrFillTextAttribute& rCandidate) const; + + // data access + const SdrFillAttribute& getFill() const { return maFill; } + const FillGradientAttribute& getFillFloatTransGradient() const { return maFillFloatTransGradient; } + const SdrTextAttribute& getText() const { return maTextAttribute; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFILLTEXTATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrformtextattribute.hxx b/svx/inc/sdr/attribute/sdrformtextattribute.hxx new file mode 100644 index 000000000..06b0fd363 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrformtextattribute.hxx @@ -0,0 +1,83 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sal/types.h> +#include <svx/xenum.hxx> +#include <tools/color.hxx> +#include <o3tl/cow_wrapper.hxx> + +// predefines + +class SfxItemSet; + +namespace drawinglayer::attribute { + class ImpSdrFormTextAttribute; + class SdrFormTextOutlineAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class SdrFormTextAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrFormTextAttribute > ImplType; + + private: + ImplType mpSdrFormTextAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrFormTextAttribute(const SfxItemSet& rSet); + SdrFormTextAttribute(); + SdrFormTextAttribute(const SdrFormTextAttribute& rCandidate); + SdrFormTextAttribute(SdrFormTextAttribute&& rCandidate) noexcept; + SdrFormTextAttribute& operator=(const SdrFormTextAttribute& rCandidate); + SdrFormTextAttribute& operator=(SdrFormTextAttribute&& rCandidate) noexcept; + ~SdrFormTextAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrFormTextAttribute& rCandidate) const; + + // data read access + sal_Int32 getFormTextDistance() const; + sal_Int32 getFormTextStart() const; + sal_Int32 getFormTextShdwXVal() const; + sal_Int32 getFormTextShdwYVal() const; + XFormTextStyle getFormTextStyle() const; + XFormTextAdjust getFormTextAdjust() const; + XFormTextShadow getFormTextShadow() const; + Color const & getFormTextShdwColor() const; + const SdrFormTextOutlineAttribute& getOutline() const; + const SdrFormTextOutlineAttribute& getShadowOutline() const; + bool getFormTextMirror() const; + bool getFormTextOutline() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx b/svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx new file mode 100644 index 000000000..826475ed9 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX +#define INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX + +#include <sal/types.h> +#include <o3tl/cow_wrapper.hxx> + +// predefines + +namespace drawinglayer::attribute { + class ImpSdrFormTextOutlineAttribute; + class LineAttribute; + class StrokeAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class SdrFormTextOutlineAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrFormTextOutlineAttribute > ImplType; + + private: + ImplType mpSdrFormTextOutlineAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrFormTextOutlineAttribute( + const LineAttribute& rLineAttribute, + const StrokeAttribute& rStrokeAttribute, + sal_uInt8 nTransparence); + SdrFormTextOutlineAttribute(); + SdrFormTextOutlineAttribute(const SdrFormTextOutlineAttribute& rCandidate); + SdrFormTextOutlineAttribute& operator=(const SdrFormTextOutlineAttribute& rCandidate); + SdrFormTextOutlineAttribute& operator=(SdrFormTextOutlineAttribute&& rCandidate) noexcept; + ~SdrFormTextOutlineAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrFormTextOutlineAttribute& rCandidate) const; + + // data read access + const LineAttribute& getLineAttribute() const; + const StrokeAttribute& getStrokeAttribute() const; + sal_uInt8 getTransparence() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx b/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx new file mode 100644 index 000000000..c53650bfc --- /dev/null +++ b/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sdr/attribute/sdreffectstextattribute.hxx> +#include <drawinglayer/attribute/sdrglowattribute.hxx> +#include <drawinglayer/attribute/sdrlineattribute.hxx> +#include <drawinglayer/attribute/sdrlinestartendattribute.hxx> + + +namespace drawinglayer +{ + namespace attribute + { + class SdrLineEffectsTextAttribute : public SdrEffectsTextAttribute + { + // line, shadow, lineStartEnd and text attributes + SdrLineAttribute maLine; // line attributes (if used) + SdrLineStartEndAttribute maLineStartEnd; // line start end (if used) + + public: + SdrLineEffectsTextAttribute( + const SdrLineAttribute& rLine, + const SdrLineStartEndAttribute& rLineStartEnd, + const SdrShadowAttribute& rShadow, + const SdrTextAttribute& rTextAttribute, + const SdrGlowAttribute& rGlow, + sal_Int32 nSoftEdgeRadius); + SdrLineEffectsTextAttribute(); + SdrLineEffectsTextAttribute(const SdrLineEffectsTextAttribute& rCandidate); + SdrLineEffectsTextAttribute& operator=(const SdrLineEffectsTextAttribute& rCandidate); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrLineEffectsTextAttribute& rCandidate) const; + + // data access + const SdrLineAttribute& getLine() const { return maLine; } + const SdrLineStartEndAttribute& getLineStartEnd() const { return maLineStartEnd; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx b/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx new file mode 100644 index 000000000..7fb25a4f5 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sdr/attribute/sdrlineeffectstextattribute.hxx> +#include <drawinglayer/attribute/sdrfillattribute.hxx> +#include <drawinglayer/attribute/fillgradientattribute.hxx> + + +namespace drawinglayer +{ + namespace attribute + { + class SdrLineFillEffectsTextAttribute : public SdrLineEffectsTextAttribute + { + // add fill and transGradient attributes + SdrFillAttribute maFill; // fill attributes (if used) + FillGradientAttribute maFillFloatTransGradient; // fill float transparence gradient (if used) + + public: + SdrLineFillEffectsTextAttribute( + const SdrLineAttribute& rLine, + const SdrFillAttribute& rFill, + const SdrLineStartEndAttribute& rLineStartEnd, + const SdrShadowAttribute& rShadow, + const FillGradientAttribute& rFillFloatTransGradient, + const SdrTextAttribute& rTextAttribute, + const SdrGlowAttribute& rGlow, + sal_Int32 nSoftEdgeRadius); + SdrLineFillEffectsTextAttribute(); + SdrLineFillEffectsTextAttribute(const SdrLineFillEffectsTextAttribute& rCandidate); + SdrLineFillEffectsTextAttribute& operator=(const SdrLineFillEffectsTextAttribute& rCandidate); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrLineFillEffectsTextAttribute& rCandidate) const; + + // data access + const SdrFillAttribute& getFill() const { return maFill; } + const FillGradientAttribute& getFillFloatTransGradient() const { return maFillFloatTransGradient; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrtextattribute.hxx b/svx/inc/sdr/attribute/sdrtextattribute.hxx new file mode 100644 index 000000000..5cb40ebb0 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrtextattribute.hxx @@ -0,0 +1,118 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sal/types.h> +#include <svx/xenum.hxx> +#include <editeng/outlobj.hxx> +#include <svx/sdtaitm.hxx> +#include <o3tl/cow_wrapper.hxx> + +// predefines + +class SdrText; +namespace drawinglayer::animation { class AnimationEntryList; } +namespace drawinglayer::attribute { class SdrFormTextAttribute; } +namespace drawinglayer::attribute { class ImpSdrTextAttribute; } + + +namespace drawinglayer +{ + namespace attribute + { + class SdrTextAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrTextAttribute > ImplType; + + private: + ImplType mpSdrTextAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrTextAttribute( + const SdrText& rSdrText, + const OutlinerParaObject& rOutlinerParaObject, + XFormTextStyle eFormTextStyle, + sal_Int32 aTextLeftDistance, + sal_Int32 aTextUpperDistance, + sal_Int32 aTextRightDistance, + sal_Int32 aTextLowerDistance, + SdrTextHorzAdjust aSdrTextHorzAdjust, + SdrTextVertAdjust aSdrTextVertAdjust, + bool bContour, + bool bFitToSize, + bool bAutoFit, + bool bHideContour, + bool bBlink, + bool bScroll, + bool bInEditMode, + bool bFixedCellHeight, + bool bWrongSpell, + bool bChainable); + + SdrTextAttribute(); + SdrTextAttribute(const SdrTextAttribute& rCandidate); + SdrTextAttribute(SdrTextAttribute&& rCandidate) noexcept; + SdrTextAttribute& operator=(const SdrTextAttribute& rCandidate); + SdrTextAttribute& operator=(SdrTextAttribute&& rCandidate) noexcept; + ~SdrTextAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrTextAttribute& rCandidate) const; + + // data read access + const SdrText& getSdrText() const; + const OutlinerParaObject& getOutlinerParaObject() const; + bool isContour() const; + bool isFitToSize() const; + bool isAutoFit() const; + bool isHideContour() const; + bool isBlink() const; + bool isScroll() const; + bool isInEditMode() const; + bool isFixedCellHeight() const; + const SdrFormTextAttribute& getSdrFormTextAttribute() const; + sal_Int32 getTextLeftDistance() const; + sal_Int32 getTextUpperDistance() const; + sal_Int32 getTextRightDistance() const; + sal_Int32 getTextLowerDistance() const; + SdrTextHorzAdjust getSdrTextHorzAdjust() const; + SdrTextVertAdjust getSdrTextVertAdjust() const; + + bool isChainable() const; + + + // helpers: animation timing generators + void getBlinkTextTiming( + drawinglayer::animation::AnimationEntryList& rAnimList) const; + void getScrollTextTiming( + drawinglayer::animation::AnimationEntryList& rAnimList, + double fFrameLength, + double fTextLength) const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/objectcontactofobjlistpainter.hxx b/svx/inc/sdr/contact/objectcontactofobjlistpainter.hxx new file mode 100644 index 000000000..724855d8b --- /dev/null +++ b/svx/inc/sdr/contact/objectcontactofobjlistpainter.hxx @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <config_options.h> +#include <svx/sdr/contact/objectcontact.hxx> +#include <svx/svxdllapi.h> +#include <svx/svdpage.hxx> +#include <tools/weakbase.hxx> + +class SdrPage; +class SdrObject; + +namespace sdr::contact { + +class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) ObjectContactPainter : public ObjectContact +{ +protected: + // Hierarchy access methods + virtual sal_uInt32 GetPaintObjectCount() const = 0; + virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) = 0; + +public: + // basic constructor/destructor + ObjectContactPainter(); + virtual ~ObjectContactPainter() override; +}; + +// typedef for transferring SdrObject +typedef ::std::vector< SdrObject* > SdrObjectVector; + +class SVXCORE_DLLPUBLIC ObjectContactOfObjListPainter final : public ObjectContactPainter +{ + // Target OutputDevice + OutputDevice& mrTargetOutputDevice; + + // Set StartPoint for next run, also given in constructor + SdrObjectVector maStartObjects; + + // the processed page which is the base e.g. for PageNumberFields + const SdrPage* mpProcessedPage; + + // Hierarchy access methods + virtual sal_uInt32 GetPaintObjectCount() const override; + virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) override; + +public: + // basic constructor/destructor + ObjectContactOfObjListPainter( + OutputDevice& rTargetDevice, + const SdrObjectVector& rObjects, + const SdrPage* pProcessedPage); + virtual ~ObjectContactOfObjListPainter() override; + + // Process the whole displaying + virtual void ProcessDisplay(DisplayInfo& rDisplayInfo) override; + + // recording MetaFile? Default is false + virtual bool isOutputToRecordingMetaFile() const override; + + // pdf export? Default is false + virtual bool isOutputToPDFFile() const override; + + virtual OutputDevice* TryToGetOutputDevice() const override; +}; + +class ObjectContactOfPagePainter : public ObjectContactPainter +{ + // the original ObjectContact this painter is working on + ObjectContact& mrOriginalObjectContact; + + // Set StartPoint for next run, also given in constructor + tools::WeakReference<SdrPage> mxStartPage; + +protected: + // Hierarchy access methods + virtual sal_uInt32 GetPaintObjectCount() const override; + virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) override; + +public: + // basic constructor + ObjectContactOfPagePainter(ObjectContact& rOriginalObjectContact); + virtual ~ObjectContactOfPagePainter() override; + + // set another page + void SetStartPage(const SdrPage* pPage); + const SdrPage* GetStartPage() const { return mxStartPage.get(); } + SdrPage* GetStartPage() { return mxStartPage.get(); } + + virtual OutputDevice* TryToGetOutputDevice() const override; +}; + +} + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofe3d.hxx b/svx/inc/sdr/contact/viewcontactofe3d.hxx new file mode 100644 index 000000000..982d28752 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofe3d.hxx @@ -0,0 +1,92 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svx/obj3d.hxx> +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> +#include <drawinglayer/primitive3d/baseprimitive3d.hxx> + +namespace drawinglayer::attribute { class SdrLineAttribute; } +namespace basegfx { + class BColor; + class B3DHomMatrix; +} + +namespace sdr::contact { + +class ViewContactOfE3dScene; + +class ViewContactOfE3d : public ViewContactOfSdrObj +{ +protected: + // Create an Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + +public: + // basic constructor, used from E3dObject. + explicit ViewContactOfE3d(E3dObject& rObj); + virtual ~ViewContactOfE3d() override; + + // access to E3dObject + const E3dObject& GetE3dObject() const + { + return static_cast<const E3dObject&>(GetSdrObject()); + } + + // public helpers + drawinglayer::primitive2d::Primitive2DContainer impCreateWithGivenPrimitive3DContainer( + const drawinglayer::primitive3d::Primitive3DContainer& rxContent3D) const; + + + // primitive stuff + + // Primitive3DContainer of the ViewContact. This contains all necessary information + // for the graphical visualisation and needs to be supported by all 3D VCs which + // can be visualized. It does NOT contain the object transformation to be able to + // buffer for all possible usages + drawinglayer::primitive3d::Primitive3DContainer mxViewIndependentPrimitive3DContainer; + +protected: + // This method is responsible for creating the graphical visualisation data which is + // stored in mxViewIndependentPrimitive3DContainer, but without object transformation + virtual drawinglayer::primitive3d::Primitive3DContainer createViewIndependentPrimitive3DContainer() const = 0; + + // This method is responsible for creating the graphical visualisation data derived ONLY from + // the model data. The default implementation will try to create a 3D to 2D embedding (will work + // when scene is known) which can then be used for 2D processing concerning ranges + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + +public: + // access to the local primitive without the object's local 3D transform. This is e.g. needed + // to get the not-yet transformed BoundVolume for e.g. interactions + drawinglayer::primitive3d::Primitive3DContainer const & getVIP3DSWithoutObjectTransform() const; + + // access to the local primitive. This will ensure that the list is + // current in comparing the local list content with a fresh created incarnation. It will + // use getVIP3DSWithoutObjectTransform and embed to 3d transform primitive when object's + // local 3d transform is used + drawinglayer::primitive3d::Primitive3DContainer getViewIndependentPrimitive3DContainer() const; +}; + +} + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofe3dcube.hxx b/svx/inc/sdr/contact/viewcontactofe3dcube.hxx new file mode 100644 index 000000000..933bc8d14 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofe3dcube.hxx @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DCUBE_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DCUBE_HXX + +#include <sdr/contact/viewcontactofe3d.hxx> +#include <svx/cube3d.hxx> + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3dCube final : public ViewContactOfE3d + { + public: + // basic constructor, used from SdrObject. + ViewContactOfE3dCube(E3dCubeObj& rCubeObj); + virtual ~ViewContactOfE3dCube() override; + + // access to SdrObject + const E3dCubeObj& GetE3dCubeObj() const + { + return static_cast<const E3dCubeObj&>(GetE3dObject()); + } + + private: + // This method is responsible for creating the graphical visualisation data which is + // stored in the local primitive list. Default creates a yellow replacement rectangle. + virtual drawinglayer::primitive3d::Primitive3DContainer createViewIndependentPrimitive3DContainer() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DCUBE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofe3dextrude.hxx b/svx/inc/sdr/contact/viewcontactofe3dextrude.hxx new file mode 100644 index 000000000..0d96fb989 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofe3dextrude.hxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DEXTRUDE_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DEXTRUDE_HXX + +#include <sdr/contact/viewcontactofe3d.hxx> +#include <extrud3d.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3dExtrude final : public ViewContactOfE3d + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfE3dExtrude(E3dExtrudeObj& rExtrude); + virtual ~ViewContactOfE3dExtrude() override; + + // access to SdrObject + const E3dExtrudeObj& GetE3dExtrudeObj() const + { + return static_cast<const E3dExtrudeObj&>(GetE3dObject()); + } + + private: + // This method is responsible for creating the graphical visualisation data which is + // stored in the local primitive list. Default creates a yellow replacement rectangle. + virtual drawinglayer::primitive3d::Primitive3DContainer createViewIndependentPrimitive3DContainer() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DEXTRUDE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofe3dlathe.hxx b/svx/inc/sdr/contact/viewcontactofe3dlathe.hxx new file mode 100644 index 000000000..00e42754f --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofe3dlathe.hxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DLATHE_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DLATHE_HXX + +#include <sdr/contact/viewcontactofe3d.hxx> +#include <svx/lathe3d.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3dLathe final : public ViewContactOfE3d + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfE3dLathe(E3dLatheObj& rLathe); + virtual ~ViewContactOfE3dLathe() override; + + // access to SdrObject + const E3dLatheObj& GetE3dLatheObj() const + { + return static_cast<const E3dLatheObj&>(GetE3dObject()); + } + + private: + // This method is responsible for creating the graphical visualisation data which is + // stored in the local primitive list. Default creates a yellow replacement rectangle. + virtual drawinglayer::primitive3d::Primitive3DContainer createViewIndependentPrimitive3DContainer() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DLATHE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofe3dpolygon.hxx b/svx/inc/sdr/contact/viewcontactofe3dpolygon.hxx new file mode 100644 index 000000000..16116cc19 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofe3dpolygon.hxx @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DPOLYGON_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DPOLYGON_HXX + +#include <sdr/contact/viewcontactofe3d.hxx> +#include <polygn3d.hxx> + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3dPolygon final : public ViewContactOfE3d + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfE3dPolygon(E3dPolygonObj& rPolygon); + virtual ~ViewContactOfE3dPolygon() override; + + // access to SdrObject + const E3dPolygonObj& GetE3dPolygonObj() const + { + return static_cast<const E3dPolygonObj&>(GetE3dObject()); + } + + // This method is responsible for creating the graphical visualisation data which is + // stored in the local primitive list. Default creates a yellow replacement rectangle. + virtual drawinglayer::primitive3d::Primitive3DContainer createViewIndependentPrimitive3DContainer() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DPOLYGON_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofe3dsphere.hxx b/svx/inc/sdr/contact/viewcontactofe3dsphere.hxx new file mode 100644 index 000000000..78d9a7ca7 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofe3dsphere.hxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DSPHERE_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DSPHERE_HXX + +#include <sdr/contact/viewcontactofe3d.hxx> +#include <svx/sphere3d.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewContactOfE3dSphere final : public ViewContactOfE3d + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfE3dSphere(E3dSphereObj& rSphere); + virtual ~ViewContactOfE3dSphere() override; + + // access to SdrObject + const E3dSphereObj& GetE3dSphereObj() const + { + return static_cast<const E3dSphereObj&>(GetE3dObject()); + } + + private: + // This method is responsible for creating the graphical visualisation data which is + // stored in the local primitive list. Default creates a yellow replacement rectangle. + virtual drawinglayer::primitive3d::Primitive3DContainer createViewIndependentPrimitive3DContainer() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFE3DSPHERE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofgraphic.hxx b/svx/inc/sdr/contact/viewcontactofgraphic.hxx new file mode 100644 index 000000000..fa2138adb --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofgraphic.hxx @@ -0,0 +1,77 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFGRAPHIC_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFGRAPHIC_HXX + +#include <sdr/contact/viewcontactoftextobj.hxx> +#include <svx/svdograf.hxx> + +namespace drawinglayer::attribute { class SdrLineFillEffectsTextAttribute; } +class GraphicAttr; + +namespace sdr +{ + namespace contact + { + class ViewContactOfGraphic final : public ViewContactOfTextObj + { + private: + // helpers for constructing various primitive visualisations in various states + drawinglayer::primitive2d::Primitive2DContainer createVIP2DSForPresObj( + const basegfx::B2DHomMatrix& rObjectMatrix, + const drawinglayer::attribute::SdrLineFillEffectsTextAttribute& rAttribute) const; + drawinglayer::primitive2d::Primitive2DContainer createVIP2DSForDraft( + const basegfx::B2DHomMatrix& rObjectMatrix, + const drawinglayer::attribute::SdrLineFillEffectsTextAttribute& rAttribute) const; + + // Create an Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + + public: + // access to SdrObject + const SdrGrafObj& GetGrafObject() const + { + return static_cast<const SdrGrafObj&>(GetSdrObject()); + } + SdrGrafObj& GetGrafObject() + { + return static_cast<SdrGrafObj&>(GetSdrObject()); + } + + // basic constructor, destructor + explicit ViewContactOfGraphic(SdrGrafObj& rGrafObj); + virtual ~ViewContactOfGraphic() override; + + // helpers for visualisation state + bool visualisationUsesPresObj() const; + bool visualisationUsesDraft() const; + + private: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + }; + } // end of namespace contact +} // end of namespace sdr + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFGRAPHIC_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofgroup.hxx b/svx/inc/sdr/contact/viewcontactofgroup.hxx new file mode 100644 index 000000000..2e952d3bb --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofgroup.hxx @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFGROUP_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFGROUP_HXX + +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> +#include <svx/svdogrp.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewContactOfGroup final : public ViewContactOfSdrObj + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfGroup(SdrObjGroup& rGroup); + virtual ~ViewContactOfGroup() override; + + private: + // Create an Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. Default is to create + // a standard ViewObjectContact containing the given ObjectContact and *this + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + + // internal access to SdrObject + const SdrObjGroup& GetSdrObjGroup() const + { + return static_cast<const SdrObjGroup&>(GetSdrObject()); + } + + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFGROUP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx b/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx new file mode 100644 index 000000000..5b3823508 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofmasterpagedescriptor.hxx @@ -0,0 +1,70 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFMASTERPAGEDESCRIPTOR_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFMASTERPAGEDESCRIPTOR_HXX + +#include <sal/types.h> +#include <svx/sdr/contact/viewcontact.hxx> +#include <svx/sdrmasterpagedescriptor.hxx> + +class SfxItemSet; +class Bitmap; +class MapMode; + +namespace sdr +{ + namespace contact + { + class ViewContactOfMasterPageDescriptor final : public ViewContact + { + // the owner of this ViewContact. Set from constructor and not + // to be changed in any way. + sdr::MasterPageDescriptor& mrMasterPageDescriptor; + + // Create an Object-Specific ViewObjectContact + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + + // This method is responsible for creating the graphical visualisation data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + + public: + // basic constructor + explicit ViewContactOfMasterPageDescriptor(sdr::MasterPageDescriptor& rDescriptor); + + // The destructor. + virtual ~ViewContactOfMasterPageDescriptor() override; + + // access to MasterPageDescriptor + sdr::MasterPageDescriptor& GetMasterPageDescriptor() const + { + return mrMasterPageDescriptor; + } + + // Access to possible sub-hierarchy and parent + virtual sal_uInt32 GetObjectCount() const override; + virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const override; + virtual ViewContact* GetParentContact() const override; + }; + } // end of namespace contact +} // end of namespace sdr + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFMASTERPAGEDESCRIPTOR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofpageobj.hxx b/svx/inc/sdr/contact/viewcontactofpageobj.hxx new file mode 100644 index 000000000..e1cb66a8b --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofpageobj.hxx @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> +#include <svx/svxdllapi.h> +#include <svx/svdopage.hxx> + +class SdrPage; + +namespace sdr::contact { + +class ViewContactOfPageObj final : public ViewContactOfSdrObj +{ + // Create an Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + + // create graphical visualisation data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; +public: + // basic constructor, used from SdrObject. + explicit ViewContactOfPageObj(SdrPageObj& rPageObj); + virtual ~ViewContactOfPageObj() override; + + // #WIP# React on changes of the object of this ViewContact + virtual void ActionChanged() override; + + // access to SdrObject + const SdrPageObj& GetPageObj() const + { + return static_cast<const SdrPageObj&>(GetSdrObject()); + } +}; + +} + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx new file mode 100644 index 000000000..6e2f07b5a --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofsdrcaptionobj.hxx @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRCAPTIONOBJ_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRCAPTIONOBJ_HXX + +#include <sdr/contact/viewcontactofsdrrectobj.hxx> +#include <svx/svdocapt.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrCaptionObj final : public ViewContactOfSdrRectObj + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrCaptionObj(SdrCaptionObj& rCaptionObj); + virtual ~ViewContactOfSdrCaptionObj() override; + + private: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRCAPTIONOBJ_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx new file mode 100644 index 000000000..64972ebee --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofsdrcircobj.hxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRCIRCOBJ_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRCIRCOBJ_HXX + +#include <sdr/contact/viewcontactofsdrrectobj.hxx> +#include <svx/svdocirc.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrCircObj final : public ViewContactOfSdrRectObj + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrCircObj(SdrCircObj& rCircObj); + virtual ~ViewContactOfSdrCircObj() override; + + private: + // internal access to SdrCircObj + const SdrCircObj& GetCircObj() const + { + return static_cast<const SdrCircObj&>(GetSdrObject()); + } + + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRCIRCOBJ_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx b/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx new file mode 100644 index 000000000..fb22bf97d --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofsdredgeobj.hxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDREDGEOBJ_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDREDGEOBJ_HXX + +#include <sdr/contact/viewcontactoftextobj.hxx> +#include <svx/svdoedge.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrEdgeObj final : public ViewContactOfTextObj + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrEdgeObj(SdrEdgeObj& rEdgeObj); + virtual ~ViewContactOfSdrEdgeObj() override; + + private: + // internal access to SdrEdgeObj + const SdrEdgeObj& GetEdgeObj() const + { + return static_cast<const SdrEdgeObj&>(GetSdrObject()); + } + + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDREDGEOBJ_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx new file mode 100644 index 000000000..caeaa283c --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofsdrmeasureobj.hxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRMEASUREOBJ_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRMEASUREOBJ_HXX + +#include <sdr/contact/viewcontactoftextobj.hxx> +#include <svx/svdomeas.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrMeasureObj final : public ViewContactOfTextObj + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrMeasureObj(SdrMeasureObj& rMeasureObj); + virtual ~ViewContactOfSdrMeasureObj() override; + + private: + // internal access to SdrMeasureObj + const SdrMeasureObj& GetMeasureObj() const + { + return static_cast<const SdrMeasureObj&>(GetSdrObject()); + } + + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRMEASUREOBJ_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx b/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx new file mode 100644 index 000000000..9834de646 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofsdrobjcustomshape.hxx @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDROBJCUSTOMSHAPE_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDROBJCUSTOMSHAPE_HXX + +#include <sdr/contact/viewcontactoftextobj.hxx> +#include <svx/svdoashp.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrObjCustomShape final : public ViewContactOfTextObj + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrObjCustomShape(SdrObjCustomShape& rCustomShape); + virtual ~ViewContactOfSdrObjCustomShape() override; + + private: + // internal access to SdrObjCustomShape + const SdrObjCustomShape& GetCustomShapeObj() const + { + return static_cast<const SdrObjCustomShape&>(GetSdrObject()); + } + + // #i101684# internal tooling + basegfx::B2DRange getCorrectedTextBoundRect() const; + + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDROBJCUSTOMSHAPE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx new file mode 100644 index 000000000..7a79e3ee4 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx @@ -0,0 +1,77 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX + +#include <sdr/contact/viewcontactofsdrrectobj.hxx> +#include <svx/svdoole2.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> + +class Graphic; + +namespace sdr::contact { + +class ViewContactOfSdrOle2Obj final : public ViewContactOfSdrRectObj +{ +private: + // #i123539# allow local buffering of chart data (if chart) + drawinglayer::primitive2d::Primitive2DReference mxChartContent; + + // Create an Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + +public: + // access to SdrOle2Obj + const SdrOle2Obj& GetOle2Obj() const + { + return static_cast<const SdrOle2Obj&>(GetSdrObject()); + } + + /// helper to create transformation from SdrObject + basegfx::B2DHomMatrix createObjectTransform() const; + + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrOle2Obj(SdrOle2Obj& rOle2Obj); + virtual ~ViewContactOfSdrOle2Obj() override; + + // helper for creating an OLE sequence for this object. It takes care od attributes, needed + // scaling (e.g. for EmptyPresObj's), the correct graphic and other stuff. It is used from + // createViewIndependentPrimitive2DSequence with false, and with evtl. HighContrast true + // from the VOC which knows that + drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceWithParameters() const; + + // #i123539# get rid of buffered chart content (if there) on change + virtual void ActionChanged() override; + + virtual basegfx::B2DRange getRange( const drawinglayer::geometry::ViewInformation2D& rViewInfo2D ) const override; + +private: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data, just wraps to call createPrimitive2DSequenceWithParameters(false) + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; +}; + +} + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx new file mode 100644 index 000000000..4168d1aa7 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx @@ -0,0 +1,205 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX + +#include <sal/types.h> +#include <svx/sdr/contact/viewcontact.hxx> + +class SdrPage; + +namespace sdr::contact { + +class ViewContactOfSdrPage; + +class ViewContactOfPageSubObject : public ViewContact +{ + ViewContactOfSdrPage& mrParentViewContactOfSdrPage; + +public: + explicit ViewContactOfPageSubObject(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfPageSubObject() override; + + virtual ViewContact* GetParentContact() const override; + const SdrPage& getPage() const; +}; + +class ViewContactOfPageBackground final : public ViewContactOfPageSubObject +{ + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + +public: + explicit ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfPageBackground() override; +}; + +class ViewContactOfPageShadow final : public ViewContactOfPageSubObject +{ + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + +public: + explicit ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfPageShadow() override; +}; + +class ViewContactOfPageFill final : public ViewContactOfPageSubObject +{ + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + +public: + explicit ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfPageFill() override; +}; + +class ViewContactOfMasterPage final : public ViewContactOfPageSubObject +{ + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + +public: + explicit ViewContactOfMasterPage(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfMasterPage() override; +}; + +class ViewContactOfOuterPageBorder final : public ViewContactOfPageSubObject +{ + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + +public: + explicit ViewContactOfOuterPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfOuterPageBorder() override; +}; + +class ViewContactOfInnerPageBorder final : public ViewContactOfPageSubObject +{ + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + +public: + explicit ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfInnerPageBorder() override; +}; + +/** + * This view contact corresponds with all SdrObject instances in a single + * SdrPage. Its GetObjectCount() returns the number of SdrObject instances + * in the SdrPage that it represents, and its GetViewContact() returns the + * view contact of the SdrObject instance associated with the identifier + * passed to the method. + */ +class ViewContactOfPageHierarchy final : public ViewContactOfPageSubObject +{ + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + +public: + explicit ViewContactOfPageHierarchy(ViewContactOfSdrPage& rParentViewContactOfSdrPage); + virtual ~ViewContactOfPageHierarchy() override; + + virtual sal_uInt32 GetObjectCount() const override; + virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const override; +}; + +class ViewContactOfGrid final : public ViewContactOfPageSubObject +{ + bool mbFront : 1; + + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + +public: + ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront); + virtual ~ViewContactOfGrid() override; + + bool getFront() const { return mbFront; } +}; + +class ViewContactOfHelplines final : public ViewContactOfPageSubObject +{ + bool mbFront : 1; + + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + +public: + ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront); + virtual ~ViewContactOfHelplines() override; + + bool getFront() const { return mbFront; } +}; + +class ViewContactOfSdrPage : public ViewContact +{ + // the owner of this ViewContact. Set from constructor and not + // to be changed in any way. + SdrPage& mrPage; + + // helper viewContacts to build a clear paint hierarchy + ViewContactOfPageBackground maViewContactOfPageBackground; + ViewContactOfPageShadow maViewContactOfPageShadow; + ViewContactOfPageFill maViewContactOfPageFill; + ViewContactOfMasterPage maViewContactOfMasterPage; + ViewContactOfOuterPageBorder maViewContactOfOuterPageBorder; + ViewContactOfInnerPageBorder maViewContactOfInnerPageBorder; + ViewContactOfGrid maViewContactOfGridBack; + ViewContactOfHelplines maViewContactOfHelplinesBack; + ViewContactOfPageHierarchy maViewContactOfPageHierarchy; + ViewContactOfGrid maViewContactOfGridFront; + ViewContactOfHelplines maViewContactOfHelplinesFront; + +protected: + // Create an Object-Specific ViewObjectContact, set ViewContact and + // ObjectContact. Always needs to return something. Default is to create + // a standard ViewObjectContact containing the given ObjectContact and *this + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; + +public: + // access to SdrObject + SdrPage& GetSdrPage() const + { + return mrPage; + } + + // basic constructor, used from SdrPage. + explicit ViewContactOfSdrPage(SdrPage& rObj); + virtual ~ViewContactOfSdrPage() override; + + // Access to possible sub-hierarchy + virtual sal_uInt32 GetObjectCount() const override; + virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const override; + + // React on changes of the object of this ViewContact + virtual void ActionChanged() override; + +protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; +}; + +} + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx new file mode 100644 index 000000000..f2055f74c --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofsdrpathobj.hxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRPATHOBJ_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRPATHOBJ_HXX + +#include <sdr/contact/viewcontactoftextobj.hxx> +#include <svx/svdopath.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewContactOfSdrPathObj final : public ViewContactOfTextObj + { + public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrPathObj(SdrPathObj& rTextObj); + virtual ~ViewContactOfSdrPathObj() override; + + private: + // internal access to SdrPathObj + const SdrPathObj& GetPathObj() const + { + return static_cast<const SdrPathObj&>(GetSdrObject()); + } + + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFSDRPATHOBJ_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofsdrrectobj.hxx b/svx/inc/sdr/contact/viewcontactofsdrrectobj.hxx new file mode 100644 index 000000000..b1de079e3 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofsdrrectobj.hxx @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sdr/contact/viewcontactoftextobj.hxx> +#include <svx/svdorect.hxx> + +namespace sdr::contact { + +class ViewContactOfSdrRectObj : public ViewContactOfTextObj +{ +protected: + // internal access to SdrRectObj + const SdrRectObj& GetRectObj() const + { + return static_cast<const SdrRectObj&>(GetSdrObject()); + } + +public: + // basic constructor, used from SdrObject. + explicit ViewContactOfSdrRectObj(SdrRectObj& rTextObj); + virtual ~ViewContactOfSdrRectObj() override; + +protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactoftextobj.hxx b/svx/inc/sdr/contact/viewcontactoftextobj.hxx new file mode 100644 index 000000000..132744d00 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactoftextobj.hxx @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> + +class SdrTextObj; + +namespace sdr::contact { + +class ViewContactOfTextObj : public ViewContactOfSdrObj +{ +public: + // basic constructor, used from SdrObject. + explicit ViewContactOfTextObj(SdrTextObj& rTextObj); + virtual ~ViewContactOfTextObj() override; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewcontactofunocontrol.hxx b/svx/inc/sdr/contact/viewcontactofunocontrol.hxx new file mode 100644 index 000000000..824051543 --- /dev/null +++ b/svx/inc/sdr/contact/viewcontactofunocontrol.hxx @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX + +#include <com/sun/star/uno/Reference.hxx> +#include <svx/sdr/contact/viewcontactofsdrobj.hxx> +#include <svx/svdouno.hxx> + +class OutputDevice; +namespace vcl { class Window; } +namespace com::sun::star { + namespace awt { + class XControl; + class XControlContainer; + } +} + + +namespace sdr::contact { + + + //= ViewContactOfUnoControl + + class ViewContactOfUnoControl : public ViewContactOfSdrObj + { + public: + // access to SdrObject + const SdrUnoObj& GetSdrUnoObj() const + { + return static_cast<const SdrUnoObj&>(GetSdrObject()); + } + + explicit ViewContactOfUnoControl( SdrUnoObj& _rUnoObject ); + virtual ~ViewContactOfUnoControl() override; + + /** retrieves a temporary XControl instance, whose parent is the given window + @seealso SdrUnoObj::GetTemporaryControlForWindow + */ + css::uno::Reference< css::awt::XControl > + getTemporaryControlForWindow( const vcl::Window& _rWindow, css::uno::Reference< css::awt::XControlContainer >& _inout_ControlContainer ) const; + + protected: + virtual ViewObjectContact& CreateObjectSpecificViewObjectContact( ObjectContact& _rObjectContact ) override; + + private: + ViewContactOfUnoControl( const ViewContactOfUnoControl& ) = delete; + ViewContactOfUnoControl& operator=( const ViewContactOfUnoControl& ) = delete; + + protected: + // This method is responsible for creating the graphical visualisation data + // ONLY based on model data + virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override; + }; + + +} // namespace sdr::contact + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx b/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx new file mode 100644 index 000000000..321bc4f8c --- /dev/null +++ b/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> +#include <drawinglayer/primitive3d/baseprimitive3d.hxx> + +namespace sdr::contact { + class ViewObjectContactOfE3dScene; +} + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfE3d final : public ViewObjectContactOfSdrObj + { + // Primitive3D sequence of the ViewContact. This contains all necessary information + // for the graphical visualisation and needs to be supported by all VCs which + // can be visualized. + drawinglayer::primitive3d::Primitive3DContainer mxPrimitive3DContainer; + + // This method is responsible for creating the graphical visualisation data which is + // stored/cached in the local primitive. Default gets view-independent Primitive3D + // from the ViewContact using ViewContact::getViewIndependentPrimitive3DContainer(), takes care of + // visibility and ghosted. + // This method will not handle included hierarchies and not check geometric visibility. + drawinglayer::primitive3d::Primitive3DContainer createPrimitive3DContainer(const DisplayInfo& rDisplayInfo) const; + + // also override the 2d method to deliver a 2d object with embedded 3d and the 3d transformation which is able to + // answer the get2DRange question accordingly + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + + public: + ViewObjectContactOfE3d(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfE3d() override; + + // access to the local primitive sequence. This will ensure that the list is + // current in comparing the local list content with a fresh created incarnation + // This method will not handle included hierarchies or visibility. + drawinglayer::primitive3d::Primitive3DContainer const & getPrimitive3DContainer(const DisplayInfo& rDisplayInfo) const; + }; + } // end of namespace contact +} // end of namespace sdr + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx b/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx new file mode 100644 index 000000000..2174462c6 --- /dev/null +++ b/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFE3DSCENE_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFE3DSCENE_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> + + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfE3dScene final : public ViewObjectContactOfSdrObj + { + // 2d primitive creator + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + + public: + // basic constructor. + ViewObjectContactOfE3dScene(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfE3dScene() override; + + // process this primitive: Eventually also recursively travel an existing hierarchy, + // e.g. for group objects, scenes or pages. This method will test geometrical visibility. + virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFE3DSCENE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx new file mode 100644 index 000000000..7b12c8332 --- /dev/null +++ b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> + +class SdrGrafObj; + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfGraphic final : public ViewObjectContactOfSdrObj + { + // This method is responsible for creating the graphical visualisation data + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + + public: + ViewObjectContactOfGraphic(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfGraphic() override; + }; + } // end of namespace contact +} // end of namespace sdr + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewobjectcontactofgroup.hxx b/svx/inc/sdr/contact/viewobjectcontactofgroup.hxx new file mode 100644 index 000000000..3dc8873bc --- /dev/null +++ b/svx/inc/sdr/contact/viewobjectcontactofgroup.hxx @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFGROUP_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFGROUP_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfGroup final : public ViewObjectContactOfSdrObj + { + public: + // basic constructor. + ViewObjectContactOfGroup(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfGroup() override; + + // This method recursively paints the draw hierarchy. + virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override; + + private: + virtual bool isPrimitiveVisibleOnAnyLayer(const SdrLayerIDSet& aLayers) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFGROUP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx b/svx/inc/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx new file mode 100644 index 000000000..8b30d772e --- /dev/null +++ b/svx/inc/sdr/contact/viewobjectcontactofmasterpagedescriptor.hxx @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFMASTERPAGEDESCRIPTOR_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFMASTERPAGEDESCRIPTOR_HXX + +#include <svx/sdr/contact/viewobjectcontact.hxx> + +namespace sdr { + class MasterPageDescriptor; +} + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfMasterPageDescriptor final : public ViewObjectContact + { + public: + ViewObjectContactOfMasterPageDescriptor(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfMasterPageDescriptor() override; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override; + virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFMASTERPAGEDESCRIPTOR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx b/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx new file mode 100644 index 000000000..c0f67e83e --- /dev/null +++ b/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> +#include <memory> + +class SdrPage; + +namespace sdr::contact { + +class PagePrimitiveExtractor; + +class ViewObjectContactOfPageObj final : public ViewObjectContactOfSdrObj +{ +private: + // the page painter helper + std::unique_ptr<PagePrimitiveExtractor> mpExtractor; + + // This method is responsible for creating the graphical visualisation data which is + // stored/cached in the local primitive. + // This method will not handle included hierarchies and not check geometric visibility. + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + +public: + ViewObjectContactOfPageObj(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageObj() override; +}; + +} + + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx b/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx new file mode 100644 index 000000000..6b0b4c476 --- /dev/null +++ b/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFSDRMEDIAOBJ_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFSDRMEDIAOBJ_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> +#include <svx/sdr/contact/viewobjectcontact.hxx> +#include <tools/gen.hxx> +#include <memory> + +namespace avmedia { class MediaItem; } +namespace vcl { class Window; } + +namespace sdr +{ + namespace contact + { + class SdrMediaWindow; + + class ViewObjectContactOfSdrMediaObj final : public ViewObjectContactOfSdrObj + { + public: + + ViewObjectContactOfSdrMediaObj( ObjectContact& rObjectContact, + ViewContact& rViewContact, + const ::avmedia::MediaItem& rMediaItem ); + virtual ~ViewObjectContactOfSdrMediaObj() override; + + public: + + vcl::Window* getWindow() const; + + Size getPreferredSize() const; + + void updateMediaItem( ::avmedia::MediaItem& rItem ) const; + void executeMediaItem( const ::avmedia::MediaItem& rItem ); + + private: + + std::unique_ptr<sdr::contact::SdrMediaWindow> mpMediaWindow; + + }; + } // end of namespace contact +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFSDRMEDIAOBJ_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx b/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx new file mode 100644 index 000000000..4d227a9c2 --- /dev/null +++ b/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROLE2OBJ_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROLE2OBJ_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> + +class SdrOle2Obj; + +namespace sdr::contact { + +class ViewObjectContactOfSdrOle2Obj final : public ViewObjectContactOfSdrObj +{ + // This method is responsible for creating the graphical visualisation data + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + +public: + ViewObjectContactOfSdrOle2Obj(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfSdrOle2Obj() override; +}; + +} + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFSDROLE2OBJ_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx b/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx new file mode 100644 index 000000000..758b0bfb0 --- /dev/null +++ b/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx @@ -0,0 +1,207 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX + +#include <svx/sdr/contact/viewobjectcontact.hxx> + +class SdrPage; + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfPageSubObject : public ViewObjectContact + { + protected: + const SdrPage& getPage() const; + + public: + ViewObjectContactOfPageSubObject(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageSubObject() override; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override; + virtual bool isPrimitiveGhosted(const DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfPageBackground final : public ViewObjectContactOfPageSubObject + { + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + + public: + ViewObjectContactOfPageBackground(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageBackground() override; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfMasterPage final : public ViewObjectContactOfPageSubObject + { + protected: + public: + ViewObjectContactOfMasterPage(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfMasterPage() override; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfPageFill final : public ViewObjectContactOfPageSubObject + { + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + + public: + ViewObjectContactOfPageFill(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageFill() override; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfPageShadow final : public ViewObjectContactOfPageSubObject + { + public: + ViewObjectContactOfPageShadow(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageShadow() override; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfOuterPageBorder final : public ViewObjectContactOfPageSubObject + { + public: + ViewObjectContactOfOuterPageBorder(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfOuterPageBorder() override; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfInnerPageBorder final : public ViewObjectContactOfPageSubObject + { + public: + ViewObjectContactOfInnerPageBorder(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfInnerPageBorder() override; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfPageHierarchy final : public ViewObjectContactOfPageSubObject + { + public: + ViewObjectContactOfPageHierarchy(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageHierarchy() override; + + virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfPageGrid final : public ViewObjectContactOfPageSubObject + { + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + + public: + ViewObjectContactOfPageGrid(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageGrid() override; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfPageHelplines final : public ViewObjectContactOfPageSubObject + { + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + + public: + ViewObjectContactOfPageHelplines(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfPageHelplines() override; + + virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +namespace sdr +{ + namespace contact + { + class ViewObjectContactOfSdrPage final : public ViewObjectContact + { + public: + ViewObjectContactOfSdrPage(ObjectContact& rObjectContact, ViewContact& rViewContact); + virtual ~ViewObjectContactOfSdrPage() override; + + virtual drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const override; + }; + } // end of namespace contact +} // end of namespace sdr + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFSDRPAGE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx new file mode 100644 index 000000000..2c708ec73 --- /dev/null +++ b/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx @@ -0,0 +1,125 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX +#define INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX + +#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> + +#include <com/sun/star/uno/Reference.hxx> +#include <rtl/ref.hxx> + +class OutputDevice; +namespace vcl { class Window; } +class SdrUnoObj; +namespace com::sun::star { + namespace awt { + class XControl; + class XControlContainer; + } +} + + +namespace sdr::contact { + + + class ViewContactOfUnoControl; + class ObjectContactOfPageView; + + //= ViewObjectContactOfUnoControl + + class ViewObjectContactOfUnoControl_Impl; + class ViewObjectContactOfUnoControl : public ViewObjectContactOfSdrObj + { + protected: + ::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pImpl; + + public: + ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); + + /// returns the ->XControl instance belonging to the instance, creates it if necessary + css::uno::Reference< css::awt::XControl > + getControl(); + + /** retrieves a temporary XControl instance, whose parent is the given device + @seealso SdrUnoObj::GetTemporaryControlForWindow + */ + static css::uno::Reference< css::awt::XControl > + getTemporaryControlForWindow( + const vcl::Window& _rWindow, + css::uno::Reference< css::awt::XControlContainer >& _inout_ControlContainer, + const SdrUnoObj& _rUnoObject + ); + + /// ensures that the control belonging to this instances has a given visibility + void ensureControlVisibility( bool _bVisible ) const; + + /** sets the design/alive mode of the control + */ + void setControlDesignMode( bool _bDesignMode ) const; + + /** callback from impl class to react on changes of properties form the XControlModel + */ + void propertyChange(); + + /** React on changes of the object of this ViewContact + */ + virtual void ActionChanged() override; + + /** to be called when any aspect of the control which requires view updates changed + */ + struct ImplAccess { friend class ViewObjectContactOfUnoControl_Impl; friend class ViewObjectContactOfUnoControl; private: ImplAccess() { } }; + void onControlChangedOrModified( ImplAccess ) { impl_onControlChangedOrModified(); } + + protected: + virtual ~ViewObjectContactOfUnoControl() override; + + // support for Primitive2D + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + + // visibility check + virtual bool isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const override; + /// to be called when any aspect of the control which requires view updates changed + void impl_onControlChangedOrModified(); + + private: + ViewObjectContactOfUnoControl( const ViewObjectContactOfUnoControl& ) = delete; + ViewObjectContactOfUnoControl& operator=( const ViewObjectContactOfUnoControl& ) = delete; + }; + + class UnoControlPrintOrPreviewContact final : public ViewObjectContactOfUnoControl + { + public: + UnoControlPrintOrPreviewContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); + virtual ~UnoControlPrintOrPreviewContact() override; + + private: + UnoControlPrintOrPreviewContact( const UnoControlPrintOrPreviewContact& ) = delete; + UnoControlPrintOrPreviewContact& operator=( const UnoControlPrintOrPreviewContact& ) = delete; + + virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const override; + }; + + +} // namespace sdr::contact + + +#endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlaycrosshair.hxx b/svx/inc/sdr/overlay/overlaycrosshair.hxx new file mode 100644 index 000000000..e297f4a4f --- /dev/null +++ b/svx/inc/sdr/overlay/overlaycrosshair.hxx @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYCROSSHAIR_HXX +#define INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYCROSSHAIR_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> + + +namespace sdr +{ + namespace overlay + { + class OverlayCrosshairStriped final : public OverlayObjectWithBasePosition + { + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; + + public: + explicit OverlayCrosshairStriped(const basegfx::B2DPoint& rBasePos); + virtual ~OverlayCrosshairStriped() override; + + // react on stripe definition change + virtual void stripeDefinitionHasChanged() override; + }; + } // end of namespace overlay +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYCROSSHAIR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlayhandle.hxx b/svx/inc/sdr/overlay/overlayhandle.hxx new file mode 100644 index 000000000..882fb702c --- /dev/null +++ b/svx/inc/sdr/overlay/overlayhandle.hxx @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYHANDLE_HXX +#define INCLUDED_SVX_SDR_OVERLAY_OVERLAYHANDLE_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <basegfx/vector/b2dsize.hxx> + +namespace sdr::overlay { + + +class OverlayHandle final : public OverlayObjectWithBasePosition +{ + basegfx::B2DSize maSize; + Color maStrokeColor; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; + +public: + OverlayHandle(const basegfx::B2DPoint& rBasePos, + const basegfx::B2DSize& rSize, + Color const & rStrokeColor, + Color const & rFillColor); + + virtual ~OverlayHandle() override; +}; + +} // end of namespace sdr::overlay + +#endif // INCLUDED_SVX_SDR_OVERLAY_OVERLAYHANDLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlayhelpline.hxx b/svx/inc/sdr/overlay/overlayhelpline.hxx new file mode 100644 index 000000000..84077f103 --- /dev/null +++ b/svx/inc/sdr/overlay/overlayhelpline.hxx @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYHELPLINE_HXX +#define INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYHELPLINE_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <svx/svdhlpln.hxx> + + +namespace sdr +{ + namespace overlay + { + class OverlayHelplineStriped final : public OverlayObjectWithBasePosition + { + // remember HelpLineKind + SdrHelpLineKind meKind; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; + + public: + explicit OverlayHelplineStriped( + const basegfx::B2DPoint& rBasePos, + SdrHelpLineKind eNewKind); + virtual ~OverlayHelplineStriped() override; + + // dat read access + SdrHelpLineKind getKind() const { return meKind; } + + // react on stripe definition change + virtual void stripeDefinitionHasChanged() override; + }; + } // end of namespace overlay +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYHELPLINE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlayline.hxx b/svx/inc/sdr/overlay/overlayline.hxx new file mode 100644 index 000000000..33ec22c0e --- /dev/null +++ b/svx/inc/sdr/overlay/overlayline.hxx @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYLINE_HXX +#define INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYLINE_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> + + +namespace sdr +{ + namespace overlay + { + class OverlayLineStriped final : public OverlayObjectWithBasePosition + { + // second position in pixel + basegfx::B2DPoint maSecondPosition; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; + + public: + OverlayLineStriped( + const basegfx::B2DPoint& rBasePos, + const basegfx::B2DPoint& rSecondPos); + virtual ~OverlayLineStriped() override; + + // change second position + const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } + + // react on stripe definition change + virtual void stripeDefinitionHasChanged() override; + }; + } // end of namespace overlay +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYLINE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx b/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx new file mode 100644 index 000000000..1970131c7 --- /dev/null +++ b/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX +#define INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX + +#include <svx/sdr/overlay/overlaymanager.hxx> +#include <basegfx/range/b2irange.hxx> +#include <vcl/virdev.hxx> +#include <vcl/idle.hxx> + + +namespace sdr +{ + namespace overlay + { + class OverlayManagerBuffered final : public OverlayManager + { + // The VirtualDevice for draw window content buffering, this + // is the view content without overlay + ScopedVclPtr<VirtualDevice> mpBufferDevice; + + // #i73602# The VirtualDevice for OverlayPaint buffering. This + // is an extra device to avoid flickering of overlay paints + ScopedVclPtr<VirtualDevice> mpOutputBufferDevice; + + // Idle for buffering + Idle maBufferIdle; + + // Range for buffering (in pixel to be independent from mapMode) + basegfx::B2IRange maBufferRememberedRangePixel; + + // link for timer + DECL_LINK(ImpBufferTimerHandler, Timer*, void); + + // Internal methods for buffering + void ImpPrepareBufferDevice(); + void ImpRestoreBackground() const ; + void ImpRestoreBackground(const vcl::Region& rRegionPixel) const; + void ImpSaveBackground(const vcl::Region& rRegion, OutputDevice* pPreRenderDevice); + + OverlayManagerBuffered(OutputDevice& rOutputDevice); + virtual ~OverlayManagerBuffered() override; + + public: + static rtl::Reference<OverlayManager> create(OutputDevice& rOutputDevice); + + // complete redraw + virtual void completeRedraw(const vcl::Region& rRegion, OutputDevice* pPreRenderDevice = nullptr) const override; + + // flush. Do buffered updates. + virtual void flush() override; + + // invalidate the given range at local OutputDevice + virtual void invalidateRange(const basegfx::B2DRange& rRange) override; + }; + } // end of namespace overlay +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlayobjectcell.hxx b/svx/inc/sdr/overlay/overlayobjectcell.hxx new file mode 100644 index 000000000..63669ba06 --- /dev/null +++ b/svx/inc/sdr/overlay/overlayobjectcell.hxx @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svx/sdr/overlay/overlayobject.hxx> + +#include <vector> + + +namespace sdr +{ + namespace overlay + { + // OverlayObjectCell - used for cell cursor, selection and AutoFill handle + + class OverlayObjectCell final : public OverlayObject + { + public: + typedef ::std::vector< basegfx::B2DRange > RangeVector; + + private: + RangeVector maRectangles; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; + + public: + OverlayObjectCell( const Color& rColor, const RangeVector& rRects); + virtual ~OverlayObjectCell() override; + }; + + } // end of namespace overlay +} // end of namespace sdr + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlayrectangle.hxx b/svx/inc/sdr/overlay/overlayrectangle.hxx new file mode 100644 index 000000000..7f4dfd895 --- /dev/null +++ b/svx/inc/sdr/overlay/overlayrectangle.hxx @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYRECTANGLE_HXX +#define INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYRECTANGLE_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> + +namespace tools { class PolyPolygon; } + +namespace sdr +{ + namespace overlay + { + class OverlayRectangle final : public OverlayObjectWithBasePosition + { + // geometric definitions + basegfx::B2DPoint maSecondPosition; + const double mfTransparence; + const double mfDiscreteGrow; + const double mfDiscreteShrink; + const double mfRotation; + + // #i53216# added CursorBlinkTime (in ms) + sal_uInt32 mnBlinkTime; + + // Flag to remember which state to draw. Inited with false (0) + bool mbOverlayState : 1; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; + + public: + OverlayRectangle( + const basegfx::B2DPoint& rBasePosition, + const basegfx::B2DPoint& rSecondPosition, + const Color& rHatchColor, + double fTransparence, + double fDiscreteGrow, + double fDiscreteShrink, + double fRotation, + bool bAnimate); + + // execute event from base class sdr::animation::Event. Default + // implementation does nothing and does not create a new event. + virtual void Trigger(sal_uInt32 nTime) override; + }; + } // end of namespace overlay +} // end of namespace sdr + +#endif // INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYRECTANGLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlayrollingrectangle.hxx b/svx/inc/sdr/overlay/overlayrollingrectangle.hxx new file mode 100644 index 000000000..7a18f1cb4 --- /dev/null +++ b/svx/inc/sdr/overlay/overlayrollingrectangle.hxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYROLLINGRECTANGLE_HXX +#define INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYROLLINGRECTANGLE_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> + + +namespace sdr +{ + namespace overlay + { + class OverlayRollingRectangleStriped final : public OverlayObjectWithBasePosition + { + // second position in pixel + basegfx::B2DPoint maSecondPosition; + + // Flag to switch on/off long lines to the OutputDevice bounds + bool mbExtendedLines : 1; + + // Flag to switch on/off the bounds itself + bool mbShowBounds : 1; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; + + public: + OverlayRollingRectangleStriped( + const basegfx::B2DPoint& rBasePos, + const basegfx::B2DPoint& rSecondPos, + bool bExtendedLines, + bool bShowBounds = true); + virtual ~OverlayRollingRectangleStriped() override; + + // change second position + const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } + void setSecondPosition(const basegfx::B2DPoint& rNew); + + // react on stripe definition change + virtual void stripeDefinitionHasChanged() override; + }; + } // end of namespace overlay +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYROLLINGRECTANGLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlaytools.hxx b/svx/inc/sdr/overlay/overlaytools.hxx new file mode 100644 index 000000000..c5df8fe09 --- /dev/null +++ b/svx/inc/sdr/overlay/overlaytools.hxx @@ -0,0 +1,304 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYTOOLS_HXX +#define INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYTOOLS_HXX + +#include <drawinglayer/primitive2d/primitivetools2d.hxx> +#include <vcl/bitmapex.hxx> +#include <basegfx/vector/b2dsize.hxx> + +namespace drawinglayer::primitive2d { + +class OverlayStaticRectanglePrimitive final : public DiscreteMetricDependentPrimitive2D +{ +private: + basegfx::B2DPoint maPosition; + basegfx::B2DSize maSize; + + // the graphic definition + basegfx::BColor maStrokeColor; + basegfx::BColor maFillColor; + double mfTransparence; + + // the rotation of the primitive itself + double mfRotation; + + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; + +public: + OverlayStaticRectanglePrimitive( + const basegfx::B2DPoint& rPosition, + const basegfx::B2DSize& rSize, + const basegfx::BColor& rStrokeColor, + const basegfx::BColor& rFillColor, + double fTransparence, + double fRotation); + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const override; + + virtual sal_uInt32 getPrimitive2DID() const override; +}; + +} // end of namespace drawinglayer::primitive2d + +// Overlay helper class which holds a BotmapEx which is to be visualized +// at the given logic position with the Bitmap's pixel size, unscaled and +// unrotated (like a marker). The discrete pixel on the bitmap assocciated +// with the target position is given in discrete X,Y coordinates +namespace drawinglayer +{ + namespace primitive2d + { + class OverlayBitmapExPrimitive final : public DiscreteMetricDependentPrimitive2D + { + private: + // The BitmapEx to use, PixelSize is used + BitmapEx maBitmapEx; + + // The logic position + basegfx::B2DPoint maBasePosition; + + // The pixel inside the BitmapEx which is assocciated with + // the target position (offset in the bitmap) + sal_uInt16 mnCenterX; + sal_uInt16 mnCenterY; + + // evtl. rotation and shear around center + double mfShearX; + double mfRotation; + + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; + + public: + OverlayBitmapExPrimitive( + const BitmapEx& rBitmapEx, + const basegfx::B2DPoint& rBasePosition, + sal_uInt16 nCenterX, + sal_uInt16 nCenterY, + double fShearX, + double fRotation); + + // data access + const BitmapEx& getBitmapEx() const { return maBitmapEx; } + const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } + sal_uInt16 getCenterX() const { return mnCenterX; } + sal_uInt16 getCenterY() const { return mnCenterY; } + double getShearX() const { return mfShearX; } + double getRotation() const { return mfRotation; } + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const override; + + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +// Overlay helper class for a crosshair +namespace drawinglayer +{ + namespace primitive2d + { + class OverlayCrosshairPrimitive final : public ViewportDependentPrimitive2D + { + private: + // The logic position + basegfx::B2DPoint maBasePosition; + + // The stripe colors and length + basegfx::BColor maRGBColorA; + basegfx::BColor maRGBColorB; + double mfDiscreteDashLength; + + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; + + public: + OverlayCrosshairPrimitive( + const basegfx::B2DPoint& rBasePosition, + const basegfx::BColor& rRGBColorA, + const basegfx::BColor& rRGBColorB, + double fDiscreteDashLength); + + // data access + const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } + const basegfx::BColor& getRGBColorA() const { return maRGBColorA; } + const basegfx::BColor& getRGBColorB() const { return maRGBColorB; } + double getDiscreteDashLength() const { return mfDiscreteDashLength; } + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const override; + + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +// Overlay helper class for a hatch rectangle as used e.g. for text object +// selection highlighting +namespace drawinglayer +{ + namespace primitive2d + { + class OverlayRectanglePrimitive final : public DiscreteMetricDependentPrimitive2D + { + private: + // the logic rectangle definition + basegfx::B2DRange maObjectRange; + + // the graphic definition + basegfx::BColor maColor; + double mfTransparence; + + // the discrete grow and shrink of the box + double mfDiscreteGrow; + double mfDiscreteShrink; + + // the rotation of the primitive itself + double mfRotation; + + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; + + public: + OverlayRectanglePrimitive( + const basegfx::B2DRange& rObjectRange, + const basegfx::BColor& rColor, + double fTransparence, + double fDiscreteGrow, + double fDiscreteShrink, + double fRotation); + + // data access + const basegfx::B2DRange& getObjectRange() const { return maObjectRange; } + const basegfx::BColor& getColor() const { return maColor; } + double getTransparence() const { return mfTransparence; } + double getDiscreteGrow() const { return mfDiscreteGrow; } + double getDiscreteShrink() const { return mfDiscreteShrink; } + double getRotation() const { return mfRotation; } + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const override; + + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +// Overlay helper class for a striped helpline + +namespace drawinglayer +{ + namespace primitive2d + { + enum HelplineStyle + { + HELPLINESTYLE_POINT, + HELPLINESTYLE_VERTICAL, + HELPLINESTYLE_HORIZONTAL + }; + + class OverlayHelplineStripedPrimitive final : public ViewportDependentPrimitive2D + { + private: + // The logic position + basegfx::B2DPoint maBasePosition; + + // the style + HelplineStyle meStyle; + + // The stripe colors and length + basegfx::BColor maRGBColorA; + basegfx::BColor maRGBColorB; + double mfDiscreteDashLength; + + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; + + public: + OverlayHelplineStripedPrimitive( + const basegfx::B2DPoint& rBasePosition, + HelplineStyle eStyle, + const basegfx::BColor& rRGBColorA, + const basegfx::BColor& rRGBColorB, + double fDiscreteDashLength); + + // data access + const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } + HelplineStyle getStyle() const { return meStyle; } + const basegfx::BColor& getRGBColorA() const { return maRGBColorA; } + const basegfx::BColor& getRGBColorB() const { return maRGBColorB; } + double getDiscreteDashLength() const { return mfDiscreteDashLength; } + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const override; + + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +// Overlay helper class for rolling rectangle helplines. This primitive is +// only for the extended lines to the ends of the view + +namespace drawinglayer +{ + namespace primitive2d + { + class OverlayRollingRectanglePrimitive final : public ViewportDependentPrimitive2D + { + private: + // The logic range + basegfx::B2DRange maRollingRectangle; + + // The stripe colors and length + basegfx::BColor maRGBColorA; + basegfx::BColor maRGBColorB; + double mfDiscreteDashLength; + + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; + + public: + OverlayRollingRectanglePrimitive( + const basegfx::B2DRange& aRollingRectangle, + const basegfx::BColor& rRGBColorA, + const basegfx::BColor& rRGBColorB, + double fDiscreteDashLength); + + // data access + const basegfx::B2DRange& getRollingRectangle() const { return maRollingRectangle; } + const basegfx::BColor& getRGBColorA() const { return maRGBColorA; } + const basegfx::BColor& getRGBColorB() const { return maRGBColorB; } + double getDiscreteDashLength() const { return mfDiscreteDashLength; } + + // compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const override; + + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYTOOLS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlaytriangle.hxx b/svx/inc/sdr/overlay/overlaytriangle.hxx new file mode 100644 index 000000000..76e481e64 --- /dev/null +++ b/svx/inc/sdr/overlay/overlaytriangle.hxx @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svx/sdr/overlay/overlayobject.hxx> + +namespace sdr +{ + namespace overlay + { + class OverlayTriangle final : public OverlayObjectWithBasePosition + { + // second and third position in pixel + basegfx::B2DPoint maSecondPosition; + basegfx::B2DPoint maThirdPosition; + + // geometry creation for OverlayObject + virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; + + public: + OverlayTriangle( + const basegfx::B2DPoint& rBasePos, + const basegfx::B2DPoint& rSecondPos, + const basegfx::B2DPoint& rThirdPos, + Color aTriangleColor); + virtual ~OverlayTriangle() override; + }; + } // end of namespace overlay +} // end of namespace sdr + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrattributecreator.hxx b/svx/inc/sdr/primitive2d/sdrattributecreator.hxx new file mode 100644 index 000000000..1bcc8e229 --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrattributecreator.hxx @@ -0,0 +1,130 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sal/types.h> +#include <svx/svxdllapi.h> + + +// predefines +class SfxItemSet; +class SdrText; + +namespace drawinglayer::attribute { + class SdrLineAttribute; + class SdrLineStartEndAttribute; + class SdrShadowAttribute; + class SdrGlowAttribute; + class SdrFillAttribute; + class SdrTextAttribute; + class FillGradientAttribute; + class SdrFillGraphicAttribute; + class SdrEffectsTextAttribute; + class SdrLineEffectsTextAttribute; + class SdrLineFillEffectsTextAttribute; + class SdrLineFillShadowAttribute3D; + class SdrSceneAttribute; + class SdrLightingAttribute; + class SdrFillTextAttribute; +} + +namespace basegfx { + class B2DRange; +} + + +namespace drawinglayer +{ + namespace primitive2d + { + // SdrAttribute creators + attribute::SdrLineAttribute SVXCORE_DLLPUBLIC createNewSdrLineAttribute( + const SfxItemSet& rSet); + + attribute::SdrLineStartEndAttribute SVXCORE_DLLPUBLIC createNewSdrLineStartEndAttribute( + const SfxItemSet& rSet, + double fWidth); + + attribute::SdrShadowAttribute createNewSdrShadowAttribute( + const SfxItemSet& rSet); + + attribute::SdrFillAttribute SVXCORE_DLLPUBLIC createNewSdrFillAttribute( + const SfxItemSet& rSet); + + // #i101508# Support handing over given text-to-border distances + attribute::SdrTextAttribute createNewSdrTextAttribute( + const SfxItemSet& rSet, + const SdrText& rText, + const sal_Int32* pLeft = nullptr, + const sal_Int32* pUpper = nullptr, + const sal_Int32* pRight = nullptr, + const sal_Int32* pLower = nullptr); + + attribute::FillGradientAttribute SVXCORE_DLLPUBLIC createNewTransparenceGradientAttribute( + const SfxItemSet& rSet); + + attribute::SdrFillGraphicAttribute createNewSdrFillGraphicAttribute( + const SfxItemSet& rSet); + + attribute::SdrEffectsTextAttribute createNewSdrEffectsTextAttribute( + const SfxItemSet& rSet, + const SdrText* pText, + bool bSuppressText); // #i98072# added option to suppress text on demand + + attribute::SdrLineEffectsTextAttribute createNewSdrLineEffectsTextAttribute( + const SfxItemSet& rSet, + const SdrText* pText); + + attribute::SdrLineFillEffectsTextAttribute createNewSdrLineFillEffectsTextAttribute( + const SfxItemSet& rSet, + const SdrText* pText, + bool bHasContent); // used from OLE and graphic + + attribute::SdrLineFillShadowAttribute3D createNewSdrLineFillShadowAttribute( + const SfxItemSet& rSet, + bool bSuppressFill); + + attribute::SdrSceneAttribute createNewSdrSceneAttribute( + const SfxItemSet& rSet); + + attribute::SdrLightingAttribute createNewSdrLightingAttribute( + const SfxItemSet& rSet); + + // #i101508# Support handing over given text-to-border distances + attribute::SdrFillTextAttribute createNewSdrFillTextAttribute( + const SfxItemSet& rSet, + const SdrText* pSdrText, + const sal_Int32* pLeft = nullptr, + const sal_Int32* pUpper = nullptr, + const sal_Int32* pRight = nullptr, + const sal_Int32* pLower = nullptr); + + // helpers + void calculateRelativeCornerRadius( + sal_Int32 nRadius, + const ::basegfx::B2DRange& rObjectRange, + double& rfCornerRadiusX, + double& rfCornerRadiusY); + + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx new file mode 100644 index 000000000..4ed7d7f1f --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx @@ -0,0 +1,75 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCAPTIONPRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCAPTIONPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <sdr/attribute/sdrlinefilleffectstextattribute.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> + + +// predefines + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrCaptionPrimitive2D final : public BufferedDecompositionPrimitive2D + { + private: + ::basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillEffectsTextAttribute maSdrLFSTAttribute; + ::basegfx::B2DPolygon maTail; + double mfCornerRadiusX; // [0.0..1.0] relative to 1/2 width + double mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrCaptionPrimitive2D( + const ::basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillEffectsTextAttribute& rSdrLFSTAttribute, + const ::basegfx::B2DPolygon& rTail, + double fCornerRadiusX, + double fCornerRadiusY); + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // data access + const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillEffectsTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + const ::basegfx::B2DPolygon& getTail() const { return maTail; } + double getCornerRadiusX() const { return mfCornerRadiusX; } + double getCornerRadiusY() const { return mfCornerRadiusY; } + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCAPTIONPRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx new file mode 100644 index 000000000..8a2d75ae1 --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrconnectorprimitive2d.hxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCONNECTORPRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCONNECTORPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <sdr/attribute/sdrlineeffectstextattribute.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> + + +// predefines + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrConnectorPrimitive2D final : public BufferedDecompositionPrimitive2D + { + private: + attribute::SdrLineEffectsTextAttribute maSdrLSTAttribute; + ::basegfx::B2DPolygon maUnitPolygon; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrConnectorPrimitive2D( + const attribute::SdrLineEffectsTextAttribute& rSdrLSTAttribute, + const ::basegfx::B2DPolygon& rUnitPolygon); + + // data access + const attribute::SdrLineEffectsTextAttribute& getSdrLSTAttribute() const { return maSdrLSTAttribute; } + const ::basegfx::B2DPolygon& getUnitPolygon() const { return maUnitPolygon; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCONNECTORPRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx new file mode 100644 index 000000000..063f6ec92 --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <sdr/attribute/sdreffectstextattribute.hxx> + + +// predefines + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrCustomShapePrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + attribute::SdrEffectsTextAttribute maSdrSTAttribute; + Primitive2DContainer maSubPrimitives; + basegfx::B2DHomMatrix maTextBox; + + // defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means + // that the text needs to be block formatted + bool mbWordWrap : 1; + + // defines that the object contains/is a 3D AutoShape. Needed for + // making exceptions with shadow generation + bool mb3DShape : 1; + + basegfx::B2DHomMatrix maTransform; + + protected: + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrCustomShapePrimitive2D( + const attribute::SdrEffectsTextAttribute& rSdrSTAttribute, + const Primitive2DContainer& rSubPrimitives, + const basegfx::B2DHomMatrix& rTextBox, + bool bWordWrap, + bool b3DShape, + const basegfx::B2DHomMatrix& rObjectMatrix); + + // data access + const attribute::SdrEffectsTextAttribute& getSdrSTAttribute() const { return maSdrSTAttribute; } + const Primitive2DContainer& getSubPrimitives() const { return maSubPrimitives; } + const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; } + bool getWordWrap() const { return mbWordWrap; } + bool get3DShape() const { return mb3DShape; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx new file mode 100644 index 000000000..e61920630 --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx @@ -0,0 +1,89 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <drawinglayer/attribute/sdrglowattribute.hxx> + +#include <svx/svxdllapi.h> + +// predefines +namespace basegfx { + class B2DPolygon; + class B2DPolyPolygon; + class B2DHomMatrix; +} + +namespace drawinglayer::attribute { + class SdrFillAttribute; + class SdrLineAttribute; + class FillGradientAttribute; + class SdrShadowAttribute; + class SdrLineStartEndAttribute; + class SdrTextAttribute; +} + + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DReference SVXCORE_DLLPUBLIC createPolyPolygonFillPrimitive( + const basegfx::B2DPolyPolygon& rPolyPolygon, + const attribute::SdrFillAttribute& rFill, + const attribute::FillGradientAttribute& rFillGradient); + + Primitive2DReference SVXCORE_DLLPUBLIC createPolyPolygonFillPrimitive( + const basegfx::B2DPolyPolygon& rPolyPolygon, + const basegfx::B2DRange& rDefinitionRange, + const attribute::SdrFillAttribute& rFill, + const attribute::FillGradientAttribute& rFillGradient); + + Primitive2DReference SVXCORE_DLLPUBLIC createPolygonLinePrimitive( + const basegfx::B2DPolygon& rPolygon, + const attribute::SdrLineAttribute& rLine, + const attribute::SdrLineStartEndAttribute& rStroke); + + Primitive2DReference SVXCORE_DLLPUBLIC createTextPrimitive( + const basegfx::B2DPolyPolygon& rUnitPolyPolygon, + const basegfx::B2DHomMatrix& rObjectTransform, + const attribute::SdrTextAttribute& rText, + const attribute::SdrLineAttribute& rStroke, + bool bCellText, + bool bWordWrap); + + Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedShadowPrimitive( + const Primitive2DContainer& rContent, + const attribute::SdrShadowAttribute& rShadow, + const basegfx::B2DHomMatrix& rObjectMatrix = basegfx::B2DHomMatrix()); + + Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedGlowPrimitive( + const Primitive2DContainer& rContent, + const attribute::SdrGlowAttribute& rGlow); + + Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedSoftEdgePrimitive( + const Primitive2DContainer& rContent, + sal_Int32 nRadius); + + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx new file mode 100644 index 000000000..2e2c0e20a --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx @@ -0,0 +1,100 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRELLIPSEPRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRELLIPSEPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <sdr/attribute/sdrlinefilleffectstextattribute.hxx> + + +// predefines + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrEllipsePrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + ::basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillEffectsTextAttribute maSdrLFSTAttribute; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrEllipsePrimitive2D( + const ::basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillEffectsTextAttribute& rSdrLFSTAttribute); + + // data access + const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillEffectsTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrEllipseSegmentPrimitive2D final : public SdrEllipsePrimitive2D + { + private: + double mfStartAngle; + double mfEndAngle; + + bool mbCloseSegment : 1; + bool mbCloseUsingCenter : 1; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrEllipseSegmentPrimitive2D( + const ::basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillEffectsTextAttribute& rSdrLFSTAttribute, + double fStartAngle, + double fEndAngle, + bool bCloseSegment, + bool bCloseUsingCenter); + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRELLIPSEPRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx new file mode 100644 index 000000000..31b5f444f --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrgrafprimitive2d.hxx @@ -0,0 +1,73 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRGRAFPRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRGRAFPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <vcl/GraphicObject.hxx> +#include <sdr/attribute/sdrlinefilleffectstextattribute.hxx> + + +// predefines + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrGrafPrimitive2D final : public BufferedDecompositionPrimitive2D + { + private: + ::basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillEffectsTextAttribute maSdrLFSTAttribute; + GraphicObject maGraphicObject; + GraphicAttr maGraphicAttr; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrGrafPrimitive2D( + const ::basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillEffectsTextAttribute& rSdrLFSTAttribute, + const GraphicObject& rGraphicObject, + const GraphicAttr& rGraphicAttr); + + // data access + const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillEffectsTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + const GraphicObject& getGraphicObject() const { return maGraphicObject; } + const GraphicAttr& getGraphicAttr() const { return maGraphicAttr; } + bool isTransparent() const; + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRGRAFPRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx new file mode 100644 index 000000000..4e28aad88 --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -0,0 +1,121 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRMEASUREPRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRMEASUREPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <sdr/attribute/sdrlineeffectstextattribute.hxx> + + +// predefines + +namespace drawinglayer::primitive2d { + enum MeasureTextPosition + { + MEASURETEXTPOSITION_AUTOMATIC, + MEASURETEXTPOSITION_NEGATIVE, + MEASURETEXTPOSITION_CENTERED, + MEASURETEXTPOSITION_POSITIVE + }; +} + +namespace drawinglayer::attribute { + class SdrLineAttribute; +} + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrMeasurePrimitive2D final : public BufferedDecompositionPrimitive2D + { + private: + attribute::SdrLineEffectsTextAttribute maSdrLSTAttribute; + basegfx::B2DPoint maStart; + basegfx::B2DPoint maEnd; + MeasureTextPosition meHorizontal; + MeasureTextPosition meVertical; + double mfDistance; + double mfUpper; + double mfLower; + double mfLeftDelta; + double mfRightDelta; + + bool mbBelow : 1; + bool mbTextRotation : 1; + bool mbTextAutoAngle : 1; + + // internal decomposition helper + Primitive2DReference impCreatePart( + const attribute::SdrLineAttribute& rLineAttribute, + const basegfx::B2DHomMatrix& rObjectMatrix, + const basegfx::B2DPoint& rStart, + const basegfx::B2DPoint& rEnd, + bool bLeftActive, + bool bRightActive) const; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrMeasurePrimitive2D( + const attribute::SdrLineEffectsTextAttribute& rSdrLSTAttribute, + const basegfx::B2DPoint& rStart, + const basegfx::B2DPoint& rEnd, + MeasureTextPosition eHorizontal, + MeasureTextPosition eVertical, + double fDistance, + double fUpper, + double fLower, + double fLeftDelta, + double fRightDelta, + bool bBelow, + bool bTextRotation, + bool bTextAutoAngle); + + // data access + const attribute::SdrLineEffectsTextAttribute& getSdrLSTAttribute() const { return maSdrLSTAttribute; } + const basegfx::B2DPoint& getStart() const { return maStart; } + const basegfx::B2DPoint& getEnd() const { return maEnd; } + MeasureTextPosition getHorizontal() const { return meHorizontal; } + MeasureTextPosition getVertical() const { return meVertical; } + double getDistance() const { return mfDistance; } + double getUpper() const { return mfUpper; } + double getLower() const { return mfLower; } + double getLeftDelta() const { return mfLeftDelta; } + double getRightDelta() const { return mfRightDelta; } + bool getBelow() const { return mbBelow; } + bool getTextRotation() const { return mbTextRotation; } + bool getTextAutoAngle() const { return mbTextAutoAngle; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRMEASUREPRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx b/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx new file mode 100644 index 000000000..8b3ce0bfb --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrole2primitive2d.hxx @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDROLE2PRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDROLE2PRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <sdr/attribute/sdrlinefilleffectstextattribute.hxx> + + +// predefines + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrOle2Primitive2D final : public BasePrimitive2D + { + private: + Primitive2DContainer maOLEContent; + basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillEffectsTextAttribute maSdrLFSTAttribute; + + public: + SdrOle2Primitive2D( + const Primitive2DContainer& rOLEContent, + const basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillEffectsTextAttribute& rSdrLFSTAttribute); + + // data access + const Primitive2DContainer& getOLEContent() const { return maOLEContent; } + const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillEffectsTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // local decomposition. + virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& aViewInformation) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDROLE2PRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx new file mode 100644 index 000000000..2dec9b986 --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <tools/weakbase.h> + + +// predefinitions + +class SdrOle2Obj; + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrOleContentPrimitive2D final : public BufferedDecompositionPrimitive2D + { + private: + tools::WeakReference<SdrOle2Obj> mpSdrOle2Obj; + basegfx::B2DHomMatrix maObjectTransform; + + // #i104867# The GraphicVersion number to identify in operator== if + // the graphic has changed, but without fetching it (which may + // be expensive, e.g. triggering chart creation) + sal_uInt32 mnGraphicVersion; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrOleContentPrimitive2D( + const SdrOle2Obj& rSdrOle2Obj, + const basegfx::B2DHomMatrix& rObjectTransform, + sal_uInt32 nGraphicVersion + ); + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // The default implementation will use getDecomposition results to create the range + virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; + + // data access + const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; } + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx new file mode 100644 index 000000000..fe823eb7a --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRPATHPRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRPATHPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <sdr/attribute/sdrlinefilleffectstextattribute.hxx> +#include <basegfx/polygon/b2dpolypolygon.hxx> + + +// predefines + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrPathPrimitive2D final : public BufferedDecompositionPrimitive2D + { + private: + basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillEffectsTextAttribute maSdrLFSTAttribute; + basegfx::B2DPolyPolygon maUnitPolyPolygon; + + // OperationSmiley: Added to be able to define a FillGeometry different from local + // geometry. It is ignored when empty and/or equal to UnitPolyPolygon. + // If used and there is a fill, the object's geometry (maUnitPolyPolygon) will be filled, + // but UnitDefinitionPolyPolygon will be used to define the FillStyle. Thus when + // using the 'same' UnitDefinitionPolyPolygon for multiple definitions, + // all filled stuff using it will fit seamlessly together. + // 'same' is in quotes since it is a UnitPolygon, so being relative to the + // unit polygon of the local geometry (UnitPolyPolygon). The definition is complete + // when applying the also given transformation (maTransform) + basegfx::B2DPolyPolygon maUnitDefinitionPolyPolygon; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + // OperationSmiley: Extended to UnitDefinitionPolyPolygon, but when needed + // a 2nd version without can be defined that just does not set the + // maUnitDefinitionPolyPolygon or set equal to UnitPolyPolygon + SdrPathPrimitive2D( + const basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillEffectsTextAttribute& rSdrLFSTAttribute, + const basegfx::B2DPolyPolygon& rUnitPolyPolygon, + const basegfx::B2DPolyPolygon& rUnitDefinitionPolyPolygon); + + // data access + const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillEffectsTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + const basegfx::B2DPolyPolygon& getUnitPolyPolygon() const { return maUnitPolyPolygon; } + const basegfx::B2DPolyPolygon& getUnitDefinitionPolyPolygon() const { return maUnitDefinitionPolyPolygon; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRPATHPRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx b/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx new file mode 100644 index 000000000..9afff3ecc --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRPRIMITIVETOOLS_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRPRIMITIVETOOLS_HXX + +#include <vcl/bitmapex.hxx> + + +// predefines + +namespace basegfx { + class BColor; +} + + +// helper methods + +namespace drawinglayer +{ + namespace primitive2d + { + // create a 3x3 cross in given color as BitmapEx + BitmapEx createDefaultCross_3x3(const basegfx::BColor& rBColor); + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRPRIMITIVETOOLS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx new file mode 100644 index 000000000..d9c411996 --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRRECTANGLEPRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRRECTANGLEPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <sdr/attribute/sdrlinefilleffectstextattribute.hxx> + + +// predefines + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrRectanglePrimitive2D final : public BufferedDecompositionPrimitive2D + { + private: + basegfx::B2DHomMatrix maTransform; + attribute::SdrLineFillEffectsTextAttribute maSdrLFSTAttribute; + double mfCornerRadiusX; // [0.0..1.0] relative to 1/2 width + double mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height + + // flag which decides if the HitArea should be the filled geometry + bool mbForceFillForHitTest : 1; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrRectanglePrimitive2D( + const basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillEffectsTextAttribute& rSdrLFSTAttribute, + double fCornerRadiusX, + double fCornerRadiusY, + bool bForceFillForHitTest); + + // data access + const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const attribute::SdrLineFillEffectsTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } + double getCornerRadiusX() const { return mfCornerRadiusX; } + double getCornerRadiusY() const { return mfCornerRadiusY; } + bool getForceFillForHitTest() const { return mbForceFillForHitTest; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRRECTANGLEPRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx new file mode 100644 index 000000000..eac15db3b --- /dev/null +++ b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -0,0 +1,355 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRTEXTPRIMITIVE2D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRTEXTPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/polygon/b2dpolypolygon.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <com/sun/star/drawing/XDrawPage.hpp> +#include <editeng/outlobj.hxx> +#include <tools/color.hxx> +#include <sdr/attribute/sdrformtextattribute.hxx> +#include <tools/weakbase.h> +#include <svx/sdtaitm.hxx> + + +// predefines +class SdrText; + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrTextPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + // The text model data; this should later just be the OutlinerParaObject or + // something equal + ::tools::WeakReference< SdrText > mrSdrText; + + // #i97628# + // The text content; now as local OutlinerParaObject copy (internally RefCounted and + // COW) and in exclusive, local form as needed in a primitive + const OutlinerParaObject maOutlinerParaObject; + + // remember last VisualizingPage for which a decomposition was made. If the new target + // is not given or different, the decomposition needs to be potentially removed + // for supporting e.g. page number change on MasterPage objects or the different + // field renderings in SubGeometry and MasterPage node + css::uno::Reference< css::drawing::XDrawPage > mxLastVisualizingPage; + + // remember last PageNumber for which a decomposition was made. This is only used + // when mbContainsPageField is true, else it is 0 + sal_Int16 mnLastPageNumber; + + // remember last PageCount for which a decomposition was made. This is only used + // when mbContainsPageCountField is true, else it is 0 + sal_Int16 mnLastPageCount; + + // #i101443# remember last TextBackgroundColor to decide if a new decomposition is + // needed because of background color change + Color maLastTextBackgroundColor; + + // is there a PageNumber, Header, Footer or DateTimeField used? Evaluated at construction + bool mbContainsPageField : 1; + bool mbContainsPageCountField : 1; + bool mbContainsOtherFields : 1; + + protected: + // support for XTEXT_PAINTSHAPE_BEGIN/XTEXT_PAINTSHAPE_END Metafile comments + static void encapsulateWithTextHierarchyBlockPrimitive2D(Primitive2DContainer& rContainer, const Primitive2DContainer& rCandidate); + + public: + SdrTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr); + + // get data + const SdrText* getSdrText() const; + const OutlinerParaObject& getOutlinerParaObject() const { return maOutlinerParaObject; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // own get2DDecomposition to take aspect of decomposition with or without spell checker + // into account + virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override; + + // transformed clone operator + virtual std::unique_ptr<SdrTextPrimitive2D> createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const = 0; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrContourTextPrimitive2D final : public SdrTextPrimitive2D + { + private: + // unit contour polygon (scaled to [0.0 .. 1.0]) + basegfx::B2DPolyPolygon maUnitPolyPolygon; + + // complete contour polygon transform (scale, rotate, shear, translate) + basegfx::B2DHomMatrix maObjectTransform; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrContourTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr, + const basegfx::B2DPolyPolygon& rUnitPolyPolygon, + const basegfx::B2DHomMatrix& rObjectTransform); + + // get data + const basegfx::B2DPolyPolygon& getUnitPolyPolygon() const { return maUnitPolyPolygon; } + const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // transformed clone operator + virtual std::unique_ptr<SdrTextPrimitive2D> createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrPathTextPrimitive2D final : public SdrTextPrimitive2D + { + private: + // the path to use. Each paragraph will use one Polygon. + basegfx::B2DPolyPolygon maPathPolyPolygon; + + // the Fontwork parameters + attribute::SdrFormTextAttribute maSdrFormTextAttribute; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrPathTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr, + const basegfx::B2DPolyPolygon& rPathPolyPolygon, + const attribute::SdrFormTextAttribute& rSdrFormTextAttribute); + + // get data + const basegfx::B2DPolyPolygon& getPathPolyPolygon() const { return maPathPolyPolygon; } + const attribute::SdrFormTextAttribute& getSdrFormTextAttribute() const { return maSdrFormTextAttribute; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // transformed clone operator + virtual std::unique_ptr<SdrTextPrimitive2D> createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrBlockTextPrimitive2D final : public SdrTextPrimitive2D + { + private: + // text range transformation from unit range ([0.0 .. 1.0]) to text range + basegfx::B2DHomMatrix maTextRangeTransform; + + // text alignments + SdrTextHorzAdjust maSdrTextHorzAdjust; + SdrTextVertAdjust maSdrTextVertAdjust; + + bool mbFixedCellHeight : 1; + bool mbUnlimitedPage : 1; // force layout with no text break + bool mbCellText : 1; // this is a cell text as block text + bool mbWordWrap : 1; // for CustomShapes text layout + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrBlockTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr, + const basegfx::B2DHomMatrix& rTextRangeTransform, + SdrTextHorzAdjust aSdrTextHorzAdjust, + SdrTextVertAdjust aSdrTextVertAdjust, + bool bFixedCellHeight, + bool bUnlimitedPage, + bool bCellText, + bool bWordWrap); + + // get data + const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } + SdrTextHorzAdjust getSdrTextHorzAdjust() const { return maSdrTextHorzAdjust; } + SdrTextVertAdjust getSdrTextVertAdjust() const { return maSdrTextVertAdjust; } + bool isFixedCellHeight() const { return mbFixedCellHeight; } + bool getUnlimitedPage() const { return mbUnlimitedPage; } + bool getCellText() const { return mbCellText; } + bool getWordWrap() const { return mbWordWrap; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // transformed clone operator + virtual std::unique_ptr<SdrTextPrimitive2D> createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrStretchTextPrimitive2D final : public SdrTextPrimitive2D + { + private: + // text range transformation from unit range ([0.0 .. 1.0]) to text range + basegfx::B2DHomMatrix maTextRangeTransform; + + bool mbFixedCellHeight : 1; + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrStretchTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr, + const basegfx::B2DHomMatrix& rTextRangeTransform, + bool bFixedCellHeight); + + // get data + const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } + bool isFixedCellHeight() const { return mbFixedCellHeight; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // transformed clone operator + virtual std::unique_ptr<SdrTextPrimitive2D> createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrAutoFitTextPrimitive2D final : public SdrTextPrimitive2D + { + private: + ::basegfx::B2DHomMatrix maTextRangeTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range + + bool mbWordWrap : 1; // for CustomShapes text layout + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrAutoFitTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtr, + const ::basegfx::B2DHomMatrix& rTextRangeTransform, + bool bWordWrap); + + // get data + const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } + bool getWordWrap() const { return mbWordWrap; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // transformed clone operator + virtual std::unique_ptr<SdrTextPrimitive2D> createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrChainedTextPrimitive2D final : public SdrTextPrimitive2D + { + private: + // XXX: might have position of overflowing text + + ::basegfx::B2DHomMatrix maTextRangeTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range + + // local decomposition. + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override; + + public: + SdrChainedTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtrs, + const ::basegfx::B2DHomMatrix& rTextRangeTransform); + + // get data + const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } + //bool getWordWrap() const { return true; } // XXX: Hack! Should have a proper implementation// + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + + // transformed clone operator + virtual std::unique_ptr<SdrTextPrimitive2D> createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const override; + + // provide unique ID + virtual sal_uInt32 getPrimitive2DID() const override; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRTEXTPRIMITIVE2D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/primitive3d/sdrattributecreator3d.hxx b/svx/inc/sdr/primitive3d/sdrattributecreator3d.hxx new file mode 100644 index 000000000..89f8f5d12 --- /dev/null +++ b/svx/inc/sdr/primitive3d/sdrattributecreator3d.hxx @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE3D_SDRATTRIBUTECREATOR3D_HXX +#define INCLUDED_SVX_INC_SDR_PRIMITIVE3D_SDRATTRIBUTECREATOR3D_HXX + + +// predefines +class SfxItemSet; + +namespace drawinglayer::attribute { + class Sdr3DObjectAttribute; +} + +namespace basegfx { + class B2DRange; +} + + +namespace drawinglayer +{ + namespace primitive2d + { + // SdrAttribute creators + attribute::Sdr3DObjectAttribute* createNewSdr3DObjectAttribute(const SfxItemSet& rSet); + + // helpers + + } // end of namespace primitive2d +} // end of namespace drawinglayer + + +#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE3D_SDRATTRIBUTECREATOR3D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx new file mode 100644 index 000000000..aa02c9484 --- /dev/null +++ b/svx/inc/sdr/properties/attributeproperties.hxx @@ -0,0 +1,94 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX + +#include <svl/lstner.hxx> +#include <svl/stylesheetuser.hxx> +#include <svx/sdr/properties/defaultproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class AttributeProperties : public DefaultProperties, public SfxListener, public svl::StyleSheetUser + { + // core to set parent at SfxItemSet and to execute the hard attribute computations + void ImpSetParentAtSfxItemSet(bool bDontRemoveHardAttr); + + // add style sheet, do all the necessary handling + void ImpAddStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr); + + // remove StyleSheet, do all the necessary handling + void ImpRemoveStyleSheet(); + + protected: + // the StyleSheet of this object + SfxStyleSheet* mpStyleSheet; + + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& pPool) override; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit AttributeProperties(SdrObject& rObj); + + // constructor for copying, but using new object + AttributeProperties(const AttributeProperties& rProps, SdrObject& rObj); + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // Get the local ItemSet. This directly returns the local ItemSet of the object. No + // merging of ItemSets is done for e.g. Group objects. + virtual const SfxItemSet& GetObjectItemSet() const override; + + // destructor + virtual ~AttributeProperties() override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const override; + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes() override; + + // This is the Notify(...) from 2nd base class SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; + + virtual bool isUsedByModel() const override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/captionproperties.hxx b/svx/inc/sdr/properties/captionproperties.hxx new file mode 100644 index 000000000..6e313daa3 --- /dev/null +++ b/svx/inc/sdr/properties/captionproperties.hxx @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_CAPTIONPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_CAPTIONPROPERTIES_HXX + +#include <sdr/properties/rectangleproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class CaptionProperties final : public RectangleProperties + { + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit CaptionProperties(SdrObject& rObj); + + // constructor for copying, but using new object + CaptionProperties(const CaptionProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~CaptionProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_CAPTIONPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/circleproperties.hxx b/svx/inc/sdr/properties/circleproperties.hxx new file mode 100644 index 000000000..eb5c1980d --- /dev/null +++ b/svx/inc/sdr/properties/circleproperties.hxx @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_CIRCLEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_CIRCLEPROPERTIES_HXX + +#include <sdr/properties/rectangleproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class CircleProperties final : public RectangleProperties + { + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit CircleProperties(SdrObject& rObj); + + // constructor for copying, but using new object + CircleProperties(const CircleProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~CircleProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_CIRCLEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/connectorproperties.hxx b/svx/inc/sdr/properties/connectorproperties.hxx new file mode 100644 index 000000000..f5d5c3892 --- /dev/null +++ b/svx/inc/sdr/properties/connectorproperties.hxx @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_CONNECTORPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_CONNECTORPROPERTIES_HXX + +#include <sdr/properties/textproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class ConnectorProperties final : public TextProperties + { + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit ConnectorProperties(SdrObject& rObj); + + // constructor for copying, but using new object + ConnectorProperties(const ConnectorProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~ConnectorProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_CONNECTORPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx b/svx/inc/sdr/properties/customshapeproperties.hxx new file mode 100644 index 000000000..696243bb3 --- /dev/null +++ b/svx/inc/sdr/properties/customshapeproperties.hxx @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX + +#include <sdr/properties/textproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class CustomShapeProperties final : public TextProperties + { + private: + void UpdateTextFrameStatus(bool bInvalidateRenderGeometry); + + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // test changeability for a single item + virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + // react on Item change + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // Called after ItemChange() is done for all items. Allows local reactions on + // specific item changes + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override; + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deletion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override; + + public: + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + + // basic constructor + explicit CustomShapeProperties(SdrObject& rObj); + + // constructor for copying, but using new object + CustomShapeProperties(const CustomShapeProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~CustomShapeProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // This is the notifier from SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dcompoundproperties.hxx b/svx/inc/sdr/properties/e3dcompoundproperties.hxx new file mode 100644 index 000000000..22da0bfca --- /dev/null +++ b/svx/inc/sdr/properties/e3dcompoundproperties.hxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_E3DCOMPOUNDPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_E3DCOMPOUNDPROPERTIES_HXX + +#include <sdr/properties/e3dproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class E3dCompoundProperties : public E3dProperties + { + protected: + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit E3dCompoundProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dCompoundProperties(const E3dCompoundProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dCompoundProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // Get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may + // be overridden e.g for group objects to return a merged ItemSet of the object. + // When using this method the returned ItemSet may contain items in the state + // SfxItemState::DONTCARE which means there were several such items with different + // values. + virtual const SfxItemSet& GetMergedItemSet() const override; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_E3DCOMPOUNDPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dextrudeproperties.hxx b/svx/inc/sdr/properties/e3dextrudeproperties.hxx new file mode 100644 index 000000000..b614a9082 --- /dev/null +++ b/svx/inc/sdr/properties/e3dextrudeproperties.hxx @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX + +#include <sdr/properties/e3dcompoundproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class E3dExtrudeProperties final : public E3dCompoundProperties + { + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit E3dExtrudeProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dExtrudeProperties(const E3dExtrudeProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dExtrudeProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dlatheproperties.hxx b/svx/inc/sdr/properties/e3dlatheproperties.hxx new file mode 100644 index 000000000..8b8030052 --- /dev/null +++ b/svx/inc/sdr/properties/e3dlatheproperties.hxx @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX + +#include <sdr/properties/e3dcompoundproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class E3dLatheProperties final : public E3dCompoundProperties + { + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit E3dLatheProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dLatheProperties(const E3dLatheProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dLatheProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dproperties.hxx b/svx/inc/sdr/properties/e3dproperties.hxx new file mode 100644 index 000000000..2a6eb0e9e --- /dev/null +++ b/svx/inc/sdr/properties/e3dproperties.hxx @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_E3DPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_E3DPROPERTIES_HXX + +#include <sdr/properties/attributeproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class E3dProperties : public AttributeProperties + { + protected: + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit E3dProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dProperties(const E3dProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_E3DPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dsceneproperties.hxx b/svx/inc/sdr/properties/e3dsceneproperties.hxx new file mode 100644 index 000000000..269ecf83d --- /dev/null +++ b/svx/inc/sdr/properties/e3dsceneproperties.hxx @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX + +#include <sdr/properties/e3dproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class E3dSceneProperties final : public E3dProperties + { + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit E3dSceneProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dSceneProperties(const E3dSceneProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dSceneProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may + // be overridden e.g for group objects to return a merged ItemSet of the object. + // When using this method the returned ItemSet may contain items in the state + // SfxItemState::DONTCARE which means there were several such items with different + // values. + virtual const SfxItemSet& GetMergedItemSet() const override; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) override; + + // Set a single item, iterate over hierarchies if necessary. + virtual void SetMergedItem(const SfxPoolItem& rItem) override; + + // Clear a single item, iterate over hierarchies if necessary. + virtual void ClearMergedItem(const sal_uInt16 nWhich) override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const override; + + // Special for scene: + void SetSceneItemsFromCamera(); + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dsphereproperties.hxx b/svx/inc/sdr/properties/e3dsphereproperties.hxx new file mode 100644 index 000000000..b1ef923cb --- /dev/null +++ b/svx/inc/sdr/properties/e3dsphereproperties.hxx @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX + +#include <sdr/properties/e3dcompoundproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class E3dSphereProperties final : public E3dCompoundProperties + { + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit E3dSphereProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dSphereProperties(const E3dSphereProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dSphereProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx new file mode 100644 index 000000000..734f7be37 --- /dev/null +++ b/svx/inc/sdr/properties/emptyproperties.hxx @@ -0,0 +1,93 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_EMPTYPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_EMPTYPROPERTIES_HXX + +#include <sal/config.h> + +#include <memory> + +#include <svx/sdr/properties/properties.hxx> +#include <svl/itemset.hxx> + + +namespace sdr +{ + namespace properties + { + class EmptyProperties : public BaseProperties + { + protected: + // the to be used ItemSet + std::unique_ptr<SfxItemSet> mpEmptyItemSet; + + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // test changeability for a single item + virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit EmptyProperties(SdrObject& rObj); + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const override; + + // set single item + virtual void SetObjectItem(const SfxPoolItem& rItem) override; + + // set single item direct, do not do any notifies or things like that + virtual void SetObjectItemDirect(const SfxPoolItem& rItem) override; + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override; + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deletion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override; + + // set complete item set + virtual void SetObjectItemSet(const SfxItemSet& rSet) override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const override; + }; + } // end of namespace properties +} // end of namespace sdr + +#endif // INCLUDED_SVX_SDR_PROPERTIES_EMPTYPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/graphicproperties.hxx b/svx/inc/sdr/properties/graphicproperties.hxx new file mode 100644 index 000000000..018c76435 --- /dev/null +++ b/svx/inc/sdr/properties/graphicproperties.hxx @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_GRAPHICPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_GRAPHICPROPERTIES_HXX + +#include <sdr/properties/rectangleproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class GraphicProperties final : public RectangleProperties + { + // apply the correct SfyStyleSheet from SdrObject's SdrModel + virtual void applyDefaultStyleSheetFromSdrModel() override; + + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit GraphicProperties(SdrObject& rObj); + + // constructor for copying, but using new object + GraphicProperties(const GraphicProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~GraphicProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_GRAPHICPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx new file mode 100644 index 000000000..412881708 --- /dev/null +++ b/svx/inc/sdr/properties/groupproperties.hxx @@ -0,0 +1,115 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX + +#include <svx/sdr/properties/defaultproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class GroupProperties final : public DefaultProperties + { + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // test changeability for a single item + virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit GroupProperties(SdrObject& rObj); + + // copy constructor + GroupProperties(const GroupProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~GroupProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const override; + + // get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may + // be overridden e.g for group objects to return a merged ItemSet of the object. + // When using this method the returned ItemSet may contain items in the state + // SfxItemState::DONTCARE which means there were several such items with different + // values. + virtual const SfxItemSet& GetMergedItemSet() const override; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) override; + + // set single item + virtual void SetObjectItem(const SfxPoolItem& rItem) override; + + // set single item direct, do not do any notifies or things like that + virtual void SetObjectItemDirect(const SfxPoolItem& rItem) override; + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override; + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deletion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override; + + // Set a single item, iterate over hierarchies if necessary. + virtual void SetMergedItem(const SfxPoolItem& rItem) override; + + // Clear a single item, iterate over hierarchies if necessary. + virtual void ClearMergedItem(const sal_uInt16 nWhich) override; + + // set complete item set + virtual void SetObjectItemSet(const SfxItemSet& rSet) override; + + // set a new StyleSheet + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // get the local StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/itemsettools.hxx b/svx/inc/sdr/properties/itemsettools.hxx new file mode 100644 index 000000000..4559f8f2e --- /dev/null +++ b/svx/inc/sdr/properties/itemsettools.hxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_ITEMSETTOOLS_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_ITEMSETTOOLS_HXX + +#include <sal/types.h> +#include <tools/gen.hxx> +#include <vector> + +class SdrObject; +class SfxItemSet; +class Fraction; + +// class to remember broadcast start positions +namespace sdr +{ + namespace properties + { + class ItemChangeBroadcaster + { + std::vector< tools::Rectangle > maRectangles; + + public: + explicit ItemChangeBroadcaster(const SdrObject& rObj); + + sal_uInt32 GetRectangleCount() const + { + return maRectangles.size(); + } + const tools::Rectangle& GetRectangle(sal_uInt32 nIndex) const + { + return maRectangles[nIndex]; + } + }; + } // end of namespace properties +} // end of namespace sdr + +namespace sdr +{ + namespace properties + { + void ScaleItemSet(SfxItemSet& rSet, const Fraction& rScale); + } // end of namespace properties +} // end of namespace sdr + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_ITEMSETTOOLS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/measureproperties.hxx b/svx/inc/sdr/properties/measureproperties.hxx new file mode 100644 index 000000000..70f3812e3 --- /dev/null +++ b/svx/inc/sdr/properties/measureproperties.hxx @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_MEASUREPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_MEASUREPROPERTIES_HXX + +#include <sdr/properties/textproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class MeasureProperties final : public TextProperties + { + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit MeasureProperties(SdrObject& rObj); + + // constructor for copying, but using new object + MeasureProperties(const MeasureProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~MeasureProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_MEASUREPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/oleproperties.hxx b/svx/inc/sdr/properties/oleproperties.hxx new file mode 100644 index 000000000..49629be3d --- /dev/null +++ b/svx/inc/sdr/properties/oleproperties.hxx @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_OLEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_OLEPROPERTIES_HXX + +#include <sdr/properties/rectangleproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class OleProperties final : public RectangleProperties + { + // apply the correct SfyStyleSheet from SdrObject's SdrModel + virtual void applyDefaultStyleSheetFromSdrModel() override; + + public: + // basic constructor + explicit OleProperties(SdrObject& rObj); + + // constructor for copying, but using new object + OleProperties(const OleProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~OleProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_OLEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/pageproperties.hxx b/svx/inc/sdr/properties/pageproperties.hxx new file mode 100644 index 000000000..1aab9c2f6 --- /dev/null +++ b/svx/inc/sdr/properties/pageproperties.hxx @@ -0,0 +1,73 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_PAGEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_PAGEPROPERTIES_HXX + +#include <sdr/properties/emptyproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class PageProperties final : public EmptyProperties + { + // create a new object specific itemset with object specific ranges. + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& pPool) override; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit PageProperties(SdrObject& rObj); + + // constructor for copying, but using new object + PageProperties(const PageProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~PageProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // get itemset. Override here to allow creating the empty itemset + // without asserting + virtual const SfxItemSet& GetObjectItemSet() const override; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const override; + + // set the installed StyleSheet + virtual void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr) override; + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_PAGEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/rectangleproperties.hxx b/svx/inc/sdr/properties/rectangleproperties.hxx new file mode 100644 index 000000000..5512ffb5b --- /dev/null +++ b/svx/inc/sdr/properties/rectangleproperties.hxx @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_RECTANGLEPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_RECTANGLEPROPERTIES_HXX + +#include <sdr/properties/textproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class RectangleProperties : public TextProperties + { + protected: + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit RectangleProperties(SdrObject& rObj); + + // constructor for copying, but using new object + RectangleProperties(const RectangleProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~RectangleProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_RECTANGLEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/textproperties.hxx b/svx/inc/sdr/properties/textproperties.hxx new file mode 100644 index 000000000..5e6482a4f --- /dev/null +++ b/svx/inc/sdr/properties/textproperties.hxx @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX + +#include <svx/itextprovider.hxx> +#include <sdr/properties/attributeproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class TextProperties : public AttributeProperties + { + private: + // #i101556# versioning support + sal_uInt32 maVersion; + + protected: + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + /// Get the TextProvider related to our SdrObject + virtual const svx::ITextProvider& getTextProvider() const; + + public: + // basic constructor + explicit TextProperties(SdrObject& rObj); + + // constructor for copying, but using new object + TextProperties(const TextProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~TextProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes() override; + + // This is the notifier from SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; + + // Set single item at the local ItemSet. *Does not use* AllowItemChange(), + // ItemChange(), PostItemChange() and ItemSetChanged() calls. + void SetObjectItemNoBroadcast(const SfxPoolItem& rItem); + + // #i101556# versioning support + virtual sal_uInt32 getVersion() const override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/spacing.hrc b/svx/inc/spacing.hrc new file mode 100644 index 000000000..b8ca2661c --- /dev/null +++ b/svx/inc/spacing.hrc @@ -0,0 +1,95 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef INCLUDED_SVX_INC_SPACING_HRC +#define INCLUDED_SVX_INC_SPACING_HRC + +#include <utility> + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +struct measurement +{ + const char* key; + int twips; + int human; +}; + +// To translators: this is a listbox labelled by "Spacing:", inch units +const measurement RID_SVXSTRARY_SPACING_INCH[] = +{ + { NC_("RID_SVXSTRARY_SPACING_INCH", "None"), 0, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Small (1/16″)"), 91, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Small (1/8″)"), 181, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Small Medium (1/4″)"), 363, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Medium (3/8″)"), 539, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Medium Large (1/2″)"), 720, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Large (3/4″)"), 1077, 0 }, + { NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Large (1″)"), 1440, 0 }, + { nullptr, 0, 0 } +}; + +// To translators: this is a listbox labelled by "Spacing:", cm units +const measurement RID_SVXSTRARY_SPACING_CM[] = +{ + { NC_("RID_SVXSTRARY_SPACING_CM", "None"), 0, 0 }, + // Extra Small (0.16 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Extra Small (%1)"), 91, 16 }, + // Small (0.32 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Small (%1)"), 181, 32 }, + // Small Medium (0.64 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Small Medium (%1)"), 363, 64 }, + // Medium (0.95 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Medium (%1)"), 539, 95 }, + // Medium Large (1.27 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Medium Large (%1)"), 720, 127 }, + // Large (1.9 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Large (%1)"), 1077, 190 }, + // Extra Large (2.54 cm) + { NC_("RID_SVXSTRARY_SPACING_CM", "Extra Large (%1)"), 1440, 254 }, + { nullptr, 0, 0 } +}; + +// To translators: this is a listbox labelled by "Margins:", inch units +const measurement RID_SVXSTRARY_MARGINS_INCH[] = +{ + { NC_("RID_SVXSTRARY_MARGINS_INCH", "None"), 0, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Small (1/16″)"), 91, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Small (1/8″)"), 181, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Small Medium (1/4″)"), 363, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium (3/8″)"), 539, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium Large (1/2″)"), 720, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Large (3/4″)"), 1077, 0 }, + { NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Large (1″)"), 1440, 0 }, + { nullptr, 0, 0 } +}; + +// To translators: this is a listbox labelled by "Margins:", cm units +const measurement RID_SVXSTRARY_MARGINS_CM[] = +{ + { NC_("RID_SVXSTRARY_MARGINS_CM", "None"), 0, 0 }, + // Extra Small (0.16 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Extra Small (%1)"), 91, 16 }, + // Small (0.32 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Small (%1)"), 181, 32 }, + // Small Medium (0.64 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Small Medium (%1)"), 363, 64 }, + // Medium (0.95 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Medium (%1)"), 539, 95 }, + // Medium Large (1.27 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Medium Large (%1)"), 720, 127 }, + // Large (1.9 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Large (%1)"), 1077, 190 }, + // Extra Large (2.54 cm) + { NC_("RID_SVXSTRARY_MARGINS_CM", "Extra Large (%1)"), 1440, 254 }, + { nullptr, 0, 0 } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/svx/inc/strings.hxx b/svx/inc/strings.hxx new file mode 100644 index 000000000..dddaf3126 --- /dev/null +++ b/svx/inc/strings.hxx @@ -0,0 +1,386 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_SVX_INC_STRINGS_HXX +#define INCLUDED_SVX_INC_STRINGS_HXX + +#define RID_GALLERYSTR_THEME_HTMLBUTTONS "private://gallery/hidden/HtmlExportButtons" +#define RID_GALLERYSTR_THEME_POWERPOINT "private://gallery/hidden/imgppt" +#define RID_GALLERYSTR_THEME_RULERS "Rulers" +#define RID_GALLERYSTR_THEME_USERSOUNDS "private://gallery/hidden/usersounds" +#define RID_GALLERYSTR_THEME_DUMMY5 "Dummy 5" +#define RID_GALLERYSTR_THEME_FONTWORK "private://gallery/hidden/fontwork" +#define RID_GALLERYSTR_THEME_FONTWORK_VERTICAL "private://gallery/hidden/fontworkvertical" + +// Reference-strings for standardcolor-table +#define RID_SVXSTR_COLOR_BLACK_DEF "Black" +#define RID_SVXSTR_COLOR_BLUE_DEF "Blue" +#define RID_SVXSTR_COLOR_GREEN_DEF "Green" +#define RID_SVXSTR_COLOR_RED_DEF "Red" +#define RID_SVXSTR_COLOR_GREY_DEF "Gray" +#define RID_SVXSTR_COLOR_YELLOW_DEF "Yellow" +#define RID_SVXSTR_COLOR_WHITE_DEF "White" +#define RID_SVXSTR_COLOR_BLUEGREY_DEF "Blue gray" +#define RID_SVXSTR_COLOR_ORANGE_DEF "Orange" +#define RID_SVXSTR_COLOR_MAGENTA_DEF "Magenta" +#define RID_SVXSTR_COLOR_BORDEAUX_DEF "Bordeaux" +#define RID_SVXSTR_COLOR_PALE_YELLOW_DEF "Pale yellow" +#define RID_SVXSTR_COLOR_PALE_GREEN_DEF "Pale green" +#define RID_SVXSTR_COLOR_DARKVIOLET_DEF "Dark violet" +#define RID_SVXSTR_COLOR_SALMON_DEF "Salmon" +#define RID_SVXSTR_COLOR_SEABLUE_DEF "Sea blue" +#define RID_SVXSTR_COLOR_CHART_DEF "Chart" +#define RID_SVXSTR_COLOR_PURPLE_DEF "Purple" +#define RID_SVXSTR_COLOR_SKYBLUE_DEF "Sky blue" +#define RID_SVXSTR_COLOR_YELLOWGREEN_DEF "Yellow green" +#define RID_SVXSTR_COLOR_PINK_DEF "Pink" +#define RID_SVXSTR_COLOR_TURQUOISE_DEF "Turquoise" +#define RID_SVXSTR_COLOR_BLUE_CLASSIC_DEF "Blue classic" +#define RID_SVXSTR_COLOR_GOLD_DEF "Gold" +#define RID_SVXSTR_COLOR_BRICK_DEF "Brick" +#define RID_SVXSTR_COLOR_INDIGO_DEF "Indigo" +#define RID_SVXSTR_COLOR_TEAL_DEF "Teal" +#define RID_SVXSTR_COLOR_LIME_DEF "Lime" +// Reference strings: Light variants of the standard color palette +#define RID_SVXSTR_COLOR_LIGHTGRAY_DEF "Light Gray" +#define RID_SVXSTR_COLOR_LIGHTYELLOW_DEF "Light Yellow" +#define RID_SVXSTR_COLOR_LIGHTGOLD_DEF "Light Gold" +#define RID_SVXSTR_COLOR_LIGHTORANGE_DEF "Light Orange" +#define RID_SVXSTR_COLOR_LIGHTBRICK_DEF "Light Brick" +#define RID_SVXSTR_COLOR_LIGHTRED_DEF "Light Red" +#define RID_SVXSTR_COLOR_LIGHTMAGENTA_DEF "Light Magenta" +#define RID_SVXSTR_COLOR_LIGHTPURPLE_DEF "Light Purple" +#define RID_SVXSTR_COLOR_LIGHTINDIGO_DEF "Light Indigo" +#define RID_SVXSTR_COLOR_LIGHTBLUE_DEF "Light Blue" +#define RID_SVXSTR_COLOR_LIGHTTEAL_DEF "Light Teal" +#define RID_SVXSTR_COLOR_LIGHTGREEN_DEF "Light Green" +#define RID_SVXSTR_COLOR_LIGHTLIME_DEF "Light Lime" +// Reference strings: Dark variants of the standard color palette +#define RID_SVXSTR_COLOR_DARKGRAY_DEF "Dark Gray" +#define RID_SVXSTR_COLOR_DARKYELLOW_DEF "Dark Yellow" +#define RID_SVXSTR_COLOR_DARKGOLD_DEF "Dark Gold" +#define RID_SVXSTR_COLOR_DARKORANGE_DEF "Dark Orange" +#define RID_SVXSTR_COLOR_DARKBRICK_DEF "Dark Brick" +#define RID_SVXSTR_COLOR_DARKRED_DEF "Dark Red" +#define RID_SVXSTR_COLOR_DARKMAGENTA_DEF "Dark Magenta" +#define RID_SVXSTR_COLOR_DARKPURPLE_DEF "Dark Purple" +#define RID_SVXSTR_COLOR_DARKINDIGO_DEF "Dark Indigo" +#define RID_SVXSTR_COLOR_DARKBLUE_DEF "Dark Blue" +#define RID_SVXSTR_COLOR_DARKTEAL_DEF "Dark Teal" +#define RID_SVXSTR_COLOR_DARKGREEN_DEF "Dark Green" +#define RID_SVXSTR_COLOR_DARKLIME_DEF "Dark Lime" +// Reference strings for the Tonal palette +#define RID_SVXSTR_COLOR_VIOLET_DEF "Violet" +#define RID_SVXSTR_COLOR_VIOLET_OUG_DEF "Violet (Out of Gamut)" +#define RID_SVXSTR_COLOR_BLUE_OUG_DEF "Blue (Out of Gamut)" +#define RID_SVXSTR_COLOR_AZURE_OUG_DEF "Azure (Out of Gamut)" +#define RID_SVXSTR_COLOR_SPRINGGREEN_OUG_DEF "Spring Green (Out of Gamut)" +#define RID_SVXSTR_COLOR_GREEN_OUG_DEF "Green (Out of Gamut)" +#define RID_SVXSTR_COLOR_CHARTREUSEGREEN_OUG_DEF "Chartreuse Green (Out of Gamut)" +#define RID_SVXSTR_COLOR_ORANGE_OUG_DEF "Orange (Out of Gamut)" +#define RID_SVXSTR_COLOR_RED_OUG_DEF "Red (Out of Gamut)" +#define RID_SVXSTR_COLOR_ROSE_OUG_DEF "Rose (Out of Gamut)" +#define RID_SVXSTR_COLOR_AZURE_DEF "Azure" +#define RID_SVXSTR_COLOR_CYAN_DEF "Cyan" +#define RID_SVXSTR_COLOR_SPRINGGREEN_DEF "Spring Green" +#define RID_SVXSTR_COLOR_CHARTREUSEGREEN_DEF "Chartreuse Green" +#define RID_SVXSTR_COLOR_ROSE_DEF "Rose" +// Reference strings for the Material palette +#define RID_SVXSTR_COLOR_MATERIAL_GRAY_A_DEF "Gray A" +#define RID_SVXSTR_COLOR_MATERIAL_YELLOW_A_DEF "Yellow A" +#define RID_SVXSTR_COLOR_MATERIAL_AMBER_A_DEF "Amber A" +#define RID_SVXSTR_COLOR_MATERIAL_AMBER_DEF "Amber" +#define RID_SVXSTR_COLOR_MATERIAL_ORANGE_A_DEF "Orange A" +#define RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE_A_DEF "Deep Orange A" +#define RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE_DEF "Deep Orange" +#define RID_SVXSTR_COLOR_MATERIAL_RED_A_DEF "Red A" +#define RID_SVXSTR_COLOR_MATERIAL_PINK_A_DEF "Pink A" +#define RID_SVXSTR_COLOR_MATERIAL_PURPLE_A_DEF "Purple A" +#define RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE_A_DEF "Deep Purple A" +#define RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE_DEF "Deep Purple" +#define RID_SVXSTR_COLOR_MATERIAL_INDIGO_A_DEF "Indigo A" +#define RID_SVXSTR_COLOR_MATERIAL_BLUE_A_DEF "Blue A" +#define RID_SVXSTR_COLOR_MATERIAL_LIGHT_BLUE_A_DEF "Light Blue A" +#define RID_SVXSTR_COLOR_MATERIAL_CYAN_A_DEF "Cyan A" +#define RID_SVXSTR_COLOR_MATERIAL_TEAL_A_DEF "Teal A" +#define RID_SVXSTR_COLOR_MATERIAL_GREEN_A_DEF "Green A" +#define RID_SVXSTR_COLOR_MATERIAL_LIGHT_GREEN_A_DEF "Light Green A" +#define RID_SVXSTR_COLOR_MATERIAL_LIME_A_DEF "Lime A" +#define RID_SVXSTR_COLOR_MATERIAL_BROWN_A_DEF "Brown A" +#define RID_SVXSTR_COLOR_MATERIAL_BROWN_DEF "Brown" +#define RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY_A_DEF "Blue Gray A" +#define RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY_DEF "Blue Gray" +// Reference-strings for standard-gradient-table +#define RID_SVXSTR_GRDT0_DEF "Gradient" +#define RID_SVXSTR_GRDT1_DEF "Linear blue/white" +#define RID_SVXSTR_GRDT2_DEF "Linear magenta/green" +#define RID_SVXSTR_GRDT3_DEF "Linear yellow/brown" +#define RID_SVXSTR_GRDT4_DEF "Radial green/black" +#define RID_SVXSTR_GRDT5_DEF "Radial red/yellow" +#define RID_SVXSTR_GRDT6_DEF "Rectangular red/white" +#define RID_SVXSTR_GRDT7_DEF "Square yellow/white" +#define RID_SVXSTR_GRDT8_DEF "Ellipsoid blue grey/light blue" +#define RID_SVXSTR_GRDT9_DEF "Axial light red/white" +#define RID_SVXSTR_GRDT10_DEF "Diagonal 1l" +#define RID_SVXSTR_GRDT11_DEF "Diagonal 1r" +#define RID_SVXSTR_GRDT12_DEF "Diagonal 2l" +#define RID_SVXSTR_GRDT13_DEF "Diagonal 2r" +#define RID_SVXSTR_GRDT14_DEF "Diagonal 3l" +#define RID_SVXSTR_GRDT15_DEF "Diagonal 3r" +#define RID_SVXSTR_GRDT16_DEF "Diagonal 4l" +#define RID_SVXSTR_GRDT17_DEF "Diagonal 4r" +#define RID_SVXSTR_GRDT18_DEF "Diagonal Blue" +#define RID_SVXSTR_GRDT19_DEF "Diagonal Green" +#define RID_SVXSTR_GRDT20_DEF "Diagonal Orange" +#define RID_SVXSTR_GRDT21_DEF "Diagonal Red" +#define RID_SVXSTR_GRDT22_DEF "Diagonal Turquoise" +#define RID_SVXSTR_GRDT23_DEF "Diagonal Violet" +#define RID_SVXSTR_GRDT24_DEF "From a Corner" +#define RID_SVXSTR_GRDT25_DEF "From a Corner, Blue" +#define RID_SVXSTR_GRDT26_DEF "From a Corner, Green" +#define RID_SVXSTR_GRDT27_DEF "From a Corner, Orange" +#define RID_SVXSTR_GRDT28_DEF "From a Corner, Red" +#define RID_SVXSTR_GRDT29_DEF "From a Corner, Turquoise" +#define RID_SVXSTR_GRDT30_DEF "From a Corner, Violet" +#define RID_SVXSTR_GRDT31_DEF "From the Middle" +#define RID_SVXSTR_GRDT32_DEF "From the Middle, Blue" +#define RID_SVXSTR_GRDT33_DEF "From the Middle, Green" +#define RID_SVXSTR_GRDT34_DEF "From the Middle, Orange" +#define RID_SVXSTR_GRDT35_DEF "From the Middle, Red" +#define RID_SVXSTR_GRDT36_DEF "From the Middle, Turquoise" +#define RID_SVXSTR_GRDT37_DEF "From the Middle, Violet" +#define RID_SVXSTR_GRDT38_DEF "Horizontal" +#define RID_SVXSTR_GRDT39_DEF "Horizontal Blue" +#define RID_SVXSTR_GRDT40_DEF "Horizontal Green" +#define RID_SVXSTR_GRDT41_DEF "Horizontal Orange" +#define RID_SVXSTR_GRDT42_DEF "Horizontal Red" +#define RID_SVXSTR_GRDT43_DEF "Horizontal Turquoise" +#define RID_SVXSTR_GRDT44_DEF "Horizontal Violet" +#define RID_SVXSTR_GRDT45_DEF "Radial" +#define RID_SVXSTR_GRDT46_DEF "Radial Blue" +#define RID_SVXSTR_GRDT47_DEF "Radial Green" +#define RID_SVXSTR_GRDT48_DEF "Radial Orange" +#define RID_SVXSTR_GRDT49_DEF "Radial Red" +#define RID_SVXSTR_GRDT50_DEF "Radial Turquoise" +#define RID_SVXSTR_GRDT51_DEF "Radial Violet" +#define RID_SVXSTR_GRDT52_DEF "Vertical" +#define RID_SVXSTR_GRDT53_DEF "Vertical Blue" +#define RID_SVXSTR_GRDT54_DEF "Vertical Green" +#define RID_SVXSTR_GRDT55_DEF "Vertical Orange" +#define RID_SVXSTR_GRDT56_DEF "Vertical Red" +#define RID_SVXSTR_GRDT57_DEF "Vertical Turquoise" +#define RID_SVXSTR_GRDT58_DEF "Vertical Violet" +#define RID_SVXSTR_GRDT59_DEF "Gray Gradient" +#define RID_SVXSTR_GRDT60_DEF "Yellow Gradient" +#define RID_SVXSTR_GRDT61_DEF "Orange Gradient" +#define RID_SVXSTR_GRDT62_DEF "Red Gradient" +#define RID_SVXSTR_GRDT63_DEF "Pink Gradient" +#define RID_SVXSTR_GRDT64_DEF "Sky" +#define RID_SVXSTR_GRDT65_DEF "Cyan Gradient" +#define RID_SVXSTR_GRDT66_DEF "Blue Gradient" +#define RID_SVXSTR_GRDT67_DEF "Purple Pipe" +#define RID_SVXSTR_GRDT68_DEF "Night" +#define RID_SVXSTR_GRDT69_DEF "Green Gradient" +//actual gradients defined for 6.1 +#define RID_SVXSTR_GRDT70_DEF "Pastel Bouquet" +#define RID_SVXSTR_GRDT71_DEF "Pastel Dream" +#define RID_SVXSTR_GRDT72_DEF "Blue Touch" +#define RID_SVXSTR_GRDT73_DEF "Blank with Gray" +#define RID_SVXSTR_GRDT74_DEF "Spotted Gray" +#define RID_SVXSTR_GRDT75_DEF "London Mist" +#define RID_SVXSTR_GRDT76_DEF "Teal to Blue" +#define RID_SVXSTR_GRDT77_DEF "Midnight" +#define RID_SVXSTR_GRDT78_DEF "Deep Ocean" +#define RID_SVXSTR_GRDT79_DEF "Submarine" +#define RID_SVXSTR_GRDT80_DEF "Green Grass" +#define RID_SVXSTR_GRDT81_DEF "Neon Light" +#define RID_SVXSTR_GRDT82_DEF "Sunshine" +#define RID_SVXSTR_GRDT83_DEF "Present" +#define RID_SVXSTR_GRDT84_DEF "Mahogany" +// Reference-strings for standard-hatch-table +#define RID_SVXSTR_HATCH0_DEF "Black 0 Degrees" +#define RID_SVXSTR_HATCH1_DEF "Black 90 Degrees" +#define RID_SVXSTR_HATCH2_DEF "Black 180 Degrees Crossed" +#define RID_SVXSTR_HATCH3_DEF "Blue 45 Degrees" +#define RID_SVXSTR_HATCH4_DEF "Blue -45 Degrees" +#define RID_SVXSTR_HATCH5_DEF "Blue 45 Degrees Crossed" +#define RID_SVXSTR_HATCH6_DEF "Green 30 Degrees" +#define RID_SVXSTR_HATCH7_DEF "Green 60 Degrees" +#define RID_SVXSTR_HATCH8_DEF "Green 90 Degrees Triple" +#define RID_SVXSTR_HATCH9_DEF "Red 45 Degrees" +#define RID_SVXSTR_HATCH10_DEF "Red 90 Degrees Crossed" +#define RID_SVXSTR_HATCH11_DEF "Red -45 Degrees Triple" +#define RID_SVXSTR_HATCH12_DEF "Yellow 45 Degrees" +#define RID_SVXSTR_HATCH13_DEF "Yellow 45 Degrees Crossed" +#define RID_SVXSTR_HATCH14_DEF "Yellow 45 Degrees Triple" +#define RID_SVXSTR_HATCH15_DEF "Hatching" +// Reference-strings for standard-bitmap-table +#define RID_SVXSTR_BMP0_DEF "Empty" +#define RID_SVXSTR_BMP1_DEF "Painted White" +#define RID_SVXSTR_BMP2_DEF "Paper Texture" +#define RID_SVXSTR_BMP3_DEF "Paper Crumpled" +#define RID_SVXSTR_BMP4_DEF "Paper Graph" +#define RID_SVXSTR_BMP5_DEF "Parchment Paper" +#define RID_SVXSTR_BMP6_DEF "Fence" +#define RID_SVXSTR_BMP7_DEF "Wooden Board" +#define RID_SVXSTR_BMP8_DEF "Maple Leaves" +#define RID_SVXSTR_BMP9_DEF "Lawn" +#define RID_SVXSTR_BMP10_DEF "Colorful Pebbles" +#define RID_SVXSTR_BMP11_DEF "Coffee Beans" +#define RID_SVXSTR_BMP12_DEF "Little Clouds" +#define RID_SVXSTR_BMP13_DEF "Bathroom Tiles" +#define RID_SVXSTR_BMP14_DEF "Wall of Rock" +#define RID_SVXSTR_BMP15_DEF "Zebra" +#define RID_SVXSTR_BMP16_DEF "Color Stripes" +#define RID_SVXSTR_BMP17_DEF "Gravel" +#define RID_SVXSTR_BMP18_DEF "Parchment Studio" +#define RID_SVXSTR_BMP19_DEF "Night Sky" +#define RID_SVXSTR_BMP20_DEF "Pool" +#define RID_SVXSTR_BMP21_DEF "Bitmap" +#define RID_SVXSTR_BMP79_DEF "Invoice Paper" +#define RID_SVXSTR_BMP80_DEF "Concrete" +#define RID_SVXSTR_BMP81_DEF "Brick Wall" +#define RID_SVXSTR_BMP82_DEF "Stone Wall" +#define RID_SVXSTR_BMP83_DEF "Floral" +#define RID_SVXSTR_BMP84_DEF "Space" +#define RID_SVXSTR_BMP85_DEF "Ice light" +#define RID_SVXSTR_BMP86_DEF "Marble" +#define RID_SVXSTR_BMP87_DEF "Sand light" +#define RID_SVXSTR_BMP88_DEF "Stone" +#define RID_SVXSTR_BMP89_DEF "White Diffusion" +#define RID_SVXSTR_BMP90_DEF "Surface" +#define RID_SVXSTR_BMP91_DEF "Cardboard" +#define RID_SVXSTR_BMP92_DEF "Studio" +// Reference strings for patterns - they are a variation of bitmaps +#define RID_SVXSTR_BMP22_DEF "5 Percent" +#define RID_SVXSTR_BMP23_DEF "10 Percent" +#define RID_SVXSTR_BMP24_DEF "20 Percent" +#define RID_SVXSTR_BMP25_DEF "25 Percent" +#define RID_SVXSTR_BMP26_DEF "30 Percent" +#define RID_SVXSTR_BMP27_DEF "40 Percent" +#define RID_SVXSTR_BMP28_DEF "50 Percent" +#define RID_SVXSTR_BMP29_DEF "60 Percent" +#define RID_SVXSTR_BMP30_DEF "70 Percent" +#define RID_SVXSTR_BMP31_DEF "75 Percent" +#define RID_SVXSTR_BMP32_DEF "80 Percent" +#define RID_SVXSTR_BMP33_DEF "90 Percent" +#define RID_SVXSTR_BMP34_DEF "Light Downward Diagonal" +#define RID_SVXSTR_BMP35_DEF "Light Upward Diagonal" +#define RID_SVXSTR_BMP36_DEF "Dark Downward Diagonal" +#define RID_SVXSTR_BMP37_DEF "Dark Upward Diagonal" +#define RID_SVXSTR_BMP38_DEF "Wide Downward Diagonal" +#define RID_SVXSTR_BMP39_DEF "Wide Upward Diagonal" +#define RID_SVXSTR_BMP40_DEF "Light Vertical" +#define RID_SVXSTR_BMP41_DEF "Light Horizontal" +#define RID_SVXSTR_BMP42_DEF "Narrow Vertical" +#define RID_SVXSTR_BMP43_DEF "Narrow Horizontal" +#define RID_SVXSTR_BMP44_DEF "Dark Vertical" +#define RID_SVXSTR_BMP45_DEF "Dark Horizontal" +#define RID_SVXSTR_BMP46_DEF "Dashed Downward Diagonal" +#define RID_SVXSTR_BMP47_DEF "Dashed Upward Diagonal" +#define RID_SVXSTR_BMP48_DEF "Dashed Horizontal" +#define RID_SVXSTR_BMP49_DEF "Dashed Vertical" +#define RID_SVXSTR_BMP50_DEF "Small Confetti" +#define RID_SVXSTR_BMP51_DEF "Large Confetti" +#define RID_SVXSTR_BMP52_DEF "Zig Zag" +#define RID_SVXSTR_BMP53_DEF "Wave" +#define RID_SVXSTR_BMP54_DEF "Diagonal Brick" +#define RID_SVXSTR_BMP55_DEF "Horizontal Brick" +#define RID_SVXSTR_BMP56_DEF "Weave" +#define RID_SVXSTR_BMP57_DEF "Plaid" +#define RID_SVXSTR_BMP58_DEF "Divot" +#define RID_SVXSTR_BMP59_DEF "Dotted Grid" +#define RID_SVXSTR_BMP60_DEF "Dotted Diamond" +#define RID_SVXSTR_BMP61_DEF "Shingle" +#define RID_SVXSTR_BMP62_DEF "Trellis" +#define RID_SVXSTR_BMP63_DEF "Sphere" +#define RID_SVXSTR_BMP64_DEF "Small Grid" +#define RID_SVXSTR_BMP65_DEF "Large Grid" +#define RID_SVXSTR_BMP66_DEF "Small Checker Board" +#define RID_SVXSTR_BMP67_DEF "Large Checker Board" +#define RID_SVXSTR_BMP68_DEF "Outlined Diamond" +#define RID_SVXSTR_BMP69_DEF "Solid Diamond" +#define RID_SVXSTR_BMP70_DEF "Vertical" +#define RID_SVXSTR_BMP71_DEF "Horizontal" +#define RID_SVXSTR_BMP72_DEF "Downward Diagonal" +#define RID_SVXSTR_BMP73_DEF "Upward Diagonal" +#define RID_SVXSTR_BMP74_DEF "Cross" +#define RID_SVXSTR_BMP75_DEF "Diagonal Cross" +#define RID_SVXSTR_BMP76_DEF "Dashed Dotted" +#define RID_SVXSTR_BMP77_DEF "Dashed Dotted Upward Diagonal" +#define RID_SVXSTR_BMP78_DEF "Solid Dotted" +// Reference-strings for standard-dash-table +#define RID_SVXSTR_DASH0_DEF "Dot" +#define RID_SVXSTR_DASH1_DEF "Long Dot" +#define RID_SVXSTR_DASH2_DEF "Double Dot" +#define RID_SVXSTR_DASH3_DEF "Dash" +#define RID_SVXSTR_DASH4_DEF "Long Dash" +#define RID_SVXSTR_DASH5_DEF "Double Dash" +#define RID_SVXSTR_DASH6_DEF "Long Dash Dot" +#define RID_SVXSTR_DASH7_DEF "Double Dash Dot" +#define RID_SVXSTR_DASH8_DEF "Double Dash Dot Dot" +#define RID_SVXSTR_DASH9_DEF "Ultrafine Dotted (var)" +#define RID_SVXSTR_DASH10_DEF "Fine Dotted" +#define RID_SVXSTR_DASH11_DEF "Ultrafine Dashed" +#define RID_SVXSTR_DASH12_DEF "Fine Dashed" +#define RID_SVXSTR_DASH13_DEF "Fine Dashed (var)" +#define RID_SVXSTR_DASH14_DEF "Dashed (var)" +#define RID_SVXSTR_DASH15_DEF "Line Style 9" +#define RID_SVXSTR_DASH16_DEF "3 Dashes 3 Dots (var)" +#define RID_SVXSTR_DASH17_DEF "Ultrafine 2 Dots 3 Dashes" +#define RID_SVXSTR_DASH18_DEF "2 Dots 1 Dash" +#define RID_SVXSTR_DASH19_DEF "Line with Fine Dots" +#define RID_SVXSTR_DASH20_DEF "Dash" +#define RID_SVXSTR_DASH21_DEF "Line Style" +// Reference-strings for standard-line-end-table +#define RID_SVXSTR_LEND0_DEF "Concave short" +#define RID_SVXSTR_LEND1_DEF "Square 45" +#define RID_SVXSTR_LEND2_DEF "Arrow short" +#define RID_SVXSTR_LEND3_DEF "Dimension Lines" +#define RID_SVXSTR_LEND4_DEF "Double Arrow" +#define RID_SVXSTR_LEND5_DEF "Triangle" +#define RID_SVXSTR_LEND6_DEF "Concave" +#define RID_SVXSTR_LEND7_DEF "Arrow large" +#define RID_SVXSTR_LEND8_DEF "Dimension Line" +#define RID_SVXSTR_LEND9_DEF "Circle" +#define RID_SVXSTR_LEND10_DEF "Square" +#define RID_SVXSTR_LEND11_DEF "Arrow" +#define RID_SVXSTR_LEND12_DEF "Half Circle" +#define RID_SVXSTR_LEND13_DEF "Triangle unfilled" +#define RID_SVXSTR_LEND14_DEF "Diamond unfilled" +#define RID_SVXSTR_LEND15_DEF "Diamond" +#define RID_SVXSTR_LEND16_DEF "Circle unfilled" +#define RID_SVXSTR_LEND17_DEF "Square 45 unfilled" +#define RID_SVXSTR_LEND18_DEF "Square unfilled" +#define RID_SVXSTR_LEND19_DEF "Half Circle unfilled" +#define RID_SVXSTR_LEND20_DEF "Dimension Line Arrow" +#define RID_SVXSTR_LEND21_DEF "Line short" +#define RID_SVXSTR_LEND22_DEF "Line" +#define RID_SVXSTR_LEND23_DEF "Half Arrow left" +#define RID_SVXSTR_LEND24_DEF "Half Arrow right" +#define RID_SVXSTR_LEND25_DEF "Reversed Arrow" +#define RID_SVXSTR_LEND26_DEF "CF One" +#define RID_SVXSTR_LEND27_DEF "CF Only One" +#define RID_SVXSTR_LEND28_DEF "CF Many" +#define RID_SVXSTR_LEND29_DEF "CF Many One" +#define RID_SVXSTR_LEND30_DEF "CF Zero One" +#define RID_SVXSTR_LEND31_DEF "CF Zero Many" +// Reference-strings for standard transparence gradients +#define RID_SVXSTR_TRASNGR0_DEF "Transparency" +#define RID_SVXSTR_COLOR_LIBRE_GREEN_1_DEF "Green 1 (%PRODUCTNAME Main Color)" +#define RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT_DEF "Green Accent" +#define RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT_DEF "Blue Accent" +#define RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT_DEF "Orange Accent" +#define RID_SVXSTR_COLOR_LIBRE_PURPLE_DEF "Purple" +#define RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT_DEF "Purple Accent" +#define RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT_DEF "Yellow Accent" + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/svx/inc/svxerr.hrc b/svx/inc/svxerr.hrc new file mode 100644 index 000000000..79409d118 --- /dev/null +++ b/svx/inc/svxerr.hrc @@ -0,0 +1,80 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SVXERR_HRC +#define INCLUDED_SVX_INC_SVXERR_HRC + +#include <utility> + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +#include <svx/svxerr.hxx> +#include <editeng/editerr.hxx> + +// Error-Context --------------------------------------------------------- +const ErrMsgCode RID_SVXERRCTX[] = +{ + { NC_("RID_SVXERRCTX", "$(ERR) executing the thesaurus.") , + ErrCode(ERRCTX_SVX_LINGU_THESAURUS) }, + { NC_("RID_SVXERRCTX", "$(ERR) executing the spellcheck.") , + ErrCode(ERRCTX_SVX_LINGU_SPELLING) }, + { NC_("RID_SVXERRCTX", "$(ERR) executing the hyphenation.") , + ErrCode(ERRCTX_SVX_LINGU_HYPHENATION) }, + { NC_("RID_SVXERRCTX", "$(ERR) creating a dictionary.") , + ErrCode(ERRCTX_SVX_LINGU_DICTIONARY) }, + { NC_("RID_SVXERRCTX", "$(ERR) setting background attribute.") , + ErrCode(ERRCTX_SVX_BACKGROUND) }, + { NC_("RID_SVXERRCTX", "$(ERR) loading the graphics.") , + ErrCode(ERRCTX_SVX_IMPORT_GRAPHIC) }, + { nullptr, ERRCODE_NONE } +}; + +// Error-Code ------------------------------------------------------------ +const ErrMsgCode RID_SVXERRCODE[] = +{ + { NC_("RID_SVXERRCODE", "$(ARG1) is not supported by the spellcheck function or is not presently active.\nPlease check your installation and, if necessary, install the required language module\nor activate it under 'Tools - Options - Language Settings - Writing Aids'."), + ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS }, + { NC_("RID_SVXERRCODE", "Spellcheck is not available.") , + ERRCODE_SVX_LINGU_LINGUNOTEXISTS }, + { NC_("RID_SVXERRCODE", "The custom dictionary $(ARG1) cannot be created.") , + ERRCODE_SVX_LINGU_DICT_NOTWRITEABLE }, + { NC_("RID_SVXERRCODE", "The graphic $(ARG1) could not be found.") , + ERRCODE_SVX_GRAPHIC_NOTREADABLE }, + { NC_("RID_SVXERRCODE", "An unlinked graphic could not be loaded."), + ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT }, + { NC_("RID_SVXERRCODE", "A language has not been fixed for the selected term."), + ERRCODE_SVX_LINGU_NOLANGUAGE }, + { NC_("RID_SVXERRCODE", "All changes to the Basic Code are lost. The original VBA Macro Code is saved instead."), + ERRCODE_SVX_MODIFIED_VBASIC_STORAGE }, + { NC_("RID_SVXERRCODE", "The original VBA Basic Code contained in the document will not be saved."), + ERRCODE_SVX_VBASIC_STORAGE_EXIST }, + { NC_("RID_SVXERRCODE", "The password is incorrect. The document cannot be opened."), + ERRCODE_SVX_WRONGPASS }, + { NC_("RID_SVXERRCODE", "The encryption method used in this document is not supported. Only Microsoft Office 97/2000 compatible password encryption is supported."), + ERRCODE_SVX_READ_FILTER_CRYPT }, + { NC_("RID_SVXERRCODE", "The loading of password-encrypted Microsoft PowerPoint presentations is not supported."), + ERRCODE_SVX_READ_FILTER_PPOINT }, + { NC_("RID_SVXERRCODE", "Password protection is not supported when documents are saved in a Microsoft Office format.\nDo you want to save the document without password protection?"), + ERRCODE_SVX_EXPORT_FILTER_CRYPT }, + { nullptr, ERRCODE_NONE } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/swframeposstrings.hrc b/svx/inc/swframeposstrings.hrc new file mode 100644 index 000000000..b08a9a3b5 --- /dev/null +++ b/svx/inc/swframeposstrings.hrc @@ -0,0 +1,75 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SWFRAMEPOSSTRINGS_HRC +#define INCLUDED_SVX_INC_SWFRAMEPOSSTRINGS_HRC + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +//the following string have to match the (enum values) positions in svx/swframeposstrings.hxx! +const char* RID_SVXSW_FRAMEPOSITIONS[] = +{ + NC_("RID_SVXSW_FRAMEPOSITIONS", "Left"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Right"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "From left"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Inside"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Outside"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "From inside"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Paragraph area"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Paragraph text area"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Left page border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Right page border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Left paragraph border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Right paragraph border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Inner page border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Outer page border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Inner paragraph border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Outer paragraph border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Entire page"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area bottom"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Base line"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Character"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Row"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Margin"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Paragraph text area"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Left frame border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Right frame border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Entire frame"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Frame text area"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Inner frame border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Outer frame border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Top"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Bottom"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Center"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Center"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "From top"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "From bottom"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Below"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "From right"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Top page border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Bottom page border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Top paragraph border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Bottom paragraph border"), + NC_("RID_SVXSW_FRAMEPOSITIONS", "Line of text") +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxallitm.hxx b/svx/inc/sxallitm.hxx new file mode 100644 index 000000000..ac0aedc78 --- /dev/null +++ b/svx/inc/sxallitm.hxx @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXALLITM_HXX +#define INCLUDED_SVX_INC_SXALLITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +class SdrAllPositionXItem: public SdrMetricItem { +public: + SdrAllPositionXItem(long nPosX=0): SdrMetricItem(SDRATTR_ALLPOSITIONX,nPosX) {} + virtual SdrAllPositionXItem* Clone(SfxItemPool*) const override + { + return new SdrAllPositionXItem(*this); + } +}; + +class SdrAllPositionYItem: public SdrMetricItem { +public: + SdrAllPositionYItem(long nPosY=0): SdrMetricItem(SDRATTR_ALLPOSITIONY,nPosY) {} + virtual SdrAllPositionYItem* Clone(SfxItemPool*) const override + { + return new SdrAllPositionYItem(*this); + } +}; + +class SdrAllSizeWidthItem: public SdrMetricItem { +public: + SdrAllSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_ALLSIZEWIDTH,nWdt) {} + virtual SdrAllSizeWidthItem* Clone(SfxItemPool*) const override + { + return new SdrAllSizeWidthItem(*this); + } +}; + +class SdrAllSizeHeightItem: public SdrMetricItem { +public: + SdrAllSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_ALLSIZEHEIGHT,nHgt) {} + virtual SdrAllSizeHeightItem* Clone(SfxItemPool*) const override + { + return new SdrAllSizeHeightItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxcaitm.hxx b/svx/inc/sxcaitm.hxx new file mode 100644 index 000000000..fc36d0076 --- /dev/null +++ b/svx/inc/sxcaitm.hxx @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svx/svddef.hxx> + +#include <svx/sdangitm.hxx> + +// SDRATTR_CAPTIONFIXEDANGLE SdrOnOffItem: +// sal_True=angle predefined by SdrCaptionAngleItem +// sal_False=free angle + +// class SdrCaptionAngleItem +// angle in 1/100 degree +// only if Type2, Type3 and Type4 +// and only if SdrCaptionIsFixedAngleItem=TRUE + +class SdrCaptionAngleItem final : public SdrAngleItem { +public: + SdrCaptionAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_CAPTIONANGLE,nAngle) {} + virtual SdrCaptionAngleItem* Clone(SfxItemPool*) const override + { + return new SdrCaptionAngleItem(*this); + } +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxcikitm.hxx b/svx/inc/sxcikitm.hxx new file mode 100644 index 000000000..c3fc7ce47 --- /dev/null +++ b/svx/inc/sxcikitm.hxx @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXCIKITM_HXX +#define INCLUDED_SVX_INC_SXCIKITM_HXX + +#include <svx/svddef.hxx> +#include <svl/eitem.hxx> +#include <svx/svdocirc.hxx> + +class SdrCircKindItem: public SfxEnumItem<SdrCircKind> { +public: + SdrCircKindItem(SdrCircKind eKind=SdrCircKind::Full): SfxEnumItem(SDRATTR_CIRCKIND, eKind) {} + virtual SdrCircKindItem* Clone(SfxItemPool* pPool=nullptr) const override; + virtual sal_uInt16 GetValueCount() const override; // { return 4; } + + virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; + virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; + + static OUString GetValueTextByPos(sal_uInt16 nPos); + virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxfiitm.hxx b/svx/inc/sxfiitm.hxx new file mode 100644 index 000000000..b629acfeb --- /dev/null +++ b/svx/inc/sxfiitm.hxx @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include <svl/poolitem.hxx> +#include <tools/fract.hxx> + +/*************************************************************************/ +/* FractionItem */ +/*************************************************************************/ + +class SdrFractionItem: public SfxPoolItem { + Fraction nValue; +public: + SdrFractionItem(sal_uInt16 nId, const Fraction& rVal): SfxPoolItem(nId), nValue(rVal) {} + virtual bool operator==(const SfxPoolItem&) const override; + virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper&) const override; + virtual SdrFractionItem* Clone(SfxItemPool *pPool=nullptr) const override; + const Fraction& GetValue() const { return nValue; } +}; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxlayitm.hxx b/svx/inc/sxlayitm.hxx new file mode 100644 index 000000000..6260ae414 --- /dev/null +++ b/svx/inc/sxlayitm.hxx @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXLAYITM_HXX +#define INCLUDED_SVX_INC_SXLAYITM_HXX + +#include <svx/svddef.hxx> +#include <svl/stritem.hxx> +#include <svl/intitem.hxx> +#include <svx/svdtypes.hxx> + +class SdrLayerIdItem: public SfxUInt16Item { +public: + SdrLayerIdItem(SdrLayerID nId): SfxUInt16Item(SDRATTR_LAYERID,sal_uInt8(nId)) {} + SdrLayerID GetValue() const { return SdrLayerID(SfxUInt16Item::GetValue()); } + virtual SdrLayerIdItem* Clone(SfxItemPool* pPool=nullptr) const override; +}; + +class SdrLayerNameItem: public SfxStringItem { +public: + SdrLayerNameItem() : SfxStringItem() { SetWhich(SDRATTR_LAYERNAME); } + SdrLayerNameItem(const OUString& rStr) : SfxStringItem(SDRATTR_LAYERNAME,rStr) {} + virtual SdrLayerNameItem* Clone(SfxItemPool* pPool=nullptr) const override; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxlogitm.hxx b/svx/inc/sxlogitm.hxx new file mode 100644 index 000000000..70fe78c00 --- /dev/null +++ b/svx/inc/sxlogitm.hxx @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXLOGITM_HXX +#define INCLUDED_SVX_INC_SXLOGITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +class SdrLogicSizeWidthItem: public SdrMetricItem { +public: + SdrLogicSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_LOGICSIZEWIDTH,nWdt) {} + virtual SdrLogicSizeWidthItem* Clone(SfxItemPool*) const override + { + return new SdrLogicSizeWidthItem(*this); + } +}; + +class SdrLogicSizeHeightItem: public SdrMetricItem { +public: + SdrLogicSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_LOGICSIZEHEIGHT,nHgt) {} + virtual SdrLogicSizeHeightItem* Clone(SfxItemPool*) const override + { + return new SdrLogicSizeHeightItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxmfsitm.hxx b/svx/inc/sxmfsitm.hxx new file mode 100644 index 000000000..5a9049740 --- /dev/null +++ b/svx/inc/sxmfsitm.hxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include <svx/svddef.hxx> +#include <svl/stritem.hxx> + +// Format string (similar to Calc), e.g. "#.###,00km" +// overwrites SdrMeasureUnitItem and SdrMeasureShowUnitItem +class SdrMeasureFormatStringItem: public SfxStringItem { +public: + SdrMeasureFormatStringItem() : SfxStringItem() { SetWhich(SDRATTR_MEASUREFORMATSTRING); } + virtual SdrMeasureFormatStringItem* Clone(SfxItemPool*) const override + { + return new SdrMeasureFormatStringItem(*this); + } +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxmkitm.hxx b/svx/inc/sxmkitm.hxx new file mode 100644 index 000000000..bebcda57b --- /dev/null +++ b/svx/inc/sxmkitm.hxx @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXMKITM_HXX +#define INCLUDED_SVX_INC_SXMKITM_HXX + +#include <svx/svddef.hxx> +#include <svl/eitem.hxx> + +enum SdrMeasureKind {SDRMEASURE_STD,SDRMEASURE_RADIUS}; // n.i. + + + +class SdrMeasureKindItem: public SfxEnumItem<SdrMeasureKind> { +public: + SdrMeasureKindItem() : SfxEnumItem(SDRATTR_MEASUREKIND, SDRMEASURE_STD) {} + virtual SdrMeasureKindItem* Clone(SfxItemPool* pPool=nullptr) const override; + virtual sal_uInt16 GetValueCount() const override; // { return 2; } + + virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; + virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; + + static OUString GetValueTextByPos(sal_uInt16 nPos); + virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxmoitm.hxx b/svx/inc/sxmoitm.hxx new file mode 100644 index 000000000..0b50536dd --- /dev/null +++ b/svx/inc/sxmoitm.hxx @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXMOITM_HXX +#define INCLUDED_SVX_INC_SXMOITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +// Overlap of the measure line over the measure helper lines +// Only of the measure arrows are on the outside +class SdrMeasureOverhangItem: public SdrMetricItem { +public: + SdrMeasureOverhangItem(long nVal): SdrMetricItem(SDRATTR_MEASUREOVERHANG,nVal) {} + virtual SdrMeasureOverhangItem* Clone(SfxItemPool*) const override + { + return new SdrMeasureOverhangItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxmovitm.hxx b/svx/inc/sxmovitm.hxx new file mode 100644 index 000000000..d3a4087c6 --- /dev/null +++ b/svx/inc/sxmovitm.hxx @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXMOVITM_HXX +#define INCLUDED_SVX_INC_SXMOVITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +class SdrMoveXItem: public SdrMetricItem { +public: + SdrMoveXItem(): SdrMetricItem(SDRATTR_MOVEX,0) {} + SdrMoveXItem* Clone(SfxItemPool*) const override + { + return new SdrMoveXItem(*this); + } +}; + +class SdrMoveYItem: public SdrMetricItem { +public: + SdrMoveYItem(): SdrMetricItem(SDRATTR_MOVEY,0) {} + SdrMoveYItem* Clone(SfxItemPool*) const override + { + return new SdrMoveYItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxmsitm.hxx b/svx/inc/sxmsitm.hxx new file mode 100644 index 000000000..78dea13bf --- /dev/null +++ b/svx/inc/sxmsitm.hxx @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXMSITM_HXX +#define INCLUDED_SVX_INC_SXMSITM_HXX + +#include <svx/svddef.hxx> +#include "sxsiitm.hxx" + +// Measure scale setting +// We do not overwrite a measure scale (UIScale), If the model already has one set. +// Instead, we multiply them with each other. +class SdrMeasureScaleItem final : public SdrScaleItem { +public: + SdrMeasureScaleItem() : SdrScaleItem(SDRATTR_MEASURESCALE,Fraction(1,1)) {} + virtual SdrMeasureScaleItem* Clone(SfxItemPool*) const override + { + return new SdrMeasureScaleItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxmtaitm.hxx b/svx/inc/sxmtaitm.hxx new file mode 100644 index 000000000..5c224d489 --- /dev/null +++ b/svx/inc/sxmtaitm.hxx @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXMTAITM_HXX +#define INCLUDED_SVX_INC_SXMTAITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdynitm.hxx> +#include <svx/sdangitm.hxx> + +// Turn text automatically in wright position (automatic UpsideDown). +// TextUpsideDown stays active and turns the text again if sal_True. +class SdrMeasureTextAutoAngleItem: public SdrYesNoItem { +public: + SdrMeasureTextAutoAngleItem(bool bOn=true): SdrYesNoItem(SDRATTR_MEASURETEXTAUTOANGLE,bOn) {} + virtual SdrMeasureTextAutoAngleItem* Clone(SfxItemPool*) const override + { + return new SdrMeasureTextAutoAngleItem(*this); + } +}; + +// Preferred perspective for reading text is only evaluated if TextAutoAngle=TRUE. +// Angle in 1/100deg from viewpoint of the user. +class SdrMeasureTextAutoAngleViewItem final : public SdrAngleItem { +public: + SdrMeasureTextAutoAngleViewItem(long nVal=31500): SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,nVal) {} + virtual SdrMeasureTextAutoAngleViewItem* Clone(SfxItemPool*) const override + { + return new SdrMeasureTextAutoAngleViewItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxoneitm.hxx b/svx/inc/sxoneitm.hxx new file mode 100644 index 000000000..516a93b91 --- /dev/null +++ b/svx/inc/sxoneitm.hxx @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXONEITM_HXX +#define INCLUDED_SVX_INC_SXONEITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +class SdrOnePositionXItem: public SdrMetricItem { +public: + SdrOnePositionXItem(long nPosX=0): SdrMetricItem(SDRATTR_ONEPOSITIONX,nPosX) {} + virtual SdrOnePositionXItem* Clone(SfxItemPool*) const override + { + return new SdrOnePositionXItem(*this); + } +}; + +class SdrOnePositionYItem: public SdrMetricItem { +public: + SdrOnePositionYItem(long nPosY=0): SdrMetricItem(SDRATTR_ONEPOSITIONY,nPosY) {} + virtual SdrOnePositionYItem* Clone(SfxItemPool*) const override + { + return new SdrOnePositionYItem(*this); + } +}; + +class SdrOneSizeWidthItem: public SdrMetricItem { +public: + SdrOneSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_ONESIZEWIDTH,nWdt) {} + virtual SdrOneSizeWidthItem* Clone(SfxItemPool*) const override + { + return new SdrOneSizeWidthItem(*this); + } +}; + +class SdrOneSizeHeightItem: public SdrMetricItem { +public: + SdrOneSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_ONESIZEHEIGHT,nHgt) {} + virtual SdrOneSizeHeightItem* Clone(SfxItemPool*) const override + { + return new SdrOneSizeHeightItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxopitm.hxx b/svx/inc/sxopitm.hxx new file mode 100644 index 000000000..b0d45bd54 --- /dev/null +++ b/svx/inc/sxopitm.hxx @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXOPITM_HXX +#define INCLUDED_SVX_INC_SXOPITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdynitm.hxx> + +class SdrObjPrintableItem: public SdrYesNoItem { +public: + SdrObjPrintableItem(bool bOn=false): SdrYesNoItem(SDRATTR_OBJPRINTABLE,bOn) {} + virtual SdrObjPrintableItem* Clone(SfxItemPool*) const override + { + return new SdrObjPrintableItem(*this); + } +}; + +class SdrObjVisibleItem: public SdrYesNoItem { +public: + SdrObjVisibleItem(bool bOn=true): SdrYesNoItem(SDRATTR_OBJVISIBLE,bOn) {} + virtual SdrObjVisibleItem* Clone(SfxItemPool*) const override + { + return new SdrObjVisibleItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxreaitm.hxx b/svx/inc/sxreaitm.hxx new file mode 100644 index 000000000..b7675a63c --- /dev/null +++ b/svx/inc/sxreaitm.hxx @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXREAITM_HXX +#define INCLUDED_SVX_INC_SXREAITM_HXX + +#include <svx/svddef.hxx> + +#include "sxfiitm.hxx" + +class SdrResizeXAllItem: public SdrFractionItem { +public: + SdrResizeXAllItem(): SdrFractionItem(SDRATTR_RESIZEXALL,Fraction(1,1)) {} + virtual SdrResizeXAllItem* Clone(SfxItemPool*) const override + { + return new SdrResizeXAllItem(*this); + } +}; + +class SdrResizeYAllItem: public SdrFractionItem { +public: + SdrResizeYAllItem(): SdrFractionItem(SDRATTR_RESIZEYALL,Fraction(1,1)) {} + virtual SdrResizeYAllItem* Clone(SfxItemPool*) const override + { + return new SdrResizeYAllItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxreoitm.hxx b/svx/inc/sxreoitm.hxx new file mode 100644 index 000000000..b619f57f8 --- /dev/null +++ b/svx/inc/sxreoitm.hxx @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXREOITM_HXX +#define INCLUDED_SVX_INC_SXREOITM_HXX + +#include <svx/svddef.hxx> + +#include "sxfiitm.hxx" + +class SdrResizeXOneItem: public SdrFractionItem { +public: + SdrResizeXOneItem(): SdrFractionItem(SDRATTR_RESIZEXONE,Fraction(1,1)) {} + SdrResizeXOneItem* Clone(SfxItemPool*) const override + { + return new SdrResizeXOneItem(*this); + } +}; + +class SdrResizeYOneItem: public SdrFractionItem { +public: + SdrResizeYOneItem(): SdrFractionItem(SDRATTR_RESIZEYONE,Fraction(1,1)) {} + SdrResizeYOneItem* Clone(SfxItemPool*) const override + { + return new SdrResizeYOneItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxroaitm.hxx b/svx/inc/sxroaitm.hxx new file mode 100644 index 000000000..dde8f989c --- /dev/null +++ b/svx/inc/sxroaitm.hxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXROAITM_HXX +#define INCLUDED_SVX_INC_SXROAITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +class SdrRotateAllItem final : public SdrAngleItem { +public: + SdrRotateAllItem(): SdrAngleItem(SDRATTR_ROTATEALL,0) {} + virtual SdrRotateAllItem* Clone(SfxItemPool*) const override + { + return new SdrRotateAllItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxrooitm.hxx b/svx/inc/sxrooitm.hxx new file mode 100644 index 000000000..28ceadafd --- /dev/null +++ b/svx/inc/sxrooitm.hxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXROOITM_HXX +#define INCLUDED_SVX_INC_SXROOITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +class SdrRotateOneItem: public SdrAngleItem { +public: + SdrRotateOneItem(): SdrAngleItem(SDRATTR_ROTATEONE,0) {} + SdrRotateOneItem* Clone(SfxItemPool*) const override + { + return new SdrRotateOneItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxsaitm.hxx b/svx/inc/sxsaitm.hxx new file mode 100644 index 000000000..ccaf50901 --- /dev/null +++ b/svx/inc/sxsaitm.hxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXSAITM_HXX +#define INCLUDED_SVX_INC_SXSAITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +class SdrShearAngleItem: public SdrAngleItem { +public: + SdrShearAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_SHEARANGLE,nAngle) {} + virtual SdrShearAngleItem* Clone(SfxItemPool*) const override + { + return new SdrShearAngleItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxsalitm.hxx b/svx/inc/sxsalitm.hxx new file mode 100644 index 000000000..f73b460a9 --- /dev/null +++ b/svx/inc/sxsalitm.hxx @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXSALITM_HXX +#define INCLUDED_SVX_INC_SXSALITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +class SdrHorzShearAllItem: public SdrAngleItem { +public: + SdrHorzShearAllItem(): SdrAngleItem(SDRATTR_HORZSHEARALL,0) {} + virtual SdrHorzShearAllItem* Clone(SfxItemPool*) const override + { + return new SdrHorzShearAllItem(*this); + } +}; + +class SdrVertShearAllItem: public SdrAngleItem { +public: + SdrVertShearAllItem(): SdrAngleItem(SDRATTR_VERTSHEARALL,0) {} + virtual SdrVertShearAllItem* Clone(SfxItemPool*) const override + { + return new SdrVertShearAllItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxsiitm.hxx b/svx/inc/sxsiitm.hxx new file mode 100644 index 000000000..2a5d65863 --- /dev/null +++ b/svx/inc/sxsiitm.hxx @@ -0,0 +1,30 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include "sxfiitm.hxx" + +class SdrScaleItem: public SdrFractionItem { +public: + SdrScaleItem(sal_uInt16 nId, const Fraction& rVal): SdrFractionItem(nId,rVal) {} + virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper&) const override; + virtual SdrScaleItem* Clone(SfxItemPool *pPool=nullptr) const override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxsoitm.hxx b/svx/inc/sxsoitm.hxx new file mode 100644 index 000000000..2c5273a5b --- /dev/null +++ b/svx/inc/sxsoitm.hxx @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXSOITM_HXX +#define INCLUDED_SVX_INC_SXSOITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdangitm.hxx> + +class SdrHorzShearOneItem: public SdrAngleItem { +public: + SdrHorzShearOneItem(): SdrAngleItem(SDRATTR_HORZSHEARONE,0) {} + SdrHorzShearOneItem* Clone(SfxItemPool*) const override + { + return new SdrHorzShearOneItem(*this); + } +}; + +class SdrVertShearOneItem: public SdrAngleItem { +public: + SdrVertShearOneItem(): SdrAngleItem(SDRATTR_VERTSHEARONE,0) {} + SdrVertShearOneItem* Clone(SfxItemPool*) const override + { + return new SdrVertShearOneItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sxtraitm.hxx b/svx/inc/sxtraitm.hxx new file mode 100644 index 000000000..1cebff377 --- /dev/null +++ b/svx/inc/sxtraitm.hxx @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_SXTRAITM_HXX +#define INCLUDED_SVX_INC_SXTRAITM_HXX + +#include <svx/svddef.hxx> +#include <svx/sdmetitm.hxx> + +class SdrTransformRef1XItem: public SdrMetricItem { +public: + SdrTransformRef1XItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1X,nHgt) {} + virtual SdrTransformRef1XItem* Clone(SfxItemPool*) const override + { + return new SdrTransformRef1XItem(*this); + } +}; + +class SdrTransformRef1YItem: public SdrMetricItem { +public: + SdrTransformRef1YItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1Y,nHgt) {} + virtual SdrTransformRef1YItem* Clone(SfxItemPool*) const override + { + return new SdrTransformRef1YItem(*this); + } +}; + +class SdrTransformRef2XItem: public SdrMetricItem { +public: + SdrTransformRef2XItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2X,nHgt) {} + virtual SdrTransformRef2XItem* Clone(SfxItemPool*) const override + { + return new SdrTransformRef2XItem(*this); + } +}; + +class SdrTransformRef2YItem: public SdrMetricItem { +public: + SdrTransformRef2YItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2Y,nHgt) {} + virtual SdrTransformRef2YItem* Clone(SfxItemPool*) const override + { + return new SdrTransformRef2YItem(*this); + } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/tabwin.hrc b/svx/inc/tabwin.hrc new file mode 100644 index 000000000..8ab188803 --- /dev/null +++ b/svx/inc/tabwin.hrc @@ -0,0 +1,34 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_TABWIN_HRC +#define INCLUDED_SVX_INC_TABWIN_HRC + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +const char* RID_RSC_TABWIN_PREFIX[] = +{ + NC_("RID_RSC_TABWIN_PREFIX", "Table"), + NC_("RID_RSC_TABWIN_PREFIX", "Query"), + NC_("RID_RSC_TABWIN_PREFIX", "SQL") +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/textchain.hxx b/svx/inc/textchain.hxx new file mode 100644 index 000000000..d5cae0be2 --- /dev/null +++ b/svx/inc/textchain.hxx @@ -0,0 +1,105 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <editeng/editdata.hxx> +#include <map> + +class ImpChainLinkProperties; +class SdrTextObj; +class SdrModel; + +namespace rtl { + class OUString; +} + +typedef OUString ChainLinkId; + +enum class CursorChainingEvent +{ + TO_NEXT_LINK, + TO_PREV_LINK, + UNCHANGED, + NULL_EVENT +}; + +class ImpChainLinkProperties +{ +protected: + friend class TextChain; + + ImpChainLinkProperties() { + aNilChainingEvent = false; + aCursorEvent = CursorChainingEvent::NULL_EVENT; + aPreChainingSel = ESelection(0,0,0,0); + aPostChainingSel = ESelection(0,0,0,0); + aIsPartOfLastParaInNextLink = false; // XXX: Should come from file + aSwitchingToNextBox = false; + } + +private: + // NOTE: Remember to set default value in constructor when adding field + bool aNilChainingEvent; + CursorChainingEvent aCursorEvent; + ESelection aPreChainingSel; + ESelection aPostChainingSel; + bool aIsPartOfLastParaInNextLink; + bool aSwitchingToNextBox; +}; + + +class TextChain +{ +public: + ~TextChain(); + + ImpChainLinkProperties *GetLinkProperties(const SdrTextObj *); + + // Specific Link Properties + CursorChainingEvent const & GetCursorEvent(const SdrTextObj *); + void SetCursorEvent(const SdrTextObj *, CursorChainingEvent const &); + + bool GetNilChainingEvent(const SdrTextObj *); + void SetNilChainingEvent(const SdrTextObj *, bool); + + ESelection const & GetPreChainingSel(const SdrTextObj *); + void SetPreChainingSel(const SdrTextObj *, ESelection const &); + + ESelection const & GetPostChainingSel(const SdrTextObj *); + void SetPostChainingSel(const SdrTextObj *, ESelection const &); + + // return whether a paragraph is split between this box and the next + bool GetIsPartOfLastParaInNextLink(const SdrTextObj *); + void SetIsPartOfLastParaInNextLink(const SdrTextObj *, bool ); + + // return whether we are currently moving the cursor to the next box (useful to know whether we should prevent SetOutlinerParaObject invocations in SdrTextObj::EndTextEdit) + bool GetSwitchingToNextBox(const SdrTextObj *); + void SetSwitchingToNextBox(const SdrTextObj *, bool); + +protected: + TextChain(); + +private: + std::map< ChainLinkId, ImpChainLinkProperties *> maLinkPropertiesMap; + + friend class SdrModel; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/textchaincursor.hxx b/svx/inc/textchaincursor.hxx new file mode 100644 index 000000000..8dfb65725 --- /dev/null +++ b/svx/inc/textchaincursor.hxx @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +class SdrObjEditView; +class SdrTextObj; +class KeyEvent; +class SdrOutliner; +enum class CursorChainingEvent; +struct ESelection; + + +class TextChainCursorManager +{ +public: + TextChainCursorManager(SdrObjEditView *pEditView, const SdrTextObj *pTextObj); + + bool HandleKeyEvent( const KeyEvent& rKEvt ); + + // Used by HandledKeyEvent and basic building block for handling cursor event + void HandleCursorEvent(const CursorChainingEvent aCurEvt, + const ESelection& aNewSel); + + // To be used after chaining event to deal with some nuisances + void HandleCursorEventAfterChaining(const CursorChainingEvent aCurEvt, + const ESelection& aNewSel); + +private: + SdrObjEditView *mpEditView; + const SdrTextObj *mpTextObj; + + // flag for handling of CANC which is kind of an exceptional case + bool mbHandlingDel; + + void impChangeEditingTextObj(SdrTextObj *pTargetTextObj, ESelection aNewSel); + void impDetectEvent(const KeyEvent& rKEvt, + CursorChainingEvent& rOutCursorEvt, + ESelection& rOutSel, + bool& rOutHandled); +}; + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ + diff --git a/svx/inc/textchainflow.hxx b/svx/inc/textchainflow.hxx new file mode 100644 index 000000000..c823663d6 --- /dev/null +++ b/svx/inc/textchainflow.hxx @@ -0,0 +1,104 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include "textchain.hxx" +#include <memory> + +class SdrTextObj; +class SdrOutliner; +class NonOverflowingText; +class OverflowingText; +class TextChain; +class OutlinerParaObject; +class OFlowChainedText; +class UFlowChainedText; + +class TextChainFlow +{ +public: + TextChainFlow(SdrTextObj *pChainTarget); + virtual ~TextChainFlow(); + + // Check for flow events in Outliner + virtual void CheckForFlowEvents(SdrOutliner *); + + void ExecuteUnderflow(SdrOutliner *); + + // Uses two outliners: one for the non-overflow text and one for overflowing (might be the same) + void ExecuteOverflow(SdrOutliner *, SdrOutliner *); + + bool IsOverflow() const; + bool IsUnderflow() const; + + SdrTextObj *GetLinkTarget() const; + +protected: + // Cursor related + bool mbPossiblyCursorOut; + ESelection maOverflowPosSel; + ESelection maPostChainingSel; + + std::unique_ptr<OFlowChainedText> mpOverflChText; + std::unique_ptr<UFlowChainedText> mpUnderflChText; + + void impCheckForFlowEvents(SdrOutliner *, SdrOutliner *); + + TextChain *GetTextChain() const; + + virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *); + void impMoveChainedTextToNextLink(SdrOutliner *); + + virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *); + +private: + bool mbOFisUFinduced; + + void impUpdateCursorInfo(); + + SdrTextObj *mpTargetLink; + SdrTextObj *mpNextLink; + + TextChain *mpTextChain; + + bool bUnderflow; + bool bOverflow; +}; + + +// NOTE: EditingTextChainFlow might be strongly coupled with behavior in SdrTextObj::onChainingEvent +class EditingTextChainFlow : public TextChainFlow +{ +public: + EditingTextChainFlow(SdrTextObj *); + virtual void CheckForFlowEvents(SdrOutliner *) override; + + //virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *) override; + +protected: + virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *) override; + + virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *) override; + +private: + void impBroadcastCursorInfo() const; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/txenctab.hrc b/svx/inc/txenctab.hrc new file mode 100644 index 000000000..e7171fbd1 --- /dev/null +++ b/svx/inc/txenctab.hrc @@ -0,0 +1,114 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_TXENCTAB_HRC +#define INCLUDED_SVX_INC_TXENCTAB_HRC + +#include <rtl/textenc.h> +#include <utility> + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +// Encodings for which no conversion exist yet are commented out. + +const std::pair<const char*, rtl_TextEncoding> RID_SVXSTR_TEXTENCODING_TABLE[] = +{ + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (Windows-1252/WinLatin 1)") , RTL_TEXTENCODING_MS_1252 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (Apple Macintosh)") , RTL_TEXTENCODING_APPLE_ROMAN }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (DOS/OS2-850/International)") , RTL_TEXTENCODING_IBM_850 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (DOS/OS2-437/US)") , RTL_TEXTENCODING_IBM_437 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (DOS/OS2-860/Portuguese)") , RTL_TEXTENCODING_IBM_860 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (DOS/OS2-861/Icelandic)") , RTL_TEXTENCODING_IBM_861 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (DOS/OS2-863/French (Can.))") , RTL_TEXTENCODING_IBM_863 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (DOS/OS2-865/Nordic)") , RTL_TEXTENCODING_IBM_865 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (ASCII/US)") , RTL_TEXTENCODING_ASCII_US }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (ISO-8859-1)") , RTL_TEXTENCODING_ISO_8859_1 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Eastern Europe (ISO-8859-2)") , RTL_TEXTENCODING_ISO_8859_2 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Latin 3 (ISO-8859-3)") , RTL_TEXTENCODING_ISO_8859_3 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Baltic (ISO-8859-4)") , RTL_TEXTENCODING_ISO_8859_4 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Cyrillic (ISO-8859-5)") , RTL_TEXTENCODING_ISO_8859_5 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Arabic (ISO-8859-6)") , RTL_TEXTENCODING_ISO_8859_6 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Greek (ISO-8859-7)") , RTL_TEXTENCODING_ISO_8859_7 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Hebrew (ISO-8859-8)") , RTL_TEXTENCODING_ISO_8859_8 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Turkish (ISO-8859-9)") , RTL_TEXTENCODING_ISO_8859_9 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (ISO-8859-14)") , RTL_TEXTENCODING_ISO_8859_14 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (ISO-8859-15/EURO)") , RTL_TEXTENCODING_ISO_8859_15 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Greek (DOS/OS2-737)") , RTL_TEXTENCODING_IBM_737 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Baltic (DOS/OS2-775)") , RTL_TEXTENCODING_IBM_775 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Eastern Europe (DOS/OS2-852)") , RTL_TEXTENCODING_IBM_852 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Cyrillic (DOS/OS2-855)") , RTL_TEXTENCODING_IBM_855 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Turkish (DOS/OS2-857)") , RTL_TEXTENCODING_IBM_857 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Hebrew (DOS/OS2-862)") , RTL_TEXTENCODING_IBM_862 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Arabic (DOS/OS2-864)") , RTL_TEXTENCODING_IBM_864 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Cyrillic (DOS/OS2-866/Russian)") , RTL_TEXTENCODING_IBM_866 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Greek (DOS/OS2-869/Modern)") , RTL_TEXTENCODING_IBM_869 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Eastern Europe (Windows-1250/WinLatin 2)") , RTL_TEXTENCODING_MS_1250 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Cyrillic (Windows-1251)") , RTL_TEXTENCODING_MS_1251 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Greek (Windows-1253)") , RTL_TEXTENCODING_MS_1253 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Turkish (Windows-1254)") , RTL_TEXTENCODING_MS_1254 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Hebrew (Windows-1255)") , RTL_TEXTENCODING_MS_1255 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Arabic (Windows-1256)") , RTL_TEXTENCODING_MS_1256 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Baltic (Windows-1257)") , RTL_TEXTENCODING_MS_1257 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Vietnamese (Windows-1258)") , RTL_TEXTENCODING_MS_1258 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Eastern Europe (Apple Macintosh)") , RTL_TEXTENCODING_APPLE_CENTEURO }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Eastern Europe (Apple Macintosh/Croatian)") , RTL_TEXTENCODING_APPLE_CROATIAN }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Cyrillic (Apple Macintosh)") , RTL_TEXTENCODING_APPLE_CYRILLIC }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Greek (Apple Macintosh)") , RTL_TEXTENCODING_APPLE_GREEK }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Western Europe (Apple Macintosh/Icelandic)") , RTL_TEXTENCODING_APPLE_ICELAND }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Eastern Europe (Apple Macintosh/Romanian)") , RTL_TEXTENCODING_APPLE_ROMANIAN }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Turkish (Apple Macintosh)") , RTL_TEXTENCODING_APPLE_TURKISH }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Cyrillic (Apple Macintosh/Ukrainian)") , RTL_TEXTENCODING_APPLE_UKRAINIAN }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese simplified (Apple Macintosh)") , RTL_TEXTENCODING_APPLE_CHINSIMP }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese traditional (Apple Macintosh)") , RTL_TEXTENCODING_APPLE_CHINTRAD }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Japanese (Apple Macintosh)") , RTL_TEXTENCODING_APPLE_JAPANESE }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Korean (Apple Macintosh)") , RTL_TEXTENCODING_APPLE_KOREAN }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Japanese (Windows-932)") , RTL_TEXTENCODING_MS_932 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese simplified (Windows-936)") , RTL_TEXTENCODING_MS_936 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Korean (Windows-949)") , RTL_TEXTENCODING_MS_949 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese traditional (Windows-950)") , RTL_TEXTENCODING_MS_950 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Japanese (Shift-JIS)") , RTL_TEXTENCODING_SHIFT_JIS }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese simplified (GB-2312)") , RTL_TEXTENCODING_GB_2312 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese simplified (GB-18030)") , RTL_TEXTENCODING_GB_18030 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese traditional (GBT-12345)") , RTL_TEXTENCODING_GBT_12345 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese simplified (GBK/GB-2312-80)") , RTL_TEXTENCODING_GBK }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese traditional (Big5)") , RTL_TEXTENCODING_BIG5 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese traditional (BIG5-HKSCS)") , RTL_TEXTENCODING_BIG5_HKSCS }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Japanese (EUC-JP)") , RTL_TEXTENCODING_EUC_JP }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese simplified (EUC-CN)") , RTL_TEXTENCODING_EUC_CN }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese traditional (EUC-TW)") , RTL_TEXTENCODING_EUC_TW }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Japanese (ISO-2022-JP)") , RTL_TEXTENCODING_ISO_2022_JP }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Chinese simplified (ISO-2022-CN)") , RTL_TEXTENCODING_ISO_2022_CN }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Cyrillic (KOI8-R)") , RTL_TEXTENCODING_KOI8_R }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Unicode (UTF-7)") , RTL_TEXTENCODING_UTF7 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Unicode (UTF-8)") , RTL_TEXTENCODING_UTF8 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Eastern Europe (ISO-8859-10)") , RTL_TEXTENCODING_ISO_8859_10 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Eastern Europe (ISO-8859-13)") , RTL_TEXTENCODING_ISO_8859_13 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Korean (EUC-KR)") , RTL_TEXTENCODING_EUC_KR }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Korean (ISO-2022-KR)") , RTL_TEXTENCODING_ISO_2022_KR }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Korean (Windows-Johab-1361)") , RTL_TEXTENCODING_MS_1361 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Unicode (UTF-16)") , RTL_TEXTENCODING_UCS2 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Thai (ISO-8859-11/TIS-620)") , RTL_TEXTENCODING_TIS_620 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Thai (Windows-874)") , RTL_TEXTENCODING_MS_874 }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Cyrillic (KOI8-U)") , RTL_TEXTENCODING_KOI8_U }, + { NC_("RID_SVXSTR_TEXTENCODING_TABLE", "Cyrillic (PT154)") , RTL_TEXTENCODING_PT154 } +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/uiobject.hxx b/svx/inc/uiobject.hxx new file mode 100644 index 000000000..c07b90cbf --- /dev/null +++ b/svx/inc/uiobject.hxx @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_SVX_INC_UIOBJECT_HXX +#define INCLUDED_SVX_INC_UIOBJECT_HXX + +#include <memory> +#include <vcl/uitest/uiobject.hxx> + +class SvxShowCharSet; + +class SvxShowCharSetUIObject final : public WindowUIObject +{ + SvxShowCharSet* mpCharSet; + +public: + SvxShowCharSetUIObject(const VclPtr<vcl::Window>& xCharSetWin, SvxShowCharSet* pCharSet); + + virtual void execute(const OUString& rAction, + const StringMap& rParameters) override; + + static std::unique_ptr<UIObject> create(vcl::Window* pWindow); + +private: + + OUString get_name() const override; +}; + +#endif // INCLUDED_SVX_INC_UIOBJECT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/unomlstr.hxx b/svx/inc/unomlstr.hxx new file mode 100644 index 000000000..af2559fa0 --- /dev/null +++ b/svx/inc/unomlstr.hxx @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVX_INC_UNOMLSTR_HXX +#define INCLUDED_SVX_INC_UNOMLSTR_HXX + +#include <com/sun/star/util/XModifyListener.hpp> + +#include <cppuhelper/implbase1.hxx> + +class SdrObject; + +class SvxUnoShapeModifyListener final : public ::cppu::WeakAggImplHelper1< css::util::XModifyListener > +{ + SdrObject* mpObj; + +public: + SvxUnoShapeModifyListener( SdrObject* pObj ) throw(); + virtual ~SvxUnoShapeModifyListener() throw() override; + + // css::util::XModifyListener + virtual void SAL_CALL modified(const css::lang::EventObject& aEvent) override; + + // css::lang::XEventListener + virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override; + + // internal + void invalidate() throw(); +}; + + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/xftshtit.hxx b/svx/inc/xftshtit.hxx new file mode 100644 index 000000000..aaefab951 --- /dev/null +++ b/svx/inc/xftshtit.hxx @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svl/intitem.hxx> + +/************************************************************************* +|* +|* FormText item for transparent shadow +|* +\************************************************************************/ + +class XFormTextShadowTranspItem final : public SfxUInt16Item +{ +public: + XFormTextShadowTranspItem(sal_uInt16 nShdwTransparence = 0); + virtual XFormTextShadowTranspItem* Clone(SfxItemPool* pPool = nullptr) const override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/xpolyimp.hxx b/svx/inc/xpolyimp.hxx new file mode 100644 index 000000000..425d2a551 --- /dev/null +++ b/svx/inc/xpolyimp.hxx @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_XPOLYIMP_HXX +#define INCLUDED_SVX_INC_XPOLYIMP_HXX + +#include <svx/xpoly.hxx> +#include <memory> +#include <vector> + +class Point; + +class ImpXPolygon +{ +public: + std::unique_ptr<Point[]> pPointAry; + std::unique_ptr<PolyFlags[]> + pFlagAry; + Point* pOldPointAry; + bool bDeleteOldPoints; + sal_uInt16 nSize; + sal_uInt16 nResize; + sal_uInt16 nPoints; + + ImpXPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize=16 ); + ImpXPolygon( const ImpXPolygon& rImpXPoly ); + ~ImpXPolygon(); + + bool operator==(const ImpXPolygon& rImpXPoly) const; + + void CheckPointDelete() const; + + void Resize( sal_uInt16 nNewSize, bool bDeletePoints = true ); + void InsertSpace( sal_uInt16 nPos, sal_uInt16 nCount ); + void Remove( sal_uInt16 nPos, sal_uInt16 nCount ); +}; + +class ImpXPolyPolygon +{ +public: + ::std::vector< XPolygon > aXPolyList; +}; + + +#endif // INCLUDED_SVX_INC_XPOLYIMP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |