tpline.cxx (70d3707a) tpline.cxx (3a5971bb)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1017 unchanged lines hidden (view full) ---

1026 {
1027 if(pSymbolList->GetObjCount())
1028 {
1029 nSymTmp=nSymTmp%pSymbolList->GetObjCount(); //Liste wird als cyclisch betrachtet!!!
1030 pObj=pSymbolList->GetObj(nSymTmp);
1031 if(pObj)
1032 {
1033 pObj=pObj->Clone();
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1017 unchanged lines hidden (view full) ---

1026 {
1027 if(pSymbolList->GetObjCount())
1028 {
1029 nSymTmp=nSymTmp%pSymbolList->GetObjCount(); //Liste wird als cyclisch betrachtet!!!
1030 pObj=pSymbolList->GetObj(nSymTmp);
1031 if(pObj)
1032 {
1033 pObj=pObj->Clone();
1034 pPage->NbcInsertObject(pObj);
1035 pView->MarkObj(pObj,pPageView);
1036 if(pSymbolAttr)
1037 {
1038 pObj->SetMergedItemSet(*pSymbolAttr);
1039 }
1040 else
1041 {
1042 pObj->SetMergedItemSet(rOutAttrs);
1043 }
1034 if(pSymbolAttr)
1035 {
1036 pObj->SetMergedItemSet(*pSymbolAttr);
1037 }
1038 else
1039 {
1040 pObj->SetMergedItemSet(rOutAttrs);
1041 }
1042
1043 pPage->NbcInsertObject(pObj);
1044
1045 // Generate invisible square to give all symbol types a
1046 // bitmap size, which is indepedent from specific glyph
1047 SdrObject *pInvisibleSquare=pSymbolList->GetObj(0);
1048 pInvisibleSquare=pInvisibleSquare->Clone();
1049 pPage->NbcInsertObject(pInvisibleSquare);
1050 pInvisibleSquare->SetMergedItem(XFillTransparenceItem(100));
1051 pInvisibleSquare->SetMergedItem(XLineTransparenceItem(100));
1052
1053 pView->MarkAll();
1044 GDIMetaFile aMeta(pView->GetMarkedObjMetaFile());
1045
1046 aSymbolGraphic=Graphic(aMeta);
1047 aSymbolSize=pObj->GetSnapRect().GetSize();
1054 GDIMetaFile aMeta(pView->GetMarkedObjMetaFile());
1055
1056 aSymbolGraphic=Graphic(aMeta);
1057 aSymbolSize=pObj->GetSnapRect().GetSize();
1048 aSymbolGraphic.SetPrefSize(aSymbolSize);
1058 aSymbolGraphic.SetPrefSize(pInvisibleSquare->GetSnapRect().GetSize());
1049 aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM);
1050 bPrevSym=sal_True;
1051 bEnable=sal_True;
1052 bIgnoreGraphic=sal_True;
1053
1054 pView->UnmarkAll();
1059 aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM);
1060 bPrevSym=sal_True;
1061 bEnable=sal_True;
1062 bIgnoreGraphic=sal_True;
1063
1064 pView->UnmarkAll();
1065 pInvisibleSquare=pPage->RemoveObject(1);
1066 SdrObject::Free( pInvisibleSquare);
1055 pObj=pPage->RemoveObject(0);
1056 SdrObject::Free( pObj );
1057 }
1058 }
1059 }
1060 delete pView;
1061 delete pModel;
1062 }

--- 10 unchanged lines hidden (view full) ---

1073 {
1074 aSymbolSize=OutputDevice::LogicToLogic( pGraphic->GetPrefSize(),
1075 pGraphic->GetPrefMapMode(),
1076 MAP_100TH_MM );
1077 }
1078 bPrevSym=sal_True;
1079 }
1080 }
1067 pObj=pPage->RemoveObject(0);
1068 SdrObject::Free( pObj );
1069 }
1070 }
1071 }
1072 delete pView;
1073 delete pModel;
1074 }

--- 10 unchanged lines hidden (view full) ---

1085 {
1086 aSymbolSize=OutputDevice::LogicToLogic( pGraphic->GetPrefSize(),
1087 pGraphic->GetPrefMapMode(),
1088 MAP_100TH_MM );
1089 }
1090 bPrevSym=sal_True;
1091 }
1092 }
1093
1081 if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),sal_True,&pPoolItem) == SFX_ITEM_SET)
1082 {
1083 aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize();
1084 }
1085
1094 if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),sal_True,&pPoolItem) == SFX_ITEM_SET)
1095 {
1096 aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize();
1097 }
1098
1086
1087 aSymbolRatioCB.Enable(bEnable);
1088 aSymbolHeightFT.Enable(bEnable);
1089 aSymbolWidthFT.Enable(bEnable);
1090 aSymbolWidthMF.Enable(bEnable);
1091 aSymbolHeightMF.Enable(bEnable);
1092 if(bPrevSym)
1093 {
1094 SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit);

--- 642 unchanged lines hidden (view full) ---

1737 // 3D View
1738 SdrView* pView = new SdrView( pModel, &aVDev );
1739 pView->hideMarkHandles();
1740// SdrPageView* pPageView = pView->ShowSdrPage(pPage, Point());
1741 SdrPageView* pPageView = pView->ShowSdrPage(pPage);
1742
1743 PopupMenu* pPopup = new PopupMenu;
1744 String aEmptyStr;
1099 aSymbolRatioCB.Enable(bEnable);
1100 aSymbolHeightFT.Enable(bEnable);
1101 aSymbolWidthFT.Enable(bEnable);
1102 aSymbolWidthMF.Enable(bEnable);
1103 aSymbolHeightMF.Enable(bEnable);
1104 if(bPrevSym)
1105 {
1106 SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit);

