diff options
Diffstat (limited to 'svx/inc')
27 files changed, 332 insertions, 134 deletions
diff --git a/svx/inc/svx/AccessibleShapeTreeInfo.hxx b/svx/inc/svx/AccessibleShapeTreeInfo.hxx index 5b9d7ba94d3b..ba4ee0701b9c 100644 --- a/svx/inc/svx/AccessibleShapeTreeInfo.hxx +++ b/svx/inc/svx/AccessibleShapeTreeInfo.hxx @@ -43,7 +43,7 @@ namespace accessibility { <ul> <li>The model broadcaster is used for getting notified about shape changes. Using this broadcaster makes in unnecessary to register at - each shape seperately.</li> + each shape separately.</li> <li>The view forwarder is responsible for transformation between coordinate systems and for providing the visible area both with respect to a specific window.</li> diff --git a/svx/inc/svx/AccessibleTextHelper.hxx b/svx/inc/svx/AccessibleTextHelper.hxx index a868dc606abb..6e8b7d4fd388 100644 --- a/svx/inc/svx/AccessibleTextHelper.hxx +++ b/svx/inc/svx/AccessibleTextHelper.hxx @@ -142,7 +142,7 @@ namespace accessibility /** Query the current edit source @attention This method returns by reference, so you are - responsible for serialization (typically, you aquired the + responsible for serialization (typically, you acquired the solar mutex when calling this method). Thus, the method should only be called from the main office thread. diff --git a/svx/inc/svx/ChildrenManager.hxx b/svx/inc/svx/ChildrenManager.hxx index be1f4079d466..53db7675e204 100644 --- a/svx/inc/svx/ChildrenManager.hxx +++ b/svx/inc/svx/ChildrenManager.hxx @@ -57,7 +57,7 @@ class ChildrenManagerImpl; forwarder in the shape tree info.</p> <p>A children manager registers itself at the broadcaster passed to its - constructor and transforms/forwards the recieved events to the listeners + constructor and transforms/forwards the received events to the listeners of the also given context base. The transformation process includes interpreting a <type>document::XEventListener</type>, the change from XShape references to the associated XAccessible reference, and the @@ -80,7 +80,7 @@ public: /** Create a children manager, which manages the children of the given parent. The parent is used for creating accessible objects. The list of shapes for which to create those objects is not derived from - the parent and has to be provided seperately by calling one of the + the parent and has to be provided separately by calling one of the update methods. @param rxParent The parent of the accessible objects which will be created @@ -135,7 +135,7 @@ public: /** Update the child manager. Take care of a modified set of children and modified visible area. This method can optimize the update - process with respect seperate updates of a modified children list + process with respect separate updates of a modified children list and visible area. @param bCreateNewObjectsOnDemand If </true> then accessible objects associated with the visible diff --git a/svx/inc/svx/IAccessibleParent.hxx b/svx/inc/svx/IAccessibleParent.hxx index bf1f3dd6fc56..48389825e0fb 100644 --- a/svx/inc/svx/IAccessibleParent.hxx +++ b/svx/inc/svx/IAccessibleParent.hxx @@ -50,7 +50,7 @@ public: with another and send the appropriate notifications. That are two child events: One notifying the removal of the current child and one about the existence of the new child. The index of the new child is - implementation dependent, i.e. it is not garanteed that the + implementation dependent, i.e. it is not guaranteed that the replacement has the same index as the current child has. <p>A default implementation can just use the ShapeTypeHandler::CreateAccessibleObject diff --git a/svx/inc/svx/IAccessibleViewForwarder.hxx b/svx/inc/svx/IAccessibleViewForwarder.hxx index a99db066e43e..53d40e514d0d 100644 --- a/svx/inc/svx/IAccessibleViewForwarder.hxx +++ b/svx/inc/svx/IAccessibleViewForwarder.hxx @@ -45,13 +45,13 @@ namespace accessibility { transformation methods do not require explicit mapmodes. These have to be provided implicitely by the classes that implement this interface. A third, less important, difference are the additional - transfomation methods for sizes. The reasons for their existince are + transfomation methods for sizes. The reasons for their existence are convenience and improved performance.</p> @attention Note, that modifications of the underlying view that lead to different transformations between internal and screen coordinates or - change the validity of the forwarder have to be signaled seperately. + change the validity of the forwarder have to be signaled separately. */ class IAccessibleViewForwarder { diff --git a/svx/inc/svx/dbaexchange.hxx b/svx/inc/svx/dbaexchange.hxx index dc6b765dd502..3760342f445c 100644 --- a/svx/inc/svx/dbaexchange.hxx +++ b/svx/inc/svx/dbaexchange.hxx @@ -169,7 +169,7 @@ namespace svx //==================================================================== //= ODataAccessObjectTransferable //==================================================================== - /** class for transfering data access objects (tables, queries, statements ...) + /** class for transferring data access objects (tables, queries, statements ...) */ class SVX_DLLPUBLIC ODataAccessObjectTransferable : public TransferableHelper { @@ -257,7 +257,7 @@ namespace svx //==================================================================== //= OMultiColumnTransferable //==================================================================== - /** class for transfering multiple columns + /** class for transferring multiple columns */ class SVX_DLLPUBLIC OMultiColumnTransferable : public TransferableHelper { diff --git a/svx/inc/svx/dlgctrl.hxx b/svx/inc/svx/dlgctrl.hxx index 682bb7a1c0a5..c9a53303b3ba 100644 --- a/svx/inc/svx/dlgctrl.hxx +++ b/svx/inc/svx/dlgctrl.hxx @@ -255,7 +255,7 @@ public: long PointToIndex(const Point &pt) const; Point IndexToPoint(long nIndex) const ; long GetFoucsPosIndex() const ; - //Solution:Keyboard fucntion for key input and focus handling function + //Solution:Keyboard function for key input and focus handling function virtual void KeyInput( const KeyEvent& rKEvt ); virtual void GetFocus(); virtual void LoseFocus(); diff --git a/svx/inc/svx/fillctrl.hxx b/svx/inc/svx/fillctrl.hxx index daa2b20604db..53ec40622b90 100644 --- a/svx/inc/svx/fillctrl.hxx +++ b/svx/inc/svx/fillctrl.hxx @@ -19,14 +19,13 @@ * *************************************************************/ - - #ifndef _FILLCTRL_HXX #define _FILLCTRL_HXX #include <svl/lstner.hxx> #include <sfx2/tbxctrl.hxx> #include "svx/svxdllapi.h" +#include <svx/xenum.hxx> class XFillStyleItem; class XFillColorItem; @@ -44,32 +43,33 @@ class ListBox; |* \************************************************************************/ -class SVX_DLLPUBLIC SvxFillToolBoxControl: public SfxToolBoxControl +class SVX_DLLPUBLIC SvxFillToolBoxControl : public SfxToolBoxControl { private: - XFillStyleItem* pStyleItem; - XFillColorItem* pColorItem; - XFillGradientItem* pGradientItem; - XFillHatchItem* pHatchItem; - XFillBitmapItem* pBitmapItem; + XFillStyleItem* mpStyleItem; + XFillColorItem* mpColorItem; + XFillGradientItem* mpGradientItem; + XFillHatchItem* mpHatchItem; + XFillBitmapItem* mpBitmapItem; + + FillControl* mpFillControl; + SvxFillTypeBox* mpFillTypeLB; + SvxFillAttrBox* mpFillAttrLB; - FillControl* pFillControl; - SvxFillTypeBox* pFillTypeLB; - SvxFillAttrBox* pFillAttrLB; + XFillStyle meLastXFS; - sal_Bool bUpdate; - sal_uInt16 eLastXFS; + /// bitfield + bool mbUpdate : 1; public: SFX_DECL_TOOLBOX_CONTROL(); - SvxFillToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); + SvxFillToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx); ~SvxFillToolBoxControl(); - virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ); - void Update( const SfxPoolItem* pState ); - virtual Window* CreateItemWindow( Window *pParent ); + virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState); + void Update(const SfxPoolItem* pState); + virtual Window* CreateItemWindow(Window* pParent); }; //======================================================================== @@ -79,24 +79,34 @@ class FillControl : public Window private: friend class SvxFillToolBoxControl; - SvxFillTypeBox* pLbFillType; - SvxFillAttrBox* pLbFillAttr; - Size aLogicalFillSize; - Size aLogicalAttrSize; - Timer aDelayTimer; - -//#if 0 // _SOLAR__PRIVATE - DECL_LINK( DelayHdl, Timer * ); - DECL_LINK( SelectFillTypeHdl, ListBox * ); - DECL_LINK( SelectFillAttrHdl, ListBox * ); -//#endif - virtual void DataChanged( const DataChangedEvent& rDCEvt ); + SvxFillTypeBox* mpLbFillType; + SvxFillAttrBox* mpLbFillAttr; + Size maLogicalFillSize; + Size maLogicalAttrSize; + + // + sal_uInt16 mnLastFillTypeControlSelectEntryPos; + sal_uInt16 mnLastFillAttrControlSelectEntryPos; + + /// bitfield + bool mbFillTypeChanged : 1; + + DECL_LINK(SelectFillTypeHdl,ListBox *); + DECL_LINK(SelectFillAttrHdl,ListBox *); + + virtual void DataChanged(const DataChangedEvent& rDCEvt); + + void InitializeFillStyleAccordingToGivenFillType(XFillStyle aFillStyle); + void updateLastFillTypeControlSelectEntryPos(); + void updateLastFillAttrControlSelectEntryPos(); + public: - FillControl( Window* pParent, WinBits nStyle = 0 ); + FillControl(Window* pParent, WinBits nStyle = 0); ~FillControl(); virtual void Resize(); }; -#endif // _FILLCTRL_HXX +#endif // _FILLCTRL_HXX +// eof diff --git a/svx/inc/svx/fmgridcl.hxx b/svx/inc/svx/fmgridcl.hxx index 6c51494f5b51..7a1d92c18a6d 100644 --- a/svx/inc/svx/fmgridcl.hxx +++ b/svx/inc/svx/fmgridcl.hxx @@ -141,7 +141,7 @@ public: @param eObjType The type to ask for @param _nPosition - The position of a tablecell (index position), header bar colum/row cell + The position of a tablecell (index position), header bar column/row cell @return The name of the specified object. */ @@ -151,7 +151,7 @@ public: @param eObjType The type to ask for @param _nPosition - The position of a tablecell (index position), header bar colum/row cell + The position of a tablecell (index position), header bar column/row cell @return The description of the specified object. */ diff --git a/svx/inc/svx/fmsrcimp.hxx b/svx/inc/svx/fmsrcimp.hxx index 5791d2e44e09..dc4ba7e81d50 100644 --- a/svx/inc/svx/fmsrcimp.hxx +++ b/svx/inc/svx/fmsrcimp.hxx @@ -92,7 +92,7 @@ struct FmSearchProgress class FmRecordCountListener : public ::cppu::WeakImplHelper1< ::com::sun::star::beans::XPropertyChangeListener> { -// Atribute +// Attribute Link m_lnkWhoWantsToKnow; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xListening; diff --git a/svx/inc/svx/hdft.hxx b/svx/inc/svx/hdft.hxx index f0018b3a6e55..307e044933f1 100644 --- a/svx/inc/svx/hdft.hxx +++ b/svx/inc/svx/hdft.hxx @@ -43,11 +43,15 @@ // class SvxHFPage ------------------------------------------------------ -class SVX_DLLPUBLIC SvxHFPage: public SfxTabPage +class SVX_DLLPUBLIC SvxHFPage : public SfxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; +private: + //UUUU + void EnableDrawingLayerFillStyles(bool bNew) { mbEnableDrawingLayerFillStyles = bNew; } + public: virtual sal_Bool FillItemSet( SfxItemSet& rOutSet ); @@ -55,8 +59,12 @@ public: virtual ~SvxHFPage(); - void DisableDeleteQueryBox() { bDisableQueryBox = sal_True; } - void EnableBackgroundSelector( sal_Bool bNew ) { bEnableBackgroundSelector = bNew; } + void DisableDeleteQueryBox() { mbDisableQueryBox = true; } + void EnableBackgroundSelector(bool bNew) { mbEnableBackgroundSelector = bNew; } + + //UUUU + virtual void PageCreated(SfxAllItemSet aSet); + void EnableDynamicSpacing(); protected: @@ -84,9 +92,11 @@ protected: sal_uInt16 nId; SfxItemSet* pBBSet; - sal_Bool bDisableQueryBox; - sal_Bool bEnableBackgroundSelector; - bool bInReset; + + /// bitfield + bool mbDisableQueryBox : 1; + bool mbEnableBackgroundSelector : 1; + bool mbEnableDrawingLayerFillStyles : 1; void InitHandler(); DECL_LINK( TurnOnHdl, CheckBox*); diff --git a/svx/inc/svx/msdffdef.hxx b/svx/inc/svx/msdffdef.hxx index f8530309ad4e..bb13756678c9 100644 --- a/svx/inc/svx/msdffdef.hxx +++ b/svx/inc/svx/msdffdef.hxx @@ -1100,7 +1100,7 @@ typedef enum { } MSO_BLIPUSAGE; typedef enum { // GEL provided types... - mso_blipERROR = 0, // An error occured during loading + mso_blipERROR = 0, // An error occurred during loading mso_blipUNKNOWN, // An unknown blip type mso_blipEMF, // Windows Enhanced Metafile mso_blipWMF, // Windows Metafile diff --git a/svx/inc/svx/pagectrl.hxx b/svx/inc/svx/pagectrl.hxx index 471b72c3cfea..df3e7582a39e 100644 --- a/svx/inc/svx/pagectrl.hxx +++ b/svx/inc/svx/pagectrl.hxx @@ -19,19 +19,14 @@ * *************************************************************/ - #ifndef _SVX_PAGECTRL_HXX #define _SVX_PAGECTRL_HXX -// include --------------------------------------------------------------- - #include <vcl/window.hxx> #include "svx/svxdllapi.h" - -// forward --------------------------------------------------------------- +#include <svx/sdr/attribute/sdrallfillattributeshelper.hxx> class SvxBoxItem; -struct PageWindow_Impl; // class SvxPageWindow --------------------------------------------------- @@ -47,29 +42,34 @@ private: long nBottom; long nLeft; long nRight; - Color aColor; - PageWindow_Impl* pImpl; + SvxBoxItem* pBorder; + sal_Bool bResetBackground; + sal_Bool bFrameDirection; + sal_Int32 nFrameDirection; long nHdLeft; long nHdRight; long nHdDist; long nHdHeight; - Color aHdColor; SvxBoxItem* pHdBorder; long nFtLeft; long nFtRight; long nFtDist; long nFtHeight; - Color aFtColor; SvxBoxItem* pFtBorder; - sal_Bool bFooter :1; - sal_Bool bHeader :1; - sal_Bool bTable :1; - sal_Bool bHorz :1; - sal_Bool bVert :1; + //UUUU + drawinglayer::attribute::SdrAllFillAttributesHelperPtr maHeaderFillAttributes; + drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFooterFillAttributes; + drawinglayer::attribute::SdrAllFillAttributesHelperPtr maPageFillAttributes; + + sal_Bool bFooter : 1; + sal_Bool bHeader : 1; + sal_Bool bTable : 1; + sal_Bool bHorz : 1; + sal_Bool bVert : 1; sal_uInt16 eUsage; @@ -77,90 +77,95 @@ private: String aRightText; protected: - virtual void Paint( const Rectangle& rRect ); + virtual void Paint(const Rectangle& rRect); - virtual void DrawPage( const Point& rPoint, - const sal_Bool bSecond, - const sal_Bool bEnabled ); + virtual void DrawPage(const Point& rPoint, + const sal_Bool bSecond, + const sal_Bool bEnabled); + + //UUUU + void drawFillAttributes( + const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes, + const Rectangle& rPaintRange, + const Rectangle& rDefineRange); public: - SvxPageWindow( Window* pParent, const ResId& rId ); + SvxPageWindow(Window* pParent,const ResId& rId); ~SvxPageWindow(); - void SetWidth( long nW ) { aSize.Width() = nW; } - void SetHeight( long nH ) { aSize.Height() = nH; } + //UUUU + void setHeaderFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maHeaderFillAttributes = rFillAttributes; } + void setFooterFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maFooterFillAttributes = rFillAttributes; } + void setPageFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maPageFillAttributes = rFillAttributes; } + const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& getPageFillAttributes() const { return maPageFillAttributes; } + + void SetWidth(long nW) { aSize.Width() = nW; } + void SetHeight(long nH) { aSize.Height() = nH; } - void SetSize( const Size& rSz ) { aSize = rSz; } + void SetSize(const Size& rSz) { aSize = rSz; } const Size& GetSize() const { return aSize; } - void SetTop( long nNew ) { nTop = nNew; } - void SetBottom( long nNew ) { nBottom = nNew; } - void SetLeft( long nNew ) { nLeft = nNew; } - void SetRight( long nNew ) { nRight = nNew; } - void SetColor( const Color& rNew ) { aColor = rNew; } - void SetBorder( const SvxBoxItem& rNew ); - void SetBitmap( Bitmap* pBmp ); - - long GetTop() const { return nTop; } - long GetBottom() const { return nBottom;} - long GetLeft() const { return nLeft; } + void SetTop(long nNew) { nTop = nNew; } + void SetBottom(long nNew) { nBottom = nNew; } + void SetLeft(long nNew) { nLeft = nNew; } + void SetRight(long nNew) { nRight = nNew; } + void SetBorder(const SvxBoxItem& rNew); + + long GetTop() const { return nTop; } + long GetBottom() const { return nBottom; } + long GetLeft() const { return nLeft; } long GetRight() const { return nRight; } - const Color& GetColor() const { return aColor; } const SvxBoxItem& GetBorder() const; - void SetHdLeft( long nNew ) { nHdLeft = nNew; } - void SetHdRight( long nNew ) { nHdRight = nNew; } - void SetHdDist( long nNew ) { nHdDist = nNew; } - void SetHdHeight( long nNew ) { nHdHeight = nNew; } - void SetHdColor( const Color& aNew ) { aHdColor = aNew; } - void SetHdBorder( const SvxBoxItem& rNew ); + void SetHdLeft(long nNew) { nHdLeft = nNew; } + void SetHdRight(long nNew) { nHdRight = nNew; } + void SetHdDist(long nNew) { nHdDist = nNew; } + void SetHdHeight(long nNew) { nHdHeight = nNew; } + void SetHdBorder(const SvxBoxItem& rNew); - long GetHdLeft() const { return nHdLeft; } + long GetHdLeft() const { return nHdLeft; } long GetHdRight() const { return nHdRight; } - long GetHdDist() const { return nHdDist; } - long GetHdHeight() const { return nHdHeight;} + long GetHdDist() const { return nHdDist; } + long GetHdHeight() const { return nHdHeight; } - const Color& GetHdColor() const { return aHdColor; } const SvxBoxItem& GetHdBorder() const { return *pHdBorder; } - void SetFtLeft( long nNew ) { nFtLeft = nNew; } - void SetFtRight( long nNew ) { nFtRight = nNew; } - void SetFtDist( long nNew ) { nFtDist = nNew; } - void SetFtHeight( long nNew ) { nFtHeight = nNew; } - void SetFtColor( const Color& aNew ) { aFtColor = aNew; } - void SetFtBorder( const SvxBoxItem& rNew ); + void SetFtLeft(long nNew) { nFtLeft = nNew; } + void SetFtRight(long nNew) { nFtRight = nNew; } + void SetFtDist(long nNew) { nFtDist = nNew; } + void SetFtHeight(long nNew) { nFtHeight = nNew; } + void SetFtBorder(const SvxBoxItem& rNew); - long GetFtLeft() const { return nFtLeft; } + long GetFtLeft() const { return nFtLeft; } long GetFtRight() const { return nFtRight; } - long GetFtDist() const { return nFtDist; } - long GetFtHeight() const { return nFtHeight;} + long GetFtDist() const { return nFtDist; } + long GetFtHeight() const { return nFtHeight; } - const Color& GetFtColor() const { return aFtColor; } const SvxBoxItem& GetFtBorder() const { return *pFtBorder; } - void SetUsage( sal_uInt16 eU ) { eUsage = eU; } - sal_uInt16 GetUsage() const { return eUsage;} + void SetUsage(sal_uInt16 eU) { eUsage = eU; } + sal_uInt16 GetUsage() const { return eUsage; } - void SetHeader( sal_Bool bNew ) { bHeader = bNew; } - sal_Bool GetHeader() const { return bHeader;} - void SetFooter( sal_Bool bNew ) { bFooter = bNew; } - sal_Bool GetFooter() const { return bFooter;} + void SetHeader(sal_Bool bNew) { bHeader = bNew; } + sal_Bool GetHeader() const { return bHeader; } + void SetFooter(sal_Bool bNew) { bFooter = bNew; } + sal_Bool GetFooter() const { return bFooter; } - void SetTable( sal_Bool bNew ) { bTable = bNew; } - sal_Bool GetTable() const { return bTable;} - void SetHorz( sal_Bool bNew ) { bHorz = bNew; } - sal_Bool GetHorz() const { return bHorz;} - void SetVert( sal_Bool bNew ) { bVert = bNew; } - sal_Bool GetVert() const { return bVert;} + void SetTable(sal_Bool bNew) { bTable = bNew; } + sal_Bool GetTable() const { return bTable; } + void SetHorz(sal_Bool bNew) { bHorz = bNew; } + sal_Bool GetHorz() const { return bHorz; } + void SetVert(sal_Bool bNew) { bVert = bNew; } + sal_Bool GetVert() const { return bVert; } void EnableFrameDirection(sal_Bool bEnable); //uses enum SvxFrameDirection - void SetFrameDirection(sal_Int32 nFrameDirection); + void SetFrameDirection(sal_Int32 nDirection); void ResetBackground(); }; #endif // #ifndef _SVX_PAGECTRL_HXX - +//eof diff --git a/svx/inc/svx/sdr/attribute/sdrallfillattributeshelper.hxx b/svx/inc/svx/sdr/attribute/sdrallfillattributeshelper.hxx new file mode 100755 index 000000000000..3983db27fc07 --- /dev/null +++ b/svx/inc/svx/sdr/attribute/sdrallfillattributeshelper.hxx @@ -0,0 +1,98 @@ +/************************************************************** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + *************************************************************/ + +#ifndef _SDR_ATTRIBUTE_SDRALLFILLATTRIBUTESHELPER_HXX +#define _SDR_ATTRIBUTE_SDRALLFILLATTRIBUTESHELPER_HXX + +#include "svx/svxdllapi.h" +#include <drawinglayer/attribute/fillgradientattribute.hxx> +#include <drawinglayer/attribute/sdrfillattribute.hxx> +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <boost/shared_ptr.hpp> +#include <tools/color.hxx> +#include <svl/itemset.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + class SVX_DLLPUBLIC SdrAllFillAttributesHelper + { + private: + basegfx::B2DRange maLastPaintRange; + basegfx::B2DRange maLastDefineRange; + boost::shared_ptr< drawinglayer::attribute::SdrFillAttribute > maFillAttribute; + boost::shared_ptr< drawinglayer::attribute::FillGradientAttribute > maFillGradientAttribute; + drawinglayer::primitive2d::Primitive2DSequence maPrimitives; + + void createPrimitive2DSequence( + const basegfx::B2DRange& rPaintRange, + const basegfx::B2DRange& rDefineRange); + + protected: + public: + SdrAllFillAttributesHelper(); + SdrAllFillAttributesHelper(const Color& rColor); + SdrAllFillAttributesHelper(const SfxItemSet& rSet); + ~SdrAllFillAttributesHelper(); + + bool isUsed() const; + bool hasSdrFillAttribute() const { return maFillAttribute.get(); } + bool hasFillGradientAttribute() const { return maFillGradientAttribute.get(); } + bool isTransparent() const; + + const drawinglayer::attribute::SdrFillAttribute& getFillAttribute() const; + const drawinglayer::attribute::FillGradientAttribute& getFillGradientAttribute() const; + const drawinglayer::primitive2d::Primitive2DSequence& getPrimitive2DSequence( + const basegfx::B2DRange& rPaintRange, + const basegfx::B2DRange& rDefineRange) const; + + // get average fill color; tries to calculate a 'medium' color + // which e.g. may be used as comparison to decide if other + // colors are visible + basegfx::BColor getAverageColor(const basegfx::BColor& rFallback) const; + + // return if a repaint of this content needs a complete repaint. This + // is e.g. not needed for no fill or color fill (a partial repaint + // will do the trick), but necessary for everything that is not top-left + // oriented + bool needCompleteRepaint() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + typedef boost::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SDR_ATTRIBUTE_SDRALLFILLATTRIBUTESHELPER_HXX + +// eof diff --git a/svx/inc/svx/sdr/contact/displayinfo.hxx b/svx/inc/svx/sdr/contact/displayinfo.hxx index abc599a922b3..4bae7bb99f64 100644 --- a/svx/inc/svx/sdr/contact/displayinfo.hxx +++ b/svx/inc/svx/sdr/contact/displayinfo.hxx @@ -73,7 +73,7 @@ namespace sdr bool mbPageProcessingActive : 1; // Internal flag to remember if EnteredGroupDrawMode is active. Default is true - // since this mode starts activated and gets switched off when reacing + // since this mode starts activated and gets switched off when reaching // the current group level. Should only be changed by instances which do // primitive processing bool mbGhostedDrawModeActive : 1; diff --git a/svx/inc/svx/sdr/contact/objectcontact.hxx b/svx/inc/svx/sdr/contact/objectcontact.hxx index 061005314788..9d9064b9f9e0 100644 --- a/svx/inc/svx/sdr/contact/objectcontact.hxx +++ b/svx/inc/svx/sdr/contact/objectcontact.hxx @@ -124,7 +124,7 @@ namespace sdr // LazyInvalidate request. This is used from the VOCs to mark that they // got invalidated by an ActionCanged() call. An active view needs to remember // this and take action on it. Default implementation directly calls back - // triggerLazyInvalidate() wich promptly handles the request + // triggerLazyInvalidate() which promptly handles the request virtual void setLazyInvalidate(ViewObjectContact& rVOC); // call this to support evtl. preparations for repaint. Default does nothing diff --git a/svx/inc/svx/sdr/contact/objectcontactofpageview.hxx b/svx/inc/svx/sdr/contact/objectcontactofpageview.hxx index 342860f4af74..1f908857ac6d 100644 --- a/svx/inc/svx/sdr/contact/objectcontactofpageview.hxx +++ b/svx/inc/svx/sdr/contact/objectcontactofpageview.hxx @@ -63,7 +63,7 @@ namespace sdr // LazyInvalidate request. This is used from the VOCs to mark that they // got invalidated by an ActionCanged() call. An active view needs to remember // this and take action on it. Default implementation directly calls back - // triggerLazyInvalidate() wich promptly handles the request + // triggerLazyInvalidate() which promptly handles the request virtual void setLazyInvalidate(ViewObjectContact& rVOC); // call this to support evtl. preparations for repaint diff --git a/svx/inc/svx/sdr/overlay/overlayobject.hxx b/svx/inc/svx/sdr/overlay/overlayobject.hxx index 1280aa5bbb54..6a637c8f8064 100644 --- a/svx/inc/svx/sdr/overlay/overlayobject.hxx +++ b/svx/inc/svx/sdr/overlay/overlayobject.hxx @@ -117,7 +117,7 @@ namespace sdr virtual void objectChange(); // write access to AntiAliase flag. This is protected since - // only implementations are allowed to change this, preferrably in their + // only implementations are allowed to change this, preferably in their // constructor void allowAntiAliase(bool bNew); diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx index fbc66481ee61..a6b6266ed0b9 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -56,7 +56,7 @@ namespace drawinglayer // COW) and in exclusive, local form as needed in a primitive const OutlinerParaObject maOutlinerParaObject; - // remeber last VisualizingPage for which a decomposition was made. If the new target + // 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 mnode diff --git a/svx/inc/svx/svdouno.hxx b/svx/inc/svx/svdouno.hxx index 17f9d1501bf5..8c15217988f1 100644 --- a/svx/inc/svx/svdouno.hxx +++ b/svx/inc/svx/svdouno.hxx @@ -150,7 +150,7 @@ protected: private: /** retrieves the typed ViewContact for the object @param _out_rpContact - Upon successfull return, ->_out_rpContact contains the ViewContact. + Upon successful return, ->_out_rpContact contains the ViewContact. @return <TRUE/> if and only if the contact was successfully retrieved. In this case, ->_out_rpContact contains a pointer to this contact. diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx index 90ad0f30d87e..1d86b4386b7c 100644 --- a/svx/inc/svx/svdpage.hxx +++ b/svx/inc/svx/svdpage.hxx @@ -181,6 +181,18 @@ public: */ void ClearUserNavigationOrder(void); + /** Set the navigation position of all SdrObjects to their position in + the mpNavigationOrder list. This method returns immediately when no + update is necessary. + @return + This method returns <TRUE/> when the navigation positions stored + in SdrObjects are up to date. + It returns <FALSE/> when the navigation positions are not valid, + for example because no explicit navigation order has been + defined, i.e. HasObjectNavigationOrder() would return <FALSE/>. + */ + bool RecalcNavigationPositions (void); + /** Set the navigation order to the one defined by the given list of XShape objects. @param rxOrder diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx index 4c75f72fbf7d..30fbcf139ea4 100644 --- a/svx/inc/svx/svdpntv.hxx +++ b/svx/inc/svx/svdpntv.hxx @@ -330,7 +330,7 @@ public: // #i72889# used from CompleteRedraw() implementation internally, added to be able to do a complete redraw in single steps // - // BeginCompleteRedraw returns (or even creates) a SdrPaintWindow whcih shall then be used as + // BeginCompleteRedraw returns (or even creates) a SdrPaintWindow which shall then be used as // target for paints. Since paints may be buffered, use it's GetTargetOutputDevice() method which will // return the buffer in case of bufered. // DoCompleteRedraw draws the DrawingLayer hierarchy then. diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx index bea905ea6952..55589a2ca9e8 100644 --- a/svx/inc/svx/svxdlg.hxx +++ b/svx/inc/svx/svxdlg.hxx @@ -385,9 +385,14 @@ public: sal_uInt16 nOther, sal_uInt16 nShorter, sal_uInt16 nLonger ) = 0; - virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( Window* pParent, //add for SvxBorderBackgroundDlg - const SfxItemSet& rCoreSet, - sal_Bool bEnableSelector = sal_False) = 0; + + //UUUU add for SvxBorderBackgroundDlg + virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( + Window* pParent, + const SfxItemSet& rCoreSet, + bool bEnableSelector = false, + bool bEnableDrawingLayerFillStyles = false) = 0; + virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( Window* pParent, //add for SvxTransformTabDialog const SfxItemSet* pAttr, const SdrView* pView, diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index 67b145f3c301..f48c4ff0dc89 100755 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -1347,9 +1347,10 @@ //UUUU #define SID_OFFER_IMPORT ( SID_SVX_START + 1119) +#define SID_DRAWINGLAYER_FILLSTYLES ( SID_SVX_START + 1120) // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE (SID_OFFER_IMPORT + 1) +#define SID_SVX_FIRSTFREE (SID_DRAWINGLAYER_FILLSTYLES + 1) // -------------------------------------------------------------------------- // Overflow check for slot IDs diff --git a/svx/inc/svx/unobrushitemhelper.hxx b/svx/inc/svx/unobrushitemhelper.hxx new file mode 100644 index 000000000000..a943d4cb3195 --- /dev/null +++ b/svx/inc/svx/unobrushitemhelper.hxx @@ -0,0 +1,56 @@ +/************************************************************** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + *************************************************************/ + +#ifndef _UNOBRUSHITEMHELPER_HXX +#define _UNOBRUSHITEMHELPER_HXX + +#include "svx/svxdllapi.h" +#include <editeng/brshitem.hxx> + +//UUUU Helper function definintions for UNO API fallbacks to replace SvxBrushItem. The +// idea is to have fallbacks to create a SvxBrushItem if needed for backwards compatibility +// if needed from the SfxItemSet and vice versa. This is used in cases where e.g. UNO API +// accesses to slots in the SvxBrushItem are used (see cases in SvxBrushItem::QueryValue +// and SvxBrushItem::PutValue as MID_BACK_COLOR and similar). +// To make this work, a cycle of creating a SvxBrushItem from a SfxItemSet, changing a value +// using PutValue, putting back to the SfxItemSet should create the *same* SvxBrushItem +// the next time this will be created using getSvxBrushItemFromSourceSet. For more details, +// see comments at the implementations of that two methods. + +// Set the equivalent in the range [XATTR_FILL_FIRST .. XATTR_FILL_LAST] in the given +// SfxItemSet to create the same FillStyle as is expressed by the given SvxBrushItem. +// This method will reset all items in the XATTR_FILL_* range first. +void SVX_DLLPUBLIC setSvxBrushItemAsFillAttributesToTargetSet( + const SvxBrushItem& rBrush, + SfxItemSet& rToSet); + +// Create a SvxBrushItem as close as possible to the settings in the DrawingLayer +// items in the range [XATTR_FILL_FIRST .. XATTR_FILL_LAST]. Since this is not 100% +// representable this may lead to reduced data. With nBackgroundID a Which-ID for the +// to-be-created SvxBrushItem has to be given (default should be 99 as in RES_BACKGROUND). +SvxBrushItem SVX_DLLPUBLIC getSvxBrushItemFromSourceSet( + const SfxItemSet& rSourceSet, + sal_uInt16 nBackgroundID, + sal_Bool bSearchInParents = sal_True); + +#endif // _UNOBRUSHITEMHELPER_HXX + +//eof diff --git a/svx/inc/svx/xflbmpit.hxx b/svx/inc/svx/xflbmpit.hxx index 5bd225d1862b..f8079cf10d0c 100644 --- a/svx/inc/svx/xflbmpit.hxx +++ b/svx/inc/svx/xflbmpit.hxx @@ -28,6 +28,7 @@ #include "svx/svxdllapi.h" #include "svx/rectenum.hxx" + /************************************************************************* |* |* diff --git a/svx/inc/svx/xtable.hxx b/svx/inc/svx/xtable.hxx index e724ee551ec4..593248d91216 100644 --- a/svx/inc/svx/xtable.hxx +++ b/svx/inc/svx/xtable.hxx @@ -211,7 +211,7 @@ typedef ::boost::shared_ptr< XBitmapList > XBitmapListSharedPtr; ////////////////////////////////////////////////////////////////////////////// // XPropertyListFactory to limit XListSharedPtr creation and thus XPropertyList creation -// to this factory, so noone can instantiate a non-shared instace of XPropertyList +// to this factory, so no one can instantiate a non-shared instace of XPropertyList // or it's derivates class SVX_DLLPUBLIC XPropertyListFactory |