svdedxv.cxx (f6e50924) | svdedxv.cxx (a56bd57b) |
---|---|
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 --- 290 unchanged lines hidden (view full) --- 299// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ 300// @@ @@@@ @@@ @@ @@@@ @@ @@ @@ @@ 301// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ 302// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ 303// @@ @@@@@ @@ @@ @@ @@@@@ @@@@@ @@ @@ 304// 305//////////////////////////////////////////////////////////////////////////////////////////////////// 306 | 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 --- 290 unchanged lines hidden (view full) --- 299// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ 300// @@ @@@@ @@@ @@ @@@@ @@ @@ @@ @@ 301// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@ 302// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ 303// @@ @@@@@ @@ @@ @@ @@@@@ @@@@@ @@ @@ 304// 305//////////////////////////////////////////////////////////////////////////////////////////////////// 306 |
307void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect) const | 307void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const |
308{ | 308{ |
309 Window* pWin = rOutlView.GetWindow(); 310 311 if(pWin) | 309 // draw old text edit stuff 310 if(IsTextEdit()) |
312 { | 311 { |
313 const SdrTextObj* pText = PTR_CAST(SdrTextObj,GetTextEditObject()); 314 bool bTextFrame(pText && pText->IsTextFrame()); 315 bool bFitToSize(0 != (pTextEditOutliner->GetControlWord() & EE_CNTRL_STRETCHING)); 316 bool bModifyMerk(pTextEditOutliner->IsModified()); // #43095# 317 Rectangle aBlankRect(rOutlView.GetOutputArea()); 318 aBlankRect.Union(aMinTextEditArea); 319 Rectangle aPixRect(pWin->LogicToPixel(aBlankRect)); 320 aBlankRect.Intersection(rRect); 321 rOutlView.GetOutliner()->SetUpdateMode(sal_True); // Bugfix #22596# 322 rOutlView.Paint(aBlankRect); | 312 const SdrOutliner* pActiveOutliner = GetTextEditOutliner(); |
323 | 313 |
324 if(!bModifyMerk) | 314 if(pActiveOutliner) |
325 { | 315 { |
326 // #43095# 327 pTextEditOutliner->ClearModifyFlag(); | 316 const sal_uInt32 nViewAnz(pActiveOutliner->GetViewCount()); 317 318 if(nViewAnz) 319 { 320 const Region& rRedrawRegion = rPaintWindow.GetRedrawRegion(); 321 const Rectangle aCheckRect(rRedrawRegion.GetBoundRect()); 322 323 for(sal_uInt32 i(0); i < nViewAnz; i++) 324 { 325 OutlinerView* pOLV = pActiveOutliner->GetView(i); 326 327 if(pOLV->GetWindow() == &rPaintWindow.GetOutputDevice()) 328 { 329 ImpPaintOutlinerView(*pOLV, aCheckRect, rPaintWindow.GetTargetOutputDevice()); 330 return; 331 } 332 } 333 } |
328 } | 334 } |
335 } 336} |
|
329 | 337 |
330 if(bTextFrame && !bFitToSize) 331 { 332 aPixRect.Left()--; 333 aPixRect.Top()--; 334 aPixRect.Right()++; 335 aPixRect.Bottom()++; 336 sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1); | 338void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect, OutputDevice& rTargetDevice) const 339{ 340 const SdrTextObj* pText = PTR_CAST(SdrTextObj,GetTextEditObject()); 341 bool bTextFrame(pText && pText->IsTextFrame()); 342 bool bFitToSize(0 != (pTextEditOutliner->GetControlWord() & EE_CNTRL_STRETCHING)); 343 bool bModifyMerk(pTextEditOutliner->IsModified()); // #43095# 344 Rectangle aBlankRect(rOutlView.GetOutputArea()); 345 aBlankRect.Union(aMinTextEditArea); 346 Rectangle aPixRect(rTargetDevice.LogicToPixel(aBlankRect)); 347 aBlankRect.Intersection(rRect); 348 rOutlView.GetOutliner()->SetUpdateMode(sal_True); // Bugfix #22596# 349 rOutlView.Paint(aBlankRect, &rTargetDevice); 350 351 if(!bModifyMerk) 352 { 353 // #43095# 354 pTextEditOutliner->ClearModifyFlag(); 355 } 356 357 if(bTextFrame && !bFitToSize) 358 { 359 aPixRect.Left()--; 360 aPixRect.Top()--; 361 aPixRect.Right()++; 362 aPixRect.Bottom()++; 363 sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1); |
337 | 364 |
338 { 339 // xPixRect Begrenzen, wegen Treiberproblem bei zu weit hinausragenden Pixelkoordinaten 340 Size aMaxXY(pWin->GetOutputSizePixel()); 341 long a(2 * nPixSiz); 342 long nMaxX(aMaxXY.Width() + a); 343 long nMaxY(aMaxXY.Height() + a); | 365 { 366 // xPixRect Begrenzen, wegen Treiberproblem bei zu weit hinausragenden Pixelkoordinaten 367 Size aMaxXY(rTargetDevice.GetOutputSizePixel()); 368 long a(2 * nPixSiz); 369 long nMaxX(aMaxXY.Width() + a); 370 long nMaxY(aMaxXY.Height() + a); |
344 | 371 |
345 if (aPixRect.Left ()<-a) aPixRect.Left()=-a; 346 if (aPixRect.Top ()<-a) aPixRect.Top ()=-a; 347 if (aPixRect.Right ()>nMaxX) aPixRect.Right ()=nMaxX; 348 if (aPixRect.Bottom()>nMaxY) aPixRect.Bottom()=nMaxY; 349 } | 372 if (aPixRect.Left ()<-a) aPixRect.Left()=-a; 373 if (aPixRect.Top ()<-a) aPixRect.Top ()=-a; 374 if (aPixRect.Right ()>nMaxX) aPixRect.Right ()=nMaxX; 375 if (aPixRect.Bottom()>nMaxY) aPixRect.Bottom()=nMaxY; 376 } |
350 | 377 |
351 Rectangle aOuterPix(aPixRect); 352 aOuterPix.Left()-=nPixSiz; 353 aOuterPix.Top()-=nPixSiz; 354 aOuterPix.Right()+=nPixSiz; 355 aOuterPix.Bottom()+=nPixSiz; | 378 Rectangle aOuterPix(aPixRect); 379 aOuterPix.Left()-=nPixSiz; 380 aOuterPix.Top()-=nPixSiz; 381 aOuterPix.Right()+=nPixSiz; 382 aOuterPix.Bottom()+=nPixSiz; |
356 | 383 |
357 bool bMerk(pWin->IsMapModeEnabled()); 358 pWin->EnableMapMode(sal_False); 359 PolyPolygon aPolyPoly( 2 ); | 384 bool bMerk(rTargetDevice.IsMapModeEnabled()); 385 rTargetDevice.EnableMapMode(sal_False); 386 PolyPolygon aPolyPoly( 2 ); |
360 | 387 |
361 svtools::ColorConfig aColorConfig; 362 Color aHatchCol( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); 363 const Hatch aHatch( HATCH_SINGLE, aHatchCol, 3, 450 ); | 388 svtools::ColorConfig aColorConfig; 389 Color aHatchCol( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); 390 const Hatch aHatch( HATCH_SINGLE, aHatchCol, 3, 450 ); |
364 | 391 |
365 aPolyPoly.Insert( aOuterPix ); 366 aPolyPoly.Insert( aPixRect ); 367 pWin->DrawHatch( aPolyPoly, aHatch ); | 392 aPolyPoly.Insert( aOuterPix ); 393 aPolyPoly.Insert( aPixRect ); 394 rTargetDevice.DrawHatch( aPolyPoly, aHatch ); |
368 | 395 |
369 pWin->EnableMapMode(bMerk); 370 } 371 372 rOutlView.ShowCursor(); | 396 rTargetDevice.EnableMapMode(bMerk); |
373 } | 397 } |
398 399 rOutlView.ShowCursor(); |
|
374} 375 376void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const 377{ 378 Window* pWin = rOutlView.GetWindow(); 379 380 if(pWin) 381 { --- 1761 unchanged lines hidden --- | 400} 401 402void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const 403{ 404 Window* pWin = rOutlView.GetWindow(); 405 406 if(pWin) 407 { --- 1761 unchanged lines hidden --- |