standardcontrol.cxx (2a97ec55) standardcontrol.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

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

677 return aStr;
678 }
679
680 //------------------------------------------------------------------
681 OColorControl::OColorControl(Window* pParent, WinBits nWinStyle)
682 :OColorControl_Base( PropertyControlType::ColorListBox, pParent, nWinStyle )
683 {
684 // initialize the color listbox
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

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

677 return aStr;
678 }
679
680 //------------------------------------------------------------------
681 OColorControl::OColorControl(Window* pParent, WinBits nWinStyle)
682 :OColorControl_Base( PropertyControlType::ColorListBox, pParent, nWinStyle )
683 {
684 // initialize the color listbox
685 XColorTable* pColorTable = NULL;
685 XColorList* pColorTable = NULL;
686 SfxObjectShell* pDocSh = SfxObjectShell::Current();
687 const SfxPoolItem* pItem = pDocSh ? pDocSh->GetItem( SID_COLOR_TABLE ) : NULL;
688 if ( pItem )
689 {
690 DBG_ASSERT(pItem->ISA(SvxColorTableItem), "OColorControl::OColorControl: invalid color item!");
691 pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
692 }
693
694 if ( !pColorTable )
695 {
686 SfxObjectShell* pDocSh = SfxObjectShell::Current();
687 const SfxPoolItem* pItem = pDocSh ? pDocSh->GetItem( SID_COLOR_TABLE ) : NULL;
688 if ( pItem )
689 {
690 DBG_ASSERT(pItem->ISA(SvxColorTableItem), "OColorControl::OColorControl: invalid color item!");
691 pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
692 }
693
694 if ( !pColorTable )
695 {
696 pColorTable = XColorTable::GetStdColorTable();
696 pColorTable = XColorList::GetStdColorList();
697 }
698
699
700 DBG_ASSERT(pColorTable, "OColorControl::OColorControl: no color table!");
701
702 if (pColorTable)
703 {
704 for (sal_uInt16 i = 0; i < pColorTable->Count(); ++i)

--- 734 unchanged lines hidden ---
697 }
698
699
700 DBG_ASSERT(pColorTable, "OColorControl::OColorControl: no color table!");
701
702 if (pColorTable)
703 {
704 for (sal_uInt16 i = 0; i < pColorTable->Count(); ++i)

--- 734 unchanged lines hidden ---