tpview.cxx (97e8a929) tpview.cxx (c7be74b1)
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

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

346 aColorFT.Disable(), aColorLB.Disable();
347
348 if ( aColorLB.GetEntryCount() == 0 )
349 {
350 SfxObjectShell* pDocSh = SfxObjectShell::Current();
351 // hier koennte auch eine andere DocShell kommen!
352 pDocSh = PTR_CAST(ScDocShell, pDocSh);
353
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

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

346 aColorFT.Disable(), aColorLB.Disable();
347
348 if ( aColorLB.GetEntryCount() == 0 )
349 {
350 SfxObjectShell* pDocSh = SfxObjectShell::Current();
351 // hier koennte auch eine andere DocShell kommen!
352 pDocSh = PTR_CAST(ScDocShell, pDocSh);
353
354 XColorList* pColorTable = NULL;
354 XColorListSharedPtr aColorTable;
355
356 if ( pDocSh )
357 {
358 const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
359
360 if ( pItem )
355
356 if ( pDocSh )
357 {
358 const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
359
360 if ( pItem )
361 pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable();
361 aColorTable = static_cast< const SvxColorTableItem* >(pItem)->GetColorTable();
362 }
363 else
362 }
363 else
364 pColorTable = XColorList::GetStdColorList();
364 aColorTable = XColorList::GetStdColorList();
365
365
366 if ( !pColorTable )
366 if ( !aColorTable.get() )
367 return;
368
369 //------------------------------------------------------
370
371 aColorLB.SetUpdateMode( sal_False );
372
373 // Eintraege aus der Colortable
374
367 return;
368
369 //------------------------------------------------------
370
371 aColorLB.SetUpdateMode( sal_False );
372
373 // Eintraege aus der Colortable
374
375 long nCount = pColorTable->Count();
375 long nCount = aColorTable->Count();
376 for ( long n=0; n<nCount; n++ )
377 {
376 for ( long n=0; n<nCount; n++ )
377 {
378 XColorEntry* pEntry = pColorTable->GetColor(n);
378 XColorEntry* pEntry = aColorTable->GetColor(n);
379 aColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
380 }
381
382 // Standard-Gitterfarbe
383
384 Color aStdCol( SC_STD_GRIDCOLOR ); // wie Default in ScViewOptions
385 if ( LISTBOX_ENTRY_NOTFOUND ==
386 aColorLB.GetEntryPos( aStdCol ) )

--- 355 unchanged lines hidden ---
379 aColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
380 }
381
382 // Standard-Gitterfarbe
383
384 Color aStdCol( SC_STD_GRIDCOLOR ); // wie Default in ScViewOptions
385 if ( LISTBOX_ENTRY_NOTFOUND ==
386 aColorLB.GetEntryPos( aStdCol ) )

--- 355 unchanged lines hidden ---