sd/source/ui/dlg/PhotoAlbumDialog.cxx | 79 ++++++++++-------------- winaccessibility/source/UAccCOM/MAccessible.cxx | 20 ------ 2 files changed, 37 insertions(+), 62 deletions(-)
New commits: commit f490e072cbbd057c804a5ff7de5409f3df1d1b33 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Mon Mar 12 17:37:30 2018 +0900 winaccessibility: GraphicURL is not set anymore Change-Id: I87dd8abcf52dac0c92936fe71b905ed6dd1beefd Reviewed-on: https://gerrit.libreoffice.org/51108 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 8a017f19516f..a560cedfcef0 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2844,30 +2844,12 @@ OUString CMAccessible::get_String4Numbering(const Any& pAny, sal_Int16 numbering { css::beans::PropertyValue rProp = pPropArray[i]; if( (rProp.Name == "BulletChar" ) || - (rProp.Name == "GraphicURL" ) || (rProp.Name == "NumberingType" )) { buf.append(rProp.Name); buf.append('='); auto const pTemp = CMAccessible::get_StringFromAny(rProp.Value); - if(rProp.Name == "GraphicURL") - { - auto const pOccur = pTemp.indexOf(':'); - if(pOccur != -1) - { - buf.append(pTemp.copy(0, pOccur)); - buf.append('.'); - buf.append(pTemp.copy(pOccur + 1)); - } - else - { - buf.append(pTemp); - } - } - else - { - buf.append(pTemp); - } + buf.append(pTemp); buf.append(','); if(rProp.Name == "NumberingType") commit eba31bffb1b8a9d0f782de56cead8c6e4f65a3a4 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Mon Mar 12 17:34:55 2018 +0900 sd: remove useage of GraphicURL in PhotoAlbumDialog Change-Id: I1ed5d2ad75d4424e93fa6d9761d99ab6e1bee06a Reviewed-on: https://gerrit.libreoffice.org/51107 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index f2369d1334db..b3ab9cbaa344 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -142,22 +142,21 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) Reference< drawing::XDrawPage > xSlide = appendNewSlide(aAutoLayout, xDrawPages); Reference< beans::XPropertySet > xSlideProps( xSlide, uno::UNO_QUERY ); - Reference< graphic::XGraphic > xGraphic = createXGraphicFromUrl(sUrl, xProvider); - Graphic aImg(xGraphic); + Graphic aGraphic(xGraphic); + if (bInsertAsLink) + aGraphic.setOriginURL(sUrl); + // Save the original size, multiplied with 100 - ::awt::Size aPicSize(aImg.GetSizePixel().Width()*100, aImg.GetSizePixel().Height()*100); + ::awt::Size aPicSize(aGraphic.GetSizePixel().Width()*100, aGraphic.GetSizePixel().Height()*100); Reference< drawing::XShape > xShape( xShapeFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - if (bInsertAsLink) - xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl)); - else - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Size aPageSize; @@ -221,19 +220,18 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) { Reference< graphic::XGraphic > xGraphic = createXGraphicFromUrl(sUrl1, xProvider); - Graphic aImg(xGraphic); + Graphic aGraphic(xGraphic); + if (bInsertAsLink) + aGraphic.setOriginURL(sUrl1); // Save the original size, multiplied with 100 - ::awt::Size aPicSize(aImg.GetSizePixel().Width()*100, aImg.GetSizePixel().Height()*100); + ::awt::Size aPicSize(aGraphic.GetSizePixel().Width()*100, aGraphic.GetSizePixel().Height()*100); Reference< drawing::XShape > xShape( xShapeFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - if (bInsertAsLink) - xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl1)); - else - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; @@ -259,19 +257,18 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) { Reference< graphic::XGraphic > xGraphic = createXGraphicFromUrl(sUrl2, xProvider); - Graphic aImg(xGraphic); + Graphic aGraphic(xGraphic); + if (bInsertAsLink) + aGraphic.setOriginURL(sUrl2); // Save the original size, multiplied with 100 - ::awt::Size aPicSize(aImg.GetSizePixel().Width()*100, aImg.GetSizePixel().Height()*100); + ::awt::Size aPicSize(aGraphic.GetSizePixel().Width()*100, aGraphic.GetSizePixel().Height()*100); Reference< drawing::XShape > xShape( xShapeFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - if (bInsertAsLink) - xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl2)); - else - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; @@ -342,19 +339,18 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) { Reference< graphic::XGraphic > xGraphic = createXGraphicFromUrl(sUrl1, xProvider); - Graphic aImg(xGraphic); + Graphic aGraphic(xGraphic); + if (bInsertAsLink) + aGraphic.setOriginURL(sUrl1); // Save the original size, multiplied with 100 - ::awt::Size aPicSize(aImg.GetSizePixel().Width()*100, aImg.GetSizePixel().Height()*100); + ::awt::Size aPicSize(aGraphic.GetSizePixel().Width()*100, aGraphic.GetSizePixel().Height()*100); Reference< drawing::XShape > xShape( xShapeFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - if (bInsertAsLink) - xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl1)); - else - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; @@ -379,19 +375,18 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) { Reference< graphic::XGraphic > xGraphic = createXGraphicFromUrl(sUrl2, xProvider); - Graphic aImg(xGraphic); + Graphic aGraphic(xGraphic); + if (bInsertAsLink) + aGraphic.setOriginURL(sUrl2); // Save the original size, multiplied with 100 - ::awt::Size aPicSize(aImg.GetSizePixel().Width()*100, aImg.GetSizePixel().Height()*100); + ::awt::Size aPicSize(aGraphic.GetSizePixel().Width()*100, aGraphic.GetSizePixel().Height()*100); Reference< drawing::XShape > xShape( xShapeFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - if (bInsertAsLink) - xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl2)); - else - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; @@ -416,19 +411,18 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) { Reference< graphic::XGraphic > xGraphic = createXGraphicFromUrl(sUrl3, xProvider); - Graphic aImg(xGraphic); + Graphic aGraphic(xGraphic); + if (bInsertAsLink) + aGraphic.setOriginURL(sUrl3); // Save the original size, multiplied with 100 - ::awt::Size aPicSize(aImg.GetSizePixel().Width()*100, aImg.GetSizePixel().Height()*100); + ::awt::Size aPicSize(aGraphic.GetSizePixel().Width()*100, aGraphic.GetSizePixel().Height()*100); Reference< drawing::XShape > xShape( xShapeFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - if (bInsertAsLink) - xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl3)); - else - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; @@ -453,19 +447,18 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) { Reference< graphic::XGraphic > xGraphic = createXGraphicFromUrl(sUrl4, xProvider); - Graphic aImg(xGraphic); + Graphic aGraphic(xGraphic); + if (bInsertAsLink) + aGraphic.setOriginURL(sUrl4); // Save the original size, multiplied with 100 - ::awt::Size aPicSize(aImg.GetSizePixel().Width()*100, aImg.GetSizePixel().Height()*100); + ::awt::Size aPicSize(aGraphic.GetSizePixel().Width()*100, aGraphic.GetSizePixel().Height()*100); Reference< drawing::XShape > xShape( xShapeFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - if (bInsertAsLink) - xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl4)); - else - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits