gridwin.cxx (51b45b88) gridwin.cxx (6043ac9b)
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

--- 5330 unchanged lines hidden (view full) ---

5339 for(sal_uInt32 a(0); a < aPixelRects.size(); a++)
5340 {
5341 const Rectangle aRA(aPixelRects[a]);
5342 basegfx::B2DRange aRB(aRA.Left() - 1, aRA.Top() - 1, aRA.Right(), aRA.Bottom());
5343 aRB.transform(aTransform);
5344 aRanges.push_back(aRB);
5345 }
5346
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

--- 5330 unchanged lines hidden (view full) ---

5339 for(sal_uInt32 a(0); a < aPixelRects.size(); a++)
5340 {
5341 const Rectangle aRA(aPixelRects[a]);
5342 basegfx::B2DRange aRB(aRA.Left() - 1, aRA.Top() - 1, aRA.Right(), aRA.Bottom());
5343 aRB.transform(aTransform);
5344 aRanges.push_back(aRB);
5345 }
5346
5347 // #i97672# get the system's hilight color and limit it to the maximum
5348 // allowed luminance. This is needed to react on too bright hilight colors
5349 // which would otherwise vive a bad visualisation
5350 Color aHighlight(GetSettings().GetStyleSettings().GetHighlightColor());
5351 const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
5352 const basegfx::BColor aSelection(aHighlight.getBColor());
5353 const double fLuminance(aSelection.luminance());
5354 const double fMaxLum(aSvtOptionsDrawinglayer.GetSelectionMaximumLuminancePercent() / 100.0);
5347 // get the system's hilight color
5348 const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
5349 const Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor());
5355
5350
5356 if(fLuminance > fMaxLum)
5357 {
5358 const double fFactor(fMaxLum / fLuminance);
5359 const basegfx::BColor aNewSelection(
5360 aSelection.getRed() * fFactor,
5361 aSelection.getGreen() * fFactor,
5362 aSelection.getBlue() * fFactor);
5363
5364 aHighlight = Color(aNewSelection);
5365 }
5366
5367 sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
5368 sdr::overlay::OVERLAY_TRANSPARENT,
5369 aHighlight,
5370 aRanges,
5371 true);
5372
5373 pOverlayManager->add(*pOverlay);
5374 mpOOSelection = new ::sdr::overlay::OverlayObjectList;

--- 362 unchanged lines hidden ---
5351 sdr::overlay::OverlayObject* pOverlay = new sdr::overlay::OverlaySelection(
5352 sdr::overlay::OVERLAY_TRANSPARENT,
5353 aHighlight,
5354 aRanges,
5355 true);
5356
5357 pOverlayManager->add(*pOverlay);
5358 mpOOSelection = new ::sdr::overlay::OverlayObjectList;

--- 362 unchanged lines hidden ---