diff options
author | Armin Le Grand <alg@apache.org> | 2013-04-22 15:38:05 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-20 11:33:18 +0100 |
commit | 60285fdc868635f99644ef1d8a195a2be87074c7 (patch) | |
tree | dbd69b9d424b527357c2ba33c2256e99edca3d91 /include | |
parent | 3af7ae5ef74756b33d35a67b7a6cee44acf79737 (diff) |
Related: #i122041# More unifications for FillStyles
better defaults and better preview visualizations
(cherry picked from commit 35c9acfc98fc98399005815e0464b1944f327d4e)
Conflicts:
officecfg/registry/schema/org/openoffice/Office/Common.xcs
svtools/inc/svtools/accessibilityoptions.hxx
svtools/inc/svtools/valueset.hxx
svtools/source/config/accessibilityoptions.cxx
svtools/source/control/ctrlbox.cxx
svtools/source/control/valueset.cxx
svtools/source/inc/configitems/accessibilityoptions_const.hxx
svx/inc/svx/dlgctrl.hxx
svx/inc/svx/xtable.hxx
svx/source/dialog/dlgctrl.cxx
svx/source/tbxctrls/SvxColorValueSet.cxx
svx/source/xoutdev/xtabdash.cxx
svx/source/xoutdev/xtable.cxx
vcl/inc/ilstbox.hxx
vcl/inc/vcl/combobox.hxx
vcl/inc/vcl/lstbox.hxx
vcl/inc/vcl/settings.hxx
vcl/source/app/settings.cxx
vcl/source/control/combobox.cxx
vcl/source/control/ilstbox.cxx
vcl/source/control/lstbox.cxx
Change-Id: I905b6814cb796a35aa23fedb9ce716f77e2bfda0
Diffstat (limited to 'include')
-rw-r--r-- | include/svtools/accessibilityoptions.hxx | 13 | ||||
-rw-r--r-- | include/svtools/valueset.hxx | 32 | ||||
-rw-r--r-- | include/svx/dlgctrl.hxx | 20 | ||||
-rw-r--r-- | include/svx/xtable.hxx | 4 | ||||
-rw-r--r-- | include/vcl/combobox.hxx | 1 | ||||
-rw-r--r-- | include/vcl/lstbox.hxx | 19 | ||||
-rw-r--r-- | include/vcl/settings.hxx | 97 |
7 files changed, 117 insertions, 69 deletions
diff --git a/include/svtools/accessibilityoptions.hxx b/include/svtools/accessibilityoptions.hxx index 52b12b9b60b4..87604393d550 100644 --- a/include/svtools/accessibilityoptions.hxx +++ b/include/svtools/accessibilityoptions.hxx @@ -49,15 +49,14 @@ public: sal_Bool IsSelectionInReadonly() const; sal_Bool GetAutoDetectSystemHC() const; - // options for configuring the look and feel for the ColorValueSet (color selector) - sal_Int16 GetColorValueSetMaximumRowCount() const; - sal_Int16 GetColorValueSetEntryEdgeLength() const; - sal_Int16 GetColorValueSetColumnCount() const; - // option to activate EdgeBlending for previews in the UI (ColorValueSet, ColorDropDown, // FillStyle/LineStyle previews, etc...). 0 == off, 100% == full paint, in-between == alpha sal_Int16 GetEdgeBlending() const; + // option to set a maximum line count for ListBoxes; when less or equal than this count + // is in a ListBox, all will be shown, else a ScrollBar will be used + sal_Int16 GetListBoxMaximumLineCount() const; + void SetIsForPagePreviews(sal_Bool bSet); void SetIsHelpTipsDisappear(sal_Bool bSet); void SetIsAllowAnimatedGraphics(sal_Bool bSet); @@ -68,10 +67,8 @@ public: void SetSelectionInReadonly(sal_Bool bSet); void SetAutoDetectSystemHC(sal_Bool bSet); - void SetColorValueSetMaximumRowCount(sal_Int16 nSet); - void SetColorValueSetEntryEdgeLength(sal_Int16 nSet); - void SetColorValueSetColumnCount(sal_Int16 nSet); void SetEdgeBlending(sal_Int16 nSet); + void SetListBoxMaximumLineCount(sal_Int16 nSet); sal_Bool IsModified() const; void Commit(); diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 70fcd008c363..d26705a3324d 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -214,15 +214,21 @@ private: long mnLines; long mnUserItemWidth; long mnUserItemHeight; - sal_uInt16 mnSelItemId; - sal_uInt16 mnHighItemId; - sal_uInt16 mnCols; - sal_uInt16 mnCurCol; - sal_uInt16 mnUserCols; - sal_uInt16 mnUserVisLines; - sal_uInt16 mnFirstLine; - sal_uInt16 mnSpacing; - sal_uInt16 mnFrameStyle; + sal_uInt16 mnSelItemId; + sal_uInt16 mnHighItemId; + sal_uInt16 mnCols; + sal_uInt16 mnCurCol; + sal_uInt16 mnUserCols; + sal_uInt16 mnUserVisLines; + sal_uInt16 mnFirstLine; + sal_uInt16 mnSpacing; + sal_uInt16 mnFrameStyle; + Color maColor; + Link maDoubleClickHdl; + Link maSelectHdl; + Link maHighlightHdl; + + // bitfield bool mbFormat : 1; bool mbHighlight : 1; bool mbSelection : 1; @@ -232,12 +238,9 @@ private: bool mbDoubleSel : 1; bool mbScroll : 1; bool mbFullMode : 1; + bool mbEdgeBlending : 1; bool mbIsTransientChildrenDisabled : 1; bool mbHasVisibleItems : 1; - Color maColor; - Link maDoubleClickHdl; - Link maSelectHdl; - Link maHighlightHdl; friend class ValueSetAcc; friend class ValueItemAcc; @@ -380,6 +383,9 @@ public: const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; } void SetHighlightHdl( const Link& rLink ); + + bool GetEdgeBlending() const { return mbEdgeBlending; } + void SetEdgeBlending(bool bNew); }; #endif // _VALUESET_HXX diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index 549b27356d88..a3c56cec39ec 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -218,12 +218,10 @@ public: class SVX_DLLPUBLIC HatchingLB : public ListBox { XHatchListRef mpList; - sal_Bool mbUserDraw; public: - HatchingLB( Window* pParent, ResId Id, sal_Bool bUserDraw = sal_True ); + explicit HatchingLB(Window* pParent, ResId Id); virtual void Fill( const XHatchListRef &pList ); - virtual void UserDraw( const UserDrawEvent& rUDEvt ); void Append( XHatchEntry* pEntry, Bitmap* pBmp = NULL ); void Modify( XHatchEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL ); @@ -234,13 +232,11 @@ public: class SVX_DLLPUBLIC GradientLB : public ListBox { XGradientListRef mpList; - sal_Bool mbUserDraw; public: - GradientLB( Window* pParent, ResId Id, sal_Bool bUserDraw = sal_True ); - GradientLB( Window* pParent, WinBits aWB, sal_Bool bUserDraw = sal_True ); + explicit GradientLB(Window* pParent, ResId Id); + explicit GradientLB(Window* pParent, WinBits aWB); virtual void Fill( const XGradientListRef &pList ); - virtual void UserDraw( const UserDrawEvent& rUDEvt ); void Append( XGradientEntry* pEntry, Bitmap* pBmp = NULL ); void Modify( XGradientEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL ); @@ -253,23 +249,18 @@ public: class SVX_DLLPUBLIC BitmapLB : public ListBox { public: - BitmapLB(Window* pParent, ResId Id, bool bUserDraw = true); + explicit BitmapLB(Window* pParent, ResId Id); virtual void Fill(const XBitmapListRef &pList); - virtual void UserDraw(const UserDrawEvent& rUDEvt); void Append(const Size& rSize, const XBitmapEntry& rEntry, BitmapEx* pBmpEx = 0); void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos, BitmapEx* pBmpEx = 0); void SelectEntryByList(const XBitmapList* pList, const String& rStr); private: - VirtualDevice maVD; BitmapEx maBitmapEx; XBitmapListRef mpList; - bool mbUserDraw; - - SVX_DLLPRIVATE void SetVirtualDevice(const Size& rSize); }; /************************************************************************/ @@ -277,11 +268,8 @@ private: class FillAttrLB : public ColorListBox { private: - VirtualDevice maVD; BitmapEx maBitmapEx; - void SetVirtualDevice(const Size& rSize); - public: FillAttrLB( Window* pParent, WinBits aWB ); diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx index 4ceca46904da..9ac5b2e75287 100644 --- a/include/svx/xtable.hxx +++ b/include/svx/xtable.hxx @@ -282,10 +282,6 @@ public: inline XBitmapListRef AsBitmapList(); inline XLineEndListRef AsLineEndList(); inline XGradientListRef AsGradientList(); - - sal_uInt32 getUiBitmapWidth() const; - sal_uInt32 getUiBitmapHeight() const; - sal_uInt32 getUiBitmapLineWidth() const; }; // ------------------ diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx index 63518749a494..1fcfe314ee08 100644 --- a/include/vcl/combobox.hxx +++ b/include/vcl/combobox.hxx @@ -116,6 +116,7 @@ public: Rectangle GetDropDownPosSizePixel() const; + void AdaptDropDownLineCountToMaximum(); void SetDropDownLineCount( sal_uInt16 nLines ); sal_uInt16 GetDropDownLineCount() const; diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index b66223328cbe..61f8b24b5f0d 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -41,13 +41,16 @@ private: ImplListBoxFloatingWindow* mpFloatWin; ImplWin* mpImplWin; ImplBtn* mpBtn; - sal_uInt16 mnDDHeight; - sal_uInt16 mnSaveValue; - sal_Bool mbDDAutoSize; + sal_uInt16 mnDDHeight; + sal_uInt16 mnSaveValue; sal_Int32 m_nMaxWidthChars; Link maSelectHdl; Link maDoubleClickHdl; - sal_uInt16 mnLineCount; + sal_uInt16 mnLineCount; + + /// bitfield + bool mbDDAutoSize : 1; + bool mbEdgeBlending : 1; private: SAL_DLLPRIVATE void ImplInitListBoxData(); @@ -102,11 +105,12 @@ public: Rectangle GetDropDownPosSizePixel() const; + void AdaptDropDownLineCountToMaximum(); void SetDropDownLineCount( sal_uInt16 nLines ); sal_uInt16 GetDropDownLineCount() const; - void EnableAutoSize( sal_Bool bAuto ); - sal_Bool IsAutoSizeEnabled() const { return mbDDAutoSize; } + void EnableAutoSize( bool bAuto ); + bool IsAutoSizeEnabled() const { return mbDDAutoSize; } void EnableDDAutoWidth( sal_Bool b ); @@ -199,6 +203,9 @@ public: void EnableMirroring(); + bool GetEdgeBlending() const { return mbEdgeBlending; } + void SetEdgeBlending(bool bNew); + /** checks whether a certain point lies within the bounds of a listbox item and returns the item as well as the character position the point is at. diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index 19dc20f3ba12..2c861cdb356c 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -318,29 +318,29 @@ private: long mnIconHorzSpace; long mnIconVertSpace; long mnAntialiasedMin; - sal_uLong mnCursorBlinkTime; - sal_uLong mnDragFullOptions; - sal_uLong mnAnimationOptions; - sal_uLong mnSelectionOptions; - sal_uLong mnLogoDisplayTime; - sal_uLong mnDisplayOptions; - sal_uLong mnToolbarIconSize; - sal_uLong mnUseFlatMenus; - sal_uLong mnOptions; - sal_uInt16 mnScreenZoom; - sal_uInt16 mnScreenFontZoom; - sal_uInt16 mnHighContrast; - sal_uInt16 mnUseSystemUIFonts; - sal_uInt16 mnAutoMnemonic; - sal_uInt16 mnUseImagesInMenus; - sal_uLong mnUseFlatBorders; - sal_Bool mbPreferredUseImagesInMenus; + sal_uLong mnCursorBlinkTime; + sal_uLong mnDragFullOptions; + sal_uLong mnAnimationOptions; + sal_uLong mnSelectionOptions; + sal_uLong mnLogoDisplayTime; + sal_uLong mnDisplayOptions; + sal_uLong mnToolbarIconSize; + sal_uLong mnUseFlatMenus; + sal_uLong mnOptions; + sal_uInt16 mnScreenZoom; + sal_uInt16 mnScreenFontZoom; + sal_uInt16 mnHighContrast; + sal_uInt16 mnUseSystemUIFonts; + sal_uInt16 mnAutoMnemonic; + sal_uInt16 mnUseImagesInMenus; + sal_uLong mnUseFlatBorders; + sal_Bool mbPreferredUseImagesInMenus; long mnMinThumbSize; - sal_uLong mnSymbolsStyle; - sal_uLong mnPreferredSymbolsStyle; - sal_uInt16 mnSkipDisabledInMenus; - sal_Bool mbHideDisabledMenuItems; - sal_Bool mbAcceleratorsInContextMenus; + sal_uLong mnSymbolsStyle; + sal_uLong mnPreferredSymbolsStyle; + sal_uInt16 mnSkipDisabledInMenus; + sal_Bool mbHideDisabledMenuItems; + sal_Bool mbAcceleratorsInContextMenus; //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise //primary means scroll by single page. Secondary button takes the alternative behaviour sal_Bool mbPrimaryButtonWarpsSlider; @@ -349,6 +349,16 @@ private: FrameStyle maFrameStyle; const void* mpFontOptions; + sal_uInt16 mnEdgeBlending; + Color maEdgeBlendingTopLeftColor; + Color maEdgeBlendingBottomRightColor; + sal_uInt16 mnListBoxMaximumLineCount; + sal_uInt16 mnColorValueSetColumnCount; + sal_uInt16 mnColorValueSetMaximumRowCount; + Size maListBoxPreviewDefaultLogicSize; + Size maListBoxPreviewDefaultPixelSize; + sal_uInt16 mnListBoxPreviewDefaultLineWidth; + OUString maPersonaHeaderFooter; ///< Cache the settings to detect changes. BitmapEx maPersonaHeaderBitmap; ///< Cache the header bitmap. @@ -868,6 +878,49 @@ public: const BitmapEx GetPersonaHeader() const; + // global switch to allow EdgeBlenging; currently possible for ValueSet and ListBox + // when activated there using Get/SetEdgeBlending; default is true + void SetEdgeBlending(sal_uInt16 nCount) { CopyData(); mpData->mnEdgeBlending = nCount; } + sal_uInt16 GetEdgeBlending() const { return mpData->mnEdgeBlending; } + + // TopLeft (default RGB_COLORDATA(0xC0, 0xC0, 0xC0)) and BottomRight (default RGB_COLORDATA(0x40, 0x40, 0x40)) + // default colors for EdgeBlending + void SetEdgeBlendingTopLeftColor(const Color& rTopLeft) { CopyData(); mpData->maEdgeBlendingTopLeftColor = rTopLeft; } + const Color& GetEdgeBlendingTopLeftColor() const { return mpData->maEdgeBlendingTopLeftColor; } + void SetEdgeBlendingBottomRightColor(const Color& rBottomRight) { CopyData(); mpData->maEdgeBlendingBottomRightColor = rBottomRight; } + const Color& GetEdgeBlendingBottomRightColor() const { return mpData->maEdgeBlendingBottomRightColor; } + + // maximum line count for ListBox control; to use this, call AdaptDropDownLineCountToMaximum() at the + // ListBox after it's ItemCount has changed/got filled. Default is 25. If more Items exist, a scrollbar + // will be used + void SetListBoxMaximumLineCount(sal_uInt16 nCount) { CopyData(); mpData->mnListBoxMaximumLineCount = nCount; } + sal_uInt16 GetListBoxMaximumLineCount() const { return mpData->mnListBoxMaximumLineCount; } + + // maximum column count for the ColorValueSet control. Default is 12 and this is optimized for the + // color scheme which has 12-color alogned layout for the part taken over from Symphony. Do + // only change this if you know what you are doing. + void SetColorValueSetColumnCount(sal_uInt16 nCount) { CopyData(); mpData->mnColorValueSetColumnCount = nCount; } + sal_uInt16 GetColorValueSetColumnCount() const { return mpData->mnColorValueSetColumnCount; } + + // maximum row/line count for the ColorValueSet control. If more lines would be needed, a scrollbar will + // be used. Default is 40. + void SetColorValueSetMaximumRowCount(sal_uInt16 nCount) { CopyData(); mpData->mnColorValueSetMaximumRowCount = nCount; } + sal_uInt16 GetColorValueSetMaximumRowCount() const { return mpData->mnColorValueSetMaximumRowCount; } + + // the logical size for preview graphics in the ListBoxes (e.g. FillColor, FillGradient, FillHatch, FillGraphic, ..). The + // default defines a UI-Scale independent setting which will be scaled using MAP_APPFONT. This ensures that the size will + // fit independent from the used SystemFont (as all the ressources for UI elements). The default is Size(15, 7) which gives + // the correct height and a decent width. Do not change the height, but you may adapt the width to change the preview width. + // GetListBoxPreviewDefaultPixelSize() is for convenience so that not everyone has to do the scaling itself and contains + // the logical size scaled by MAP_APPFONT. + void SetListBoxPreviewDefaultLogicSize(const Size& rSize) { CopyData(); mpData->maListBoxPreviewDefaultLogicSize = rSize; mpData->maListBoxPreviewDefaultPixelSize = Size(0, 0);} + const Size& GetListBoxPreviewDefaultLogicSize() const { return mpData->maListBoxPreviewDefaultLogicSize; } + const Size& GetListBoxPreviewDefaultPixelSize() const; + + // the default LineWidth for ListBox UI previews (LineStyle, LineDash, LineStartEnd). Default is 1. + void SetListBoxPreviewDefaultLineWidth(sal_uInt16 nWidth) { CopyData(); mpData->mnListBoxPreviewDefaultLineWidth = nWidth; } + sal_uInt16 GetListBoxPreviewDefaultLineWidth() const { return mpData->mnListBoxPreviewDefaultLineWidth; } + void SetStandardStyles(); const StyleSettings& operator =( const StyleSettings& rSet ); |