diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2011-09-09 15:02:34 +0200 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-09-20 12:14:13 -0400 |
commit | 3e5edf6ca9d3bc56549602bda2adc855dd57f658 (patch) | |
tree | 51e8993e730ff7f17721c4b8c126fc92ab92bb34 /cui/source | |
parent | 53abf4dc1c065fba3ec9e691cacd55aceaf19fc7 (diff) |
Add missing chart data point ODF1.2 standard symbols
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 2b44a9ebd136..b6825b92225b 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -910,8 +910,6 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) if(pObj) { pObj=pObj->Clone(); - pPage->NbcInsertObject(pObj); - pView->MarkObj(pObj,pPageView); if(pSymbolAttr) { pObj->SetMergedItemSet(*pSymbolAttr); @@ -920,17 +918,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->GetAllMarkedMetaFile()); 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 ); } @@ -957,12 +969,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); @@ -1537,6 +1549,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); @@ -1545,7 +1566,6 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) pObj=pObj->Clone(); aGrfNames.push_back(aEmptyStr); pPage->NbcInsertObject(pObj); - pView->MarkObj(pObj,pPageView); if(pSymbolAttr) { pObj->SetMergedItemSet(*pSymbolAttr); @@ -1554,11 +1574,11 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) { pObj->SetMergedItemSet(rOutAttrs); } - + pView->MarkAll(); Bitmap aBitmap(pView->GetAllMarkedBitmap()); GDIMetaFile aMeta(pView->GetAllMarkedMetaFile()); pView->UnmarkAll(); - pObj=pPage->RemoveObject(0); + pObj=pPage->RemoveObject(1); SdrObject::Free(pObj); SvxBrushItem* pBrushItem = new SvxBrushItem(Graphic(aMeta), GPOS_AREA, SID_ATTR_BRUSH); @@ -1585,6 +1605,9 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) Image aImage(aBitmap); pPopup->InsertItem(pInfo->nItemId,aEmptyStr,aImage); } + pInvisibleSquare=pPage->RemoveObject(0); + SdrObject::Free(pInvisibleSquare); + aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup ); if(aGrfNames.empty()) |