diff options
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/sidebar/PreviewValueSet.cxx | 21 | ||||
-rw-r--r-- | sd/source/ui/sidebar/PreviewValueSet.hxx | 1 |
2 files changed, 0 insertions, 22 deletions
diff --git a/sd/source/ui/sidebar/PreviewValueSet.cxx b/sd/source/ui/sidebar/PreviewValueSet.cxx index 59242ddbae8d..c738b0be64d5 100644 --- a/sd/source/ui/sidebar/PreviewValueSet.cxx +++ b/sd/source/ui/sidebar/PreviewValueSet.cxx @@ -111,27 +111,6 @@ sal_uInt16 PreviewValueSet::CalculateRowCount (sal_uInt16 nColumnCount) const return (sal_uInt16)nRowCount; } -sal_Int32 PreviewValueSet::GetPreferredWidth (sal_Int32 nHeight) -{ - int nPreferredWidth (maPreviewSize.Width() + 2*mnBorderWidth); - - // Get height of each row. - int nItemHeight (maPreviewSize.Height() + 2*mnBorderHeight); - - // Calculate the row- and column count and from the later the preferred - // width. - int nRowCount = nHeight / nItemHeight; - if (nRowCount > 0) - { - int nColumnCount = (GetItemCount()+nRowCount-1) / nRowCount; - if (nColumnCount > 0) - nPreferredWidth = (maPreviewSize.Width() + 2*mnBorderWidth) - * nColumnCount; - } - - return nPreferredWidth; -} - sal_Int32 PreviewValueSet::GetPreferredHeight (sal_Int32 nWidth) { int nRowCount (CalculateRowCount(CalculateColumnCount(nWidth))); diff --git a/sd/source/ui/sidebar/PreviewValueSet.hxx b/sd/source/ui/sidebar/PreviewValueSet.hxx index 8ed413de2351..f41f33b2462d 100644 --- a/sd/source/ui/sidebar/PreviewValueSet.hxx +++ b/sd/source/ui/sidebar/PreviewValueSet.hxx @@ -38,7 +38,6 @@ public: void SetPreviewSize (const Size& rSize); - sal_Int32 GetPreferredWidth (sal_Int32 nHeight); sal_Int32 GetPreferredHeight (sal_Int32 nWidth); /** Set the number of rows and columns according to the current number |