Bugzilla – Attachment 50702 Details for
Bug 34431
[PATCH]More symbols (crosses, circles) needed for data points in charts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add new standard symbols for data points
0001-Add-missing-chart-data-point-ODF1.2-standard-symbols.patch (text/plain), 28.99 KB, created by
Regina Henschel
on 2011-08-30 13:46:39 UTC
(
hide
)
Description:
Add new standard symbols for data points
Filename:
MIME Type:
Creator:
Regina Henschel
Created:
2011-08-30 13:46:39 UTC
Size:
28.99 KB
patch
obsolete
>From fae09a2b61756ea76e57d14010f1426f0881b116 Mon Sep 17 00:00:00 2001 >From: Regina Henschel <rb.henschel@t-online.de> >Date: Tue, 30 Aug 2011 16:27:21 +0200 >Subject: [PATCH 1/2] Add missing chart data point ODF1.2 standard symbols > >--- > .../chartapiwrapper/WrappedSymbolProperties.cxx | 2 +- > chart2/source/view/main/ShapeFactory.cxx | 323 ++++++++++++++++++++ > cui/source/tabpages/tpline.cxx | 37 ++- > oox/source/drawingml/chart/typegroupconverter.cxx | 12 +- > sc/source/filter/excel/xlchart.cxx | 18 +- > xmloff/inc/xmloff/xmltoken.hxx | 6 + > xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx | 7 + > xmloff/source/core/xmltoken.cxx | 6 + > xmloff/source/transform/StyleOASISTContext.cxx | 14 + > xmloff/source/transform/StyleOOoTContext.cxx | 21 ++ > 10 files changed, 427 insertions(+), 19 deletions(-) > >diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx >index 5707a0a..97d3156 100644 >--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx >+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx >@@ -151,7 +151,7 @@ sal_Int32 lcl_getSymbolType( const ::com::sun::star::chart2::Symbol& rSymbol ) > nSymbol = ::com::sun::star::chart::ChartSymbolType::AUTO; > break; > case chart2::SymbolStyle_STANDARD: >- nSymbol = rSymbol.StandardSymbol%8; >+ nSymbol = rSymbol.StandardSymbol%15; > break; > case chart2::SymbolStyle_POLYGON://new feature > nSymbol = ::com::sun::star::chart::ChartSymbolType::AUTO; >diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx >index e152c47..dc06eba 100644 >--- a/chart2/source/view/main/ShapeFactory.cxx >+++ b/chart2/source/view/main/ShapeFactory.cxx >@@ -1263,6 +1263,13 @@ enum SymbolType { SYMBOL_SQUARE=0 > , SYMBOL_ARROW_LEFT > , SYMBOL_BOWTIE > , SYMBOL_SANDGLASS >+ , SYMBOL_CIRCLE >+ , SYMBOL_STAR >+ , SYMBOL_X >+ , SYMBOL_PLUS >+ , SYMBOL_ASTERISK >+ , SYMBOL_HORIZONTAL_BAR >+ , SYMBOL_VERTICAL_BAR > , SYMBOL_COUNT > }; > >@@ -1286,6 +1293,9 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& > const double fWidthH = rSize.DirectionX/2.0; //fWidthH stands for Half Width > const double fHeightH = rSize.DirectionY/2.0; //fHeightH stands for Half Height > >+ double fMaxSize = fHeightH > fWidthH ? fHeightH : fWidthH; //assumes non negative >+ const sal_Int32 nQuarterCount = 35; // points inside a quadrant, used in case circle >+ > sal_Int32 nPointCount = 4; //all arrow symbols only need 4 points > switch( eSymbolType ) > { >@@ -1293,8 +1303,25 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& > case SYMBOL_DIAMOND: > case SYMBOL_BOWTIE: > case SYMBOL_SANDGLASS: >+ case SYMBOL_HORIZONTAL_BAR: >+ case SYMBOL_VERTICAL_BAR: > nPointCount = 5; > break; >+ case SYMBOL_X: >+ nPointCount = 13; >+ break; >+ case SYMBOL_PLUS: >+ nPointCount = 13; >+ break; >+ case SYMBOL_STAR: >+ nPointCount = 9; >+ break; >+ case SYMBOL_ASTERISK: >+ nPointCount = 19; >+ break; >+ case SYMBOL_CIRCLE: >+ nPointCount = 5 + 4 * nQuarterCount; >+ break; > default: > break; > } >@@ -1323,6 +1350,24 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& > > switch(eSymbolType) > { >+ case SYMBOL_SQUARE: >+ { >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY-fHeightH; >+ >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY+fHeightH; >+ >+ *pInnerSequenceX++ = fX+fWidthH; >+ *pInnerSequenceY++ = fY+fHeightH; >+ >+ *pInnerSequenceX++ = fX+fWidthH; >+ *pInnerSequenceY++ = fY-fHeightH; >+ >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY-fHeightH; >+ break; >+ } > case SYMBOL_ARROW_UP: > { > *pInnerSequenceX++ = fX-fWidthH; >@@ -1438,6 +1483,284 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& > *pInnerSequenceY++ = fY; > break; > } >+ case SYMBOL_HORIZONTAL_BAR: >+ { >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY-0.2*fHeightH; >+ >+ *pInnerSequenceX++ = fX+fWidthH; >+ *pInnerSequenceY++ = fY-0.2*fHeightH; >+ >+ >+ *pInnerSequenceX++ = fX+fWidthH; >+ *pInnerSequenceY++ = fY+0.2*fHeightH; >+ >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY+0.2*fHeightH; >+ >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY-0.2*fHeightH; >+ break; >+ } >+ case SYMBOL_VERTICAL_BAR: >+ { >+ *pInnerSequenceX++ = fX-0.2*fWidthH; >+ *pInnerSequenceY++ = fY-fHeightH; >+ >+ *pInnerSequenceX++ = fX+0.2*fWidthH; >+ *pInnerSequenceY++ = fY-fHeightH; >+ >+ >+ *pInnerSequenceX++ = fX+0.2*fWidthH; >+ *pInnerSequenceY++ = fY+fHeightH; >+ >+ *pInnerSequenceX++ = fX-0.2*fWidthH; >+ *pInnerSequenceY++ = fY+fHeightH; >+ >+ *pInnerSequenceX++ = fX-0.2*fWidthH; >+ *pInnerSequenceY++ = fY-fHeightH; >+ >+ break; >+ } >+ case SYMBOL_CIRCLE: >+ { >+ double fOmega = 1.5707963267948966192 / (nQuarterCount + 1.0); >+ // one point in the middle of each edge to get full size bounding rectangle >+ *pInnerSequenceX++ = fX + fWidthH; >+ *pInnerSequenceY++ = fY; >+ // 0 to PI/2 >+ for (sal_Int32 i = 1; i <= nQuarterCount; ++i) >+ { >+ *pInnerSequenceX++ = fX + fWidthH * cos( i * fOmega ); >+ *pInnerSequenceY++ = fY - fHeightH * sin( i * fOmega ); >+ } >+ // PI/2 to PI >+ *pInnerSequenceX++ = fX; >+ *pInnerSequenceY++ = fY - fHeightH; >+ for (sal_Int32 i = 1; i <= nQuarterCount; ++i) >+ { >+ *pInnerSequenceX++ = fX - fWidthH * sin( i * fOmega); >+ *pInnerSequenceY++ = fY - fHeightH * cos( i * fOmega); >+ } >+ // PI to 3/2*PI >+ *pInnerSequenceX++ = fX - fWidthH; >+ *pInnerSequenceY++ = fY; >+ for (sal_Int32 i = 1; i <= nQuarterCount; ++i) >+ { >+ *pInnerSequenceX++ = fX - fWidthH * cos( i * fOmega); >+ *pInnerSequenceY++ = fY + fHeightH * sin( i * fOmega); >+ } >+ // 3/2*PI to 2*PI >+ *pInnerSequenceX++ = fX; >+ *pInnerSequenceY++ = fY + fHeightH; >+ for (sal_Int32 i = 1; i <= nQuarterCount; ++i) >+ { >+ *pInnerSequenceX++ = fX + fWidthH * sin(i * fOmega); >+ *pInnerSequenceY++ = fY + fHeightH * cos(i * fOmega); >+ } >+ // close polygon >+ *pInnerSequenceX++ = fX + fWidthH; >+ *pInnerSequenceY++ = fY; >+ break; >+ } >+ case SYMBOL_STAR: >+ { >+ *pInnerSequenceX++ = fX; >+ *pInnerSequenceY++ = fY-fHeightH; >+ >+ *pInnerSequenceX++ = fX+0.2*fWidthH; >+ *pInnerSequenceY++ = fY-0.2*fHeightH; >+ >+ *pInnerSequenceX++ = fX+fWidthH; >+ *pInnerSequenceY++ = fY; >+ >+ *pInnerSequenceX++ = fX+0.2*fWidthH; >+ *pInnerSequenceY++ = fY+0.2*fHeightH; >+ >+ *pInnerSequenceX++ = fX; >+ *pInnerSequenceY++ = fY+fHeightH; >+ >+ *pInnerSequenceX++ = fX-0.2*fWidthH; >+ *pInnerSequenceY++ = fY+0.2*fHeightH; >+ >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY; >+ >+ *pInnerSequenceX++ = fX-0.2*fWidthH; >+ *pInnerSequenceY++ = fY-0.2*fHeightH; >+ >+ *pInnerSequenceX++ = fX; >+ *pInnerSequenceY++ = fY-fHeightH; >+ break; >+ } >+ case SYMBOL_X: >+ { >+ const double fScaleX = fWidthH / 128.0; >+ const double fScaleY = fHeightH / 128.0; >+ const double fSmall = sqrt(200.0); >+ const double fLarge = 128.0 - fSmall; >+ >+ *pInnerSequenceX++ = fX; >+ *pInnerSequenceY++ = fY - fScaleY * fSmall; >+ >+ *pInnerSequenceX++ = fX - fScaleX * fLarge; >+ *pInnerSequenceY++ = fY - fHeightH; >+ >+ *pInnerSequenceX++ = fX - fWidthH; >+ *pInnerSequenceY++ = fY - fScaleY * fLarge; >+ >+ *pInnerSequenceX++ = fX - fScaleX * fSmall; >+ *pInnerSequenceY++ = fY; >+ >+ *pInnerSequenceX++ = fX - fWidthH; >+ *pInnerSequenceY++ = fY + fScaleY * fLarge; >+ >+ *pInnerSequenceX++ = fX - fScaleX * fLarge; >+ *pInnerSequenceY++ = fY + fHeightH; >+ >+ *pInnerSequenceX++ = fX; >+ *pInnerSequenceY++ = fY + fScaleY * fSmall; >+ >+ *pInnerSequenceX++ = fX + fScaleX * fLarge; >+ *pInnerSequenceY++ = fY + fHeightH; >+ >+ *pInnerSequenceX++ = fX + fWidthH; >+ *pInnerSequenceY++ = fY + fScaleY * fLarge; >+ >+ *pInnerSequenceX++ = fX + fScaleX * fSmall; >+ *pInnerSequenceY++ = fY; >+ >+ *pInnerSequenceX++ = fX + fWidthH; >+ *pInnerSequenceY++ = fY - fScaleY * fLarge; >+ >+ *pInnerSequenceX++ = fX + fScaleX * fLarge; >+ *pInnerSequenceY++ = fY - fHeightH; >+ >+ *pInnerSequenceX++ = fX; >+ *pInnerSequenceY++ = fY - fScaleY * fSmall; >+ break; >+ >+ } >+ case SYMBOL_PLUS: >+ { >+ const double fScaleX = fWidthH / 128.0; >+ const double fScaleY = fHeightH / 128.0; >+ const double fHalf = 10.0; //half line width on 256 size square >+ const double fdX = fScaleX * fHalf; >+ const double fdY = fScaleY * fHalf; >+ >+ *pInnerSequenceX++ = fX-fdX; >+ *pInnerSequenceY++ = fY-fHeightH; >+ >+ *pInnerSequenceX++ = fX-fdX; >+ *pInnerSequenceY++ = fY-fdY; >+ >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY-fdY; >+ >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY+fdY; >+ >+ *pInnerSequenceX++ = fX-fdX; >+ *pInnerSequenceY++ = fY+fdY; >+ >+ *pInnerSequenceX++ = fX-fdX; >+ *pInnerSequenceY++ = fY+fHeightH; >+ >+ *pInnerSequenceX++ = fX+fdX; >+ *pInnerSequenceY++ = fY+fHeightH; >+ >+ *pInnerSequenceX++ = fX+fdX; >+ *pInnerSequenceY++ = fY+fdY; >+ >+ *pInnerSequenceX++ = fX+fWidthH; >+ *pInnerSequenceY++ = fY+fdY; >+ >+ *pInnerSequenceX++ = fX+fWidthH; >+ *pInnerSequenceY++ = fY-fdY; >+ >+ *pInnerSequenceX++ = fX+fdX; >+ *pInnerSequenceY++ = fY-fdY; >+ >+ *pInnerSequenceX++ = fX+fdY; >+ *pInnerSequenceY++ = fY-fHeightH; >+ >+ *pInnerSequenceX++ = fX-fdX; >+ *pInnerSequenceY++ = fY-fHeightH; >+ break; >+ >+ } >+ case SYMBOL_ASTERISK: >+ { >+ const double fHalf = 10.0; // half line width on 256 size square >+ const double fTwoY = fHalf * sqrt(3.0); >+ const double fFourY = (128.0 - 2.0 * fHalf ) / sqrt(3.0); >+ const double fThreeX = 128.0 - fHalf; >+ const double fThreeY = fHalf * sqrt(3.0) + fFourY; >+ const double fFiveX = 2.0 * fHalf; >+ >+ const double fScaleX = fWidthH / 128.0; >+ const double fScaleY = fHeightH / 128.0; >+ >+ //1 >+ *pInnerSequenceX++ = fX-fScaleX * fHalf; >+ *pInnerSequenceY++ = fY-fHeightH; >+ //2 >+ *pInnerSequenceX++ = fX-fScaleX * fHalf; >+ *pInnerSequenceY++ = fY-fScaleY * fTwoY; >+ //3 >+ *pInnerSequenceX++ = fX-fScaleX * fThreeX; >+ *pInnerSequenceY++ = fY-fScaleY * fThreeY; >+ //4 >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY-fScaleY * fFourY; >+ //5 >+ *pInnerSequenceX++ = fX-fScaleX * fFiveX; >+ *pInnerSequenceY++ = fY; >+ //6 as 4 >+ *pInnerSequenceX++ = fX-fWidthH; >+ *pInnerSequenceY++ = fY+fScaleY * fFourY; >+ //7 as 3 >+ *pInnerSequenceX++ = fX-fScaleX * fThreeX; >+ *pInnerSequenceY++ = fY+fScaleY * fThreeY; >+ //8 as 2 >+ *pInnerSequenceX++ = fX-fScaleX * fHalf; >+ *pInnerSequenceY++ = fY+fScaleY * fTwoY; >+ //9 as 1 >+ *pInnerSequenceX++ = fX-fScaleX * fHalf; >+ *pInnerSequenceY++ = fY+fHeightH; >+ //10 as 1 >+ *pInnerSequenceX++ = fX+fScaleX * fHalf; >+ *pInnerSequenceY++ = fY+fHeightH; >+ //11 as 2 >+ *pInnerSequenceX++ = fX+fScaleX * fHalf; >+ *pInnerSequenceY++ = fY+fScaleY * fTwoY; >+ //12 as 3 >+ *pInnerSequenceX++ = fX+fScaleX * fThreeX; >+ *pInnerSequenceY++ = fY+fScaleY * fThreeY; >+ //13 as 4 >+ *pInnerSequenceX++ = fX+fWidthH; >+ *pInnerSequenceY++ = fY+fScaleY * fFourY; >+ //14 as 5 >+ *pInnerSequenceX++ = fX+fScaleX * fFiveX; >+ *pInnerSequenceY++ = fY; >+ //15 as 4 >+ *pInnerSequenceX++ = fX+fWidthH; >+ *pInnerSequenceY++ = fY-fScaleY * fFourY; >+ //16 as 3 >+ *pInnerSequenceX++ = fX+fScaleX * fThreeX; >+ *pInnerSequenceY++ = fY-fScaleY * fThreeY; >+ //17 as 2 >+ *pInnerSequenceX++ = fX+fScaleX * fHalf; >+ *pInnerSequenceY++ = fY-fScaleY * fTwoY; >+ // 18 as 1 >+ *pInnerSequenceX++ = fX+fScaleX * fHalf; >+ *pInnerSequenceY++ = fY-fHeightH; >+ // 19 = 1, closing >+ *pInnerSequenceX++ = fX-fScaleX * fHalf; >+ *pInnerSequenceY++ = fY-fHeightH; >+ break; >+ } > default: //case SYMBOL_SQUARE: > { > *pInnerSequenceX++ = fX-fWidthH; >diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx >index 2b44a9e..b6825b9 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()) >diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx >index 5dba350..3924694 100644 >--- a/oox/source/drawingml/chart/typegroupconverter.cxx >+++ b/oox/source/drawingml/chart/typegroupconverter.cxx >@@ -451,19 +451,19 @@ void TypeGroupConverter::convertMarker( PropertySet& rPropSet, sal_Int32 nOoxSym > // symbol style > cssc::Symbol aSymbol; > aSymbol.Style = cssc::SymbolStyle_STANDARD; >- switch( nOoxSymbol ) >+ switch( nOoxSymbol ) // compare with XclChPropSetHelper::WriteMarkerProperties in xlchart.cxx > { > case XML_auto: aSymbol.Style = cssc::SymbolStyle_AUTO; break; > case XML_none: aSymbol.Style = cssc::SymbolStyle_NONE; break; > case XML_square: aSymbol.StandardSymbol = 0; break; // square > case XML_diamond: aSymbol.StandardSymbol = 1; break; // diamond > case XML_triangle: aSymbol.StandardSymbol = 3; break; // arrow up >- case XML_x: aSymbol.StandardSymbol = 6; break; // bow tie >- case XML_star: aSymbol.StandardSymbol = 7; break; // sand glass >+ case XML_x: aSymbol.StandardSymbol = 10; break; // X, legacy bow tie >+ case XML_star: aSymbol.StandardSymbol = 12; break; // asterisk, legacy sand glass > case XML_dot: aSymbol.StandardSymbol = 4; break; // arrow right >- case XML_dash: aSymbol.StandardSymbol = 2; break; // arrow down >- case XML_circle: aSymbol.StandardSymbol = 4; break; // arrow right >- case XML_plus: aSymbol.StandardSymbol = 5; break; // arrow left >+ case XML_dash: aSymbol.StandardSymbol = 13; break; // horizontal bar, legacy arrow down >+ case XML_circle: aSymbol.StandardSymbol = 8; break; // circle, legacy arrow right >+ case XML_plus: aSymbol.StandardSymbol = 11; break; // plus, legacy arrow left > } > > // symbol size (points in OOXML, 1/100 mm in Chart2) >diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx >index 6a71736..092709c 100644 >--- a/sc/source/filter/excel/xlchart.cxx >+++ b/sc/source/filter/excel/xlchart.cxx >@@ -948,6 +948,13 @@ void XclChPropSetHelper::ReadMarkerProperties( > case 5: rMarkerFmt.mnMarkerType = EXC_CHMARKERFORMAT_PLUS; break; // arrow left > case 6: rMarkerFmt.mnMarkerType = EXC_CHMARKERFORMAT_CROSS; break; // bow tie > case 7: rMarkerFmt.mnMarkerType = EXC_CHMARKERFORMAT_STAR; break; // sand glass >+ case 8: rMarkerFmt.mnMarkerType = EXC_CHMARKERFORMAT_CIRCLE; break; // circle new in LibO3.5 >+ case 9: rMarkerFmt.mnMarkerType = EXC_CHMARKERFORMAT_SQUARE; break; // star new in LibO3.5 >+ case 10: rMarkerFmt.mnMarkerType = EXC_CHMARKERFORMAT_CROSS; break; // X new in LibO3.5 >+ case 11: rMarkerFmt.mnMarkerType = EXC_CHMARKERFORMAT_PLUS; break; // plus new in LibO3.5 >+ case 12: rMarkerFmt.mnMarkerType = EXC_CHMARKERFORMAT_STAR; break; // asterisk new in LibO3.5 >+ case 13: rMarkerFmt.mnMarkerType = EXC_CHMARKERFORMAT_STDDEV; break; // horizontal bar new in LibO3.5 >+ case 14: rMarkerFmt.mnMarkerType = EXC_CHMARKERFORMAT_DOWJ; break; // vertical bar new in LibO3.5 > default: rMarkerFmt.mnMarkerType = XclChartHelper::GetAutoMarkerType( nFormatIdx ); > } > break; >@@ -1153,12 +1160,13 @@ void XclChPropSetHelper::WriteMarkerProperties( > case EXC_CHMARKERFORMAT_SQUARE: aApiSymbol.StandardSymbol = 0; break; // square > case EXC_CHMARKERFORMAT_DIAMOND: aApiSymbol.StandardSymbol = 1; break; // diamond > case EXC_CHMARKERFORMAT_TRIANGLE: aApiSymbol.StandardSymbol = 3; break; // arrow up >- case EXC_CHMARKERFORMAT_CROSS: aApiSymbol.StandardSymbol = 6; break; // bow tie >- case EXC_CHMARKERFORMAT_STAR: aApiSymbol.StandardSymbol = 7; break; // sand glass >+ case EXC_CHMARKERFORMAT_CROSS: aApiSymbol.StandardSymbol = 10; break; // X, legacy bow tie >+ case EXC_CHMARKERFORMAT_STAR: aApiSymbol.StandardSymbol = 12; break; // asterisk, legacy sand glass > case EXC_CHMARKERFORMAT_DOWJ: aApiSymbol.StandardSymbol = 4; break; // arrow right >- case EXC_CHMARKERFORMAT_STDDEV: aApiSymbol.StandardSymbol = 2; break; // arrow down >- case EXC_CHMARKERFORMAT_CIRCLE: aApiSymbol.StandardSymbol = 4; break; // arrow right >- case EXC_CHMARKERFORMAT_PLUS: aApiSymbol.StandardSymbol = 5; break; // arrow left >+ case EXC_CHMARKERFORMAT_STDDEV: aApiSymbol.StandardSymbol = 13; break; // horizontal bar, legacy arrow down >+ case EXC_CHMARKERFORMAT_CIRCLE: aApiSymbol.StandardSymbol = 8; break; // circle, legacy arrow right >+ case EXC_CHMARKERFORMAT_PLUS: aApiSymbol.StandardSymbol = 11; break; // plus, legacy arrow left >+ default: break; > } > > // symbol size >diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx >index a923f46..746e75d 100644 >--- a/xmloff/inc/xmloff/xmltoken.hxx >+++ b/xmloff/inc/xmloff/xmltoken.hxx >@@ -3139,6 +3139,12 @@ namespace xmloff { namespace token { > > XML_MARGIN, // #i117001# > >+ // regina, ODF1.2 additional symbols in charts >+ XML_STAR, >+ XML_ASTERISK, >+ XML_HORIZONTAL_BAR, >+ XML_VERTICAL_BAR, >+ > XML_TOKEN_END > }; > >diff --git a/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx b/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx >index 4eba27e..c284c57 100644 >--- a/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx >+++ b/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx >@@ -63,6 +63,13 @@ SvXMLSignedEnumMapEntry aXMLChartSymbolNameMap[] = > { XML_ARROW_LEFT, 5 }, > { XML_BOW_TIE, 6 }, > { XML_HOURGLASS, 7 }, >+ { XML_CIRCLE, 8 }, >+ { XML_STAR, 9 }, >+ { XML_X, 10 }, >+ { XML_PLUS, 11 }, >+ { XML_ASTERISK, 12 }, >+ { XML_HORIZONTAL_BAR, 13 }, >+ { XML_VERTICAL_BAR, 14 }, > { XML_TOKEN_INVALID, 0 } > }; > >diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx >index b07e77a..45bcc35 100644 >--- a/xmloff/source/core/xmltoken.cxx >+++ b/xmloff/source/core/xmltoken.cxx >@@ -3137,6 +3137,12 @@ namespace xmloff { namespace token { > > TOKEN( "margin", XML_MARGIN), > >+ // regina, ODF1.2 additional symbols in charts >+ TOKEN( "star", XML_STAR ), >+ TOKEN( "asterisk", XML_ASTERISK ), >+ TOKEN( "horizontal-bar", XML_HORIZONTAL_BAR ), >+ TOKEN( "vertical-bar", XML_VERTICAL_BAR ), >+ > #if OSL_DEBUG_LEVEL > 0 > { 0, NULL, NULL, XML_TOKEN_END } > #else >diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx >index 2ef42bf..b6e361f 100644 >--- a/xmloff/source/transform/StyleOASISTContext.cxx >+++ b/xmloff/source/transform/StyleOASISTContext.cxx >@@ -389,6 +389,20 @@ void XMLPropertiesTContext_Impl::StartElement( > nSymbolType = 6; > else if( IsXMLToken( rAttrValue, XML_HOURGLASS )) > nSymbolType = 7; >+ else if( IsXMLToken( rAttrValue, XML_CIRCLE )) >+ nSymbolType = 8; >+ else if( IsXMLToken( rAttrValue, XML_STAR )) >+ nSymbolType = 9; >+ else if( IsXMLToken( rAttrValue, XML_X )) >+ nSymbolType = 10; >+ else if( IsXMLToken( rAttrValue, XML_PLUS )) >+ nSymbolType = 11; >+ else if( IsXMLToken( rAttrValue, XML_ASTERISK )) >+ nSymbolType = 12; >+ else if( IsXMLToken( rAttrValue, XML_HORIZONTAL_BAR )) >+ nSymbolType = 13; >+ else if( IsXMLToken( rAttrValue, XML_VERTICAL_BAR )) >+ nSymbolType = 14; > > if( nSymbolType >= 0 ) > pAttrList->AddAttribute( >diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx >index f74ebde..88cff6b 100644 >--- a/xmloff/source/transform/StyleOOoTContext.cxx >+++ b/xmloff/source/transform/StyleOOoTContext.cxx >@@ -772,6 +772,27 @@ void XMLPropertiesOOoTContext_Impl::StartElement( > case 7: > eToken = XML_HOURGLASS; > break; >+ case 8: >+ eToken = XML_CIRCLE; >+ break; >+ case 9: >+ eToken = XML_STAR; >+ break; >+ case 10: >+ eToken = XML_X; >+ break; >+ case 11: >+ eToken = XML_PLUS; >+ break; >+ case 12: >+ eToken = XML_ASTERISK; >+ break; >+ case 13: >+ eToken = XML_HORIZONTAL_BAR; >+ break; >+ case 14: >+ eToken = XML_VERTICAL_BAR; >+ break; > default: > OSL_FAIL( "invalid named symbol" ); > break; >-- >1.7.5.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 34431
:
43586
|
43597
|
50702
|
50704
|
50999