tpline.cxx (5aaf853b) | tpline.cxx (bb18ee55) |
---|---|
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 --- 1028 unchanged lines hidden (view full) --- 1037 if(pSymbolAttr) 1038 { 1039 pObj->SetMergedItemSet(*pSymbolAttr); 1040 } 1041 else 1042 { 1043 pObj->SetMergedItemSet(rOutAttrs); 1044 } | 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 --- 1028 unchanged lines hidden (view full) --- 1037 if(pSymbolAttr) 1038 { 1039 pObj->SetMergedItemSet(*pSymbolAttr); 1040 } 1041 else 1042 { 1043 pObj->SetMergedItemSet(rOutAttrs); 1044 } |
1045 GDIMetaFile aMeta(pView->GetAllMarkedMetaFile()); | 1045 GDIMetaFile aMeta(pView->GetMarkedObjMetaFile()); |
1046 1047 aSymbolGraphic=Graphic(aMeta); 1048 aSymbolSize=pObj->GetSnapRect().GetSize(); 1049 aSymbolGraphic.SetPrefSize(aSymbolSize); 1050 aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM); 1051 bPrevSym=sal_True; 1052 bEnable=sal_True; 1053 bIgnoreGraphic=sal_True; --- 705 unchanged lines hidden (view full) --- 1759 { 1760 pObj->SetMergedItemSet(*pSymbolAttr); 1761 } 1762 else 1763 { 1764 pObj->SetMergedItemSet(rOutAttrs); 1765 } 1766 | 1046 1047 aSymbolGraphic=Graphic(aMeta); 1048 aSymbolSize=pObj->GetSnapRect().GetSize(); 1049 aSymbolGraphic.SetPrefSize(aSymbolSize); 1050 aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM); 1051 bPrevSym=sal_True; 1052 bEnable=sal_True; 1053 bIgnoreGraphic=sal_True; --- 705 unchanged lines hidden (view full) --- 1759 { 1760 pObj->SetMergedItemSet(*pSymbolAttr); 1761 } 1762 else 1763 { 1764 pObj->SetMergedItemSet(rOutAttrs); 1765 } 1766 |
1767 Bitmap aBitmap(pView->GetAllMarkedBitmap()); 1768 GDIMetaFile aMeta(pView->GetAllMarkedMetaFile()); | 1767 BitmapEx aBitmapEx(pView->GetMarkedObjBitmapEx()); 1768 GDIMetaFile aMeta(pView->GetMarkedObjMetaFile()); |
1769 pView->UnmarkAll(); 1770 pObj=pPage->RemoveObject(0); 1771 SdrObject::Free(pObj); 1772 1773 SvxBrushItem* pBrushItem = new SvxBrushItem(Graphic(aMeta), GPOS_AREA, SID_ATTR_BRUSH); 1774 pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl)); 1775 1776 SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); 1777 pInfo->pBrushItem = pBrushItem; 1778 pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems); 1779 aGrfBrushItems.Insert(pInfo, nNumMenuGalleryItems + i); 1780 | 1769 pView->UnmarkAll(); 1770 pObj=pPage->RemoveObject(0); 1771 SdrObject::Free(pObj); 1772 1773 SvxBrushItem* pBrushItem = new SvxBrushItem(Graphic(aMeta), GPOS_AREA, SID_ATTR_BRUSH); 1774 pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl)); 1775 1776 SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); 1777 pInfo->pBrushItem = pBrushItem; 1778 pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems); 1779 aGrfBrushItems.Insert(pInfo, nNumMenuGalleryItems + i); 1780 |
1781 Size aSize(aBitmap.GetSizePixel()); | 1781 Size aSize(aBitmapEx.GetSizePixel()); |
1782 if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) 1783 { 1784 sal_Bool bWidth = aSize.Width() > aSize.Height(); 1785 double nScale = bWidth ? 1786 (double)MAX_BMP_WIDTH / (double)aSize.Width(): 1787 (double)MAX_BMP_HEIGHT / (double)aSize.Height(); | 1782 if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) 1783 { 1784 sal_Bool bWidth = aSize.Width() > aSize.Height(); 1785 double nScale = bWidth ? 1786 (double)MAX_BMP_WIDTH / (double)aSize.Width(): 1787 (double)MAX_BMP_HEIGHT / (double)aSize.Height(); |
1788 aBitmap.Scale(nScale, nScale); | 1788 aBitmapEx.Scale(nScale, nScale); |
1789 } | 1789 } |
1790 Image aImage(aBitmap); | 1790 Image aImage(aBitmapEx); |
1791 pPopup->InsertItem(pInfo->nItemId,*pStr,aImage); 1792 } 1793 aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup ); 1794 if(!aGrfNames.Count()) 1795 aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False); 1796 1797 delete pView; 1798 delete pModel; --- 249 unchanged lines hidden --- | 1791 pPopup->InsertItem(pInfo->nItemId,*pStr,aImage); 1792 } 1793 aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup ); 1794 if(!aGrfNames.Count()) 1795 aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False); 1796 1797 delete pView; 1798 delete pModel; --- 249 unchanged lines hidden --- |