svdhdl.cxx (f6e50924) | svdhdl.cxx (4772d9af) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 82 unchanged lines hidden (view full) --- 91}; 92 93//////////////////////////////////////////////////////////////////////////////////////////////////// 94#define KIND_COUNT (14) 95#define INDEX_COUNT (6) 96#define INDIVIDUAL_COUNT (4) 97 98SdrHdlBitmapSet::SdrHdlBitmapSet(sal_uInt16 nResId) | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 82 unchanged lines hidden (view full) --- 91}; 92 93//////////////////////////////////////////////////////////////////////////////////////////////////// 94#define KIND_COUNT (14) 95#define INDEX_COUNT (6) 96#define INDIVIDUAL_COUNT (4) 97 98SdrHdlBitmapSet::SdrHdlBitmapSet(sal_uInt16 nResId) |
99: maMarkersBitmap(), | 99: maMarkersBitmap(ResId(nResId, *ImpGetResMgr())), // just use ressource with alpha channel |
100 // 14 kinds (BitmapMarkerKind) use index [0..5], 4 extra 101 maRealMarkers((KIND_COUNT * INDEX_COUNT) + INDIVIDUAL_COUNT) 102{ | 100 // 14 kinds (BitmapMarkerKind) use index [0..5], 4 extra 101 maRealMarkers((KIND_COUNT * INDEX_COUNT) + INDIVIDUAL_COUNT) 102{ |
103 // #101928# change color used for transparent parts to 0x00ff00ff (ImageList standard) 104 const Color aColTransparent(0x00ff00ff); 105 const Bitmap aBitmap(ResId(nResId, *ImpGetResMgr())); 106 const Bitmap aMask(aBitmap.CreateMask(aColTransparent)); 107 108 // create a real BitmapEx with an AlphaMask 109 maMarkersBitmap = BitmapEx(aBitmap, aMask); 110 // maMarkersBitmap = BitmapEx(aBitmap, aColTransparent); | |
111} 112 113SdrHdlBitmapSet::~SdrHdlBitmapSet() 114{ 115} 116 117BitmapEx& SdrHdlBitmapSet::impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle) 118{ --- 47 unchanged lines hidden (view full) --- 166 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 66), Size(13, 13))); 167 } 168 case 1: 169 { 170 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 66), Size(13, 13))); 171 } 172 case 2: 173 { | 103} 104 105SdrHdlBitmapSet::~SdrHdlBitmapSet() 106{ 107} 108 109BitmapEx& SdrHdlBitmapSet::impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle) 110{ --- 47 unchanged lines hidden (view full) --- 158 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 66), Size(13, 13))); 159 } 160 case 1: 161 { 162 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 66), Size(13, 13))); 163 } 164 case 2: 165 { |
174 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 78), Size(13, 13))); | 166 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 79), Size(13, 13))); |
175 } 176 case 3: 177 { | 167 } 168 case 3: 169 { |
178 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 78), Size(13, 13))); | 170 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 79), Size(13, 13))); |
179 } 180 case 4: 181 { | 171 } 172 case 4: 173 { |
182 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 78), Size(13, 13))); | 174 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 79), Size(13, 13))); |
183 } 184 default: // case 5: 185 { 186 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 66), Size(13, 13))); 187 } 188 } 189 } 190 191 case Circ_7x7: | 175 } 176 default: // case 5: 177 { 178 return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 66), Size(13, 13))); 179 } 180 } 181 } 182 183 case Circ_7x7: |
184 case Customshape_7x7: |
|
192 { 193 return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, Rectangle(Point(27, nYPos), Size(7, 7))); 194 } 195 196 case Circ_9x9: | 185 { 186 return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, Rectangle(Point(27, nYPos), Size(7, 7))); 187 } 188 189 case Circ_9x9: |
197 case Customshape1: | 190 case Customshape_9x9: |
198 { 199 return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, Rectangle(Point(34, nYPos), Size(9, 9))); 200 } 201 202 case Circ_11x11: | 191 { 192 return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, Rectangle(Point(34, nYPos), Size(9, 9))); 193 } 194 195 case Circ_11x11: |
196 case Customshape_11x11: |
|
203 { 204 return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, Rectangle(Point(43, nYPos), Size(11, 11))); 205 } 206 207 case Elli_7x9: 208 { 209 return impGetOrCreateTargetBitmap((7 * INDEX_COUNT) + nInd, Rectangle(Point(54, nYPos), Size(7, 9))); 210 } --- 36 unchanged lines hidden (view full) --- 247 case Glue: 248 { 249 return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, Rectangle(Point(15, 74), Size(9, 9))); 250 } 251 252 case Anchor: // #101688# AnchorTR for SW 253 case AnchorTR: 254 { | 197 { 198 return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, Rectangle(Point(43, nYPos), Size(11, 11))); 199 } 200 201 case Elli_7x9: 202 { 203 return impGetOrCreateTargetBitmap((7 * INDEX_COUNT) + nInd, Rectangle(Point(54, nYPos), Size(7, 9))); 204 } --- 36 unchanged lines hidden (view full) --- 241 case Glue: 242 { 243 return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, Rectangle(Point(15, 74), Size(9, 9))); 244 } 245 246 case Anchor: // #101688# AnchorTR for SW 247 case AnchorTR: 248 { |
255 return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, Rectangle(Point(24, 68), Size(24, 23))); | 249 return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, Rectangle(Point(24, 68), Size(24, 24))); |
256 } 257 258 // #98388# add AnchorPressed to be able to aninate anchor control 259 case AnchorPressed: 260 case AnchorPressedTR: 261 { | 250 } 251 252 // #98388# add AnchorPressed to be able to aninate anchor control 253 case AnchorPressed: 254 case AnchorPressedTR: 255 { |
262 return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, Rectangle(Point(48, 68), Size(24, 23))); | 256 return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, Rectangle(Point(48, 68), Size(24, 24))); |
263 } 264 } 265 266 // cannot happen since all pathes return something; return Rect_7x7 as default (see switch) 267 return maRealMarkers[0]; 268} 269 270//////////////////////////////////////////////////////////////////////////////////////////////////// --- 275 unchanged lines hidden (view full) --- 546 { 547 eKindOfMarker = AnchorTR; 548 break; 549 } 550 551 // for SJ and the CustomShapeHandles: 552 case HDL_CUSTOMSHAPE1: 553 { | 257 } 258 } 259 260 // cannot happen since all pathes return something; return Rect_7x7 as default (see switch) 261 return maRealMarkers[0]; 262} 263 264//////////////////////////////////////////////////////////////////////////////////////////////////// --- 275 unchanged lines hidden (view full) --- 540 { 541 eKindOfMarker = AnchorTR; 542 break; 543 } 544 545 // for SJ and the CustomShapeHandles: 546 case HDL_CUSTOMSHAPE1: 547 { |
554 eKindOfMarker = Customshape1; | 548 eKindOfMarker = (b1PixMore) ? Customshape_7x7 : Customshape_9x9; |
555 eColIndex = Yellow; 556 break; 557 } 558 default: 559 break; 560 } 561 562 SdrMarkView* pView = pHdlList->GetView(); --- 58 unchanged lines hidden (view full) --- 621 case Rect_9x9: eRetval = Rect_11x11; break; 622 case Rect_11x11: eRetval = Rect_13x13; break; 623 //case Rect_13x13: eRetval = ; break; 624 625 case Circ_7x7: eRetval = Circ_9x9; break; 626 case Circ_9x9: eRetval = Circ_11x11; break; 627 //case Circ_11x11: eRetval = ; break; 628 | 549 eColIndex = Yellow; 550 break; 551 } 552 default: 553 break; 554 } 555 556 SdrMarkView* pView = pHdlList->GetView(); --- 58 unchanged lines hidden (view full) --- 615 case Rect_9x9: eRetval = Rect_11x11; break; 616 case Rect_11x11: eRetval = Rect_13x13; break; 617 //case Rect_13x13: eRetval = ; break; 618 619 case Circ_7x7: eRetval = Circ_9x9; break; 620 case Circ_9x9: eRetval = Circ_11x11; break; 621 //case Circ_11x11: eRetval = ; break; 622 |
623 case Customshape_7x7: eRetval = Customshape_9x9; break; 624 case Customshape_9x9: eRetval = Customshape_11x11; break; 625 //case Customshape_11x11: eRetval = ; break; 626 |
|
629 case Elli_7x9: eRetval = Elli_9x11; break; 630 //case Elli_9x11: eRetval = ; break; 631 632 case Elli_9x7: eRetval = Elli_11x9; break; 633 //case Elli_11x9: eRetval = ; break; 634 635 case RectPlus_7x7: eRetval = RectPlus_9x9; break; 636 case RectPlus_9x9: eRetval = RectPlus_11x11; break; --- 43 unchanged lines hidden (view full) --- 680 const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); 681 sal_Bool bIsHighContrast(rStyleSettings.GetHighContrastMode()); 682 683 // support bigger sizes 684 sal_Bool bForceBiggerSize(sal_False); 685 686 if(pHdlList->GetHdlSize() > 3) 687 { | 627 case Elli_7x9: eRetval = Elli_9x11; break; 628 //case Elli_9x11: eRetval = ; break; 629 630 case Elli_9x7: eRetval = Elli_11x9; break; 631 //case Elli_11x9: eRetval = ; break; 632 633 case RectPlus_7x7: eRetval = RectPlus_9x9; break; 634 case RectPlus_9x9: eRetval = RectPlus_11x11; break; --- 43 unchanged lines hidden (view full) --- 678 const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); 679 sal_Bool bIsHighContrast(rStyleSettings.GetHighContrastMode()); 680 681 // support bigger sizes 682 sal_Bool bForceBiggerSize(sal_False); 683 684 if(pHdlList->GetHdlSize() > 3) 685 { |
688 bForceBiggerSize = sal_True; | 686 switch(eKindOfMarker) 687 { 688 case Anchor: 689 case AnchorPressed: 690 case AnchorTR: 691 case AnchorPressedTR: 692 { 693 // #121463# For anchor, do not simply make bigger because of HdlSize, 694 // do it dependent of IsSelected() which Writer can set in drag mode 695 if(IsSelected()) 696 { 697 bForceBiggerSize = sal_True; 698 } 699 break; 700 } 701 default: 702 { 703 bForceBiggerSize = sal_True; 704 break; 705 } 706 } |
689 } 690 691 // #101928# ...for high contrast, too. 692 if(!bForceBiggerSize && bIsHighContrast) 693 { 694 // #107925# 695 // ...but not for anchors, else they will not blink when activated 696 if(Anchor != eKindOfMarker && AnchorTR != eKindOfMarker) --- 1382 unchanged lines hidden (view full) --- 2079: mnFocusIndex(CONTAINER_ENTRY_NOTFOUND), 2080 pView(pV), 2081 aList(1024,32,32) 2082{ 2083 nHdlSize = 3; 2084 bRotateShear = sal_False; 2085 bMoveOutside = sal_False; 2086 bDistortShear = sal_False; | 707 } 708 709 // #101928# ...for high contrast, too. 710 if(!bForceBiggerSize && bIsHighContrast) 711 { 712 // #107925# 713 // ...but not for anchors, else they will not blink when activated 714 if(Anchor != eKindOfMarker && AnchorTR != eKindOfMarker) --- 1382 unchanged lines hidden (view full) --- 2097: mnFocusIndex(CONTAINER_ENTRY_NOTFOUND), 2098 pView(pV), 2099 aList(1024,32,32) 2100{ 2101 nHdlSize = 3; 2102 bRotateShear = sal_False; 2103 bMoveOutside = sal_False; 2104 bDistortShear = sal_False; |
2087 bFineHandles = sal_False; | 2105 bFineHandles = sal_True; // new default: Handles are fine handles |
2088} 2089 2090SdrHdlList::~SdrHdlList() 2091{ 2092 Clear(); 2093} 2094 2095void SdrHdlList::SetHdlSize(sal_uInt16 nSiz) --- 318 unchanged lines hidden --- | 2106} 2107 2108SdrHdlList::~SdrHdlList() 2109{ 2110 Clear(); 2111} 2112 2113void SdrHdlList::SetHdlSize(sal_uInt16 nSiz) --- 318 unchanged lines hidden --- |