linectrl.cxx (f6e50924) linectrl.cxx (97e8a929)
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

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

520
521// -----------------------------------------------------------------------
522
523void SvxLineEndWindow::FillValueSet()
524{
525 if( pLineEndList )
526 {
527 XLineEndEntry* pEntry = NULL;
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

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

520
521// -----------------------------------------------------------------------
522
523void SvxLineEndWindow::FillValueSet()
524{
525 if( pLineEndList )
526 {
527 XLineEndEntry* pEntry = NULL;
528 Bitmap* pBmp = NULL;
529 VirtualDevice aVD;
530
531 long nCount = pLineEndList->Count();
532
533 // Erster Eintrag: kein LinienEnde
534 // Temporaer wird ein Eintrag hinzugefuegt, um die UI-Bitmap zu erhalten
535 basegfx::B2DPolyPolygon aNothing;
536 pLineEndList->Insert( new XLineEndEntry( aNothing, SVX_RESSTR( RID_SVXSTR_NONE ) ) );
537 pEntry = pLineEndList->GetLineEnd( nCount );
528 VirtualDevice aVD;
529
530 long nCount = pLineEndList->Count();
531
532 // Erster Eintrag: kein LinienEnde
533 // Temporaer wird ein Eintrag hinzugefuegt, um die UI-Bitmap zu erhalten
534 basegfx::B2DPolyPolygon aNothing;
535 pLineEndList->Insert( new XLineEndEntry( aNothing, SVX_RESSTR( RID_SVXSTR_NONE ) ) );
536 pEntry = pLineEndList->GetLineEnd( nCount );
538 pBmp = pLineEndList->GetBitmap( nCount );
539 DBG_ASSERT( pBmp, "UI-Bitmap wurde nicht erzeugt" );
537 Bitmap aBmp = pLineEndList->GetUiBitmap( nCount );
538 OSL_ENSURE( !aBmp.IsEmpty(), "UI-Bitmap wurde nicht erzeugt" );
540
539
541 aBmpSize = pBmp->GetSizePixel();
540 aBmpSize = aBmp.GetSizePixel();
542 aVD.SetOutputSizePixel( aBmpSize, sal_False );
543 aBmpSize.Width() = aBmpSize.Width() / 2;
544 Point aPt0( 0, 0 );
545 Point aPt1( aBmpSize.Width(), 0 );
546
541 aVD.SetOutputSizePixel( aBmpSize, sal_False );
542 aBmpSize.Width() = aBmpSize.Width() / 2;
543 Point aPt0( 0, 0 );
544 Point aPt1( aBmpSize.Width(), 0 );
545
547 aVD.DrawBitmap( Point(), *pBmp );
546 aVD.DrawBitmap( Point(), aBmp );
548 aLineEndSet.InsertItem( 1, aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() );
549 aLineEndSet.InsertItem( 2, aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() );
550
551 delete pLineEndList->Remove( nCount );
552
553 for( long i = 0; i < nCount; i++ )
554 {
555 pEntry = pLineEndList->GetLineEnd( i );
556 DBG_ASSERT( pEntry, "Konnte auf LineEndEntry nicht zugreifen" );
547 aLineEndSet.InsertItem( 1, aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() );
548 aLineEndSet.InsertItem( 2, aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() );
549
550 delete pLineEndList->Remove( nCount );
551
552 for( long i = 0; i < nCount; i++ )
553 {
554 pEntry = pLineEndList->GetLineEnd( i );
555 DBG_ASSERT( pEntry, "Konnte auf LineEndEntry nicht zugreifen" );
557 pBmp = pLineEndList->GetBitmap( i );
558 DBG_ASSERT( pBmp, "UI-Bitmap wurde nicht erzeugt" );
556 aBmp = pLineEndList->GetUiBitmap( i );
557 OSL_ENSURE( !aBmp.IsEmpty(), "UI-Bitmap wurde nicht erzeugt" );
559
558
560 aVD.DrawBitmap( aPt0, *pBmp );
559 aVD.DrawBitmap( aPt0, aBmp );
561 aLineEndSet.InsertItem( (sal_uInt16)((i+1L)*2L+1L), aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() );
562 aLineEndSet.InsertItem( (sal_uInt16)((i+2L)*2L), aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() );
563 }
564 nLines = Min( (sal_uInt16)(nCount + 1), (sal_uInt16) MAX_LINES );
565 aLineEndSet.SetLineCount( nLines );
566
567 SetSize();
568 }

--- 212 unchanged lines hidden ---
560 aLineEndSet.InsertItem( (sal_uInt16)((i+1L)*2L+1L), aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() );
561 aLineEndSet.InsertItem( (sal_uInt16)((i+2L)*2L), aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() );
562 }
563 nLines = Min( (sal_uInt16)(nCount + 1), (sal_uInt16) MAX_LINES );
564 aLineEndSet.SetLineCount( nLines );
565
566 SetSize();
567 }

--- 212 unchanged lines hidden ---