--- 642 unchanged lines hidden (view full) ---

1749 // 3D View
1750 SdrView* pView = new SdrView( pModel, &aVDev );
1751 pView->hideMarkHandles();
1752// SdrPageView* pPageView = pView->ShowSdrPage(pPage, Point());
1753 SdrPageView* pPageView = pView->ShowSdrPage(pPage);
1754
1755 PopupMenu* pPopup = new PopupMenu;
1756 String aEmptyStr;
1757
1758 // Generate invisible square to give all symbols a
1759 // bitmap size, which is indepedent from specific glyph
1760 SdrObject *pInvisibleSquare=pSymbolList->GetObj(0);
1761 pInvisibleSquare=pInvisibleSquare->Clone();
1762 pPage->NbcInsertObject(pInvisibleSquare);
1763 pInvisibleSquare->SetMergedItem(XFillTransparenceItem(100));
1764 pInvisibleSquare->SetMergedItem(XLineTransparenceItem(100));
1765
1745 for(long i=0;; ++i)
1746 {
1747 SdrObject *pObj=pSymbolList->GetObj(i);
1748 if(pObj==NULL)
1749 break;
1750 pObj=pObj->Clone();
1751 //const String* pGrfName = (const String*)aGrfNames.GetObject(i);
1752 String *pStr=new String();//String(i));
1753 aGrfNames.Insert(pStr,LIST_APPEND);
1754 //Rectangle aRect(pObj->GetLogicRect());
1755 pPage->NbcInsertObject(pObj);
1766 for(long i=0;; ++i)
1767 {
1768 SdrObject *pObj=pSymbolList->GetObj(i);
1769 if(pObj==NULL)
1770 break;
1771 pObj=pObj->Clone();
1772 //const String* pGrfName = (const String*)aGrfNames.GetObject(i);
1773 String *pStr=new String();//String(i));
1774 aGrfNames.Insert(pStr,LIST_APPEND);
1775 //Rectangle aRect(pObj->GetLogicRect());
1776 pPage->NbcInsertObject(pObj);
1756 pView->MarkObj(pObj,pPageView);
1757 if(pSymbolAttr)
1758 {
1759 pObj->SetMergedItemSet(*pSymbolAttr);
1760 }
1761 else
1762 {
1763 pObj->SetMergedItemSet(rOutAttrs);
1764 }
1777 if(pSymbolAttr)
1778 {
1779 pObj->SetMergedItemSet(*pSymbolAttr);
1780 }
1781 else
1782 {
1783 pObj->SetMergedItemSet(rOutAttrs);
1784 }
1765
1785 pView->MarkAll();
1766 BitmapEx aBitmapEx(pView->GetMarkedObjBitmapEx());
1767 GDIMetaFile aMeta(pView->GetMarkedObjMetaFile());
1768 pView->UnmarkAll();
1786 BitmapEx aBitmapEx(pView->GetMarkedObjBitmapEx());
1787 GDIMetaFile aMeta(pView->GetMarkedObjMetaFile());
1788 pView->UnmarkAll();
1769 pObj=pPage->RemoveObject(0);
1789 pObj=pPage->RemoveObject(1);
1770 SdrObject::Free(pObj);
1771
1772 SvxBrushItem* pBrushItem = new SvxBrushItem(Graphic(aMeta), GPOS_AREA, SID_ATTR_BRUSH);
1773 pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl));
1774
1775 SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();
1776 pInfo->pBrushItem = pBrushItem;
1777 pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems);

--- 6 unchanged lines hidden (view full) ---

1784 double nScale = bWidth ?
1785 (double)MAX_BMP_WIDTH / (double)aSize.Width():
1786 (double)MAX_BMP_HEIGHT / (double)aSize.Height();
1787 aBitmapEx.Scale(nScale, nScale);
1788 }
1789 Image aImage(aBitmapEx);
1790 pPopup->InsertItem(pInfo->nItemId,*pStr,aImage);
1791 }
1790 SdrObject::Free(pObj);
1791
1792 SvxBrushItem* pBrushItem = new SvxBrushItem(Graphic(aMeta), GPOS_AREA, SID_ATTR_BRUSH);
1793 pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl));
1794
1795 SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();
1796 pInfo->pBrushItem = pBrushItem;
1797 pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems);

--- 6 unchanged lines hidden (view full) ---

1804 double nScale = bWidth ?
1805 (double)MAX_BMP_WIDTH / (double)aSize.Width():
1806 (double)MAX_BMP_HEIGHT / (double)aSize.Height();
1807 aBitmapEx.Scale(nScale, nScale);
1808 }
1809 Image aImage(aBitmapEx);
1810 pPopup->InsertItem(pInfo->nItemId,*pStr,aImage);
1811 }
1812 pInvisibleSquare=pPage->RemoveObject(0);
1813 SdrObject::Free(pInvisibleSquare);
1814
1792 aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup );
1793 if(!aGrfNames.Count())
1794 aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False);
1795
1796 delete pView;
1797 delete pModel;
1798 }
1799 return 0;

--- 247 unchanged lines hidden ---
1815 aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup );
1816 if(!aGrfNames.Count())
1817 aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False);
1818
1819 delete pView;
1820 delete pModel;
1821 }
1822 return 0;

--- 247 unchanged lines hidden ---