diff options
38 files changed, 141 insertions, 23 deletions
diff --git a/icon-themes/elementary/svx/res/frmsel.png b/icon-themes/elementary/svx/res/frmsel.png Binary files differdeleted file mode 100644 index 7f0319496c29..000000000000 --- a/icon-themes/elementary/svx/res/frmsel.png +++ /dev/null diff --git a/icon-themes/elementary/svx/res/frmsel1.png b/icon-themes/elementary/svx/res/frmsel1.png Binary files differnew file mode 100644 index 000000000000..ba7a23ea9ce4 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel1.png diff --git a/icon-themes/elementary/svx/res/frmsel10.png b/icon-themes/elementary/svx/res/frmsel10.png Binary files differnew file mode 100644 index 000000000000..6746c41708bf --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel10.png diff --git a/icon-themes/elementary/svx/res/frmsel11.png b/icon-themes/elementary/svx/res/frmsel11.png Binary files differnew file mode 100644 index 000000000000..c766d0f2e5cc --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel11.png diff --git a/icon-themes/elementary/svx/res/frmsel12.png b/icon-themes/elementary/svx/res/frmsel12.png Binary files differnew file mode 100644 index 000000000000..99cb87835f95 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel12.png diff --git a/icon-themes/elementary/svx/res/frmsel13.png b/icon-themes/elementary/svx/res/frmsel13.png Binary files differnew file mode 100644 index 000000000000..c4e954b4bc47 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel13.png diff --git a/icon-themes/elementary/svx/res/frmsel14.png b/icon-themes/elementary/svx/res/frmsel14.png Binary files differnew file mode 100644 index 000000000000..d9a0acc46332 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel14.png diff --git a/icon-themes/elementary/svx/res/frmsel15.png b/icon-themes/elementary/svx/res/frmsel15.png Binary files differnew file mode 100644 index 000000000000..6f575ce5afc6 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel15.png diff --git a/icon-themes/elementary/svx/res/frmsel16.png b/icon-themes/elementary/svx/res/frmsel16.png Binary files differnew file mode 100644 index 000000000000..0ca35d6daebf --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel16.png diff --git a/icon-themes/elementary/svx/res/frmsel2.png b/icon-themes/elementary/svx/res/frmsel2.png Binary files differnew file mode 100644 index 000000000000..87c0ae00ecb1 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel2.png diff --git a/icon-themes/elementary/svx/res/frmsel3.png b/icon-themes/elementary/svx/res/frmsel3.png Binary files differnew file mode 100644 index 000000000000..b57d53a1bbe6 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel3.png diff --git a/icon-themes/elementary/svx/res/frmsel4.png b/icon-themes/elementary/svx/res/frmsel4.png Binary files differnew file mode 100644 index 000000000000..c72002e00a81 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel4.png diff --git a/icon-themes/elementary/svx/res/frmsel5.png b/icon-themes/elementary/svx/res/frmsel5.png Binary files differnew file mode 100644 index 000000000000..0fd6d86c5deb --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel5.png diff --git a/icon-themes/elementary/svx/res/frmsel6.png b/icon-themes/elementary/svx/res/frmsel6.png Binary files differnew file mode 100644 index 000000000000..ddc7baaee317 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel6.png diff --git a/icon-themes/elementary/svx/res/frmsel7.png b/icon-themes/elementary/svx/res/frmsel7.png Binary files differnew file mode 100644 index 000000000000..9a1e4aa20c16 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel7.png diff --git a/icon-themes/elementary/svx/res/frmsel8.png b/icon-themes/elementary/svx/res/frmsel8.png Binary files differnew file mode 100644 index 000000000000..f8b1ef55dab9 --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel8.png diff --git a/icon-themes/elementary/svx/res/frmsel9.png b/icon-themes/elementary/svx/res/frmsel9.png Binary files differnew file mode 100644 index 000000000000..ccd02f3e077f --- /dev/null +++ b/icon-themes/elementary/svx/res/frmsel9.png diff --git a/icon-themes/galaxy/svx/res/frmsel.png b/icon-themes/galaxy/svx/res/frmsel.png Binary files differdeleted file mode 100644 index 7f0319496c29..000000000000 --- a/icon-themes/galaxy/svx/res/frmsel.png +++ /dev/null diff --git a/icon-themes/galaxy/svx/res/frmsel1.png b/icon-themes/galaxy/svx/res/frmsel1.png Binary files differnew file mode 100644 index 000000000000..ba7a23ea9ce4 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel1.png diff --git a/icon-themes/galaxy/svx/res/frmsel10.png b/icon-themes/galaxy/svx/res/frmsel10.png Binary files differnew file mode 100644 index 000000000000..6746c41708bf --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel10.png diff --git a/icon-themes/galaxy/svx/res/frmsel11.png b/icon-themes/galaxy/svx/res/frmsel11.png Binary files differnew file mode 100644 index 000000000000..c766d0f2e5cc --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel11.png diff --git a/icon-themes/galaxy/svx/res/frmsel12.png b/icon-themes/galaxy/svx/res/frmsel12.png Binary files differnew file mode 100644 index 000000000000..99cb87835f95 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel12.png diff --git a/icon-themes/galaxy/svx/res/frmsel13.png b/icon-themes/galaxy/svx/res/frmsel13.png Binary files differnew file mode 100644 index 000000000000..c4e954b4bc47 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel13.png diff --git a/icon-themes/galaxy/svx/res/frmsel14.png b/icon-themes/galaxy/svx/res/frmsel14.png Binary files differnew file mode 100644 index 000000000000..d9a0acc46332 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel14.png diff --git a/icon-themes/galaxy/svx/res/frmsel15.png b/icon-themes/galaxy/svx/res/frmsel15.png Binary files differnew file mode 100644 index 000000000000..6f575ce5afc6 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel15.png diff --git a/icon-themes/galaxy/svx/res/frmsel16.png b/icon-themes/galaxy/svx/res/frmsel16.png Binary files differnew file mode 100644 index 000000000000..0ca35d6daebf --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel16.png diff --git a/icon-themes/galaxy/svx/res/frmsel2.png b/icon-themes/galaxy/svx/res/frmsel2.png Binary files differnew file mode 100644 index 000000000000..87c0ae00ecb1 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel2.png diff --git a/icon-themes/galaxy/svx/res/frmsel3.png b/icon-themes/galaxy/svx/res/frmsel3.png Binary files differnew file mode 100644 index 000000000000..b57d53a1bbe6 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel3.png diff --git a/icon-themes/galaxy/svx/res/frmsel4.png b/icon-themes/galaxy/svx/res/frmsel4.png Binary files differnew file mode 100644 index 000000000000..c72002e00a81 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel4.png diff --git a/icon-themes/galaxy/svx/res/frmsel5.png b/icon-themes/galaxy/svx/res/frmsel5.png Binary files differnew file mode 100644 index 000000000000..0fd6d86c5deb --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel5.png diff --git a/icon-themes/galaxy/svx/res/frmsel6.png b/icon-themes/galaxy/svx/res/frmsel6.png Binary files differnew file mode 100644 index 000000000000..ddc7baaee317 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel6.png diff --git a/icon-themes/galaxy/svx/res/frmsel7.png b/icon-themes/galaxy/svx/res/frmsel7.png Binary files differnew file mode 100644 index 000000000000..9a1e4aa20c16 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel7.png diff --git a/icon-themes/galaxy/svx/res/frmsel8.png b/icon-themes/galaxy/svx/res/frmsel8.png Binary files differnew file mode 100644 index 000000000000..f8b1ef55dab9 --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel8.png diff --git a/icon-themes/galaxy/svx/res/frmsel9.png b/icon-themes/galaxy/svx/res/frmsel9.png Binary files differnew file mode 100644 index 000000000000..ccd02f3e077f --- /dev/null +++ b/icon-themes/galaxy/svx/res/frmsel9.png diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 0282980c06a9..7574d3ddb4da 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 e06cf45fc779..78c1d9c9909f 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 16fa657770e5..ea5526776b12 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 07e85eda7035..4e9dfb35a0ec 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. |