/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// *Put* in the core set all table brushes that are *SET* in the m_aAttrSet if (nSlot != SID_ATTR_BRUSH)
{
nWhich = m_aAttrSet.GetPool()->GetWhichIDFromSlotID(SID_ATTR_BRUSH); if (SfxItemState::SET == m_aAttrSet.GetItemState(nWhich))
{
SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(m_aAttrSet.Get(nWhich)));
pCoreSet->Put(aBrushItem);
}
} if (nSlot != SID_ATTR_BRUSH_ROW)
{ if (SfxItemState::SET == m_aAttrSet.GetItemState(SID_ATTR_BRUSH_ROW))
{
SvxBrushItem aBrushItem(m_aAttrSet.Get(SID_ATTR_BRUSH_ROW));
pCoreSet->Put(aBrushItem);
}
} if (nSlot != SID_ATTR_BRUSH_TABLE)
{ if (SfxItemState::SET == m_aAttrSet.GetItemState(SID_ATTR_BRUSH_TABLE))
{
SvxBrushItem aBrushItem(m_aAttrSet.Get(SID_ATTR_BRUSH_TABLE));
pCoreSet->Put(aBrushItem);
}
}
// we always have the color page
XColorListRef xColorTable; if (pObjSh)
{ const SvxColorListItem* pItem = pObjSh->GetItem(SID_COLOR_TABLE); if (pItem)
xColorTable = pItem->GetColorList();
} if (!xColorTable.is())
xColorTable = XColorList::CreateStdColorList();
SetColorList(xColorTable);
// sometimes we have the bitmap page if (m_xBtnBitmap->get_visible())
{
XBitmapListRef xBitmapList; if (pObjSh) if (const SvxBitmapListItem* pItem = pObjSh->GetItem(SID_BITMAP_LIST))
xBitmapList = pItem->GetBitmapList();
SetBitmapList(xBitmapList);
}
}
// Fill the local item set with XATTR_FILL settings gathered from the tab page, convert to // SvxBrushItem and store in table destination slot Which. Do this so cell, row, and table // brush items can be set together.
SvxAreaTabPage::FillItemSet(&m_aAttrSet);
m_aAttrSet.Put(getSvxBrushItemFromSourceSet(m_aAttrSet, GetWhich(lcl_GetTableDestSlot(m_nActPos))));
m_nActPos = nSelPos;
SetActiveTableDestinationBrushItem();
}
void SvxBkgTabPage::SetActiveTableDestinationBrushItem()
{ // set the table destination (cell, row, table) brush item as a fill item in the local item set
sal_uInt16 nWhich = GetWhich(lcl_GetTableDestSlot(m_nActPos)); if (SfxItemState::SET == GetItemSet().GetItemState(nWhich))
{
SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(GetItemSet().Get(nWhich)));
setSvxBrushItemAsFillAttributesToTargetSet(aBrushItem, m_aAttrSet);
} else
{
SelectFillType(*m_xBtnNone, &m_aAttrSet); return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.