Remove XFillAttrSetItem and XLineAttrSetItem
Both are derived from SfxSetItem which means they contain a SfxItemSet themselves. That leads to problems since at their construction time a SfxItemPool has to be known and it *should* not be different to the one of the ItemSet that Item gets added later - that leads to the 2nd class of problems. In the long therm we should get rid of all SfxSetItems. This change simplifies already some stuff, including that the standard Items for DrawObjects reduces by two (and more due to containing a whole ItemSet) and e.g. the problem that these Items had to be converted to hard attributes in the done fixes for copy/pasting Slides. Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com> Change-Id: I8b1c6cabdaa43ed6062811b5508ab3dece47a755 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6795 Reviewed-by: Armin Le Grand <armin.legrand@collabora.com> Tested-by: Jenkins CPCI <releng@collaboraoffice.com> (cherry picked from commit e67458a9b769fe7a3a7ee0739ed6d5c46dbc0692) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211734 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
committed by
Xisco Fauli
parent
4bc8d8e4dd
commit
760394bbad
@@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include <svx/ColorIconView.hxx>
|
#include <svx/ColorIconView.hxx>
|
||||||
#include <svx/dlgctrl.hxx>
|
#include <svx/dlgctrl.hxx>
|
||||||
#include <svx/xflasit.hxx>
|
|
||||||
#include <svx/tabarea.hxx>
|
#include <svx/tabarea.hxx>
|
||||||
#include <svx/PaletteManager.hxx>
|
#include <svx/PaletteManager.hxx>
|
||||||
#include <svx/svdview.hxx>
|
#include <svx/svdview.hxx>
|
||||||
@@ -158,8 +157,7 @@ class SvxTransparenceTabPage : public SfxTabPage
|
|||||||
|
|
||||||
bool bBitmap;
|
bool bBitmap;
|
||||||
|
|
||||||
XFillAttrSetItem aXFillAttr;
|
SfxItemSet m_aFillAttributeSet;
|
||||||
SfxItemSet& rXFSet;
|
|
||||||
|
|
||||||
SvxXRectPreview m_aCtlBitmapPreview;
|
SvxXRectPreview m_aCtlBitmapPreview;
|
||||||
SvxXRectPreview m_aCtlXRectPreview;
|
SvxXRectPreview m_aCtlXRectPreview;
|
||||||
@@ -253,8 +251,7 @@ private:
|
|||||||
|
|
||||||
ChangeType* m_pnColorListState;
|
ChangeType* m_pnColorListState;
|
||||||
|
|
||||||
XFillAttrSetItem m_aXFillAttr;
|
SfxItemSet m_aFillAttributeSet;
|
||||||
SfxItemSet& m_rXFSet;
|
|
||||||
|
|
||||||
bool m_bBtnClicked = false;
|
bool m_bBtnClicked = false;
|
||||||
|
|
||||||
@@ -328,8 +325,7 @@ private:
|
|||||||
PageType m_nPageType;
|
PageType m_nPageType;
|
||||||
sal_uInt16 m_nDlgType;
|
sal_uInt16 m_nDlgType;
|
||||||
|
|
||||||
XFillAttrSetItem m_aXFillAttr;
|
SfxItemSet m_aFillAttributeSet;
|
||||||
SfxItemSet& m_rXFSet;
|
|
||||||
MapUnit m_ePoolUnit;
|
MapUnit m_ePoolUnit;
|
||||||
|
|
||||||
SvxRectCtl m_aCtlPosition;
|
SvxRectCtl m_aCtlPosition;
|
||||||
@@ -380,8 +376,7 @@ private:
|
|||||||
ChangeType m_nGradientListState;
|
ChangeType m_nGradientListState;
|
||||||
ChangeType* m_pnColorListState;
|
ChangeType* m_pnColorListState;
|
||||||
|
|
||||||
XFillAttrSetItem m_aXFillAttr;
|
SfxItemSet m_aFillAttributeSet;
|
||||||
SfxItemSet& m_rXFSet;
|
|
||||||
|
|
||||||
// MCGR: Preserve ColorStops until we have a UI to edit these
|
// MCGR: Preserve ColorStops until we have a UI to edit these
|
||||||
basegfx::BColorStops m_aColorStops;
|
basegfx::BColorStops m_aColorStops;
|
||||||
@@ -461,8 +456,7 @@ private:
|
|||||||
ChangeType m_nHatchingListState;
|
ChangeType m_nHatchingListState;
|
||||||
ChangeType* m_pnColorListState;
|
ChangeType* m_pnColorListState;
|
||||||
|
|
||||||
XFillAttrSetItem m_aXFillAttr;
|
SfxItemSet m_aFillAttributeSet;
|
||||||
SfxItemSet& m_rXFSet;
|
|
||||||
|
|
||||||
MapUnit m_ePoolUnit;
|
MapUnit m_ePoolUnit;
|
||||||
|
|
||||||
@@ -532,8 +526,7 @@ class SvxBitmapTabPage : public SfxTabPage
|
|||||||
double m_fObjectHeight;
|
double m_fObjectHeight;
|
||||||
bool m_bLogicalSize;
|
bool m_bLogicalSize;
|
||||||
|
|
||||||
XFillAttrSetItem m_aXFillAttr;
|
SfxItemSet m_aFillAttributeSet;
|
||||||
SfxItemSet& m_rXFSet;
|
|
||||||
const SdrView* mpView;
|
const SdrView* mpView;
|
||||||
MapUnit mePoolUnit;
|
MapUnit mePoolUnit;
|
||||||
FieldUnit meFieldUnit;
|
FieldUnit meFieldUnit;
|
||||||
@@ -607,8 +600,7 @@ private:
|
|||||||
ChangeType m_nPatternListState;
|
ChangeType m_nPatternListState;
|
||||||
ChangeType* m_pnColorListState;
|
ChangeType* m_pnColorListState;
|
||||||
|
|
||||||
XFillAttrSetItem m_aXFillAttr;
|
SfxItemSet m_aFillAttributeSet;
|
||||||
SfxItemSet& m_rXFSet;
|
|
||||||
|
|
||||||
SvxXRectPreview m_aCtlPreview;
|
SvxXRectPreview m_aCtlPreview;
|
||||||
std::unique_ptr<SvxPixelCtl> m_xCtlPixel;
|
std::unique_ptr<SvxPixelCtl> m_xCtlPixel;
|
||||||
@@ -671,8 +663,7 @@ private:
|
|||||||
|
|
||||||
ChangeType* m_pnColorListState;
|
ChangeType* m_pnColorListState;
|
||||||
|
|
||||||
XFillAttrSetItem m_aXFillAttr;
|
SfxItemSet m_aFillAttributeSet;
|
||||||
SfxItemSet& m_rXFSet;
|
|
||||||
|
|
||||||
ColorModel m_eCM;
|
ColorModel m_eCM;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <sfx2/tabdlg.hxx>
|
#include <sfx2/tabdlg.hxx>
|
||||||
#include <svx/svdpage.hxx>
|
#include <svx/svdpage.hxx>
|
||||||
#include <svx/tabarea.hxx>
|
#include <svx/tabarea.hxx>
|
||||||
#include <svx/xlnasit.hxx>
|
// #include <svx/xlnasit.hxx>
|
||||||
#include <svx/xtable.hxx>
|
#include <svx/xtable.hxx>
|
||||||
#include <svx/dlgctrl.hxx>
|
#include <svx/dlgctrl.hxx>
|
||||||
#include <tools/fldunit.hxx>
|
#include <tools/fldunit.hxx>
|
||||||
@@ -122,8 +122,7 @@ private:
|
|||||||
const SfxItemSet& m_rOutAttrs;
|
const SfxItemSet& m_rOutAttrs;
|
||||||
bool m_bObjSelected;
|
bool m_bObjSelected;
|
||||||
|
|
||||||
XLineAttrSetItem m_aXLineAttr;
|
SfxItemSet m_aLineAttributeSet;
|
||||||
SfxItemSet& m_rXLSet;
|
|
||||||
|
|
||||||
XDashListRef m_pDashList;
|
XDashListRef m_pDashList;
|
||||||
XLineEndListRef m_pLineEndList;
|
XLineEndListRef m_pLineEndList;
|
||||||
@@ -250,8 +249,7 @@ private:
|
|||||||
const SfxItemSet& rOutAttrs;
|
const SfxItemSet& rOutAttrs;
|
||||||
XDash aDash;
|
XDash aDash;
|
||||||
|
|
||||||
XLineAttrSetItem aXLineAttr;
|
SfxItemSet m_aLineAttributeSet;
|
||||||
SfxItemSet& rXLSet;
|
|
||||||
|
|
||||||
XDashListRef pDashList;
|
XDashListRef pDashList;
|
||||||
|
|
||||||
@@ -330,8 +328,7 @@ private:
|
|||||||
const SfxItemSet& rOutAttrs;
|
const SfxItemSet& rOutAttrs;
|
||||||
const SdrObject* pPolyObj;
|
const SdrObject* pPolyObj;
|
||||||
|
|
||||||
XLineAttrSetItem aXLineAttr;
|
SfxItemSet m_aLineAttributeSet;
|
||||||
SfxItemSet& rXLSet;
|
|
||||||
|
|
||||||
XLineEndListRef pLineEndList;
|
XLineEndListRef pLineEndList;
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,7 @@ SvxAreaTabPage::SvxAreaTabPage(weld::Container* pPage, weld::DialogController* p
|
|||||||
, maFixed_ChangeType(ChangeType::NONE)
|
, maFixed_ChangeType(ChangeType::NONE)
|
||||||
// init with pointers to fixed ChangeType
|
// init with pointers to fixed ChangeType
|
||||||
, m_pnColorListState(&maFixed_ChangeType)
|
, m_pnColorListState(&maFixed_ChangeType)
|
||||||
, m_aXFillAttr(rInAttrs.GetPool())
|
, m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST))
|
||||||
, m_rXFSet(m_aXFillAttr.GetItemSet())
|
|
||||||
, m_xFillTab(m_xBuilder->weld_container(u"fillstylebox"_ustr))
|
, m_xFillTab(m_xBuilder->weld_container(u"fillstylebox"_ustr))
|
||||||
, m_xBtnNone(m_xBuilder->weld_toggle_button(u"btnnone"_ustr))
|
, m_xBtnNone(m_xBuilder->weld_toggle_button(u"btnnone"_ustr))
|
||||||
, m_xBtnColor(m_xBuilder->weld_toggle_button(u"btncolor"_ustr))
|
, m_xBtnColor(m_xBuilder->weld_toggle_button(u"btncolor"_ustr))
|
||||||
@@ -120,30 +119,30 @@ void SvxAreaTabPage::SetOptimalSize(weld::DialogController* pController)
|
|||||||
m_xFillTab->set_size_request(-1, -1);
|
m_xFillTab->set_size_request(-1, -1);
|
||||||
|
|
||||||
// Calculate optimal size of all pages...
|
// Calculate optimal size of all pages...
|
||||||
m_xFillTabPage = SvxColorTabPage::Create(m_xFillTab.get(), pController, m_rXFSet);
|
m_xFillTabPage = SvxColorTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet);
|
||||||
Size aSize(m_xFillTab->get_preferred_size());
|
Size aSize(m_xFillTab->get_preferred_size());
|
||||||
|
|
||||||
if (m_xBtnGradient->get_visible())
|
if (m_xBtnGradient->get_visible())
|
||||||
{
|
{
|
||||||
m_xFillTabPage = SvxGradientTabPage::Create(m_xFillTab.get(), pController, m_rXFSet);
|
m_xFillTabPage = SvxGradientTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet);
|
||||||
Size aGradientSize = m_xFillTab->get_preferred_size();
|
Size aGradientSize = m_xFillTab->get_preferred_size();
|
||||||
lclExtendSize(aSize, aGradientSize);
|
lclExtendSize(aSize, aGradientSize);
|
||||||
}
|
}
|
||||||
if (m_xBtnBitmap->get_visible())
|
if (m_xBtnBitmap->get_visible())
|
||||||
{
|
{
|
||||||
m_xFillTabPage = SvxBitmapTabPage::Create(m_xFillTab.get(), pController, m_rXFSet);
|
m_xFillTabPage = SvxBitmapTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet);
|
||||||
Size aBitmapSize = m_xFillTab->get_preferred_size();
|
Size aBitmapSize = m_xFillTab->get_preferred_size();
|
||||||
lclExtendSize(aSize, aBitmapSize);
|
lclExtendSize(aSize, aBitmapSize);
|
||||||
}
|
}
|
||||||
if (m_xBtnHatch->get_visible())
|
if (m_xBtnHatch->get_visible())
|
||||||
{
|
{
|
||||||
m_xFillTabPage = SvxHatchTabPage::Create(m_xFillTab.get(), pController, m_rXFSet);
|
m_xFillTabPage = SvxHatchTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet);
|
||||||
Size aHatchSize = m_xFillTab->get_preferred_size();
|
Size aHatchSize = m_xFillTab->get_preferred_size();
|
||||||
lclExtendSize(aSize, aHatchSize);
|
lclExtendSize(aSize, aHatchSize);
|
||||||
}
|
}
|
||||||
if (m_xBtnPattern->get_visible())
|
if (m_xBtnPattern->get_visible())
|
||||||
{
|
{
|
||||||
m_xFillTabPage = SvxPatternTabPage::Create(m_xFillTab.get(), pController, m_rXFSet);
|
m_xFillTabPage = SvxPatternTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet);
|
||||||
Size aPatternSize = m_xFillTab->get_preferred_size();
|
Size aPatternSize = m_xFillTab->get_preferred_size();
|
||||||
lclExtendSize(aSize, aPatternSize);
|
lclExtendSize(aSize, aPatternSize);
|
||||||
}
|
}
|
||||||
@@ -166,7 +165,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
|
|||||||
{
|
{
|
||||||
const XFillStyleItem& aFillStyleItem( rSet.Get( GetWhich( XATTR_FILLSTYLE ) ) );
|
const XFillStyleItem& aFillStyleItem( rSet.Get( GetWhich( XATTR_FILLSTYLE ) ) );
|
||||||
eXFS = aFillStyleItem.GetValue();
|
eXFS = aFillStyleItem.GetValue();
|
||||||
m_rXFSet.Put( aFillStyleItem );
|
m_aFillAttributeSet.Put( aFillStyleItem );
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(eXFS)
|
switch(eXFS)
|
||||||
@@ -183,22 +182,22 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
|
|||||||
}
|
}
|
||||||
case drawing::FillStyle_SOLID:
|
case drawing::FillStyle_SOLID:
|
||||||
{
|
{
|
||||||
m_rXFSet.Put( rSet.Get( GetWhich( XATTR_FILLCOLOR ) ) );
|
m_aFillAttributeSet.Put( rSet.Get( GetWhich( XATTR_FILLCOLOR ) ) );
|
||||||
SelectFillType(*m_xBtnColor);
|
SelectFillType(*m_xBtnColor);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case drawing::FillStyle_GRADIENT:
|
case drawing::FillStyle_GRADIENT:
|
||||||
{
|
{
|
||||||
m_rXFSet.Put( rSet.Get( GetWhich( XATTR_FILLGRADIENT ) ) );
|
m_aFillAttributeSet.Put( rSet.Get( GetWhich( XATTR_FILLGRADIENT ) ) );
|
||||||
m_rXFSet.Put(rSet.Get(GetWhich(XATTR_GRADIENTSTEPCOUNT)));
|
m_aFillAttributeSet.Put(rSet.Get(GetWhich(XATTR_GRADIENTSTEPCOUNT)));
|
||||||
SelectFillType(*m_xBtnGradient);
|
SelectFillType(*m_xBtnGradient);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case drawing::FillStyle_HATCH:
|
case drawing::FillStyle_HATCH:
|
||||||
{
|
{
|
||||||
m_rXFSet.Put( rSet.Get(XATTR_FILLHATCH) );
|
m_aFillAttributeSet.Put( rSet.Get(XATTR_FILLHATCH) );
|
||||||
m_rXFSet.Put( rSet.Get(XATTR_FILLUSESLIDEBACKGROUND) );
|
m_aFillAttributeSet.Put( rSet.Get(XATTR_FILLUSESLIDEBACKGROUND) );
|
||||||
m_rXFSet.Put( rSet.Get(XATTR_FILLCOLOR) );
|
m_aFillAttributeSet.Put( rSet.Get(XATTR_FILLCOLOR) );
|
||||||
SelectFillType(*m_xBtnHatch);
|
SelectFillType(*m_xBtnHatch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -206,7 +205,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
|
|||||||
{
|
{
|
||||||
const bool bPattern = rSet.Get(GetWhich(XATTR_FILLBITMAP)).isPattern();
|
const bool bPattern = rSet.Get(GetWhich(XATTR_FILLBITMAP)).isPattern();
|
||||||
// pass full item set here, bitmap fill has many attributes (tiling, size, offset etc.)
|
// pass full item set here, bitmap fill has many attributes (tiling, size, offset etc.)
|
||||||
m_rXFSet.Put( rSet );
|
m_aFillAttributeSet.Put( rSet );
|
||||||
if (!bPattern)
|
if (!bPattern)
|
||||||
SelectFillType(*m_xBtnBitmap);
|
SelectFillType(*m_xBtnBitmap);
|
||||||
else
|
else
|
||||||
@@ -404,7 +403,7 @@ IMPL_LINK(SvxAreaTabPage, SelectFillTypeHdl_Impl, weld::Toggleable&, rButton, vo
|
|||||||
void SvxAreaTabPage::SelectFillType(weld::Toggleable& rButton, const SfxItemSet* _pSet)
|
void SvxAreaTabPage::SelectFillType(weld::Toggleable& rButton, const SfxItemSet* _pSet)
|
||||||
{
|
{
|
||||||
if (_pSet)
|
if (_pSet)
|
||||||
m_rXFSet.Set(*_pSet);
|
m_aFillAttributeSet.Set(*_pSet);
|
||||||
|
|
||||||
if (_pSet || maBox.GetFillType(rButton) != maBox.GetCurrentFillType())
|
if (_pSet || maBox.GetFillType(rButton) != maBox.GetCurrentFillType())
|
||||||
{
|
{
|
||||||
@@ -442,62 +441,62 @@ std::unique_ptr<SfxTabPage> SvxAreaTabPage::CreatePage(FillType eFillType)
|
|||||||
case FillType::SOLID:
|
case FillType::SOLID:
|
||||||
{
|
{
|
||||||
std::unique_ptr<SvxColorTabPage> pColorTabPage
|
std::unique_ptr<SvxColorTabPage> pColorTabPage
|
||||||
= SvxColorTabPage::Create(m_xFillTab.get(), pController, m_rXFSet);
|
= SvxColorTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet);
|
||||||
pColorTabPage->SetColorList(m_pColorList);
|
pColorTabPage->SetColorList(m_pColorList);
|
||||||
pColorTabPage->SetColorChgd(m_pnColorListState);
|
pColorTabPage->SetColorChgd(m_pnColorListState);
|
||||||
pColorTabPage->Construct();
|
pColorTabPage->Construct();
|
||||||
pColorTabPage->ActivatePage(m_rXFSet);
|
pColorTabPage->ActivatePage(m_aFillAttributeSet);
|
||||||
pColorTabPage->Reset(&m_rXFSet);
|
pColorTabPage->Reset(&m_aFillAttributeSet);
|
||||||
pColorTabPage->set_visible(true);
|
pColorTabPage->set_visible(true);
|
||||||
return pColorTabPage;
|
return pColorTabPage;
|
||||||
}
|
}
|
||||||
case FillType::GRADIENT:
|
case FillType::GRADIENT:
|
||||||
{
|
{
|
||||||
std::unique_ptr<SvxGradientTabPage> pGradientTabPage
|
std::unique_ptr<SvxGradientTabPage> pGradientTabPage
|
||||||
= SvxGradientTabPage::Create(m_xFillTab.get(), pController, m_rXFSet);
|
= SvxGradientTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet);
|
||||||
pGradientTabPage->SetColorList(m_pColorList);
|
pGradientTabPage->SetColorList(m_pColorList);
|
||||||
pGradientTabPage->SetGradientList(m_pGradientList);
|
pGradientTabPage->SetGradientList(m_pGradientList);
|
||||||
pGradientTabPage->SetColorChgd(m_pnColorListState);
|
pGradientTabPage->SetColorChgd(m_pnColorListState);
|
||||||
pGradientTabPage->Construct();
|
pGradientTabPage->Construct();
|
||||||
pGradientTabPage->ActivatePage(m_rXFSet);
|
pGradientTabPage->ActivatePage(m_aFillAttributeSet);
|
||||||
pGradientTabPage->Reset(&m_rXFSet);
|
pGradientTabPage->Reset(&m_aFillAttributeSet);
|
||||||
pGradientTabPage->set_visible(true);
|
pGradientTabPage->set_visible(true);
|
||||||
return pGradientTabPage;
|
return pGradientTabPage;
|
||||||
}
|
}
|
||||||
case FillType::HATCH:
|
case FillType::HATCH:
|
||||||
{
|
{
|
||||||
std::unique_ptr<SvxHatchTabPage> pHatchTabPage
|
std::unique_ptr<SvxHatchTabPage> pHatchTabPage
|
||||||
= SvxHatchTabPage::Create(m_xFillTab.get(), pController, m_rXFSet);
|
= SvxHatchTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet);
|
||||||
pHatchTabPage->SetColorList(m_pColorList);
|
pHatchTabPage->SetColorList(m_pColorList);
|
||||||
pHatchTabPage->SetHatchingList(m_pHatchingList);
|
pHatchTabPage->SetHatchingList(m_pHatchingList);
|
||||||
pHatchTabPage->SetColorChgd(m_pnColorListState);
|
pHatchTabPage->SetColorChgd(m_pnColorListState);
|
||||||
pHatchTabPage->Construct();
|
pHatchTabPage->Construct();
|
||||||
pHatchTabPage->ActivatePage(m_rXFSet);
|
pHatchTabPage->ActivatePage(m_aFillAttributeSet);
|
||||||
pHatchTabPage->Reset(&m_rXFSet);
|
pHatchTabPage->Reset(&m_aFillAttributeSet);
|
||||||
pHatchTabPage->set_visible(true);
|
pHatchTabPage->set_visible(true);
|
||||||
return pHatchTabPage;
|
return pHatchTabPage;
|
||||||
}
|
}
|
||||||
case FillType::BITMAP:
|
case FillType::BITMAP:
|
||||||
{
|
{
|
||||||
std::unique_ptr<SvxBitmapTabPage> pBitmapTabPage
|
std::unique_ptr<SvxBitmapTabPage> pBitmapTabPage
|
||||||
= SvxBitmapTabPage::Create(m_xFillTab.get(), pController, m_rXFSet);
|
= SvxBitmapTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet);
|
||||||
pBitmapTabPage->SetBitmapList(m_pBitmapList);
|
pBitmapTabPage->SetBitmapList(m_pBitmapList);
|
||||||
pBitmapTabPage->Construct();
|
pBitmapTabPage->Construct();
|
||||||
pBitmapTabPage->ActivatePage(m_rXFSet);
|
pBitmapTabPage->ActivatePage(m_aFillAttributeSet);
|
||||||
pBitmapTabPage->Reset(&m_rXFSet);
|
pBitmapTabPage->Reset(&m_aFillAttributeSet);
|
||||||
pBitmapTabPage->set_visible(true);
|
pBitmapTabPage->set_visible(true);
|
||||||
return pBitmapTabPage;
|
return pBitmapTabPage;
|
||||||
}
|
}
|
||||||
case FillType::PATTERN:
|
case FillType::PATTERN:
|
||||||
{
|
{
|
||||||
std::unique_ptr<SvxPatternTabPage> pPatternTabPage
|
std::unique_ptr<SvxPatternTabPage> pPatternTabPage
|
||||||
= SvxPatternTabPage::Create(m_xFillTab.get(), pController, m_rXFSet);
|
= SvxPatternTabPage::Create(m_xFillTab.get(), pController, m_aFillAttributeSet);
|
||||||
pPatternTabPage->SetColorList(m_pColorList);
|
pPatternTabPage->SetColorList(m_pColorList);
|
||||||
pPatternTabPage->SetPatternList(m_pPatternList);
|
pPatternTabPage->SetPatternList(m_pPatternList);
|
||||||
pPatternTabPage->SetColorChgd(m_pnColorListState);
|
pPatternTabPage->SetColorChgd(m_pnColorListState);
|
||||||
pPatternTabPage->Construct();
|
pPatternTabPage->Construct();
|
||||||
pPatternTabPage->ActivatePage(m_rXFSet);
|
pPatternTabPage->ActivatePage(m_aFillAttributeSet);
|
||||||
pPatternTabPage->Reset(&m_rXFSet);
|
pPatternTabPage->Reset(&m_aFillAttributeSet);
|
||||||
pPatternTabPage->set_visible(true);
|
pPatternTabPage->set_visible(true);
|
||||||
return pPatternTabPage;
|
return pPatternTabPage;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,8 +82,7 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, weld::DialogControlle
|
|||||||
, m_fObjectWidth(0.0)
|
, m_fObjectWidth(0.0)
|
||||||
, m_fObjectHeight(0.0)
|
, m_fObjectHeight(0.0)
|
||||||
, m_bLogicalSize(false)
|
, m_bLogicalSize(false)
|
||||||
, m_aXFillAttr(rInAttrs.GetPool())
|
, m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST))
|
||||||
, m_rXFSet(m_aXFillAttr.GetItemSet())
|
|
||||||
, mpView(nullptr)
|
, mpView(nullptr)
|
||||||
, m_xBitmapsPresets(m_xBuilder->weld_icon_view(u"images"_ustr))
|
, m_xBitmapsPresets(m_xBuilder->weld_icon_view(u"images"_ustr))
|
||||||
, m_xBitmapLB(new SvxPresetListBox(*m_xBitmapsPresets))
|
, m_xBitmapLB(new SvxPresetListBox(*m_xBitmapsPresets))
|
||||||
@@ -104,9 +103,9 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, weld::DialogControlle
|
|||||||
, m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_IMAGE_PREVIEW"_ustr, m_aCtlBitmapPreview))
|
, m_xCtlBitmapPreview(new weld::CustomWeld(*m_xBuilder, u"CTL_IMAGE_PREVIEW"_ustr, m_aCtlBitmapPreview))
|
||||||
{
|
{
|
||||||
// setting the output device
|
// setting the output device
|
||||||
m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) );
|
m_aFillAttributeSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) );
|
||||||
m_rXFSet.Put( XFillBitmapItem(OUString(), Graphic()) );
|
m_aFillAttributeSet.Put( XFillBitmapItem(OUString(), Graphic()) );
|
||||||
m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
m_xBitmapsPresets->connect_item_activated(LINK(this, SvxBitmapTabPage, ModifyBitmapHdl));
|
m_xBitmapsPresets->connect_item_activated(LINK(this, SvxBitmapTabPage, ModifyBitmapHdl));
|
||||||
m_xBitmapLB->SetRenameHdl( LINK(this, SvxBitmapTabPage, ClickRenameHdl) );
|
m_xBitmapLB->SetRenameHdl( LINK(this, SvxBitmapTabPage, ClickRenameHdl) );
|
||||||
@@ -129,7 +128,7 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, weld::DialogControlle
|
|||||||
Size aSize = getDrawPreviewOptimalSize(m_aCtlBitmapPreview.GetDrawingArea()->get_ref_device());
|
Size aSize = getDrawPreviewOptimalSize(m_aCtlBitmapPreview.GetDrawingArea()->get_ref_device());
|
||||||
m_xCtlBitmapPreview->set_size_request(aSize.Width(), aSize.Height());
|
m_xCtlBitmapPreview->set_size_request(aSize.Width(), aSize.Height());
|
||||||
|
|
||||||
SfxItemPool* pPool = m_rXFSet.GetPool();
|
SfxItemPool* pPool = m_aFillAttributeSet.GetPool();
|
||||||
mePoolUnit = pPool->GetMetric( XATTR_FILLBMP_SIZEX );
|
mePoolUnit = pPool->GetMetric( XATTR_FILLBMP_SIZEX );
|
||||||
meFieldUnit = GetModuleFieldUnit( rInAttrs );
|
meFieldUnit = GetModuleFieldUnit( rInAttrs );
|
||||||
SetFieldUnit( *m_xBitmapWidth, meFieldUnit, true );
|
SetFieldUnit( *m_xBitmapWidth, meFieldUnit, true );
|
||||||
@@ -304,8 +303,8 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
|
|||||||
|
|
||||||
if(!aItem.isPattern())
|
if(!aItem.isPattern())
|
||||||
{
|
{
|
||||||
m_rXFSet.Put( aItem );
|
m_aFillAttributeSet.Put( aItem );
|
||||||
m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlBitmapPreview.Invalidate();
|
m_aCtlBitmapPreview.Invalidate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -517,11 +516,11 @@ void SvxBitmapTabPage::UpdateBitmap()
|
|||||||
ModifyBitmapStyleHdl( *m_xBitmapStyleLB );
|
ModifyBitmapStyleHdl( *m_xBitmapStyleLB );
|
||||||
ModifyBitmapPositionHdl( *m_xPositionLB );
|
ModifyBitmapPositionHdl( *m_xPositionLB );
|
||||||
|
|
||||||
m_rXFSet.ClearItem(XATTR_FILLBITMAP);
|
m_aFillAttributeSet.ClearItem(XATTR_FILLBITMAP);
|
||||||
m_rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
|
m_aFillAttributeSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
|
||||||
m_rXFSet.Put(XFillBitmapItem(OUString(), *pGraphicObject));
|
m_aFillAttributeSet.Put(XFillBitmapItem(OUString(), *pGraphicObject));
|
||||||
|
|
||||||
m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlBitmapPreview.Invalidate();
|
m_aCtlBitmapPreview.Invalidate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -612,7 +611,7 @@ IMPL_LINK_NOARG( SvxBitmapTabPage, ModifyBitmapSizeHdl, weld::MetricSpinButton&,
|
|||||||
}
|
}
|
||||||
ModifyBitmapStyleHdl(*m_xBitmapStyleLB);
|
ModifyBitmapStyleHdl(*m_xBitmapStyleLB);
|
||||||
|
|
||||||
m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlBitmapPreview.Invalidate();
|
m_aCtlBitmapPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -657,8 +656,8 @@ IMPL_LINK_NOARG( SvxBitmapTabPage, ModifyBitmapStyleHdl, weld::ComboBox&, void )
|
|||||||
m_xPositionOffBox->set_sensitive( bIsTiled );
|
m_xPositionOffBox->set_sensitive( bIsTiled );
|
||||||
m_xTileOffBox->set_sensitive( bIsTiled );
|
m_xTileOffBox->set_sensitive( bIsTiled );
|
||||||
|
|
||||||
m_rXFSet.Put( XFillBmpTileItem( bIsTiled ) );
|
m_aFillAttributeSet.Put( XFillBmpTileItem( bIsTiled ) );
|
||||||
m_rXFSet.Put( XFillBmpStretchItem( bIsStretched ) );
|
m_aFillAttributeSet.Put( XFillBmpStretchItem( bIsStretched ) );
|
||||||
|
|
||||||
if(!bIsStretched)
|
if(!bIsStretched)
|
||||||
{
|
{
|
||||||
@@ -684,32 +683,32 @@ IMPL_LINK_NOARG( SvxBitmapTabPage, ModifyBitmapStyleHdl, weld::ComboBox&, void )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_rXFSet.Put( XFillBmpSizeXItem( aSetBitmapSize.Width() ) );
|
m_aFillAttributeSet.Put( XFillBmpSizeXItem( aSetBitmapSize.Width() ) );
|
||||||
m_rXFSet.Put( XFillBmpSizeYItem( aSetBitmapSize.Height() ) );
|
m_aFillAttributeSet.Put( XFillBmpSizeYItem( aSetBitmapSize.Height() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlBitmapPreview.Invalidate();
|
m_aCtlBitmapPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapPositionHdl, weld::ComboBox&, void)
|
IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapPositionHdl, weld::ComboBox&, void)
|
||||||
{
|
{
|
||||||
if (m_xPositionLB->get_sensitive())
|
if (m_xPositionLB->get_sensitive())
|
||||||
m_rXFSet.Put( XFillBmpPosItem( static_cast< RectPoint >( m_xPositionLB->get_active() ) ) );
|
m_aFillAttributeSet.Put( XFillBmpPosItem( static_cast< RectPoint >( m_xPositionLB->get_active() ) ) );
|
||||||
|
|
||||||
m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlBitmapPreview.Invalidate();
|
m_aCtlBitmapPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyPositionOffsetHdl, weld::MetricSpinButton&, void)
|
IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyPositionOffsetHdl, weld::MetricSpinButton&, void)
|
||||||
{
|
{
|
||||||
if (m_xPositionOffX->get_sensitive())
|
if (m_xPositionOffX->get_sensitive())
|
||||||
m_rXFSet.Put( XFillBmpPosOffsetXItem( m_xPositionOffX->get_value(FieldUnit::PERCENT) ) );
|
m_aFillAttributeSet.Put( XFillBmpPosOffsetXItem( m_xPositionOffX->get_value(FieldUnit::PERCENT) ) );
|
||||||
|
|
||||||
if (m_xPositionOffY->get_sensitive())
|
if (m_xPositionOffY->get_sensitive())
|
||||||
m_rXFSet.Put( XFillBmpPosOffsetYItem( m_xPositionOffY->get_value(FieldUnit::PERCENT) ) );
|
m_aFillAttributeSet.Put( XFillBmpPosOffsetYItem( m_xPositionOffY->get_value(FieldUnit::PERCENT) ) );
|
||||||
|
|
||||||
m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlBitmapPreview.Invalidate();
|
m_aCtlBitmapPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -724,10 +723,10 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyTileOffsetHdl, weld::MetricSpinButton&,
|
|||||||
if(m_xTileOffLB->get_active() == static_cast<sal_Int32>(COLUMN))
|
if(m_xTileOffLB->get_active() == static_cast<sal_Int32>(COLUMN))
|
||||||
nTileYOff = o3tl::sanitizing_cast<sal_uInt16>(m_xTileOffset->get_value(FieldUnit::PERCENT));
|
nTileYOff = o3tl::sanitizing_cast<sal_uInt16>(m_xTileOffset->get_value(FieldUnit::PERCENT));
|
||||||
|
|
||||||
m_rXFSet.Put( XFillBmpTileOffsetXItem(nTileXOff) );
|
m_aFillAttributeSet.Put( XFillBmpTileOffsetXItem(nTileXOff) );
|
||||||
m_rXFSet.Put( XFillBmpTileOffsetYItem(nTileYOff) );
|
m_aFillAttributeSet.Put( XFillBmpTileOffsetYItem(nTileYOff) );
|
||||||
|
|
||||||
m_aCtlBitmapPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlBitmapPreview.Invalidate();
|
m_aCtlBitmapPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,7 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController*
|
|||||||
, m_rOutAttrs(rInAttrs)
|
, m_rOutAttrs(rInAttrs)
|
||||||
// All the horrific pointers we store and should not
|
// All the horrific pointers we store and should not
|
||||||
, m_pnColorListState( nullptr )
|
, m_pnColorListState( nullptr )
|
||||||
, m_aXFillAttr( rInAttrs.GetPool() )
|
, m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST))
|
||||||
, m_rXFSet( m_aXFillAttr.GetItemSet() )
|
|
||||||
, m_eCM( ColorModel::RGB )
|
, m_eCM( ColorModel::RGB )
|
||||||
, m_aColorIconView(m_xBuilder->weld_icon_view(u"coloriconview"_ustr))
|
, m_aColorIconView(m_xBuilder->weld_icon_view(u"coloriconview"_ustr))
|
||||||
, m_aRecentIconView(m_xBuilder->weld_icon_view(u"recentcoloriconview"_ustr))
|
, m_aRecentIconView(m_xBuilder->weld_icon_view(u"recentcoloriconview"_ustr))
|
||||||
@@ -96,10 +95,10 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController*
|
|||||||
SetExchangeSupport();
|
SetExchangeSupport();
|
||||||
|
|
||||||
// setting the output device
|
// setting the output device
|
||||||
m_rXFSet.Put(XFillStyleItem(drawing::FillStyle_SOLID));
|
m_aFillAttributeSet.Put(XFillStyleItem(drawing::FillStyle_SOLID));
|
||||||
m_rXFSet.Put(XFillColorItem(OUString(), COL_BLACK));
|
m_aFillAttributeSet.Put(XFillColorItem(OUString(), COL_BLACK));
|
||||||
m_aCtlPreviewOld.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreviewOld.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
// set handler
|
// set handler
|
||||||
m_xSelectPalette->connect_changed(LINK(this, SvxColorTabPage, SelectPaletteLBHdl));
|
m_xSelectPalette->connect_changed(LINK(this, SvxColorTabPage, SelectPaletteLBHdl));
|
||||||
@@ -178,7 +177,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
|
|||||||
|
|
||||||
SelectPaletteLBHdl(*m_xSelectPalette);
|
SelectPaletteLBHdl(*m_xSelectPalette);
|
||||||
|
|
||||||
m_aCtlPreviewOld.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreviewOld.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreviewOld.Invalidate();
|
m_aCtlPreviewOld.Invalidate();
|
||||||
|
|
||||||
const int nSelectedIndex = m_aColorIconView.get_selected_index();
|
const int nSelectedIndex = m_aColorIconView.get_selected_index();
|
||||||
@@ -253,8 +252,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, SpinValueHdl_Impl, weld::SpinButton&, void)
|
|||||||
static_cast<sal_uInt8>(PercentToColor_Impl(m_xBcustom->get_value())));
|
static_cast<sal_uInt8>(PercentToColor_Impl(m_xBcustom->get_value())));
|
||||||
UpdateColorValues();
|
UpdateColorValues();
|
||||||
|
|
||||||
m_rXFSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor));
|
m_aFillAttributeSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor));
|
||||||
m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
m_aCtlPreviewNew.Invalidate();
|
m_aCtlPreviewNew.Invalidate();
|
||||||
}
|
}
|
||||||
@@ -268,8 +267,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, MetricSpinValueHdl_Impl, weld::MetricSpinButton
|
|||||||
static_cast<sal_uInt8>(PercentToColor_Impl(m_xMcustom->get_value(FieldUnit::NONE))));
|
static_cast<sal_uInt8>(PercentToColor_Impl(m_xMcustom->get_value(FieldUnit::NONE))));
|
||||||
ConvertColorValues (m_aCurrentColor.m_aColor, ColorModel::RGB);
|
ConvertColorValues (m_aCurrentColor.m_aColor, ColorModel::RGB);
|
||||||
|
|
||||||
m_rXFSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor));
|
m_aFillAttributeSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor));
|
||||||
m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
m_aCtlPreviewNew.Invalidate();
|
m_aCtlPreviewNew.Invalidate();
|
||||||
}
|
}
|
||||||
@@ -279,8 +278,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, ModifiedHdl_Impl, weld::Entry&, void)
|
|||||||
m_aCurrentColor.m_aColor = m_xHexcustom->GetColor();
|
m_aCurrentColor.m_aColor = m_xHexcustom->GetColor();
|
||||||
UpdateColorValues();
|
UpdateColorValues();
|
||||||
|
|
||||||
m_rXFSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor));
|
m_aFillAttributeSet.Put(XFillColorItem(OUString(), m_aCurrentColor.m_aColor));
|
||||||
m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
m_aCtlPreviewNew.Invalidate();
|
m_aCtlPreviewNew.Invalidate();
|
||||||
}
|
}
|
||||||
@@ -354,9 +353,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickWorkOnHdl_Impl, weld::Button&, void)
|
|||||||
m_aCurrentColor.m_aColor = aPreviewColor;
|
m_aCurrentColor.m_aColor = aPreviewColor;
|
||||||
UpdateColorValues( false );
|
UpdateColorValues( false );
|
||||||
// fill ItemSet and pass it on to XOut
|
// fill ItemSet and pass it on to XOut
|
||||||
m_rXFSet.Put(XFillColorItem(OUString(), aPreviewColor));
|
m_aFillAttributeSet.Put(XFillColorItem(OUString(), aPreviewColor));
|
||||||
//m_aCtlPreviewOld.SetAttributes(m_aXFillAttr);
|
//m_aCtlPreviewOld.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
m_aCtlPreviewNew.Invalidate();
|
m_aCtlPreviewNew.Invalidate();
|
||||||
}
|
}
|
||||||
@@ -474,8 +473,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectPaletteLBHdl, weld::ComboBox&, void)
|
|||||||
|
|
||||||
void SvxColorTabPage::UpdateToSelectedColor(const NamedColor& rNamedColor)
|
void SvxColorTabPage::UpdateToSelectedColor(const NamedColor& rNamedColor)
|
||||||
{
|
{
|
||||||
m_rXFSet.Put(XFillColorItem(OUString(), rNamedColor.m_aColor));
|
m_aFillAttributeSet.Put(XFillColorItem(OUString(), rNamedColor.m_aColor));
|
||||||
m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreviewNew.Invalidate();
|
m_aCtlPreviewNew.Invalidate();
|
||||||
|
|
||||||
ChangeColor(rNamedColor, false);
|
ChangeColor(rNamedColor, false);
|
||||||
@@ -569,9 +568,9 @@ void SvxColorTabPage::ChangeColor(const NamedColor &rNewColor, bool bUpdatePrese
|
|||||||
// fill ItemSet and pass it on to XOut
|
// fill ItemSet and pass it on to XOut
|
||||||
XFillColorItem aItem(OUString(), m_aCurrentColor.m_aColor);
|
XFillColorItem aItem(OUString(), m_aCurrentColor.m_aColor);
|
||||||
aItem.setComplexColor(m_aCurrentColor.getComplexColor());
|
aItem.setComplexColor(m_aCurrentColor.getComplexColor());
|
||||||
m_rXFSet.Put(aItem);
|
m_aFillAttributeSet.Put(aItem);
|
||||||
|
|
||||||
m_aCtlPreviewNew.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreviewNew.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreviewNew.Invalidate();
|
m_aCtlPreviewNew.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,8 +50,7 @@ SvxGradientTabPage::SvxGradientTabPage(weld::Container* pPage, weld::DialogContr
|
|||||||
, m_rOutAttrs(rInAttrs)
|
, m_rOutAttrs(rInAttrs)
|
||||||
, m_nGradientListState(ChangeType::NONE)
|
, m_nGradientListState(ChangeType::NONE)
|
||||||
, m_pnColorListState(nullptr)
|
, m_pnColorListState(nullptr)
|
||||||
, m_aXFillAttr(rInAttrs.GetPool())
|
, m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST))
|
||||||
, m_rXFSet(m_aXFillAttr.GetItemSet())
|
|
||||||
, m_xLbGradientType(m_xBuilder->weld_combo_box(u"gradienttypelb"_ustr))
|
, m_xLbGradientType(m_xBuilder->weld_combo_box(u"gradienttypelb"_ustr))
|
||||||
, m_xFtCenter(m_xBuilder->weld_label(u"centerft"_ustr))
|
, m_xFtCenter(m_xBuilder->weld_label(u"centerft"_ustr))
|
||||||
, m_xMtrCenterX(m_xBuilder->weld_metric_spin_button(u"centerxmtr"_ustr, FieldUnit::PERCENT))
|
, m_xMtrCenterX(m_xBuilder->weld_metric_spin_button(u"centerxmtr"_ustr, FieldUnit::PERCENT))
|
||||||
@@ -86,9 +85,9 @@ SvxGradientTabPage::SvxGradientTabPage(weld::Container* pPage, weld::DialogContr
|
|||||||
m_xMtrColorFrom->set_value(100, FieldUnit::PERCENT);
|
m_xMtrColorFrom->set_value(100, FieldUnit::PERCENT);
|
||||||
|
|
||||||
// setting the output device
|
// setting the output device
|
||||||
m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_GRADIENT) );
|
m_aFillAttributeSet.Put( XFillStyleItem(drawing::FillStyle_GRADIENT) );
|
||||||
m_rXFSet.Put( XFillGradientItem(OUString(), basegfx::BGradient()));
|
m_aFillAttributeSet.Put( XFillGradientItem(OUString(), basegfx::BGradient()));
|
||||||
m_aCtlPreview.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
// set handler
|
// set handler
|
||||||
m_xGradientPresets->connect_item_activated(LINK(this, SvxGradientTabPage, ChangeGradientHdl));
|
m_xGradientPresets->connect_item_activated(LINK(this, SvxGradientTabPage, ChangeGradientHdl));
|
||||||
@@ -324,11 +323,11 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void const * pControl )
|
|||||||
if (pControl == m_xLbGradientType.get() || pControl == this)
|
if (pControl == m_xLbGradientType.get() || pControl == this)
|
||||||
SetControlState_Impl( eXGS );
|
SetControlState_Impl( eXGS );
|
||||||
|
|
||||||
m_rXFSet.Put( XGradientStepCountItem( nValue ) );
|
m_aFillAttributeSet.Put( XGradientStepCountItem( nValue ) );
|
||||||
|
|
||||||
// displaying in XOutDev
|
// displaying in XOutDev
|
||||||
m_rXFSet.Put( XFillGradientItem( OUString(), aBGradient ) );
|
m_aFillAttributeSet.Put( XFillGradientItem( OUString(), aBGradient ) );
|
||||||
m_aCtlPreview.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -584,9 +583,9 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl()
|
|||||||
SetControlState_Impl( eXGS );
|
SetControlState_Impl( eXGS );
|
||||||
|
|
||||||
// fill ItemSet and pass it on to aCtlPreview
|
// fill ItemSet and pass it on to aCtlPreview
|
||||||
m_rXFSet.Put( XFillGradientItem( OUString(), *pGradient ) );
|
m_aFillAttributeSet.Put( XFillGradientItem( OUString(), *pGradient ) );
|
||||||
m_rXFSet.Put( XGradientStepCountItem( nValue ) );
|
m_aFillAttributeSet.Put( XGradientStepCountItem( nValue ) );
|
||||||
m_aCtlPreview.SetAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,8 +53,7 @@ SvxHatchTabPage::SvxHatchTabPage(weld::Container* pPage, weld::DialogController*
|
|||||||
, m_rOutAttrs(rInAttrs)
|
, m_rOutAttrs(rInAttrs)
|
||||||
, m_nHatchingListState(ChangeType::NONE)
|
, m_nHatchingListState(ChangeType::NONE)
|
||||||
, m_pnColorListState(nullptr)
|
, m_pnColorListState(nullptr)
|
||||||
, m_aXFillAttr(rInAttrs.GetPool())
|
, m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST)) //m_aXFillAttr.GetItemSet())
|
||||||
, m_rXFSet(m_aXFillAttr.GetItemSet())
|
|
||||||
, m_xMtrDistance(m_xBuilder->weld_metric_spin_button(u"distancemtr"_ustr, FieldUnit::MM))
|
, m_xMtrDistance(m_xBuilder->weld_metric_spin_button(u"distancemtr"_ustr, FieldUnit::MM))
|
||||||
, m_xMtrAngle(m_xBuilder->weld_metric_spin_button(u"anglemtr"_ustr, FieldUnit::DEGREE))
|
, m_xMtrAngle(m_xBuilder->weld_metric_spin_button(u"anglemtr"_ustr, FieldUnit::DEGREE))
|
||||||
, m_xSliderAngle(m_xBuilder->weld_scale(u"angleslider"_ustr))
|
, m_xSliderAngle(m_xBuilder->weld_scale(u"angleslider"_ustr))
|
||||||
@@ -95,9 +94,9 @@ SvxHatchTabPage::SvxHatchTabPage(weld::Container* pPage, weld::DialogController*
|
|||||||
m_ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
|
m_ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
|
||||||
|
|
||||||
// setting the output device
|
// setting the output device
|
||||||
m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_HATCH) );
|
m_aFillAttributeSet.Put( XFillStyleItem(drawing::FillStyle_HATCH) );
|
||||||
m_rXFSet.Put( XFillHatchItem(OUString(), XHatch()) );
|
m_aFillAttributeSet.Put( XFillHatchItem(OUString(), XHatch()) );
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_xHatchPresets->connect_item_activated(LINK(this, SvxHatchTabPage, ChangeHatchHdl));
|
m_xHatchPresets->connect_item_activated(LINK(this, SvxHatchTabPage, ChangeHatchHdl));
|
||||||
m_xHatchLB->SetRenameHdl( LINK( this, SvxHatchTabPage, ClickRenameHdl_Impl ) );
|
m_xHatchLB->SetRenameHdl( LINK( this, SvxHatchTabPage, ClickRenameHdl_Impl ) );
|
||||||
m_xHatchLB->SetDeleteHdl( LINK( this, SvxHatchTabPage, ClickDeleteHdl_Impl ) );
|
m_xHatchLB->SetDeleteHdl( LINK( this, SvxHatchTabPage, ClickDeleteHdl_Impl ) );
|
||||||
@@ -183,7 +182,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
|
|||||||
}
|
}
|
||||||
|
|
||||||
const XFillBackgroundItem& aBckItem( rSet.Get(XATTR_FILLBACKGROUND));
|
const XFillBackgroundItem& aBckItem( rSet.Get(XATTR_FILLBACKGROUND));
|
||||||
m_rXFSet.Put( aBckItem );
|
m_aFillAttributeSet.Put( aBckItem );
|
||||||
|
|
||||||
if (aBckItem.GetValue())
|
if (aBckItem.GetValue())
|
||||||
{
|
{
|
||||||
@@ -192,7 +191,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
|
|||||||
Color aColor(aColorItem.GetColorValue());
|
Color aColor(aColorItem.GetColorValue());
|
||||||
m_xLbBackgroundColor->SelectEntry(aColor);
|
m_xLbBackgroundColor->SelectEntry(aColor);
|
||||||
m_xLbBackgroundColor->set_sensitive(true);
|
m_xLbBackgroundColor->set_sensitive(true);
|
||||||
m_rXFSet.Put( aColorItem );
|
m_aFillAttributeSet.Put( aColorItem );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -201,7 +200,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
|
|||||||
m_xLbBackgroundColor->set_sensitive(false);
|
m_xLbBackgroundColor->set_sensitive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,16 +265,16 @@ void SvxHatchTabPage::Reset( const SfxItemSet* rSet )
|
|||||||
|
|
||||||
const XFillColorItem& aColItem( rSet->Get(XATTR_FILLCOLOR) );
|
const XFillColorItem& aColItem( rSet->Get(XATTR_FILLCOLOR) );
|
||||||
m_xLbBackgroundColor->SelectEntry(aColItem.GetColorValue());
|
m_xLbBackgroundColor->SelectEntry(aColItem.GetColorValue());
|
||||||
m_rXFSet.Put( aColItem );
|
m_aFillAttributeSet.Put( aColItem );
|
||||||
|
|
||||||
const XFillBackgroundItem& aBckItem( rSet->Get(XATTR_FILLBACKGROUND) );
|
const XFillBackgroundItem& aBckItem( rSet->Get(XATTR_FILLBACKGROUND) );
|
||||||
if(aBckItem.GetValue())
|
if(aBckItem.GetValue())
|
||||||
m_xCbBackgroundColor->set_state(TRISTATE_TRUE);
|
m_xCbBackgroundColor->set_state(TRISTATE_TRUE);
|
||||||
else
|
else
|
||||||
m_xCbBackgroundColor->set_state(TRISTATE_FALSE);
|
m_xCbBackgroundColor->set_state(TRISTATE_FALSE);
|
||||||
m_rXFSet.Put( aBckItem );
|
m_aFillAttributeSet.Put( aBckItem );
|
||||||
|
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,7 +304,7 @@ IMPL_LINK_NOARG( SvxHatchTabPage, ToggleHatchBackgroundColor_Impl, weld::Togglea
|
|||||||
m_xLbBackgroundColor->set_sensitive(true);
|
m_xLbBackgroundColor->set_sensitive(true);
|
||||||
else
|
else
|
||||||
m_xLbBackgroundColor->set_sensitive(false);
|
m_xLbBackgroundColor->set_sensitive(false);
|
||||||
m_rXFSet.Put( XFillBackgroundItem( m_xCbBackgroundColor->get_active() ) );
|
m_aFillAttributeSet.Put( XFillBackgroundItem( m_xCbBackgroundColor->get_active() ) );
|
||||||
ModifiedBackgroundHdl_Impl(*m_xLbBackgroundColor);
|
ModifiedBackgroundHdl_Impl(*m_xLbBackgroundColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,12 +314,12 @@ IMPL_LINK_NOARG( SvxHatchTabPage, ModifiedBackgroundHdl_Impl, ColorListBox&, voi
|
|||||||
if (m_xCbBackgroundColor->get_active())
|
if (m_xCbBackgroundColor->get_active())
|
||||||
{
|
{
|
||||||
aColor = m_xLbBackgroundColor->GetSelectEntryColor();
|
aColor = m_xLbBackgroundColor->GetSelectEntryColor();
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
m_rXFSet.Put(XFillColorItem( OUString(), aColor ));
|
m_aFillAttributeSet.Put(XFillColorItem( OUString(), aColor ));
|
||||||
|
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,9 +348,9 @@ void SvxHatchTabPage::ModifiedHdl_Impl( void const * p )
|
|||||||
GetCoreValue( *m_xMtrDistance, m_ePoolUnit ),
|
GetCoreValue( *m_xMtrDistance, m_ePoolUnit ),
|
||||||
Degree10(static_cast<sal_Int16>((m_xMtrAngle->get_value(FieldUnit::NONE) % 360) * 10)) );
|
Degree10(static_cast<sal_Int16>((m_xMtrAngle->get_value(FieldUnit::NONE) % 360) * 10)) );
|
||||||
|
|
||||||
m_rXFSet.Put( XFillHatchItem( OUString(), aXHatch ) );
|
m_aFillAttributeSet.Put( XFillHatchItem( OUString(), aXHatch ) );
|
||||||
|
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,8 +396,8 @@ void SvxHatchTabPage::ChangeHatchHdl_Impl()
|
|||||||
m_xSliderAngle->set_value(nHatchAngle);
|
m_xSliderAngle->set_value(nHatchAngle);
|
||||||
|
|
||||||
// fill ItemSet and pass it on to m_aCtlPreview
|
// fill ItemSet and pass it on to m_aCtlPreview
|
||||||
m_rXFSet.Put( XFillHatchItem( OUString(), *pHatch ) );
|
m_aFillAttributeSet.Put( XFillHatchItem( OUString(), *pHatch ) );
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
pHatch.reset();
|
pHatch.reset();
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ SvxLineTabPage::SvxLineTabPage(weld::Container* pPage, weld::DialogController* p
|
|||||||
, m_bSymbols(false)
|
, m_bSymbols(false)
|
||||||
, m_rOutAttrs(rInAttrs)
|
, m_rOutAttrs(rInAttrs)
|
||||||
, m_bObjSelected(false)
|
, m_bObjSelected(false)
|
||||||
, m_aXLineAttr(rInAttrs.GetPool())
|
, m_aLineAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_LINE_FIRST, XATTR_LINE_LAST))
|
||||||
, m_rXLSet(m_aXLineAttr.GetItemSet())
|
|
||||||
, m_pnLineEndListState(nullptr)
|
, m_pnLineEndListState(nullptr)
|
||||||
, m_pnDashListState(nullptr)
|
, m_pnDashListState(nullptr)
|
||||||
, m_pnColorListState(nullptr)
|
, m_pnColorListState(nullptr)
|
||||||
@@ -664,20 +663,20 @@ void SvxLineTabPage::FillXLSet_Impl()
|
|||||||
|
|
||||||
if (m_xLbLineStyle->get_active() == -1)
|
if (m_xLbLineStyle->get_active() == -1)
|
||||||
{
|
{
|
||||||
m_rXLSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
|
m_aLineAttributeSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
|
||||||
}
|
}
|
||||||
else if (m_xLbLineStyle->get_active() == 0)
|
else if (m_xLbLineStyle->get_active() == 0)
|
||||||
m_rXLSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
|
m_aLineAttributeSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
|
||||||
else if (m_xLbLineStyle->get_active() == 1)
|
else if (m_xLbLineStyle->get_active() == 1)
|
||||||
m_rXLSet.Put( XLineStyleItem( drawing::LineStyle_SOLID ) );
|
m_aLineAttributeSet.Put( XLineStyleItem( drawing::LineStyle_SOLID ) );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_rXLSet.Put( XLineStyleItem( drawing::LineStyle_DASH ) );
|
m_aLineAttributeSet.Put( XLineStyleItem( drawing::LineStyle_DASH ) );
|
||||||
|
|
||||||
nPos = m_xLbLineStyle->get_active();
|
nPos = m_xLbLineStyle->get_active();
|
||||||
if (nPos != -1)
|
if (nPos != -1)
|
||||||
{
|
{
|
||||||
m_rXLSet.Put( XLineDashItem( m_xLbLineStyle->get_active_text(),
|
m_aLineAttributeSet.Put( XLineDashItem( m_xLbLineStyle->get_active_text(),
|
||||||
m_pDashList->GetDash( nPos - 2 )->GetDash() ) );
|
m_pDashList->GetDash( nPos - 2 )->GetDash() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -686,18 +685,18 @@ void SvxLineTabPage::FillXLSet_Impl()
|
|||||||
if (nPos != -1)
|
if (nPos != -1)
|
||||||
{
|
{
|
||||||
if( nPos == 0 )
|
if( nPos == 0 )
|
||||||
m_rXLSet.Put( XLineStartItem() );
|
m_aLineAttributeSet.Put( XLineStartItem() );
|
||||||
else
|
else
|
||||||
m_rXLSet.Put( XLineStartItem( m_xLbStartStyle->get_active_text(),
|
m_aLineAttributeSet.Put( XLineStartItem( m_xLbStartStyle->get_active_text(),
|
||||||
m_pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) );
|
m_pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) );
|
||||||
}
|
}
|
||||||
nPos = m_xLbEndStyle->get_active();
|
nPos = m_xLbEndStyle->get_active();
|
||||||
if (nPos != -1)
|
if (nPos != -1)
|
||||||
{
|
{
|
||||||
if( nPos == 0 )
|
if( nPos == 0 )
|
||||||
m_rXLSet.Put( XLineEndItem() );
|
m_aLineAttributeSet.Put( XLineEndItem() );
|
||||||
else
|
else
|
||||||
m_rXLSet.Put( XLineEndItem( m_xLbEndStyle->get_active_text(),
|
m_aLineAttributeSet.Put( XLineEndItem( m_xLbEndStyle->get_active_text(),
|
||||||
m_pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) );
|
m_pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -708,22 +707,22 @@ void SvxLineTabPage::FillXLSet_Impl()
|
|||||||
{
|
{
|
||||||
case 0: // Rounded, default
|
case 0: // Rounded, default
|
||||||
{
|
{
|
||||||
m_rXLSet.Put(XLineJointItem(css::drawing::LineJoint_ROUND));
|
m_aLineAttributeSet.Put(XLineJointItem(css::drawing::LineJoint_ROUND));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1: // - none -
|
case 1: // - none -
|
||||||
{
|
{
|
||||||
m_rXLSet.Put(XLineJointItem(css::drawing::LineJoint_NONE));
|
m_aLineAttributeSet.Put(XLineJointItem(css::drawing::LineJoint_NONE));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: // Miter
|
case 2: // Miter
|
||||||
{
|
{
|
||||||
m_rXLSet.Put(XLineJointItem(css::drawing::LineJoint_MITER));
|
m_aLineAttributeSet.Put(XLineJointItem(css::drawing::LineJoint_MITER));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3: // Bevel
|
case 3: // Bevel
|
||||||
{
|
{
|
||||||
m_rXLSet.Put(XLineJointItem(css::drawing::LineJoint_BEVEL));
|
m_aLineAttributeSet.Put(XLineJointItem(css::drawing::LineJoint_BEVEL));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -737,47 +736,47 @@ void SvxLineTabPage::FillXLSet_Impl()
|
|||||||
{
|
{
|
||||||
case 0: // Butt (=Flat), default
|
case 0: // Butt (=Flat), default
|
||||||
{
|
{
|
||||||
m_rXLSet.Put(XLineCapItem(css::drawing::LineCap_BUTT));
|
m_aLineAttributeSet.Put(XLineCapItem(css::drawing::LineCap_BUTT));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1: // Round
|
case 1: // Round
|
||||||
{
|
{
|
||||||
m_rXLSet.Put(XLineCapItem(css::drawing::LineCap_ROUND));
|
m_aLineAttributeSet.Put(XLineCapItem(css::drawing::LineCap_ROUND));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: // Square
|
case 2: // Square
|
||||||
{
|
{
|
||||||
m_rXLSet.Put(XLineCapItem(css::drawing::LineCap_SQUARE));
|
m_aLineAttributeSet.Put(XLineCapItem(css::drawing::LineCap_SQUARE));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_rXLSet.Put( XLineStartWidthItem( GetCoreValue( *m_xMtrStartWidth, m_ePoolUnit ) ) );
|
m_aLineAttributeSet.Put( XLineStartWidthItem( GetCoreValue( *m_xMtrStartWidth, m_ePoolUnit ) ) );
|
||||||
m_rXLSet.Put( XLineEndWidthItem( GetCoreValue( *m_xMtrEndWidth, m_ePoolUnit ) ) );
|
m_aLineAttributeSet.Put( XLineEndWidthItem( GetCoreValue( *m_xMtrEndWidth, m_ePoolUnit ) ) );
|
||||||
|
|
||||||
m_rXLSet.Put( XLineWidthItem( GetCoreValue( *m_xMtrLineWidth, m_ePoolUnit ) ) );
|
m_aLineAttributeSet.Put( XLineWidthItem( GetCoreValue( *m_xMtrLineWidth, m_ePoolUnit ) ) );
|
||||||
NamedColor aNamedColor = m_xLbColor->GetSelectedEntry();
|
NamedColor aNamedColor = m_xLbColor->GetSelectedEntry();
|
||||||
XLineColorItem aLineColor(aNamedColor.m_aName, aNamedColor.m_aColor);
|
XLineColorItem aLineColor(aNamedColor.m_aName, aNamedColor.m_aColor);
|
||||||
aLineColor.setComplexColor(aNamedColor.getComplexColor());
|
aLineColor.setComplexColor(aNamedColor.getComplexColor());
|
||||||
m_rXLSet.Put(aLineColor);
|
m_aLineAttributeSet.Put(aLineColor);
|
||||||
|
|
||||||
// Centered line end
|
// Centered line end
|
||||||
if( m_xTsbCenterStart->get_state() == TRISTATE_TRUE )
|
if( m_xTsbCenterStart->get_state() == TRISTATE_TRUE )
|
||||||
m_rXLSet.Put( XLineStartCenterItem( true ) );
|
m_aLineAttributeSet.Put( XLineStartCenterItem( true ) );
|
||||||
else if( m_xTsbCenterStart->get_state() == TRISTATE_FALSE )
|
else if( m_xTsbCenterStart->get_state() == TRISTATE_FALSE )
|
||||||
m_rXLSet.Put( XLineStartCenterItem( false ) );
|
m_aLineAttributeSet.Put( XLineStartCenterItem( false ) );
|
||||||
|
|
||||||
if( m_xTsbCenterEnd->get_state() == TRISTATE_TRUE )
|
if( m_xTsbCenterEnd->get_state() == TRISTATE_TRUE )
|
||||||
m_rXLSet.Put( XLineEndCenterItem( true ) );
|
m_aLineAttributeSet.Put( XLineEndCenterItem( true ) );
|
||||||
else if( m_xTsbCenterEnd->get_state() == TRISTATE_FALSE )
|
else if( m_xTsbCenterEnd->get_state() == TRISTATE_FALSE )
|
||||||
m_rXLSet.Put( XLineEndCenterItem( false ) );
|
m_aLineAttributeSet.Put( XLineEndCenterItem( false ) );
|
||||||
|
|
||||||
// Transparency
|
// Transparency
|
||||||
sal_uInt16 nVal = o3tl::sanitizing_cast<sal_uInt16>(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
|
sal_uInt16 nVal = o3tl::sanitizing_cast<sal_uInt16>(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
|
||||||
m_rXLSet.Put( XLineTransparenceItem( nVal ) );
|
m_aLineAttributeSet.Put( XLineTransparenceItem( nVal ) );
|
||||||
|
|
||||||
m_aCtlPreview.SetLineAttributes(m_aXLineAttr.GetItemSet());
|
m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1228,7 +1227,7 @@ void SvxLineTabPage::ChangePreviewHdl_Impl(const weld::MetricSpinButton* pCntrl)
|
|||||||
if(m_nActLineWidth == -1)
|
if(m_nActLineWidth == -1)
|
||||||
{
|
{
|
||||||
// Don't initialize yet, get the start value
|
// Don't initialize yet, get the start value
|
||||||
const SfxPoolItem* pOld = GetOldItem( m_rXLSet, XATTR_LINEWIDTH );
|
const SfxPoolItem* pOld = GetOldItem( m_aLineAttributeSet, XATTR_LINEWIDTH );
|
||||||
sal_Int32 nStartLineWidth = 0;
|
sal_Int32 nStartLineWidth = 0;
|
||||||
if(pOld)
|
if(pOld)
|
||||||
nStartLineWidth = static_cast<const XLineWidthItem *>(pOld)->GetValue();
|
nStartLineWidth = static_cast<const XLineWidthItem *>(pOld)->GetValue();
|
||||||
@@ -1387,7 +1386,7 @@ IMPL_LINK_NOARG(SvxLineTabPage, ChangeTransparentHdl_Impl, weld::MetricSpinButto
|
|||||||
{
|
{
|
||||||
sal_uInt16 nVal = o3tl::sanitizing_cast<sal_uInt16>(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
|
sal_uInt16 nVal = o3tl::sanitizing_cast<sal_uInt16>(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
|
||||||
|
|
||||||
m_rXLSet.Put(XLineTransparenceItem(nVal));
|
m_aLineAttributeSet.Put(XLineTransparenceItem(nVal));
|
||||||
|
|
||||||
FillXLSet_Impl();
|
FillXLSet_Impl();
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,7 @@ constexpr int RET_BTN_2 = 101;
|
|||||||
SvxLineDefTabPage::SvxLineDefTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs)
|
SvxLineDefTabPage::SvxLineDefTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs)
|
||||||
: SfxTabPage(pPage, pController, u"cui/ui/linestyletabpage.ui"_ustr, u"LineStylePage"_ustr, &rInAttrs)
|
: SfxTabPage(pPage, pController, u"cui/ui/linestyletabpage.ui"_ustr, u"LineStylePage"_ustr, &rInAttrs)
|
||||||
, rOutAttrs(rInAttrs)
|
, rOutAttrs(rInAttrs)
|
||||||
, aXLineAttr(rInAttrs.GetPool())
|
, m_aLineAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_LINE_FIRST, XATTR_LINE_LAST))
|
||||||
, rXLSet(aXLineAttr.GetItemSet())
|
|
||||||
, pnDashListState(nullptr)
|
, pnDashListState(nullptr)
|
||||||
, pPageType(nullptr)
|
, pPageType(nullptr)
|
||||||
, nDlgType(0)
|
, nDlgType(0)
|
||||||
@@ -99,13 +98,13 @@ SvxLineDefTabPage::SvxLineDefTabPage(weld::Container* pPage, weld::DialogControl
|
|||||||
assert(pPool && "Where is the pool?");
|
assert(pPool && "Where is the pool?");
|
||||||
ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH );
|
ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH );
|
||||||
|
|
||||||
rXLSet.Put( XLineStyleItem(drawing::LineStyle_DASH) );
|
m_aLineAttributeSet.Put( XLineStyleItem(drawing::LineStyle_DASH) );
|
||||||
rXLSet.Put( XLineWidthItem(XOUT_WIDTH) );
|
m_aLineAttributeSet.Put( XLineWidthItem(XOUT_WIDTH) );
|
||||||
rXLSet.Put( XLineDashItem( OUString(), XDash( css::drawing::DashStyle_RECT, 3, 7, 2, 40, 15 ) ) );
|
m_aLineAttributeSet.Put( XLineDashItem( OUString(), XDash( css::drawing::DashStyle_RECT, 3, 7, 2, 40, 15 ) ) );
|
||||||
rXLSet.Put( XLineColorItem(OUString(), COL_BLACK) );
|
m_aLineAttributeSet.Put( XLineColorItem(OUString(), COL_BLACK) );
|
||||||
|
|
||||||
// #i34740#
|
// #i34740#
|
||||||
m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet());
|
m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet);
|
||||||
|
|
||||||
m_xBtnAdd->connect_clicked(LINK(this, SvxLineDefTabPage, ClickAddHdl_Impl));
|
m_xBtnAdd->connect_clicked(LINK(this, SvxLineDefTabPage, ClickAddHdl_Impl));
|
||||||
m_xBtnModify->connect_clicked(LINK(this, SvxLineDefTabPage, ClickModifyHdl_Impl));
|
m_xBtnModify->connect_clicked(LINK(this, SvxLineDefTabPage, ClickModifyHdl_Impl));
|
||||||
@@ -323,10 +322,10 @@ void SvxLineDefTabPage::SelectLinestyleHdl_Impl(const weld::ComboBox* p)
|
|||||||
|
|
||||||
FillDialog_Impl();
|
FillDialog_Impl();
|
||||||
|
|
||||||
rXLSet.Put( XLineDashItem( OUString(), aDash ) );
|
m_aLineAttributeSet.Put( XLineDashItem( OUString(), aDash ) );
|
||||||
|
|
||||||
// #i34740#
|
// #i34740#
|
||||||
m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet());
|
m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
|
|
||||||
// Is not set before, in order to take the new style
|
// Is not set before, in order to take the new style
|
||||||
@@ -780,10 +779,10 @@ void SvxLineDefTabPage::FillDash_Impl()
|
|||||||
aDash.SetDashLen( m_xLbType2->get_active() == 0 ? 0 : GetCoreValue( *m_xMtrLength2, ePoolUnit ) );
|
aDash.SetDashLen( m_xLbType2->get_active() == 0 ? 0 : GetCoreValue( *m_xMtrLength2, ePoolUnit ) );
|
||||||
aDash.SetDistance( GetCoreValue( *m_xMtrDistance, ePoolUnit ) );
|
aDash.SetDistance( GetCoreValue( *m_xMtrDistance, ePoolUnit ) );
|
||||||
|
|
||||||
rXLSet.Put( XLineDashItem( OUString(), aDash ) );
|
m_aLineAttributeSet.Put( XLineDashItem( OUString(), aDash ) );
|
||||||
|
|
||||||
// #i34740#
|
// #i34740#
|
||||||
m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet());
|
m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SvxLineDefTabPage::FillDialog_Impl()
|
void SvxLineDefTabPage::FillDialog_Impl()
|
||||||
|
|||||||
@@ -52,8 +52,7 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage(weld::Container* pPage, weld::DialogC
|
|||||||
: SfxTabPage(pPage, pController, u"cui/ui/lineendstabpage.ui"_ustr, u"LineEndPage"_ustr, &rInAttrs)
|
: SfxTabPage(pPage, pController, u"cui/ui/lineendstabpage.ui"_ustr, u"LineEndPage"_ustr, &rInAttrs)
|
||||||
, rOutAttrs(rInAttrs)
|
, rOutAttrs(rInAttrs)
|
||||||
, pPolyObj(nullptr)
|
, pPolyObj(nullptr)
|
||||||
, aXLineAttr(rInAttrs.GetPool())
|
, m_aLineAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_LINE_FIRST, XATTR_LINE_LAST))
|
||||||
, rXLSet(aXLineAttr.GetItemSet())
|
|
||||||
, pnLineEndListState(nullptr)
|
, pnLineEndListState(nullptr)
|
||||||
, pPageType(nullptr)
|
, pPageType(nullptr)
|
||||||
, nDlgType(0)
|
, nDlgType(0)
|
||||||
@@ -70,14 +69,14 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage(weld::Container* pPage, weld::DialogC
|
|||||||
// this page needs ExchangeSupport
|
// this page needs ExchangeSupport
|
||||||
SetExchangeSupport();
|
SetExchangeSupport();
|
||||||
|
|
||||||
rXLSet.Put( XLineStyleItem(css::drawing::LineStyle_SOLID) );
|
m_aLineAttributeSet.Put( XLineStyleItem(css::drawing::LineStyle_SOLID) );
|
||||||
rXLSet.Put( XLineWidthItem(XOUT_WIDTH) );
|
m_aLineAttributeSet.Put( XLineWidthItem(XOUT_WIDTH) );
|
||||||
rXLSet.Put( XLineColorItem( OUString(), COL_BLACK ) );
|
m_aLineAttributeSet.Put( XLineColorItem( OUString(), COL_BLACK ) );
|
||||||
rXLSet.Put( XLineStartWidthItem( m_aCtlPreview.GetOutputSize().Height() / 2 ) );
|
m_aLineAttributeSet.Put( XLineStartWidthItem( m_aCtlPreview.GetOutputSize().Height() / 2 ) );
|
||||||
rXLSet.Put( XLineEndWidthItem( m_aCtlPreview.GetOutputSize().Height() / 2 ) );
|
m_aLineAttributeSet.Put( XLineEndWidthItem( m_aCtlPreview.GetOutputSize().Height() / 2 ) );
|
||||||
|
|
||||||
// #i34740#
|
// #i34740#
|
||||||
m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet());
|
m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet);
|
||||||
|
|
||||||
m_xBtnAdd->connect_clicked(LINK(this, SvxLineEndDefTabPage, ClickAddHdl_Impl));
|
m_xBtnAdd->connect_clicked(LINK(this, SvxLineEndDefTabPage, ClickAddHdl_Impl));
|
||||||
m_xBtnModify->connect_clicked(LINK( this, SvxLineEndDefTabPage, ClickModifyHdl_Impl));
|
m_xBtnModify->connect_clicked(LINK( this, SvxLineEndDefTabPage, ClickModifyHdl_Impl));
|
||||||
@@ -207,11 +206,11 @@ void SvxLineEndDefTabPage::Reset( const SfxItemSet* )
|
|||||||
|
|
||||||
m_xEdtName->set_text(m_xLbLineEnds->get_active_text());
|
m_xEdtName->set_text(m_xLbLineEnds->get_active_text());
|
||||||
|
|
||||||
rXLSet.Put( XLineStartItem( OUString(), pEntry->GetLineEnd() ) );
|
m_aLineAttributeSet.Put( XLineStartItem( OUString(), pEntry->GetLineEnd() ) );
|
||||||
rXLSet.Put( XLineEndItem( OUString(), pEntry->GetLineEnd() ) );
|
m_aLineAttributeSet.Put( XLineEndItem( OUString(), pEntry->GetLineEnd() ) );
|
||||||
|
|
||||||
// #i34740#
|
// #i34740#
|
||||||
m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet());
|
m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,11 +245,11 @@ void SvxLineEndDefTabPage::SelectLineEndHdl_Impl()
|
|||||||
|
|
||||||
m_xEdtName->set_text(m_xLbLineEnds->get_active_text());
|
m_xEdtName->set_text(m_xLbLineEnds->get_active_text());
|
||||||
|
|
||||||
rXLSet.Put( XLineStartItem( OUString(), pEntry->GetLineEnd() ) );
|
m_aLineAttributeSet.Put( XLineStartItem( OUString(), pEntry->GetLineEnd() ) );
|
||||||
rXLSet.Put( XLineEndItem( OUString(), pEntry->GetLineEnd() ) );
|
m_aLineAttributeSet.Put( XLineEndItem( OUString(), pEntry->GetLineEnd() ) );
|
||||||
|
|
||||||
// #i34740#
|
// #i34740#
|
||||||
m_aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet());
|
m_aCtlPreview.SetLineAttributes(m_aLineAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
|
|
||||||
// Is not set before, in order to only take the new style,
|
// Is not set before, in order to only take the new style,
|
||||||
|
|||||||
@@ -80,8 +80,7 @@ SvxPatternTabPage::SvxPatternTabPage(weld::Container* pPage, weld::DialogControl
|
|||||||
, m_rOutAttrs(rInAttrs)
|
, m_rOutAttrs(rInAttrs)
|
||||||
, m_nPatternListState(ChangeType::NONE)
|
, m_nPatternListState(ChangeType::NONE)
|
||||||
, m_pnColorListState(nullptr)
|
, m_pnColorListState(nullptr)
|
||||||
, m_aXFillAttr(rInAttrs.GetPool())
|
, m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST))
|
||||||
, m_rXFSet(m_aXFillAttr.GetItemSet())
|
|
||||||
, m_xCtlPixel(new SvxPixelCtl(this))
|
, m_xCtlPixel(new SvxPixelCtl(this))
|
||||||
, m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_COLOR"_ustr),
|
, m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_COLOR"_ustr),
|
||||||
[this]{ return GetDialogController()->getDialog(); }))
|
[this]{ return GetDialogController()->getDialog(); }))
|
||||||
@@ -104,8 +103,8 @@ SvxPatternTabPage::SvxPatternTabPage(weld::Container* pPage, weld::DialogControl
|
|||||||
SetExchangeSupport();
|
SetExchangeSupport();
|
||||||
|
|
||||||
// setting the output device
|
// setting the output device
|
||||||
m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) );
|
m_aFillAttributeSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) );
|
||||||
m_rXFSet.Put( XFillBitmapItem(OUString(), Graphic()) );
|
m_aFillAttributeSet.Put( XFillBitmapItem(OUString(), Graphic()) );
|
||||||
|
|
||||||
m_xBtnAdd->connect_clicked( LINK( this, SvxPatternTabPage, ClickAddHdl_Impl ) );
|
m_xBtnAdd->connect_clicked( LINK( this, SvxPatternTabPage, ClickAddHdl_Impl ) );
|
||||||
m_xBtnModify->connect_clicked( LINK( this, SvxPatternTabPage, ClickModifyHdl_Impl ) );
|
m_xBtnModify->connect_clicked( LINK( this, SvxPatternTabPage, ClickModifyHdl_Impl ) );
|
||||||
@@ -227,8 +226,8 @@ void SvxPatternTabPage::Reset( const SfxItemSet* )
|
|||||||
const XFillBitmapItem aBmpItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap()));
|
const XFillBitmapItem aBmpItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap()));
|
||||||
if(aBmpItem.isPattern())
|
if(aBmpItem.isPattern())
|
||||||
{
|
{
|
||||||
m_rXFSet.Put( aBmpItem );
|
m_aFillAttributeSet.Put( aBmpItem );
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,10 +314,10 @@ void SvxPatternTabPage::UpdatePattern()
|
|||||||
// update m_xBitmapCtl, rXFSet and m_aCtlPreview
|
// update m_xBitmapCtl, rXFSet and m_aCtlPreview
|
||||||
m_xBitmapCtl->SetPixelColor( aPixelColor );
|
m_xBitmapCtl->SetPixelColor( aPixelColor );
|
||||||
m_xBitmapCtl->SetBackgroundColor( aBackColor );
|
m_xBitmapCtl->SetBackgroundColor( aBackColor );
|
||||||
m_rXFSet.ClearItem();
|
m_aFillAttributeSet.ClearItem();
|
||||||
m_rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
|
m_aFillAttributeSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
|
||||||
m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap())));
|
m_aFillAttributeSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap())));
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -516,8 +515,8 @@ void SvxPatternTabPage::ChangeColor_Impl()
|
|||||||
m_xBitmapCtl->SetBackgroundColor( m_xLbBackgroundColor->GetSelectEntryColor() );
|
m_xBitmapCtl->SetBackgroundColor( m_xLbBackgroundColor->GetSelectEntryColor() );
|
||||||
|
|
||||||
// get bitmap and display it
|
// get bitmap and display it
|
||||||
m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap())));
|
m_aFillAttributeSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap())));
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -528,8 +527,8 @@ void SvxPatternTabPage::PointChanged(weld::DrawingArea* pDrawingArea, RectPoint)
|
|||||||
m_xBitmapCtl->SetBmpArray(m_xCtlPixel->GetBitmapPixelPtr());
|
m_xBitmapCtl->SetBmpArray(m_xCtlPixel->GetBitmapPixelPtr());
|
||||||
|
|
||||||
// get bitmap and display it
|
// get bitmap and display it
|
||||||
m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap())));
|
m_aFillAttributeSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmap())));
|
||||||
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
|
m_aCtlPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlPreview.Invalidate();
|
m_aCtlPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle
|
|||||||
, m_pnColorListState(nullptr)
|
, m_pnColorListState(nullptr)
|
||||||
, m_nPageType(PageType::Area)
|
, m_nPageType(PageType::Area)
|
||||||
, m_nDlgType(0)
|
, m_nDlgType(0)
|
||||||
, m_aXFillAttr(rInAttrs.GetPool())
|
, m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST))
|
||||||
, m_rXFSet(m_aXFillAttr.GetItemSet())
|
|
||||||
, m_aCtlPosition(this)
|
, m_aCtlPosition(this)
|
||||||
, m_xTsbShowShadow(m_xBuilder->weld_check_button(u"TSB_SHOW_SHADOW"_ustr))
|
, m_xTsbShowShadow(m_xBuilder->weld_check_button(u"TSB_SHOW_SHADOW"_ustr))
|
||||||
, m_xGridShadow(m_xBuilder->weld_widget(u"gridSHADOW"_ustr))
|
, m_xGridShadow(m_xBuilder->weld_widget(u"gridSHADOW"_ustr))
|
||||||
@@ -101,21 +100,21 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle
|
|||||||
case drawing::FillStyle_SOLID:
|
case drawing::FillStyle_SOLID:
|
||||||
if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLCOLOR ) )
|
if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLCOLOR ) )
|
||||||
{
|
{
|
||||||
m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLCOLOR ) );
|
m_aFillAttributeSet.Put( m_rOutAttrs.Get( XATTR_FILLCOLOR ) );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case drawing::FillStyle_GRADIENT:
|
case drawing::FillStyle_GRADIENT:
|
||||||
if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) )
|
if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) )
|
||||||
{
|
{
|
||||||
m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLGRADIENT ) );
|
m_aFillAttributeSet.Put( m_rOutAttrs.Get( XATTR_FILLGRADIENT ) );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case drawing::FillStyle_HATCH:
|
case drawing::FillStyle_HATCH:
|
||||||
if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLHATCH ) )
|
if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLHATCH ) )
|
||||||
{
|
{
|
||||||
m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLHATCH ) );
|
m_aFillAttributeSet.Put( m_rOutAttrs.Get( XATTR_FILLHATCH ) );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -123,7 +122,7 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle
|
|||||||
{
|
{
|
||||||
if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLBITMAP ) )
|
if( SfxItemState::INVALID != m_rOutAttrs.GetItemState( XATTR_FILLBITMAP ) )
|
||||||
{
|
{
|
||||||
m_rXFSet.Put( m_rOutAttrs.Get( XATTR_FILLBITMAP ) );
|
m_aFillAttributeSet.Put( m_rOutAttrs.Get( XATTR_FILLBITMAP ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -133,7 +132,7 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_rXFSet.Put( XFillColorItem( OUString(), COL_LIGHTRED ) );
|
m_aFillAttributeSet.Put( XFillColorItem( OUString(), COL_LIGHTRED ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if(drawing::FillStyle_NONE == eXFS)
|
if(drawing::FillStyle_NONE == eXFS)
|
||||||
@@ -145,8 +144,8 @@ SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogControlle
|
|||||||
eXFS = drawing::FillStyle_SOLID;
|
eXFS = drawing::FillStyle_SOLID;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_rXFSet.Put( XFillStyleItem( eXFS ) );
|
m_aFillAttributeSet.Put( XFillStyleItem( eXFS ) );
|
||||||
m_aCtlXRectPreview.SetRectangleAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlXRectPreview.SetRectangleAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
m_xTsbShowShadow->connect_toggled(LINK( this, SvxShadowTabPage, ClickShadowHdl_Impl));
|
m_xTsbShowShadow->connect_toggled(LINK( this, SvxShadowTabPage, ClickShadowHdl_Impl));
|
||||||
m_xLbShadowColor->SetSelectHdl( LINK( this, SvxShadowTabPage, SelectShadowHdl_Impl ) );
|
m_xLbShadowColor->SetSelectHdl( LINK( this, SvxShadowTabPage, SelectShadowHdl_Impl ) );
|
||||||
@@ -465,13 +464,13 @@ IMPL_LINK_NOARG(SvxShadowTabPage, SelectShadowHdl_Impl, ColorListBox&, void)
|
|||||||
IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, weld::MetricSpinButton&, void)
|
IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, weld::MetricSpinButton&, void)
|
||||||
{
|
{
|
||||||
if (m_xTsbShowShadow->get_state() == TRISTATE_TRUE)
|
if (m_xTsbShowShadow->get_state() == TRISTATE_TRUE)
|
||||||
m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
|
m_aFillAttributeSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
|
||||||
else
|
else
|
||||||
m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
|
m_aFillAttributeSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
|
||||||
|
|
||||||
m_rXFSet.Put( XFillColorItem( OUString(), m_xLbShadowColor->GetSelectEntryColor() ) );
|
m_aFillAttributeSet.Put( XFillColorItem( OUString(), m_xLbShadowColor->GetSelectEntryColor() ) );
|
||||||
sal_uInt16 nVal = static_cast<sal_uInt16>(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
|
sal_uInt16 nVal = static_cast<sal_uInt16>(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
|
||||||
m_rXFSet.Put( XFillTransparenceItem( nVal ) );
|
m_aFillAttributeSet.Put( XFillTransparenceItem( nVal ) );
|
||||||
|
|
||||||
// shadow removal
|
// shadow removal
|
||||||
sal_Int32 nX = 0, nY = 0;
|
sal_Int32 nX = 0, nY = 0;
|
||||||
@@ -491,7 +490,7 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, weld::MetricSpinButton&,
|
|||||||
|
|
||||||
m_aCtlXRectPreview.SetShadowPosition(Point(nX, nY));
|
m_aCtlXRectPreview.SetShadowPosition(Point(nX, nY));
|
||||||
|
|
||||||
m_aCtlXRectPreview.SetShadowAttributes(m_aXFillAttr.GetItemSet());
|
m_aCtlXRectPreview.SetShadowAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlXRectPreview.Invalidate();
|
m_aCtlXRectPreview.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,10 +54,10 @@ IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransOffHdl_Impl, weld::Toggleable&
|
|||||||
ActivateGradient(false);
|
ActivateGradient(false);
|
||||||
|
|
||||||
// Preview
|
// Preview
|
||||||
rXFSet.ClearItem(XATTR_FILLTRANSPARENCE);
|
m_aFillAttributeSet.ClearItem(XATTR_FILLTRANSPARENCE);
|
||||||
rXFSet.ClearItem(XATTR_FILLFLOATTRANSPARENCE);
|
m_aFillAttributeSet.ClearItem(XATTR_FILLFLOATTRANSPARENCE);
|
||||||
m_aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() );
|
m_aCtlXRectPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
InvalidatePreview(false);
|
InvalidatePreview(false);
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, weld::Toggleab
|
|||||||
ActivateGradient(false);
|
ActivateGradient(false);
|
||||||
|
|
||||||
// preview
|
// preview
|
||||||
rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE);
|
m_aFillAttributeSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE);
|
||||||
ModifyTransparentHdl_Impl(*m_xMtrTransparent);
|
ModifyTransparentHdl_Impl(*m_xMtrTransparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, weld::Toggle
|
|||||||
ActivateGradient(true);
|
ActivateGradient(true);
|
||||||
|
|
||||||
// preview
|
// preview
|
||||||
rXFSet.ClearItem (XATTR_FILLTRANSPARENCE);
|
m_aFillAttributeSet.ClearItem (XATTR_FILLTRANSPARENCE);
|
||||||
ModifiedTrgrHdl_Impl(nullptr);
|
ModifiedTrgrHdl_Impl(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ void SvxTransparenceTabPage::ActivateLinear(bool bActivate)
|
|||||||
IMPL_LINK_NOARG(SvxTransparenceTabPage, ModifyTransparentHdl_Impl, weld::MetricSpinButton&, void)
|
IMPL_LINK_NOARG(SvxTransparenceTabPage, ModifyTransparentHdl_Impl, weld::MetricSpinButton&, void)
|
||||||
{
|
{
|
||||||
sal_uInt16 nPos = o3tl::sanitizing_cast<sal_uInt16>(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
|
sal_uInt16 nPos = o3tl::sanitizing_cast<sal_uInt16>(m_xMtrTransparent->get_value(FieldUnit::PERCENT));
|
||||||
rXFSet.Put(XFillTransparenceItem(nPos));
|
m_aFillAttributeSet.Put(XFillTransparenceItem(nPos));
|
||||||
|
|
||||||
// preview
|
// preview
|
||||||
InvalidatePreview();
|
InvalidatePreview();
|
||||||
@@ -131,7 +131,7 @@ void SvxTransparenceTabPage::ModifiedTrgrHdl_Impl(const weld::ComboBox* pControl
|
|||||||
100, 100);
|
100, 100);
|
||||||
|
|
||||||
XFillFloatTransparenceItem aItem( aTmpGradient);
|
XFillFloatTransparenceItem aItem( aTmpGradient);
|
||||||
rXFSet.Put ( aItem );
|
m_aFillAttributeSet.Put ( aItem );
|
||||||
|
|
||||||
InvalidatePreview();
|
InvalidatePreview();
|
||||||
}
|
}
|
||||||
@@ -191,8 +191,7 @@ SvxTransparenceTabPage::SvxTransparenceTabPage(weld::Container* pPage, weld::Dia
|
|||||||
, nPageType(PageType::Area)
|
, nPageType(PageType::Area)
|
||||||
, nDlgType(0)
|
, nDlgType(0)
|
||||||
, bBitmap(false)
|
, bBitmap(false)
|
||||||
, aXFillAttr(rInAttrs.GetPool())
|
, m_aFillAttributeSet(rInAttrs.getPool(), WhichRangesContainer(XATTR_FILL_FIRST, XATTR_FILL_LAST))
|
||||||
, rXFSet(aXFillAttr.GetItemSet())
|
|
||||||
, m_xRbtTransOff(m_xBuilder->weld_radio_button(u"RBT_TRANS_OFF"_ustr))
|
, m_xRbtTransOff(m_xBuilder->weld_radio_button(u"RBT_TRANS_OFF"_ustr))
|
||||||
, m_xRbtTransLinear(m_xBuilder->weld_radio_button(u"RBT_TRANS_LINEAR"_ustr))
|
, m_xRbtTransLinear(m_xBuilder->weld_radio_button(u"RBT_TRANS_LINEAR"_ustr))
|
||||||
, m_xRbtTransGradient(m_xBuilder->weld_radio_button(u"RBT_TRANS_GRADIENT"_ustr))
|
, m_xRbtTransGradient(m_xBuilder->weld_radio_button(u"RBT_TRANS_GRADIENT"_ustr))
|
||||||
@@ -459,15 +458,15 @@ bool SvxTransparenceTabPage::InitPreview(const SfxItemSet& rSet)
|
|||||||
|
|
||||||
// Get fillstyle for preview
|
// Get fillstyle for preview
|
||||||
rSet.SetAccessTrackerIgnore(true);
|
rSet.SetAccessTrackerIgnore(true);
|
||||||
rXFSet.Put ( rSet.Get(XATTR_FILLSTYLE) );
|
m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLSTYLE) );
|
||||||
rXFSet.Put ( rSet.Get(XATTR_FILLCOLOR) );
|
m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLCOLOR) );
|
||||||
rXFSet.Put ( rSet.Get(XATTR_FILLGRADIENT) );
|
m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLGRADIENT) );
|
||||||
rXFSet.Put ( rSet.Get(XATTR_FILLHATCH) );
|
m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLHATCH) );
|
||||||
rXFSet.Put ( rSet.Get(XATTR_FILLBACKGROUND) );
|
m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLBACKGROUND) );
|
||||||
rXFSet.Put ( rSet.Get(XATTR_FILLBITMAP) );
|
m_aFillAttributeSet.Put ( rSet.Get(XATTR_FILLBITMAP) );
|
||||||
|
|
||||||
m_aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() );
|
m_aCtlXRectPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
m_aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
|
|
||||||
bBitmap = rSet.Get(XATTR_FILLSTYLE).GetValue() == drawing::FillStyle_BITMAP;
|
bBitmap = rSet.Get(XATTR_FILLSTYLE).GetValue() == drawing::FillStyle_BITMAP;
|
||||||
rSet.SetAccessTrackerIgnore(false);
|
rSet.SetAccessTrackerIgnore(false);
|
||||||
@@ -494,7 +493,7 @@ void SvxTransparenceTabPage::InvalidatePreview (bool bEnable)
|
|||||||
if ( bEnable )
|
if ( bEnable )
|
||||||
{
|
{
|
||||||
m_xCtlBitmapPreview->set_sensitive(true);
|
m_xCtlBitmapPreview->set_sensitive(true);
|
||||||
m_aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() );
|
m_aCtlBitmapPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_xCtlBitmapPreview->set_sensitive(false);
|
m_xCtlBitmapPreview->set_sensitive(false);
|
||||||
@@ -505,7 +504,7 @@ void SvxTransparenceTabPage::InvalidatePreview (bool bEnable)
|
|||||||
if ( bEnable )
|
if ( bEnable )
|
||||||
{
|
{
|
||||||
m_xCtlXRectPreview->set_sensitive(true);
|
m_xCtlXRectPreview->set_sensitive(true);
|
||||||
m_aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() );
|
m_aCtlXRectPreview.SetAttributes(m_aFillAttributeSet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_xCtlXRectPreview->set_sensitive(false);
|
m_xCtlXRectPreview->set_sensitive(false);
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ class SAL_WARN_UNUSED SVL_DLLPUBLIC SfxItemSet
|
|||||||
|
|
||||||
#ifdef DBG_UTIL
|
#ifdef DBG_UTIL
|
||||||
sal_uInt16 m_nRegisteredSfxItemIter;
|
sal_uInt16 m_nRegisteredSfxItemIter;
|
||||||
|
bool m_bDeleted;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WhichRangesContainer m_aWhichRanges; ///< array of Which Ranges
|
WhichRangesContainer m_aWhichRanges; ///< array of Which Ranges
|
||||||
@@ -126,6 +127,10 @@ public:
|
|||||||
SfxItemSet( SfxItemPool& rPool, sal_uInt16 nWhichStart, sal_uInt16 nWhichEnd )
|
SfxItemSet( SfxItemPool& rPool, sal_uInt16 nWhichStart, sal_uInt16 nWhichEnd )
|
||||||
: SfxItemSet(rPool, WhichRangesContainer(nWhichStart, nWhichEnd)) {}
|
: SfxItemSet(rPool, WhichRangesContainer(nWhichStart, nWhichEnd)) {}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
bool isDeleted() const { return m_bDeleted; }
|
||||||
|
#endif
|
||||||
|
|
||||||
template<sal_uInt16... WIDs>
|
template<sal_uInt16... WIDs>
|
||||||
static SfxItemSet makeFixedSfxItemSet(SfxItemPool& pool)
|
static SfxItemSet makeFixedSfxItemSet(SfxItemPool& pool)
|
||||||
{
|
{
|
||||||
@@ -242,6 +247,7 @@ public:
|
|||||||
void MergeValue( const SfxPoolItem& rItem);
|
void MergeValue( const SfxPoolItem& rItem);
|
||||||
|
|
||||||
SfxItemPool* GetPool() const { return m_pPool; }
|
SfxItemPool* GetPool() const { return m_pPool; }
|
||||||
|
SfxItemPool& getPool() const { assert(!isDeleted() && "Destructed instance used (!)"); return *m_pPool; }
|
||||||
const WhichRangesContainer & GetRanges() const { return m_aWhichRanges; }
|
const WhichRangesContainer & GetRanges() const { return m_aWhichRanges; }
|
||||||
void SetRanges( const WhichRangesContainer& );
|
void SetRanges( const WhichRangesContainer& );
|
||||||
void SetRanges( WhichRangesContainer&& );
|
void SetRanges( WhichRangesContainer&& );
|
||||||
|
|||||||
@@ -507,7 +507,6 @@ enum class SfxItemType : sal_uInt16
|
|||||||
SwUINumRuleItemType,
|
SwUINumRuleItemType,
|
||||||
SwWrtShellItemType,
|
SwWrtShellItemType,
|
||||||
XColorItemType,
|
XColorItemType,
|
||||||
XFillAttrSetItemType,
|
|
||||||
XFillBackgroundItemType,
|
XFillBackgroundItemType,
|
||||||
XFillBitmapItemType,
|
XFillBitmapItemType,
|
||||||
XFillBmpPosItemType,
|
XFillBmpPosItemType,
|
||||||
@@ -540,7 +539,6 @@ enum class SfxItemType : sal_uInt16
|
|||||||
XFormTextStartItemType,
|
XFormTextStartItemType,
|
||||||
XFormTextStyleItemType,
|
XFormTextStyleItemType,
|
||||||
XGradientStepCountItemType,
|
XGradientStepCountItemType,
|
||||||
XLineAttrSetItemType,
|
|
||||||
XLineCapItemType,
|
XLineCapItemType,
|
||||||
XLineColorItemType,
|
XLineColorItemType,
|
||||||
XLineDashItemType,
|
XLineDashItemType,
|
||||||
|
|||||||
@@ -324,7 +324,6 @@
|
|||||||
#define SIP_XA_LINEENDCENTER NC_("SIP_XA_LINEENDCENTER", "Center arrowend")
|
#define SIP_XA_LINEENDCENTER NC_("SIP_XA_LINEENDCENTER", "Center arrowend")
|
||||||
#define SIP_XA_LINETRANSPARENCE NC_("SIP_XA_LINETRANSPARENCE", "Line transparency")
|
#define SIP_XA_LINETRANSPARENCE NC_("SIP_XA_LINETRANSPARENCE", "Line transparency")
|
||||||
#define SIP_XA_LINEJOINT NC_("SIP_XA_LINEJOINT", "Line joint")
|
#define SIP_XA_LINEJOINT NC_("SIP_XA_LINEJOINT", "Line joint")
|
||||||
#define SIP_XATTRSET_LINE NC_("SIP_XATTRSET_LINE", "Line attributes")
|
|
||||||
#define SIP_XA_FILLSTYLE NC_("SIP_XA_FILLSTYLE", "Fill style")
|
#define SIP_XA_FILLSTYLE NC_("SIP_XA_FILLSTYLE", "Fill style")
|
||||||
#define SIP_XA_FILLCOLOR NC_("SIP_XA_FILLCOLOR", "Fillcolor")
|
#define SIP_XA_FILLCOLOR NC_("SIP_XA_FILLCOLOR", "Fillcolor")
|
||||||
#define SIP_XA_FILLGRADIENT NC_("SIP_XA_FILLGRADIENT", "Gradient")
|
#define SIP_XA_FILLGRADIENT NC_("SIP_XA_FILLGRADIENT", "Gradient")
|
||||||
@@ -346,7 +345,6 @@
|
|||||||
#define SIP_XA_FILLBMP_POSOFFSETY NC_("SIP_XA_FILLBMP_POSOFFSETY", "Tile position Y in %")
|
#define SIP_XA_FILLBMP_POSOFFSETY NC_("SIP_XA_FILLBMP_POSOFFSETY", "Tile position Y in %")
|
||||||
#define SIP_XA_FILLBACKGROUND NC_("SIP_XA_FILLBACKGROUND", "Background fill")
|
#define SIP_XA_FILLBACKGROUND NC_("SIP_XA_FILLBACKGROUND", "Background fill")
|
||||||
#define SIP_XA_FILLUSESLIDEBACKGROUND NC_("SIP_XA_FILLUSESLIDEBACKGROUND", "Use slide background fill")
|
#define SIP_XA_FILLUSESLIDEBACKGROUND NC_("SIP_XA_FILLUSESLIDEBACKGROUND", "Use slide background fill")
|
||||||
#define SIP_XATTRSET_FILL NC_("SIP_XATTRSET_FILL", "Area attributes")
|
|
||||||
#define SIP_XA_FORMTXTSTYLE NC_("SIP_XA_FORMTXTSTYLE", "Fontwork style")
|
#define SIP_XA_FORMTXTSTYLE NC_("SIP_XA_FORMTXTSTYLE", "Fontwork style")
|
||||||
#define SIP_XA_FORMTXTADJUST NC_("SIP_XA_FORMTXTADJUST", "Fontwork alignment")
|
#define SIP_XA_FORMTXTADJUST NC_("SIP_XA_FORMTXTADJUST", "Fontwork alignment")
|
||||||
#define SIP_XA_FORMTXTDISTANCE NC_("SIP_XA_FORMTXTDISTANCE", "Fontwork spacing")
|
#define SIP_XA_FORMTXTDISTANCE NC_("SIP_XA_FORMTXTDISTANCE", "Fontwork spacing")
|
||||||
|
|||||||
@@ -25,14 +25,10 @@
|
|||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
// SdrItemPool V2, 09-11-1995:
|
// SdrItemPool V2, 09-11-1995:
|
||||||
// 7 new Items for XLineAttrSetItem
|
|
||||||
// 7 new Items for XFillAttrSetItem
|
|
||||||
// 8 new Items for SdrShadowSetItem
|
// 8 new Items for SdrShadowSetItem
|
||||||
// 5 new Items for SdrCaptionSetItem
|
// 5 new Items for SdrCaptionSetItem
|
||||||
// 25 new Items for SdrMiscSetItem
|
// 25 new Items for SdrMiscSetItem
|
||||||
// 6 new Items for SdrNotPersist
|
// 6 new Items for SdrNotPersist
|
||||||
// SdrItemPool V3, 29-02-1996
|
|
||||||
// 17 new Items for XFillAttrSetItem (Bitmapfill)
|
|
||||||
// SdrItemPool V4, 10-08-1996
|
// SdrItemPool V4, 10-08-1996
|
||||||
// 45 new Items for Edge and Measure (Connector and Measuring object)
|
// 45 new Items for Edge and Measure (Connector and Measuring object)
|
||||||
// SdrItemPool V4+, 18-10-1996
|
// SdrItemPool V4+, 18-10-1996
|
||||||
|
|||||||
+38
-42
@@ -31,7 +31,6 @@
|
|||||||
\************************************************************************/
|
\************************************************************************/
|
||||||
|
|
||||||
class SfxMetricItem;
|
class SfxMetricItem;
|
||||||
class XFillAttrSetItem;
|
|
||||||
class XFillBackgroundItem;
|
class XFillBackgroundItem;
|
||||||
class XFillBitmapItem;
|
class XFillBitmapItem;
|
||||||
class XFillBmpPosItem;
|
class XFillBmpPosItem;
|
||||||
@@ -63,7 +62,6 @@ class XFormTextShadowYValItem;
|
|||||||
class XFormTextStartItem;
|
class XFormTextStartItem;
|
||||||
class XFormTextStyleItem;
|
class XFormTextStyleItem;
|
||||||
class XGradientStepCountItem;
|
class XGradientStepCountItem;
|
||||||
class XLineAttrSetItem;
|
|
||||||
class XLineCapItem;
|
class XLineCapItem;
|
||||||
class XLineColorItem;
|
class XLineColorItem;
|
||||||
class XLineDashItem;
|
class XLineDashItem;
|
||||||
@@ -102,49 +100,47 @@ inline constexpr TypedWhichId<XLineTransparenceItem> XATTR_LINETRANSPARENCE (XAT
|
|||||||
inline constexpr TypedWhichId<XLineJointItem> XATTR_LINEJOINT (XATTR_LINE_FIRST + 11); // 1011
|
inline constexpr TypedWhichId<XLineJointItem> XATTR_LINEJOINT (XATTR_LINE_FIRST + 11); // 1011
|
||||||
inline constexpr TypedWhichId<XLineCapItem> XATTR_LINECAP (XATTR_LINE_FIRST + 12); // 1012
|
inline constexpr TypedWhichId<XLineCapItem> XATTR_LINECAP (XATTR_LINE_FIRST + 12); // 1012
|
||||||
inline constexpr sal_uInt16 XATTR_LINE_LAST (XATTR_LINECAP); // 1012
|
inline constexpr sal_uInt16 XATTR_LINE_LAST (XATTR_LINECAP); // 1012
|
||||||
inline constexpr TypedWhichId<XLineAttrSetItem> XATTRSET_LINE (XATTR_LINE_LAST + 1); // 1013
|
|
||||||
|
|
||||||
inline constexpr sal_uInt16 XATTR_FILL_FIRST (XATTRSET_LINE + 1); // 1014
|
inline constexpr sal_uInt16 XATTR_FILL_FIRST (XATTR_LINE_LAST + 1); // 1013
|
||||||
inline constexpr TypedWhichId<XFillStyleItem> XATTR_FILLSTYLE (XATTR_FILL_FIRST); // 1014
|
inline constexpr TypedWhichId<XFillStyleItem> XATTR_FILLSTYLE (XATTR_FILL_FIRST); // 1013
|
||||||
inline constexpr TypedWhichId<XFillColorItem> XATTR_FILLCOLOR (XATTR_FILL_FIRST + 1); // 1015
|
inline constexpr TypedWhichId<XFillColorItem> XATTR_FILLCOLOR (XATTR_FILL_FIRST + 1); // 1014
|
||||||
inline constexpr TypedWhichId<XFillGradientItem> XATTR_FILLGRADIENT (XATTR_FILL_FIRST + 2); // 1016
|
inline constexpr TypedWhichId<XFillGradientItem> XATTR_FILLGRADIENT (XATTR_FILL_FIRST + 2); // 1015
|
||||||
inline constexpr TypedWhichId<XFillHatchItem> XATTR_FILLHATCH (XATTR_FILL_FIRST + 3); // 1017
|
inline constexpr TypedWhichId<XFillHatchItem> XATTR_FILLHATCH (XATTR_FILL_FIRST + 3); // 1016
|
||||||
inline constexpr TypedWhichId<XFillBitmapItem> XATTR_FILLBITMAP (XATTR_FILL_FIRST + 4); // 1018
|
inline constexpr TypedWhichId<XFillBitmapItem> XATTR_FILLBITMAP (XATTR_FILL_FIRST + 4); // 1017
|
||||||
inline constexpr TypedWhichId<XFillTransparenceItem> XATTR_FILLTRANSPARENCE (XATTR_FILL_FIRST + 5); // 1019
|
inline constexpr TypedWhichId<XFillTransparenceItem> XATTR_FILLTRANSPARENCE (XATTR_FILL_FIRST + 5); // 1018
|
||||||
inline constexpr TypedWhichId<XGradientStepCountItem> XATTR_GRADIENTSTEPCOUNT (XATTR_FILL_FIRST + 6); // 1020
|
inline constexpr TypedWhichId<XGradientStepCountItem> XATTR_GRADIENTSTEPCOUNT (XATTR_FILL_FIRST + 6); // 1019
|
||||||
inline constexpr TypedWhichId<XFillBmpTileItem> XATTR_FILLBMP_TILE (XATTR_FILL_FIRST + 7); // 1021
|
inline constexpr TypedWhichId<XFillBmpTileItem> XATTR_FILLBMP_TILE (XATTR_FILL_FIRST + 7); // 1020
|
||||||
inline constexpr TypedWhichId<XFillBmpPosItem> XATTR_FILLBMP_POS (XATTR_FILL_FIRST + 8); // 1022
|
inline constexpr TypedWhichId<XFillBmpPosItem> XATTR_FILLBMP_POS (XATTR_FILL_FIRST + 8); // 1021
|
||||||
inline constexpr TypedWhichId<SfxMetricItem> XATTR_FILLBMP_SIZEX (XATTR_FILL_FIRST + 9); // 1023
|
inline constexpr TypedWhichId<SfxMetricItem> XATTR_FILLBMP_SIZEX (XATTR_FILL_FIRST + 9); // 1022
|
||||||
inline constexpr TypedWhichId<XFillBmpSizeYItem> XATTR_FILLBMP_SIZEY (XATTR_FILL_FIRST + 10); // 1024
|
inline constexpr TypedWhichId<XFillBmpSizeYItem> XATTR_FILLBMP_SIZEY (XATTR_FILL_FIRST + 10); // 1023
|
||||||
inline constexpr TypedWhichId<XFillFloatTransparenceItem> XATTR_FILLFLOATTRANSPARENCE (XATTR_FILL_FIRST + 11); // 1025
|
inline constexpr TypedWhichId<XFillFloatTransparenceItem> XATTR_FILLFLOATTRANSPARENCE (XATTR_FILL_FIRST + 11); // 1024
|
||||||
inline constexpr TypedWhichId<XSecondaryFillColorItem> XATTR_SECONDARYFILLCOLOR (XATTR_FILL_FIRST + 12); // 1026
|
inline constexpr TypedWhichId<XSecondaryFillColorItem> XATTR_SECONDARYFILLCOLOR (XATTR_FILL_FIRST + 12); // 1025
|
||||||
inline constexpr TypedWhichId<XFillBmpSizeLogItem> XATTR_FILLBMP_SIZELOG (XATTR_FILL_FIRST + 13); // 1027
|
inline constexpr TypedWhichId<XFillBmpSizeLogItem> XATTR_FILLBMP_SIZELOG (XATTR_FILL_FIRST + 13); // 1026
|
||||||
inline constexpr TypedWhichId<XFillBmpTileOffsetXItem> XATTR_FILLBMP_TILEOFFSETX (XATTR_FILL_FIRST + 14); // 1028
|
inline constexpr TypedWhichId<XFillBmpTileOffsetXItem> XATTR_FILLBMP_TILEOFFSETX (XATTR_FILL_FIRST + 14); // 1027
|
||||||
inline constexpr TypedWhichId<XFillBmpTileOffsetYItem> XATTR_FILLBMP_TILEOFFSETY (XATTR_FILL_FIRST + 15); // 1029
|
inline constexpr TypedWhichId<XFillBmpTileOffsetYItem> XATTR_FILLBMP_TILEOFFSETY (XATTR_FILL_FIRST + 15); // 1028
|
||||||
inline constexpr TypedWhichId<XFillBmpStretchItem> XATTR_FILLBMP_STRETCH (XATTR_FILL_FIRST + 16); // 1030
|
inline constexpr TypedWhichId<XFillBmpStretchItem> XATTR_FILLBMP_STRETCH (XATTR_FILL_FIRST + 16); // 1029
|
||||||
inline constexpr TypedWhichId<XFillBmpPosOffsetXItem> XATTR_FILLBMP_POSOFFSETX (XATTR_FILL_FIRST + 17); // 1031
|
inline constexpr TypedWhichId<XFillBmpPosOffsetXItem> XATTR_FILLBMP_POSOFFSETX (XATTR_FILL_FIRST + 17); // 1030
|
||||||
inline constexpr TypedWhichId<XFillBmpPosOffsetYItem> XATTR_FILLBMP_POSOFFSETY (XATTR_FILL_FIRST + 18); // 1032
|
inline constexpr TypedWhichId<XFillBmpPosOffsetYItem> XATTR_FILLBMP_POSOFFSETY (XATTR_FILL_FIRST + 18); // 1031
|
||||||
inline constexpr TypedWhichId<XFillBackgroundItem> XATTR_FILLBACKGROUND (XATTR_FILL_FIRST + 19); // 1033
|
inline constexpr TypedWhichId<XFillBackgroundItem> XATTR_FILLBACKGROUND (XATTR_FILL_FIRST + 19); // 1032
|
||||||
inline constexpr TypedWhichId<XFillUseSlideBackgroundItem> XATTR_FILLUSESLIDEBACKGROUND (XATTR_FILL_FIRST + 20);// 1034
|
inline constexpr TypedWhichId<XFillUseSlideBackgroundItem> XATTR_FILLUSESLIDEBACKGROUND (XATTR_FILL_FIRST + 20);// 1033
|
||||||
inline constexpr sal_uInt16 XATTR_FILL_LAST (XATTR_FILLUSESLIDEBACKGROUND); // 1034
|
inline constexpr sal_uInt16 XATTR_FILL_LAST (XATTR_FILLUSESLIDEBACKGROUND); // 1033
|
||||||
inline constexpr TypedWhichId<XFillAttrSetItem> XATTRSET_FILL (XATTR_FILL_LAST + 1); // 1035
|
|
||||||
|
|
||||||
inline constexpr sal_uInt16 XATTR_TEXT_FIRST (XATTRSET_FILL + 1); // 1036
|
inline constexpr sal_uInt16 XATTR_TEXT_FIRST (XATTR_FILL_LAST + 1); // 1034
|
||||||
inline constexpr TypedWhichId<XFormTextStyleItem> XATTR_FORMTXTSTYLE (XATTR_TEXT_FIRST); // 1036
|
inline constexpr TypedWhichId<XFormTextStyleItem> XATTR_FORMTXTSTYLE (XATTR_TEXT_FIRST); // 1034
|
||||||
inline constexpr TypedWhichId<XFormTextAdjustItem> XATTR_FORMTXTADJUST (XATTR_TEXT_FIRST + 1); // 1037
|
inline constexpr TypedWhichId<XFormTextAdjustItem> XATTR_FORMTXTADJUST (XATTR_TEXT_FIRST + 1); // 1035
|
||||||
inline constexpr TypedWhichId<XFormTextDistanceItem> XATTR_FORMTXTDISTANCE (XATTR_TEXT_FIRST + 2); // 1038
|
inline constexpr TypedWhichId<XFormTextDistanceItem> XATTR_FORMTXTDISTANCE (XATTR_TEXT_FIRST + 2); // 1036
|
||||||
inline constexpr TypedWhichId<XFormTextStartItem> XATTR_FORMTXTSTART (XATTR_TEXT_FIRST + 3); // 1039
|
inline constexpr TypedWhichId<XFormTextStartItem> XATTR_FORMTXTSTART (XATTR_TEXT_FIRST + 3); // 1037
|
||||||
inline constexpr TypedWhichId<XFormTextMirrorItem> XATTR_FORMTXTMIRROR (XATTR_TEXT_FIRST + 4); // 1040
|
inline constexpr TypedWhichId<XFormTextMirrorItem> XATTR_FORMTXTMIRROR (XATTR_TEXT_FIRST + 4); // 1038
|
||||||
inline constexpr TypedWhichId<XFormTextOutlineItem> XATTR_FORMTXTOUTLINE (XATTR_TEXT_FIRST + 5); // 1041
|
inline constexpr TypedWhichId<XFormTextOutlineItem> XATTR_FORMTXTOUTLINE (XATTR_TEXT_FIRST + 5); // 1039
|
||||||
inline constexpr TypedWhichId<XFormTextShadowItem> XATTR_FORMTXTSHADOW (XATTR_TEXT_FIRST + 6); // 1042
|
inline constexpr TypedWhichId<XFormTextShadowItem> XATTR_FORMTXTSHADOW (XATTR_TEXT_FIRST + 6); // 1040
|
||||||
inline constexpr TypedWhichId<XFormTextShadowColorItem> XATTR_FORMTXTSHDWCOLOR (XATTR_TEXT_FIRST + 7); // 1043
|
inline constexpr TypedWhichId<XFormTextShadowColorItem> XATTR_FORMTXTSHDWCOLOR (XATTR_TEXT_FIRST + 7); // 1041
|
||||||
inline constexpr TypedWhichId<XFormTextShadowXValItem> XATTR_FORMTXTSHDWXVAL (XATTR_TEXT_FIRST + 8); // 1044
|
inline constexpr TypedWhichId<XFormTextShadowXValItem> XATTR_FORMTXTSHDWXVAL (XATTR_TEXT_FIRST + 8); // 1042
|
||||||
inline constexpr TypedWhichId<XFormTextShadowYValItem> XATTR_FORMTXTSHDWYVAL (XATTR_TEXT_FIRST + 9); // 1045
|
inline constexpr TypedWhichId<XFormTextShadowYValItem> XATTR_FORMTXTSHDWYVAL (XATTR_TEXT_FIRST + 9); // 1043
|
||||||
inline constexpr TypedWhichId<XFormTextHideFormItem> XATTR_FORMTXTHIDEFORM (XATTR_TEXT_FIRST + 10); // 1046
|
inline constexpr TypedWhichId<XFormTextHideFormItem> XATTR_FORMTXTHIDEFORM (XATTR_TEXT_FIRST + 10); // 1044
|
||||||
inline constexpr TypedWhichId<XFormTextShadowTranspItem> XATTR_FORMTXTSHDWTRANSP (XATTR_TEXT_FIRST + 11); // 1047
|
inline constexpr TypedWhichId<XFormTextShadowTranspItem> XATTR_FORMTXTSHDWTRANSP (XATTR_TEXT_FIRST + 11); // 1045
|
||||||
inline constexpr sal_uInt16 XATTR_TEXT_LAST (XATTR_FORMTXTSHDWTRANSP);// 1047
|
inline constexpr sal_uInt16 XATTR_TEXT_LAST (XATTR_FORMTXTSHDWTRANSP);// 1045
|
||||||
|
|
||||||
inline constexpr sal_uInt16 XATTR_END = XATTR_TEXT_LAST; // 1047
|
inline constexpr sal_uInt16 XATTR_END = XATTR_TEXT_LAST; // 1045
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -5765,7 +5765,6 @@ include/svx/xdash.hxx
|
|||||||
include/svx/xdef.hxx
|
include/svx/xdef.hxx
|
||||||
include/svx/xenum.hxx
|
include/svx/xenum.hxx
|
||||||
include/svx/xfillit0.hxx
|
include/svx/xfillit0.hxx
|
||||||
include/svx/xflasit.hxx
|
|
||||||
include/svx/xflbckit.hxx
|
include/svx/xflbckit.hxx
|
||||||
include/svx/xflbmpit.hxx
|
include/svx/xflbmpit.hxx
|
||||||
include/svx/xflbmsli.hxx
|
include/svx/xflbmsli.hxx
|
||||||
@@ -5791,7 +5790,6 @@ include/svx/xhatch.hxx
|
|||||||
include/svx/xit.hxx
|
include/svx/xit.hxx
|
||||||
include/svx/xlineit0.hxx
|
include/svx/xlineit0.hxx
|
||||||
include/svx/xlinjoit.hxx
|
include/svx/xlinjoit.hxx
|
||||||
include/svx/xlnasit.hxx
|
|
||||||
include/svx/xlncapit.hxx
|
include/svx/xlncapit.hxx
|
||||||
include/svx/xlnclit.hxx
|
include/svx/xlnclit.hxx
|
||||||
include/svx/xlndsit.hxx
|
include/svx/xlndsit.hxx
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ SfxItemSet::SfxItemSet(SfxItemPool& rPool)
|
|||||||
, m_nRegister(0)
|
, m_nRegister(0)
|
||||||
#ifdef DBG_UTIL
|
#ifdef DBG_UTIL
|
||||||
, m_nRegisteredSfxItemIter(0)
|
, m_nRegisteredSfxItemIter(0)
|
||||||
|
, m_bDeleted(false)
|
||||||
#endif
|
#endif
|
||||||
, m_aWhichRanges(rPool.GetMergedIdRanges())
|
, m_aWhichRanges(rPool.GetMergedIdRanges())
|
||||||
, m_aPoolItemMap()
|
, m_aPoolItemMap()
|
||||||
@@ -235,6 +236,7 @@ SfxItemSet::SfxItemSet(SfxItemPool& pool, WhichRangesContainer wids)
|
|||||||
, m_nRegister(0)
|
, m_nRegister(0)
|
||||||
#ifdef DBG_UTIL
|
#ifdef DBG_UTIL
|
||||||
, m_nRegisteredSfxItemIter(0)
|
, m_nRegisteredSfxItemIter(0)
|
||||||
|
, m_bDeleted(false)
|
||||||
#endif
|
#endif
|
||||||
, m_aWhichRanges(std::move(wids))
|
, m_aWhichRanges(std::move(wids))
|
||||||
, m_aPoolItemMap()
|
, m_aPoolItemMap()
|
||||||
@@ -253,6 +255,7 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet )
|
|||||||
, m_nRegister( 0 )
|
, m_nRegister( 0 )
|
||||||
#ifdef DBG_UTIL
|
#ifdef DBG_UTIL
|
||||||
, m_nRegisteredSfxItemIter(0)
|
, m_nRegisteredSfxItemIter(0)
|
||||||
|
, m_bDeleted(false)
|
||||||
#endif
|
#endif
|
||||||
, m_aWhichRanges( rASet.m_aWhichRanges )
|
, m_aWhichRanges( rASet.m_aWhichRanges )
|
||||||
, m_aPoolItemMap()
|
, m_aPoolItemMap()
|
||||||
@@ -281,6 +284,7 @@ SfxItemSet::SfxItemSet(SfxItemSet&& rASet) noexcept
|
|||||||
, m_nRegister( rASet.m_nRegister )
|
, m_nRegister( rASet.m_nRegister )
|
||||||
#ifdef DBG_UTIL
|
#ifdef DBG_UTIL
|
||||||
, m_nRegisteredSfxItemIter(0)
|
, m_nRegisteredSfxItemIter(0)
|
||||||
|
, m_bDeleted(false)
|
||||||
#endif
|
#endif
|
||||||
, m_aWhichRanges( std::move(rASet.m_aWhichRanges) )
|
, m_aWhichRanges( std::move(rASet.m_aWhichRanges) )
|
||||||
, m_aPoolItemMap( std::move(rASet.m_aPoolItemMap) )
|
, m_aPoolItemMap( std::move(rASet.m_aPoolItemMap) )
|
||||||
@@ -319,6 +323,9 @@ SfxItemSet::~SfxItemSet()
|
|||||||
|
|
||||||
// for invariant-testing
|
// for invariant-testing
|
||||||
m_aWhichRanges.reset();
|
m_aWhichRanges.reset();
|
||||||
|
#ifdef DBG_UTIL
|
||||||
|
m_bDeleted = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//item String XFillAttrSetItem; SfxSetItem!
|
|
||||||
struct XFillBitmap
|
struct XFillBitmap
|
||||||
{
|
{
|
||||||
String Name MID_NAME;
|
String Name MID_NAME;
|
||||||
@@ -88,8 +87,6 @@ enum SvxFillStyle
|
|||||||
|
|
||||||
item SvxFillStyle XFillStyleItem;
|
item SvxFillStyle XFillStyleItem;
|
||||||
|
|
||||||
//item String XLineAttrSetItem; SfxSetItem!
|
|
||||||
|
|
||||||
struct XLineColor
|
struct XLineColor
|
||||||
{
|
{
|
||||||
INT32 Color MID_COLOR_RGB;
|
INT32 Color MID_COLOR_RGB;
|
||||||
|
|||||||
@@ -63,7 +63,6 @@
|
|||||||
#include <svx/xlntrit.hxx>
|
#include <svx/xlntrit.hxx>
|
||||||
#include <svx/xfltrit.hxx>
|
#include <svx/xfltrit.hxx>
|
||||||
#include <svx/xgrscit.hxx>
|
#include <svx/xgrscit.hxx>
|
||||||
#include <svx/xflasit.hxx>
|
|
||||||
#include <svx/xflbmtit.hxx>
|
#include <svx/xflbmtit.hxx>
|
||||||
#include <svx/xflbmpit.hxx>
|
#include <svx/xflbmpit.hxx>
|
||||||
#include <svx/xflbmsxy.hxx>
|
#include <svx/xflbmsxy.hxx>
|
||||||
@@ -75,7 +74,6 @@
|
|||||||
#include <svx/xfillit0.hxx>
|
#include <svx/xfillit0.hxx>
|
||||||
#include <svx/xfilluseslidebackgrounditem.hxx>
|
#include <svx/xfilluseslidebackgrounditem.hxx>
|
||||||
#include <svx/xtextit0.hxx>
|
#include <svx/xtextit0.hxx>
|
||||||
#include <svx/xlnasit.hxx>
|
|
||||||
#include <svx/xlndsit.hxx>
|
#include <svx/xlndsit.hxx>
|
||||||
#include <svx/xlnwtit.hxx>
|
#include <svx/xlnwtit.hxx>
|
||||||
#include <svx/xlnclit.hxx>
|
#include <svx/xlnclit.hxx>
|
||||||
@@ -187,7 +185,6 @@ static ItemInfoPackage& getItemInfoPackageSdr()
|
|||||||
{ XATTR_LINETRANSPARENCE, new XLineTransparenceItem, SID_ATTR_LINE_TRANSPARENCE, SFX_ITEMINFOFLAG_NONE },
|
{ XATTR_LINETRANSPARENCE, new XLineTransparenceItem, SID_ATTR_LINE_TRANSPARENCE, SFX_ITEMINFOFLAG_NONE },
|
||||||
{ XATTR_LINEJOINT, new XLineJointItem, SID_ATTR_LINE_JOINT, SFX_ITEMINFOFLAG_NONE },
|
{ XATTR_LINEJOINT, new XLineJointItem, SID_ATTR_LINE_JOINT, SFX_ITEMINFOFLAG_NONE },
|
||||||
{ XATTR_LINECAP, new XLineCapItem, SID_ATTR_LINE_CAP, SFX_ITEMINFOFLAG_NONE },
|
{ XATTR_LINECAP, new XLineCapItem, SID_ATTR_LINE_CAP, SFX_ITEMINFOFLAG_NONE },
|
||||||
{ XATTRSET_LINE, nullptr, 0, SFX_ITEMINFOFLAG_NONE },
|
|
||||||
{ XATTR_FILLSTYLE, new XFillStyleItem, SID_ATTR_FILL_STYLE, SFX_ITEMINFOFLAG_NONE },
|
{ XATTR_FILLSTYLE, new XFillStyleItem, SID_ATTR_FILL_STYLE, SFX_ITEMINFOFLAG_NONE },
|
||||||
{ XATTR_FILLCOLOR, new XFillColorItem (OUString(), COL_DEFAULT_SHAPE_FILLING), SID_ATTR_FILL_COLOR, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE },
|
{ XATTR_FILLCOLOR, new XFillColorItem (OUString(), COL_DEFAULT_SHAPE_FILLING), SID_ATTR_FILL_COLOR, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE },
|
||||||
{ XATTR_FILLGRADIENT, new XFillGradientItem(basegfx::BGradient()), SID_ATTR_FILL_GRADIENT, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE },
|
{ XATTR_FILLGRADIENT, new XFillGradientItem(basegfx::BGradient()), SID_ATTR_FILL_GRADIENT, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE },
|
||||||
@@ -209,7 +206,6 @@ static ItemInfoPackage& getItemInfoPackageSdr()
|
|||||||
{ XATTR_FILLBMP_POSOFFSETY, new XFillBmpPosOffsetYItem, 0, SFX_ITEMINFOFLAG_NONE },
|
{ XATTR_FILLBMP_POSOFFSETY, new XFillBmpPosOffsetYItem, 0, SFX_ITEMINFOFLAG_NONE },
|
||||||
{ XATTR_FILLBACKGROUND, new XFillBackgroundItem, 0, SFX_ITEMINFOFLAG_NONE },
|
{ XATTR_FILLBACKGROUND, new XFillBackgroundItem, 0, SFX_ITEMINFOFLAG_NONE },
|
||||||
{ XATTR_FILLUSESLIDEBACKGROUND, new XFillUseSlideBackgroundItem, SID_ATTR_FILL_USE_SLIDE_BACKGROUND, SFX_ITEMINFOFLAG_NONE },
|
{ XATTR_FILLUSESLIDEBACKGROUND, new XFillUseSlideBackgroundItem, SID_ATTR_FILL_USE_SLIDE_BACKGROUND, SFX_ITEMINFOFLAG_NONE },
|
||||||
{ XATTRSET_FILL, nullptr, 0, SFX_ITEMINFOFLAG_NONE },
|
|
||||||
{ XATTR_FORMTXTSTYLE, new XFormTextStyleItem, SID_FORMTEXT_STYLE, SFX_ITEMINFOFLAG_NONE },
|
{ XATTR_FORMTXTSTYLE, new XFormTextStyleItem, SID_FORMTEXT_STYLE, SFX_ITEMINFOFLAG_NONE },
|
||||||
{ XATTR_FORMTXTADJUST, new XFormTextAdjustItem, SID_FORMTEXT_ADJUST, SFX_ITEMINFOFLAG_NONE },
|
{ XATTR_FORMTXTADJUST, new XFormTextAdjustItem, SID_FORMTEXT_ADJUST, SFX_ITEMINFOFLAG_NONE },
|
||||||
{ XATTR_FORMTXTDISTANCE, new XFormTextDistanceItem, SID_FORMTEXT_DISTANCE, SFX_ITEMINFOFLAG_NONE },
|
{ XATTR_FORMTXTDISTANCE, new XFormTextDistanceItem, SID_FORMTEXT_DISTANCE, SFX_ITEMINFOFLAG_NONE },
|
||||||
@@ -467,7 +463,7 @@ static ItemInfoPackage& getItemInfoPackageSdr()
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t size() const override { return maItemInfos.size(); }
|
virtual size_t size() const override { return maItemInfos.size(); }
|
||||||
virtual const ItemInfo& getItemInfo(size_t nIndex, SfxItemPool& rPool) override
|
virtual const ItemInfo& getItemInfo(size_t nIndex, SfxItemPool& /*rPool*/) override
|
||||||
{
|
{
|
||||||
const ItemInfo& rRetval(maItemInfos[nIndex]);
|
const ItemInfo& rRetval(maItemInfos[nIndex]);
|
||||||
|
|
||||||
@@ -475,12 +471,6 @@ static ItemInfoPackage& getItemInfoPackageSdr()
|
|||||||
if (nullptr != rRetval.getItem())
|
if (nullptr != rRetval.getItem())
|
||||||
return rRetval;
|
return rRetval;
|
||||||
|
|
||||||
if (XATTRSET_LINE == rRetval.getWhich())
|
|
||||||
return *new ItemInfoDynamic(rRetval, new XLineAttrSetItem(SfxItemSet(rPool, WhichRangesContainer(svl::Items<XATTR_LINE_FIRST, XATTR_LINE_LAST>))));
|
|
||||||
|
|
||||||
if (XATTRSET_FILL == rRetval.getWhich())
|
|
||||||
return *new ItemInfoDynamic(rRetval, new XFillAttrSetItem(SfxItemSet(rPool, WhichRangesContainer(svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>))));
|
|
||||||
|
|
||||||
if (XATTR_FILLBITMAP == rRetval.getWhich())
|
if (XATTR_FILLBITMAP == rRetval.getWhich())
|
||||||
return *new ItemInfoDynamic(rRetval, new XFillBitmapItem(Graphic()));
|
return *new ItemInfoDynamic(rRetval, new XFillBitmapItem(Graphic()));
|
||||||
|
|
||||||
@@ -563,7 +553,6 @@ OUString SdrItemPool::GetItemName(sal_uInt16 nWhich)
|
|||||||
case XATTR_LINEENDCENTER : pResId = SIP_XA_LINEENDCENTER;break;
|
case XATTR_LINEENDCENTER : pResId = SIP_XA_LINEENDCENTER;break;
|
||||||
case XATTR_LINETRANSPARENCE : pResId = SIP_XA_LINETRANSPARENCE;break;
|
case XATTR_LINETRANSPARENCE : pResId = SIP_XA_LINETRANSPARENCE;break;
|
||||||
case XATTR_LINEJOINT : pResId = SIP_XA_LINEJOINT;break;
|
case XATTR_LINEJOINT : pResId = SIP_XA_LINEJOINT;break;
|
||||||
case XATTRSET_LINE : pResId = SIP_XATTRSET_LINE;break;
|
|
||||||
|
|
||||||
case XATTR_FILLSTYLE : pResId = SIP_XA_FILLSTYLE;break;
|
case XATTR_FILLSTYLE : pResId = SIP_XA_FILLSTYLE;break;
|
||||||
case XATTR_FILLCOLOR : pResId = SIP_XA_FILLCOLOR;break;
|
case XATTR_FILLCOLOR : pResId = SIP_XA_FILLCOLOR;break;
|
||||||
@@ -587,8 +576,6 @@ OUString SdrItemPool::GetItemName(sal_uInt16 nWhich)
|
|||||||
case XATTR_FILLBACKGROUND : pResId = SIP_XA_FILLBACKGROUND;break;
|
case XATTR_FILLBACKGROUND : pResId = SIP_XA_FILLBACKGROUND;break;
|
||||||
case XATTR_FILLUSESLIDEBACKGROUND: pResId = SIP_XA_FILLUSESLIDEBACKGROUND;break;
|
case XATTR_FILLUSESLIDEBACKGROUND: pResId = SIP_XA_FILLUSESLIDEBACKGROUND;break;
|
||||||
|
|
||||||
case XATTRSET_FILL : pResId = SIP_XATTRSET_FILL;break;
|
|
||||||
|
|
||||||
case XATTR_FORMTXTSTYLE : pResId = SIP_XA_FORMTXTSTYLE;break;
|
case XATTR_FORMTXTSTYLE : pResId = SIP_XA_FORMTXTSTYLE;break;
|
||||||
case XATTR_FORMTXTADJUST : pResId = SIP_XA_FORMTXTADJUST;break;
|
case XATTR_FORMTXTADJUST : pResId = SIP_XA_FORMTXTADJUST;break;
|
||||||
case XATTR_FORMTXTDISTANCE : pResId = SIP_XA_FORMTXTDISTANCE;break;
|
case XATTR_FORMTXTDISTANCE : pResId = SIP_XA_FORMTXTDISTANCE;break;
|
||||||
|
|||||||
@@ -2878,7 +2878,7 @@ bool SdrObjEditView::SupportsFormatPaintbrush(SdrInventor nObjectInventor,
|
|||||||
static const WhichRangesContainer& GetFormatRangeImpl(bool bTextOnly, bool withParagraphAttr = true)
|
static const WhichRangesContainer& GetFormatRangeImpl(bool bTextOnly, bool withParagraphAttr = true)
|
||||||
{
|
{
|
||||||
static const WhichRangesContainer gFull(
|
static const WhichRangesContainer gFull(
|
||||||
svl::Items<XATTR_LINE_FIRST, XATTR_LINE_LAST, XATTR_FILL_FIRST, XATTRSET_FILL,
|
svl::Items<XATTR_LINE_FIRST, XATTR_LINE_LAST, XATTR_FILL_FIRST, XATTR_FILL_LAST,
|
||||||
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, SDRATTR_MISC_FIRST,
|
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, SDRATTR_MISC_FIRST,
|
||||||
SDRATTR_MISC_LAST, // table cell formats
|
SDRATTR_MISC_LAST, // table cell formats
|
||||||
SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST, SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST,
|
SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST, SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST,
|
||||||
|
|||||||
@@ -1984,14 +1984,6 @@ bool SdrObject::Equals(const SdrObject& rOtherObj) const
|
|||||||
// on MasterPages
|
// on MasterPages
|
||||||
switch (nWhich)
|
switch (nWhich)
|
||||||
{
|
{
|
||||||
case XATTRSET_LINE:
|
|
||||||
case XATTRSET_FILL:
|
|
||||||
// these Items are not really used (maybe removed),
|
|
||||||
// ignore. Diffs come from these being SfxSetItems
|
|
||||||
// on different models with slightly different defaults
|
|
||||||
// in the contained complete default SfxItemSet
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// somewhere defaults for some objects seem to be set on MasterPages
|
// somewhere defaults for some objects seem to be set on MasterPages
|
||||||
// that define Items (here: for XATTR_FILLGRADIENT and FillStyle_BITMAP).
|
// that define Items (here: for XATTR_FILLGRADIENT and FillStyle_BITMAP).
|
||||||
// These can be ignored when the FillStyle does not *use* these anyways.
|
// These can be ignored when the FillStyle does not *use* these anyways.
|
||||||
|
|||||||
@@ -49,9 +49,7 @@
|
|||||||
#include <svl/itemset.hxx>
|
#include <svl/itemset.hxx>
|
||||||
#include <svx/strings.hrc>
|
#include <svx/strings.hrc>
|
||||||
#include <svx/xfillit0.hxx>
|
#include <svx/xfillit0.hxx>
|
||||||
#include <svx/xflasit.hxx>
|
|
||||||
#include <svx/xlineit0.hxx>
|
#include <svx/xlineit0.hxx>
|
||||||
#include <svx/xlnasit.hxx>
|
|
||||||
#include <svx/xtextit0.hxx>
|
#include <svx/xtextit0.hxx>
|
||||||
#include <svx/xtable.hxx>
|
#include <svx/xtable.hxx>
|
||||||
#include <svx/dialmgr.hxx>
|
#include <svx/dialmgr.hxx>
|
||||||
@@ -2832,63 +2830,4 @@ XFormTextHideFormItem* XFormTextHideFormItem::Clone(SfxItemPool* /*pPool*/) cons
|
|||||||
return new XFormTextHideFormItem(*this);
|
return new XFormTextHideFormItem(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- SetItems ---
|
|
||||||
|
|
||||||
|
|
||||||
/// a line attribute set item
|
|
||||||
XLineAttrSetItem::XLineAttrSetItem( SfxItemSet&& pItemSet ) :
|
|
||||||
SfxSetItem( XATTRSET_LINE, std::move(pItemSet))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
XLineAttrSetItem::XLineAttrSetItem( SfxItemPool* pItemPool ) :
|
|
||||||
SfxSetItem(XATTRSET_LINE,
|
|
||||||
SfxItemSet::makeFixedSfxItemSet<XATTR_LINE_FIRST, XATTR_LINE_LAST>(*pItemPool))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr ) :
|
|
||||||
SfxSetItem( rLineAttr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr,
|
|
||||||
SfxItemPool* pItemPool) :
|
|
||||||
SfxSetItem( rLineAttr, pItemPool )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
XLineAttrSetItem* XLineAttrSetItem::Clone( SfxItemPool* pPool ) const
|
|
||||||
{
|
|
||||||
return new XLineAttrSetItem( *this, pPool );
|
|
||||||
}
|
|
||||||
|
|
||||||
/// fill attribute set item
|
|
||||||
XFillAttrSetItem::XFillAttrSetItem( SfxItemSet&& pItemSet ) :
|
|
||||||
SfxSetItem( XATTRSET_FILL, std::move(pItemSet))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
XFillAttrSetItem::XFillAttrSetItem( SfxItemPool* pItemPool ) :
|
|
||||||
SfxSetItem(XATTRSET_FILL,
|
|
||||||
SfxItemSet::makeFixedSfxItemSet<XATTR_FILL_FIRST, XATTR_FILL_LAST>(*pItemPool))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr ) :
|
|
||||||
SfxSetItem( rFillAttr )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr,
|
|
||||||
SfxItemPool* pItemPool ) :
|
|
||||||
SfxSetItem( rFillAttr, pItemPool )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
XFillAttrSetItem* XFillAttrSetItem::Clone( SfxItemPool* pPool ) const
|
|
||||||
{
|
|
||||||
return new XFillAttrSetItem( *this, pPool );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
|||||||
Reference in New Issue
Block a user