summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2012-02-24 15:11:11 +0000
committerArmin Le Grand <alg@apache.org>2012-02-24 15:11:11 +0000
commit0ee60e0bdee5db5cab13b986645a90b84ac764a2 (patch)
treee6d4489b142c59af56f2d455fc0eac49740c4b15 /cui/source
parent321638350b7c2f41d3aea8c26f47d0e5a83e6b3d (diff)
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert metafiles to bitmapEx, dynamically expanding needed bitmap size right and bottom dependent of having a hairline there. To check this, I adapted GDIMetaFile::GetBoundRect to be able to deliver the HairlineBoudRect inn parallell to the regular geometry one
Notes
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/tabpages/tpline.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 2a4d59374815..a95d7430997c 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1042,7 +1042,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
{
pObj->SetMergedItemSet(rOutAttrs);
}
- GDIMetaFile aMeta(pView->GetAllMarkedMetaFile());
+ GDIMetaFile aMeta(pView->GetMarkedObjMetaFile());
aSymbolGraphic=Graphic(aMeta);
aSymbolSize=pObj->GetSnapRect().GetSize();
@@ -1764,8 +1764,8 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
pObj->SetMergedItemSet(rOutAttrs);
}
- Bitmap aBitmap(pView->GetAllMarkedBitmap());
- GDIMetaFile aMeta(pView->GetAllMarkedMetaFile());
+ BitmapEx aBitmapEx(pView->GetMarkedObjBitmapEx());
+ GDIMetaFile aMeta(pView->GetMarkedObjMetaFile());
pView->UnmarkAll();
pObj=pPage->RemoveObject(0);
SdrObject::Free(pObj);
@@ -1778,16 +1778,16 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems);
aGrfBrushItems.Insert(pInfo, nNumMenuGalleryItems + i);
- Size aSize(aBitmap.GetSizePixel());
+ Size aSize(aBitmapEx.GetSizePixel());
if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT)
{
sal_Bool bWidth = aSize.Width() > aSize.Height();
double nScale = bWidth ?
(double)MAX_BMP_WIDTH / (double)aSize.Width():
(double)MAX_BMP_HEIGHT / (double)aSize.Height();
- aBitmap.Scale(nScale, nScale);
+ aBitmapEx.Scale(nScale, nScale);
}
- Image aImage(aBitmap);
+ Image aImage(aBitmapEx);
pPopup->InsertItem(pInfo->nItemId,*pStr,aImage);
}
aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup );