[Libreoffice-commits] core.git: 5 commits - icon-themes/elementary icon-themes/galaxy include/svx include/vcl svx/source vcl/inc vcl/source
Caolán McNamara
caolanm at redhat.com
Thu Jan 5 13:24:35 UTC 2017
dev/null |binary
icon-themes/elementary/svx/res/frmsel1.png |binary
icon-themes/elementary/svx/res/frmsel10.png |binary
icon-themes/elementary/svx/res/frmsel11.png |binary
icon-themes/elementary/svx/res/frmsel12.png |binary
icon-themes/elementary/svx/res/frmsel13.png |binary
icon-themes/elementary/svx/res/frmsel14.png |binary
icon-themes/elementary/svx/res/frmsel15.png |binary
icon-themes/elementary/svx/res/frmsel16.png |binary
icon-themes/elementary/svx/res/frmsel2.png |binary
icon-themes/elementary/svx/res/frmsel3.png |binary
icon-themes/elementary/svx/res/frmsel4.png |binary
icon-themes/elementary/svx/res/frmsel5.png |binary
icon-themes/elementary/svx/res/frmsel6.png |binary
icon-themes/elementary/svx/res/frmsel7.png |binary
icon-themes/elementary/svx/res/frmsel8.png |binary
icon-themes/elementary/svx/res/frmsel9.png |binary
icon-themes/galaxy/svx/res/frmsel1.png |binary
icon-themes/galaxy/svx/res/frmsel10.png |binary
icon-themes/galaxy/svx/res/frmsel11.png |binary
icon-themes/galaxy/svx/res/frmsel12.png |binary
icon-themes/galaxy/svx/res/frmsel13.png |binary
icon-themes/galaxy/svx/res/frmsel14.png |binary
icon-themes/galaxy/svx/res/frmsel15.png |binary
icon-themes/galaxy/svx/res/frmsel16.png |binary
icon-themes/galaxy/svx/res/frmsel2.png |binary
icon-themes/galaxy/svx/res/frmsel3.png |binary
icon-themes/galaxy/svx/res/frmsel4.png |binary
icon-themes/galaxy/svx/res/frmsel5.png |binary
icon-themes/galaxy/svx/res/frmsel6.png |binary
icon-themes/galaxy/svx/res/frmsel7.png |binary
icon-themes/galaxy/svx/res/frmsel8.png |binary
icon-themes/galaxy/svx/res/frmsel9.png |binary
include/svx/dialogs.hrc | 21 ++-
include/vcl/image.hxx | 5
svx/source/accessibility/AccessibleFrameSelector.cxx | 8 -
svx/source/dialog/frmsel.cxx | 68 ++++++---
svx/source/dialog/frmsel.src | 133 ++++++++++++++-----
svx/source/inc/AccessibleFrameSelector.hxx | 3
svx/source/inc/frmsel.hrc | 31 ----
svx/source/inc/frmselimpl.hxx | 4
vcl/inc/svdata.hxx | 1
vcl/inc/svids.hrc | 3
vcl/source/image/ImageList.cxx | 15 --
44 files changed, 173 insertions(+), 119 deletions(-)
New commits:
commit a1baba68858ff639b3cd7a19551a705fed5d50d7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jan 5 12:54:02 2017 +0000
drop unused forward decl
Change-Id: Ie4a2ac8e5363539eb09bb16f13f46829c3c63785
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 3ce64d7..78eefcb 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -61,7 +61,6 @@ class Timer;
class AutoTimer;
class Idle;
class Help;
-class ImageList;
class Image;
class PopupMenu;
class Application;
commit 9253dae3611d02ece90fba1fd5255901a0924589
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jan 5 12:52:07 2017 +0000
drop newly unused InsertFromHorizontalBitmap
Change-Id: Ia0b0032bf261712be30ac23c8e5ce993011b2e5c
diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index d086c3e..ec4b972 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -80,11 +80,6 @@ public:
void InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
const std::vector< OUString > &rNameVector );
- void InsertFromHorizontalBitmap(const ResId& rResId,
- sal_uInt16 nCount,
- const Color *pSearchColors,
- const Color *pReplaceColors,
- sal_uLong nColorCount);
BitmapEx GetAsHorizontalStrip() const;
sal_uInt16 GetImageCount() const;
Size GetImageSize() const;
diff --git a/vcl/source/image/ImageList.cxx b/vcl/source/image/ImageList.cxx
index e9b8c33..6610c51 100644
--- a/vcl/source/image/ImageList.cxx
+++ b/vcl/source/image/ImageList.cxx
@@ -118,21 +118,6 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
}
}
-void ImageList::InsertFromHorizontalBitmap( const ResId& rResId,
- sal_uInt16 nCount,
- const Color *pSearchColors,
- const Color *pReplaceColors,
- sal_uLong nColorCount)
-{
- BitmapEx aBmpEx( rResId );
-
- if ( nColorCount && pSearchColors && pReplaceColors )
- aBmpEx.Replace( pSearchColors, pReplaceColors, nColorCount );
-
- std::vector< OUString > aNames( nCount );
- InsertFromHorizontalStrip( aBmpEx, aNames );
-}
-
sal_uInt16 ImageList::ImplGetImageId( const OUString& rImageName ) const
{
ImageAryData *pImg = mpImplData->maNameHash[ rImageName ];
commit 619456ed85b8b7596a3d4eab548b683da7512e4f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jan 5 12:50:27 2017 +0000
unwind RID_SVXBMP_FRMSEL_ARROWS imagelist
Change-Id: Id74ebd81b3688383271b581b69734fecfe3eb079
diff --git a/icon-themes/elementary/svx/res/frmsel.png b/icon-themes/elementary/svx/res/frmsel.png
deleted file mode 100644
index 7f03194..0000000
Binary files a/icon-themes/elementary/svx/res/frmsel.png and /dev/null differ
diff --git a/icon-themes/elementary/svx/res/frmsel1.png b/icon-themes/elementary/svx/res/frmsel1.png
new file mode 100644
index 0000000..ba7a23e
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel1.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel10.png b/icon-themes/elementary/svx/res/frmsel10.png
new file mode 100644
index 0000000..6746c41
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel10.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel11.png b/icon-themes/elementary/svx/res/frmsel11.png
new file mode 100644
index 0000000..c766d0f
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel11.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel12.png b/icon-themes/elementary/svx/res/frmsel12.png
new file mode 100644
index 0000000..99cb878
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel12.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel13.png b/icon-themes/elementary/svx/res/frmsel13.png
new file mode 100644
index 0000000..c4e954b
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel13.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel14.png b/icon-themes/elementary/svx/res/frmsel14.png
new file mode 100644
index 0000000..d9a0acc
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel14.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel15.png b/icon-themes/elementary/svx/res/frmsel15.png
new file mode 100644
index 0000000..6f575ce
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel15.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel16.png b/icon-themes/elementary/svx/res/frmsel16.png
new file mode 100644
index 0000000..0ca35d6
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel16.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel2.png b/icon-themes/elementary/svx/res/frmsel2.png
new file mode 100644
index 0000000..87c0ae0
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel2.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel3.png b/icon-themes/elementary/svx/res/frmsel3.png
new file mode 100644
index 0000000..b57d53a
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel3.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel4.png b/icon-themes/elementary/svx/res/frmsel4.png
new file mode 100644
index 0000000..c72002e
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel4.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel5.png b/icon-themes/elementary/svx/res/frmsel5.png
new file mode 100644
index 0000000..0fd6d86
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel5.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel6.png b/icon-themes/elementary/svx/res/frmsel6.png
new file mode 100644
index 0000000..ddc7baa
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel6.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel7.png b/icon-themes/elementary/svx/res/frmsel7.png
new file mode 100644
index 0000000..9a1e4aa
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel7.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel8.png b/icon-themes/elementary/svx/res/frmsel8.png
new file mode 100644
index 0000000..f8b1ef5
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel8.png differ
diff --git a/icon-themes/elementary/svx/res/frmsel9.png b/icon-themes/elementary/svx/res/frmsel9.png
new file mode 100644
index 0000000..ccd02f3
Binary files /dev/null and b/icon-themes/elementary/svx/res/frmsel9.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel.png b/icon-themes/galaxy/svx/res/frmsel.png
deleted file mode 100644
index 7f03194..0000000
Binary files a/icon-themes/galaxy/svx/res/frmsel.png and /dev/null differ
diff --git a/icon-themes/galaxy/svx/res/frmsel1.png b/icon-themes/galaxy/svx/res/frmsel1.png
new file mode 100644
index 0000000..ba7a23e
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel1.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel10.png b/icon-themes/galaxy/svx/res/frmsel10.png
new file mode 100644
index 0000000..6746c41
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel10.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel11.png b/icon-themes/galaxy/svx/res/frmsel11.png
new file mode 100644
index 0000000..c766d0f
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel11.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel12.png b/icon-themes/galaxy/svx/res/frmsel12.png
new file mode 100644
index 0000000..99cb878
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel12.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel13.png b/icon-themes/galaxy/svx/res/frmsel13.png
new file mode 100644
index 0000000..c4e954b
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel13.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel14.png b/icon-themes/galaxy/svx/res/frmsel14.png
new file mode 100644
index 0000000..d9a0acc
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel14.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel15.png b/icon-themes/galaxy/svx/res/frmsel15.png
new file mode 100644
index 0000000..6f575ce
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel15.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel16.png b/icon-themes/galaxy/svx/res/frmsel16.png
new file mode 100644
index 0000000..0ca35d6
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel16.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel2.png b/icon-themes/galaxy/svx/res/frmsel2.png
new file mode 100644
index 0000000..87c0ae0
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel2.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel3.png b/icon-themes/galaxy/svx/res/frmsel3.png
new file mode 100644
index 0000000..b57d53a
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel3.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel4.png b/icon-themes/galaxy/svx/res/frmsel4.png
new file mode 100644
index 0000000..c72002e
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel4.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel5.png b/icon-themes/galaxy/svx/res/frmsel5.png
new file mode 100644
index 0000000..0fd6d86
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel5.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel6.png b/icon-themes/galaxy/svx/res/frmsel6.png
new file mode 100644
index 0000000..ddc7baa
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel6.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel7.png b/icon-themes/galaxy/svx/res/frmsel7.png
new file mode 100644
index 0000000..9a1e4aa
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel7.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel8.png b/icon-themes/galaxy/svx/res/frmsel8.png
new file mode 100644
index 0000000..f8b1ef5
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel8.png differ
diff --git a/icon-themes/galaxy/svx/res/frmsel9.png b/icon-themes/galaxy/svx/res/frmsel9.png
new file mode 100644
index 0000000..ccd02f3
Binary files /dev/null and b/icon-themes/galaxy/svx/res/frmsel9.png differ
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 0282980..7574d3d 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -198,9 +198,24 @@
// Menu for the ruler
#define RID_SVXMN_RULER (RID_SVX_START + 92)
-#define RID_SVXBMP_FRMSEL_ARROWS (RID_SVX_START + 93)
-#define RID_SVXSTR_FRMSEL_TEXTS (RID_SVX_START + 94)
-#define RID_SVXSTR_FRMSEL_DESCRIPTIONS (RID_SVX_START + 95)
+#define RID_SVXSTR_FRMSEL_TEXTS (RID_SVX_START + 93)
+#define RID_SVXSTR_FRMSEL_DESCRIPTIONS (RID_SVX_START + 94)
+#define RID_SVXBMP_FRMSEL_ARROW1 (RID_SVX_START + 95)
+#define RID_SVXBMP_FRMSEL_ARROW2 (RID_SVX_START + 96)
+#define RID_SVXBMP_FRMSEL_ARROW3 (RID_SVX_START + 97)
+#define RID_SVXBMP_FRMSEL_ARROW4 (RID_SVX_START + 98)
+#define RID_SVXBMP_FRMSEL_ARROW5 (RID_SVX_START + 99)
+#define RID_SVXBMP_FRMSEL_ARROW6 (RID_SVX_START + 100)
+#define RID_SVXBMP_FRMSEL_ARROW7 (RID_SVX_START + 101)
+#define RID_SVXBMP_FRMSEL_ARROW8 (RID_SVX_START + 102)
+#define RID_SVXBMP_FRMSEL_ARROW9 (RID_SVX_START + 103)
+#define RID_SVXBMP_FRMSEL_ARROW10 (RID_SVX_START + 104)
+#define RID_SVXBMP_FRMSEL_ARROW11 (RID_SVX_START + 105)
+#define RID_SVXBMP_FRMSEL_ARROW12 (RID_SVX_START + 106)
+#define RID_SVXBMP_FRMSEL_ARROW13 (RID_SVX_START + 107)
+#define RID_SVXBMP_FRMSEL_ARROW14 (RID_SVX_START + 108)
+#define RID_SVXBMP_FRMSEL_ARROW15 (RID_SVX_START + 109)
+#define RID_SVXBMP_FRMSEL_ARROW16 (RID_SVX_START + 110)
// for Toolbox-Control style
#define RID_SVX_STYLE_MENU (RID_SVX_START + 121)
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index e06cf45..78c1d9c 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -206,7 +206,6 @@ FrameBorderType FrameBorder::GetKeyboardNeighbor( sal_uInt16 nKeyCode ) const
FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) :
mrFrameSel( rFrameSel ),
mpVirDev( VclPtr<VirtualDevice>::Create() ),
- maILArrows(),
maLeft( FrameBorderType::Left ),
maRight( FrameBorderType::Right ),
maTop( FrameBorderType::Top ),
@@ -303,8 +302,30 @@ void FrameSelectorImpl::InitColors()
maHCLineCol = rSettings.GetLabelTextColor();
}
+static const sal_uInt16 aImageIds[] =
+{
+ RID_SVXBMP_FRMSEL_ARROW1,
+ RID_SVXBMP_FRMSEL_ARROW2,
+ RID_SVXBMP_FRMSEL_ARROW3,
+ RID_SVXBMP_FRMSEL_ARROW4,
+ RID_SVXBMP_FRMSEL_ARROW5,
+ RID_SVXBMP_FRMSEL_ARROW6,
+ RID_SVXBMP_FRMSEL_ARROW7,
+ RID_SVXBMP_FRMSEL_ARROW8,
+ RID_SVXBMP_FRMSEL_ARROW9,
+ RID_SVXBMP_FRMSEL_ARROW10,
+ RID_SVXBMP_FRMSEL_ARROW11,
+ RID_SVXBMP_FRMSEL_ARROW12,
+ RID_SVXBMP_FRMSEL_ARROW13,
+ RID_SVXBMP_FRMSEL_ARROW14,
+ RID_SVXBMP_FRMSEL_ARROW15,
+ RID_SVXBMP_FRMSEL_ARROW16
+};
+
void FrameSelectorImpl::InitArrowImageList()
{
+ maArrows.clear();
+
/* Build the arrow images bitmap with current colors. */
Color pColorAry1[3];
Color pColorAry2[3];
@@ -315,11 +336,16 @@ void FrameSelectorImpl::InitArrowImageList()
pColorAry1[2] = Color( 255, 0, 255 );
pColorAry2[2] = maBackCol; // magenta -> background
- maILArrows.InsertFromHorizontalBitmap(
- SVX_RES( RID_SVXBMP_FRMSEL_ARROWS ), 16, pColorAry1, pColorAry2, 3);
- DBG_ASSERT( maILArrows.GetImageSize().Height() == maILArrows.GetImageSize().Width(),
- "svx::FrameSelectorImpl::InitArrowImageList - images are not squarish" );
- mnArrowSize = maILArrows.GetImageSize().Height();
+ assert(SAL_N_ELEMENTS(aImageIds) == 16);
+ for (size_t i = 0; i < SAL_N_ELEMENTS(aImageIds); ++i)
+ {
+ BitmapEx aBmpEx(SVX_RES(aImageIds[i]));
+ aBmpEx.Replace(pColorAry1, pColorAry2, 3);
+ maArrows.push_back(Image(aBmpEx));
+ }
+ assert(maArrows.size() == 16);
+
+ mnArrowSize = maArrows[0].GetSizePixel().Height();
}
void FrameSelectorImpl::InitGlobalGeometry()
@@ -551,38 +577,40 @@ void FrameSelectorImpl::DrawArrows( const FrameBorder& rBorder )
long nTLPos = 0;
long nBRPos = mnCtrlSize - mnArrowSize;
Point aPos1, aPos2;
- sal_uInt16 nImgId1 = 0, nImgId2 = 0;
+ int nImgIndex1 = -1, nImgIndex2 = -1;
switch( rBorder.GetType() )
{
case FrameBorderType::Left:
case FrameBorderType::Right:
case FrameBorderType::Vertical:
- aPos1 = Point( nLinePos, nTLPos ); nImgId1 = 1;
- aPos2 = Point( nLinePos, nBRPos ); nImgId2 = 2;
+ aPos1 = Point( nLinePos, nTLPos ); nImgIndex1 = 0;
+ aPos2 = Point( nLinePos, nBRPos ); nImgIndex2 = 1;
break;
case FrameBorderType::Top:
case FrameBorderType::Bottom:
case FrameBorderType::Horizontal:
- aPos1 = Point( nTLPos, nLinePos ); nImgId1 = 3;
- aPos2 = Point( nBRPos, nLinePos ); nImgId2 = 4;
+ aPos1 = Point( nTLPos, nLinePos ); nImgIndex1 = 2;
+ aPos2 = Point( nBRPos, nLinePos ); nImgIndex2 = 3;
break;
case FrameBorderType::TLBR:
- aPos1 = Point( nTLPos, nTLPos ); nImgId1 = 5;
- aPos2 = Point( nBRPos, nBRPos ); nImgId2 = 6;
+ aPos1 = Point( nTLPos, nTLPos ); nImgIndex1 = 4;
+ aPos2 = Point( nBRPos, nBRPos ); nImgIndex2 = 5;
break;
case FrameBorderType::BLTR:
- aPos1 = Point( nTLPos, nBRPos ); nImgId1 = 7;
- aPos2 = Point( nBRPos, nTLPos ); nImgId2 = 8;
+ aPos1 = Point( nTLPos, nBRPos ); nImgIndex1 = 6;
+ aPos2 = Point( nBRPos, nTLPos ); nImgIndex2 = 7;
break;
default: ; //prevent warning
}
// Arrow or marker? Do not draw arrows into disabled control.
sal_uInt16 nSelectAdd = (mrFrameSel.IsEnabled() && rBorder.IsSelected()) ? 0 : 8;
- mpVirDev->DrawImage( aPos1, maILArrows.GetImage( nImgId1 + nSelectAdd ) );
- mpVirDev->DrawImage( aPos2, maILArrows.GetImage( nImgId2 + nSelectAdd ) );
+ if (nImgIndex1 >= 0)
+ mpVirDev->DrawImage(aPos1, maArrows[nImgIndex1 + nSelectAdd]);
+ if (nImgIndex2 >= 0)
+ mpVirDev->DrawImage(aPos2, maArrows[nImgIndex2 + nSelectAdd]);
}
Color FrameSelectorImpl::GetDrawLineColor( const Color& rColor ) const
diff --git a/svx/source/dialog/frmsel.src b/svx/source/dialog/frmsel.src
index 16fa657..ea55267 100644
--- a/svx/source/dialog/frmsel.src
+++ b/svx/source/dialog/frmsel.src
@@ -51,9 +51,84 @@ StringArray RID_SVXSTR_FRMSEL_DESCRIPTIONS
};
};
-Bitmap RID_SVXBMP_FRMSEL_ARROWS
+Bitmap RID_SVXBMP_FRMSEL_ARROW1
{
- File = "frmsel.png";
+ File = "frmsel1.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW2
+{
+ File = "frmsel2.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW3
+{
+ File = "frmsel3.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW4
+{
+ File = "frmsel4.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW5
+{
+ File = "frmsel5.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW6
+{
+ File = "frmsel6.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW7
+{
+ File = "frmsel7.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW8
+{
+ File = "frmsel8.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW9
+{
+ File = "frmsel9.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW10
+{
+ File = "frmsel10.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW11
+{
+ File = "frmsel11.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW12
+{
+ File = "frmsel12.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW13
+{
+ File = "frmsel13.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW14
+{
+ File = "frmsel14.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW15
+{
+ File = "frmsel15.png";
+};
+
+Bitmap RID_SVXBMP_FRMSEL_ARROW16
+{
+ File = "frmsel16.png";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/frmselimpl.hxx b/svx/source/inc/frmselimpl.hxx
index 07e85ed..4e9dfb3 100644
--- a/svx/source/inc/frmselimpl.hxx
+++ b/svx/source/inc/frmselimpl.hxx
@@ -99,7 +99,7 @@ struct FrameSelectorImpl
{
FrameSelector& mrFrameSel; /// The control itself.
ScopedVclPtr<VirtualDevice> mpVirDev; /// For all buffered drawing operations.
- ImageList maILArrows; /// Arrows in current system colors.
+ std::vector<Image> maArrows; /// Arrows in current system colors.
Color maBackCol; /// Background color.
Color maArrowCol; /// Selection arrow color.
Color maMarkCol; /// Selection marker color.
commit 2a8e0cab908e5b6983e0e7074db509615f9d8c4f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jan 5 12:21:41 2017 +0000
drop newly unused defines
Change-Id: I9ab375c851b4c0738bceec3c2cefc16df57c16ce
diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc
index 86ea7be..01bce62 100644
--- a/vcl/inc/svids.hrc
+++ b/vcl/inc/svids.hrc
@@ -20,9 +20,6 @@
#ifndef INCLUDED_VCL_INC_SVIDS_HRC
#define INCLUDED_VCL_INC_SVIDS_HRC
-#define SV_RESID_STDOFFSET 0
-#define SV_RESID_MONOOFFSET 1
-
#define SV_RESID_BITMAP_CHECK1 1000
#define SV_RESID_BITMAP_CHECK2 1001
#define SV_RESID_BITMAP_CHECK3 1002
commit 1016cd785685118fb6c69fe59ba9bd0647a76f63
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jan 5 12:21:31 2017 +0000
flatten and simplify this resource hierarchy
Change-Id: I622dae5f36b44c08e597d94fe8184ad92504d038
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 64fee58..0282980 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -198,6 +198,10 @@
// Menu for the ruler
#define RID_SVXMN_RULER (RID_SVX_START + 92)
+#define RID_SVXBMP_FRMSEL_ARROWS (RID_SVX_START + 93)
+#define RID_SVXSTR_FRMSEL_TEXTS (RID_SVX_START + 94)
+#define RID_SVXSTR_FRMSEL_DESCRIPTIONS (RID_SVX_START + 95)
+
// for Toolbox-Control style
#define RID_SVX_STYLE_MENU (RID_SVX_START + 121)
#define RID_SVX_UPDATE_STYLE (RID_SVX_START + 122)
@@ -866,8 +870,6 @@
#define RID_SVXSTR_TRASNGR_START RID_SVXSTR_TRASNGR0
// RID_SVXSTR_TRASNGR_END RID_SVXSTR_TRASNGR0
-#define RID_SVXSTR_BORDER_CONTROL (RID_SVX_START + 852)
-
// Accessibility strings. The actual string ids are defined in
// svx/inc/accessibility.hrc, the strings are defined in
// svx/source/accessibility/accessibility.src
diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx
index c7c9af1..20808a9 100644
--- a/svx/source/accessibility/AccessibleFrameSelector.cxx
+++ b/svx/source/accessibility/AccessibleFrameSelector.cxx
@@ -37,7 +37,6 @@
#include "editeng/unolingu.hxx"
#include <svx/dialogs.hrc>
-#include "frmsel.hrc"
namespace svx {
namespace a11y {
@@ -56,17 +55,14 @@ using namespace ::com::sun::star::accessibility;
AccFrameSelector::AccFrameSelector( FrameSelector& rFrameSel, FrameBorderType eBorder ) :
- Resource( SVX_RES( RID_SVXSTR_BORDER_CONTROL ) ),
mpFrameSel( &rFrameSel ),
meBorder( eBorder ),
maFocusListeners( maFocusMutex ),
maPropertyListeners( maPropertyMutex ),
- maNames( SVX_RES( ARR_TEXTS ) ),
- maDescriptions( SVX_RES(ARR_DESCRIPTIONS ) ),
+ maNames( SVX_RES( RID_SVXSTR_FRMSEL_TEXTS ) ),
+ maDescriptions( SVX_RES(RID_SVXSTR_FRMSEL_DESCRIPTIONS) ),
mnClientId( 0 )
{
- FreeResource();
-
if ( mpFrameSel )
{
mpFrameSel->AddEventListener( LINK( this, AccFrameSelector, WindowEventListener ) );
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 1f045ba..e06cf45 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -30,7 +30,6 @@
#include <vcl/settings.hxx>
#include <svx/dialogs.hrc>
-#include "frmsel.hrc"
#include <tools/rcid.h>
@@ -205,7 +204,6 @@ FrameBorderType FrameBorder::GetKeyboardNeighbor( sal_uInt16 nKeyCode ) const
}
FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) :
- Resource( SVX_RES( RID_SVXSTR_BORDER_CONTROL ) ),
mrFrameSel( rFrameSel ),
mpVirDev( VclPtr<VirtualDevice>::Create() ),
maILArrows(),
@@ -236,8 +234,6 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) :
maChildVec( 8, static_cast< a11y::AccFrameSelector* >( nullptr ) ),
mxChildVec( 8 )
{
- FreeResource();
-
maAllBorders.resize( FRAMEBORDERTYPE_COUNT, nullptr );
maAllBorders[ GetIndexFromFrameBorderType( FrameBorderType::Left ) ] = &maLeft;
maAllBorders[ GetIndexFromFrameBorderType( FrameBorderType::Right ) ] = &maRight;
@@ -319,10 +315,8 @@ void FrameSelectorImpl::InitArrowImageList()
pColorAry1[2] = Color( 255, 0, 255 );
pColorAry2[2] = maBackCol; // magenta -> background
- GetRes( SVX_RES( RID_SVXSTR_BORDER_CONTROL ).SetRT( RSC_RESOURCE ) );
maILArrows.InsertFromHorizontalBitmap(
- SVX_RES( BMP_FRMSEL_ARROWS ), 16, pColorAry1, pColorAry2, 3);
- FreeResource();
+ SVX_RES( RID_SVXBMP_FRMSEL_ARROWS ), 16, pColorAry1, pColorAry2, 3);
DBG_ASSERT( maILArrows.GetImageSize().Height() == maILArrows.GetImageSize().Width(),
"svx::FrameSelectorImpl::InitArrowImageList - images are not squarish" );
mnArrowSize = maILArrows.GetImageSize().Height();
diff --git a/svx/source/dialog/frmsel.src b/svx/source/dialog/frmsel.src
index 5018d92..16fa657 100644
--- a/svx/source/dialog/frmsel.src
+++ b/svx/source/dialog/frmsel.src
@@ -18,42 +18,42 @@
*/
#include <svx/dialogs.hrc>
-#include "frmsel.hrc"
-Resource RID_SVXSTR_BORDER_CONTROL
+StringArray RID_SVXSTR_FRMSEL_TEXTS
{
- StringArray ARR_TEXTS
+ ItemList [ en-US ] =
{
- ItemList [ en-US ] =
- {
- < "Border setting" ; 0; > ;
- < "Left border line" ; 1; > ;
- < "Right border line" ; 2; > ;
- < "Top border line" ; 3; > ;
- < "Bottom border line" ; 4; > ;
- < "Horizontal border line" ; 5; > ;
- < "Vertical border line" ; 6; > ;
- < "Diagonal border line from top left to bottom right" ; 7; > ;
- < "Diagonal border line from bottom left to top right" ; 8; > ;
- };
+ < "Border setting" ; 0; > ;
+ < "Left border line" ; 1; > ;
+ < "Right border line" ; 2; > ;
+ < "Top border line" ; 3; > ;
+ < "Bottom border line" ; 4; > ;
+ < "Horizontal border line" ; 5; > ;
+ < "Vertical border line" ; 6; > ;
+ < "Diagonal border line from top left to bottom right" ; 7; > ;
+ < "Diagonal border line from bottom left to top right" ; 8; > ;
};
- StringArray ARR_DESCRIPTIONS
+};
+
+StringArray RID_SVXSTR_FRMSEL_DESCRIPTIONS
+{
+ ItemList [ en-US ] =
{
- ItemList [ en-US ] =
- {
- < "Border setting" ; 0; > ;
- < "Left border line" ; 1; > ;
- < "Right border line" ; 2; > ;
- < "Top border line" ; 3; > ;
- < "Bottom border line" ; 4; > ;
- < "Horizontal border line" ; 5; > ;
- < "Vertical border line" ; 6; > ;
- < "Diagonal border line from top left to bottom right" ; 7; > ;
- < "Diagonal border line from bottom left to top right" ; 8; > ;
- };
+ < "Border setting" ; 0; > ;
+ < "Left border line" ; 1; > ;
+ < "Right border line" ; 2; > ;
+ < "Top border line" ; 3; > ;
+ < "Bottom border line" ; 4; > ;
+ < "Horizontal border line" ; 5; > ;
+ < "Vertical border line" ; 6; > ;
+ < "Diagonal border line from top left to bottom right" ; 7; > ;
+ < "Diagonal border line from bottom left to top right" ; 8; > ;
};
+};
- Bitmap BMP_FRMSEL_ARROWS { File = "frmsel.png"; };
+Bitmap RID_SVXBMP_FRMSEL_ARROWS
+{
+ File = "frmsel.png";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/AccessibleFrameSelector.hxx b/svx/source/inc/AccessibleFrameSelector.hxx
index 1a8e3c3..9c2ad91 100644
--- a/svx/source/inc/AccessibleFrameSelector.hxx
+++ b/svx/source/inc/AccessibleFrameSelector.hxx
@@ -53,8 +53,7 @@ class AccFrameSelector :
css::accessibility::XAccessibleComponent,
css::accessibility::XAccessibleEventBroadcaster,
css::lang::XServiceInfo
- >,
- public Resource
+ >
{
public:
explicit AccFrameSelector( FrameSelector& rFrameSel, FrameBorderType eBorder );
diff --git a/svx/source/inc/frmsel.hrc b/svx/source/inc/frmsel.hrc
deleted file mode 100644
index 5ec3567..0000000
--- a/svx/source/inc/frmsel.hrc
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- 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 SVX_FRMSEL_HRC
-#define SVX_FRMSEL_HRC
-
-#define ARR_TEXTS 1
-#define ARR_DESCRIPTIONS 2
-
-// image: arrows and markers
-#define BMP_FRMSEL_ARROWS 3
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/frmselimpl.hxx b/svx/source/inc/frmselimpl.hxx
index 73bbe55..07e85ed 100644
--- a/svx/source/inc/frmselimpl.hxx
+++ b/svx/source/inc/frmselimpl.hxx
@@ -95,7 +95,7 @@ private:
typedef std::vector< FrameBorder* > FrameBorderPtrVec;
-struct FrameSelectorImpl : public Resource
+struct FrameSelectorImpl
{
FrameSelector& mrFrameSel; /// The control itself.
ScopedVclPtr<VirtualDevice> mpVirDev; /// For all buffered drawing operations.
More information about the Libreoffice-commits
mailing list