summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorRegina Henschel <regina@apache.org>2012-05-19 19:27:41 +0000
committerRegina Henschel <regina@apache.org>2012-05-19 19:27:41 +0000
commit94754eb3c4b9dc2b721ea05db9bae655bb16cc04 (patch)
tree298ef06784e5e17edf2c4c40294ab588a38d7e6f /cui
parenta06ccbd905e7829c310bca0b1b244da5fa2d4981 (diff)
Add missing chart data point ODF1.2 standard symbols
Notes
Notes: prefer: 3e5edf6ca9d3bc56549602bda2adc855dd57f658
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/tpline.cxx37
1 files changed, 30 insertions, 7 deletions
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index ccfa1c71dc5b..767d287f0a78 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1031,8 +1031,6 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
if(pObj)
{
pObj=pObj->Clone();
- pPage->NbcInsertObject(pObj);
- pView->MarkObj(pObj,pPageView);
if(pSymbolAttr)
{
pObj->SetMergedItemSet(*pSymbolAttr);
@@ -1041,17 +1039,31 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
{
pObj->SetMergedItemSet(rOutAttrs);
}
+
+ pPage->NbcInsertObject(pObj);
+
+ // Generate invisible square to give all symbol types a
+ // bitmap size, which is indepedent from specific glyph
+ SdrObject *pInvisibleSquare=pSymbolList->GetObj(0);
+ pInvisibleSquare=pInvisibleSquare->Clone();
+ pPage->NbcInsertObject(pInvisibleSquare);
+ pInvisibleSquare->SetMergedItem(XFillTransparenceItem(100));
+ pInvisibleSquare->SetMergedItem(XLineTransparenceItem(100));
+
+ pView->MarkAll();
GDIMetaFile aMeta(pView->GetMarkedObjMetaFile());
aSymbolGraphic=Graphic(aMeta);
aSymbolSize=pObj->GetSnapRect().GetSize();
- aSymbolGraphic.SetPrefSize(aSymbolSize);
+ aSymbolGraphic.SetPrefSize(pInvisibleSquare->GetSnapRect().GetSize());
aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM);
bPrevSym=sal_True;
bEnable=sal_True;
bIgnoreGraphic=sal_True;
pView->UnmarkAll();
+ pInvisibleSquare=pPage->RemoveObject(1);
+ SdrObject::Free( pInvisibleSquare);
pObj=pPage->RemoveObject(0);
SdrObject::Free( pObj );
}
@@ -1078,12 +1090,12 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
bPrevSym=sal_True;
}
}
+
if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),sal_True,&pPoolItem) == SFX_ITEM_SET)
{
aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize();
}
-
aSymbolRatioCB.Enable(bEnable);
aSymbolHeightFT.Enable(bEnable);
aSymbolWidthFT.Enable(bEnable);
@@ -1742,6 +1754,15 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
PopupMenu* pPopup = new PopupMenu;
String aEmptyStr;
+
+ // Generate invisible square to give all symbols a
+ // bitmap size, which is indepedent from specific glyph
+ SdrObject *pInvisibleSquare=pSymbolList->GetObj(0);
+ pInvisibleSquare=pInvisibleSquare->Clone();
+ pPage->NbcInsertObject(pInvisibleSquare);
+ pInvisibleSquare->SetMergedItem(XFillTransparenceItem(100));
+ pInvisibleSquare->SetMergedItem(XLineTransparenceItem(100));
+
for(long i=0;; ++i)
{
SdrObject *pObj=pSymbolList->GetObj(i);
@@ -1753,7 +1774,6 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
aGrfNames.Insert(pStr,LIST_APPEND);
//Rectangle aRect(pObj->GetLogicRect());
pPage->NbcInsertObject(pObj);
- pView->MarkObj(pObj,pPageView);
if(pSymbolAttr)
{
pObj->SetMergedItemSet(*pSymbolAttr);
@@ -1762,11 +1782,11 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
{
pObj->SetMergedItemSet(rOutAttrs);
}
-
+ pView->MarkAll();
BitmapEx aBitmapEx(pView->GetMarkedObjBitmapEx());
GDIMetaFile aMeta(pView->GetMarkedObjMetaFile());
pView->UnmarkAll();
- pObj=pPage->RemoveObject(0);
+ pObj=pPage->RemoveObject(1);
SdrObject::Free(pObj);
SvxBrushItem* pBrushItem = new SvxBrushItem(Graphic(aMeta), GPOS_AREA, SID_ATTR_BRUSH);
@@ -1789,6 +1809,9 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
Image aImage(aBitmapEx);
pPopup->InsertItem(pInfo->nItemId,*pStr,aImage);
}
+ pInvisibleSquare=pPage->RemoveObject(0);
+ SdrObject::Free(pInvisibleSquare);
+
aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup );
if(!aGrfNames.Count())
aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False);