diff options
author | Jan Holesovsky <kendy@collabora.com> | 2016-05-16 17:17:17 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-05-16 17:17:17 +0200 |
commit | f9461c1ede15ee00688fec434cd4d0a9407f4771 (patch) | |
tree | 15e683db4cb9b72b4472944fed95ba1555444308 | |
parent | a1ea62d0515fcd992eaf4df0f6ee3d3c9e0cdfd6 (diff) |
cairo svp: Build fixes in the rest of the codebase.
Change-Id: I4b3ee0ff32d408365ba8aa5786029aeb492fff6f
-rw-r--r-- | chart2/source/view/main/OpenGLRender.cxx | 27 | ||||
-rw-r--r-- | chart2/source/view/main/OpenGLRender.hxx | 1 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 15 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 3 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 45 | ||||
-rw-r--r-- | include/vcl/abstdlg.hxx | 1 |
6 files changed, 11 insertions, 81 deletions
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 1b64ef1d193e..25eb4a495043 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -623,33 +623,6 @@ int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill) return 0; } -int OpenGLRender::CreateTextTexture(::rtl::OUString const &textValue, vcl::Font aFont, long , awt::Point aPos, awt::Size aSize, long rotation) -{ - ScopedVclPtrInstance< VirtualDevice > pDevice(*Application::GetDefaultDevice(), 0, 0); - pDevice->Erase(); - Rectangle aRect; - pDevice->SetFont(aFont); - pDevice->GetTextBoundRect(aRect, textValue); - int screenWidth = (aRect.BottomRight().X() + 3) & ~3; - int screenHeight = (aRect.BottomRight().Y() + 3) & ~3; - pDevice->SetOutputSizePixel(Size(screenWidth * 3, screenHeight)); - pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); - pDevice->DrawText(Point(0, 0), textValue); - int bmpWidth = (aRect.Right() - aRect.Left() + 3) & ~3; - int bmpHeight = (aRect.Bottom() - aRect.Top() + 3) & ~3; - BitmapEx aBitmap = BitmapEx(pDevice->GetBitmapEx(aRect.TopLeft(), Size(bmpWidth, bmpHeight))); - - sal_Int32 nXPos = aPos.X; - sal_Int32 nYPos = aPos.Y; - ::basegfx::B2DHomMatrix aM; - aM.rotate( -rotation*F_PI/180.0 );//#i78696#->#i80521# - aM.translate( nXPos, nYPos ); - drawing::HomogenMatrix3 aTrans = chart::B2DHomMatrixToHomogenMatrix3(aM); - aTrans.Line1.Column1 = 20 * bmpWidth; - aTrans.Line2.Column2 = 20 * bmpHeight; - return CreateTextTexture(aBitmap,aPos,aSize,rotation,aTrans); -} - int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, const awt::Point&, const awt::Size& aSize, long rotation, const drawing::HomogenMatrix3& rTrans) { diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx index c11653df4710..910c86298962 100644 --- a/chart2/source/view/main/OpenGLRender.hxx +++ b/chart2/source/view/main/OpenGLRender.hxx @@ -94,7 +94,6 @@ public: int CreateTextTexture(const BitmapEx& rBitmapEx, const css::awt::Point& aPos, const css::awt::Size& aSize, long rotation, const css::drawing::HomogenMatrix3& rTrans); - int CreateTextTexture(::rtl::OUString const &textValue, vcl::Font aFont, long fontColor, css::awt::Point aPos, css::awt::Size aSize, long rotation); int RenderTextShape(); int SetArea2DShapePoint(float x, float y, int listLength); diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 4ec04bef1cbd..e211afd6d3d5 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -449,11 +449,6 @@ void AbstractSearchProgress_Impl::Update() pDlg->Update(); } -void AbstractSearchProgress_Impl::Sync() -{ - pDlg->Sync(); -} - void AbstractSearchProgress_Impl::SetFileType( const OUString& rType ) { pDlg->SetFileType( rType ); @@ -473,11 +468,6 @@ void AbstractTakeProgress_Impl::Update() pDlg->Update(); } -void AbstractTakeProgress_Impl::Sync() -{ - pDlg->Sync(); -} - void AbstractTakeProgress_Impl::SetFile( const INetURLObject& rURL ) { pDlg->SetFile( rURL ); @@ -503,11 +493,6 @@ void VclAbstractRefreshableDialog_Impl::Update() pDlg->Update(); } -void VclAbstractRefreshableDialog_Impl::Sync() -{ - pDlg->Sync(); -} - OUString AbstractURLDlg_Impl::GetURL() const { return pDlg->GetURL(); diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index b194d199b431..df7faabe4180 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -97,7 +97,6 @@ class VclAbstractRefreshableDialog_Impl : public VclAbstractRefreshableDialog { DECL_ABSTDLG_BASE(VclAbstractRefreshableDialog_Impl,Dialog) virtual void Update() SAL_OVERRIDE ; - virtual void Sync() SAL_OVERRIDE ; }; class CuiAbstractSfxDialog_Impl : public SfxAbstractDialog @@ -213,7 +212,6 @@ class AbstractSearchProgress_Impl : public AbstractSearchProgress { DECL_ABSTDLG_BASE(AbstractSearchProgress_Impl,SearchProgress) virtual void Update() SAL_OVERRIDE ; - virtual void Sync() SAL_OVERRIDE ; virtual void SetFileType( const OUString& rType ) SAL_OVERRIDE ; virtual void SetDirectory( const INetURLObject& rURL ) SAL_OVERRIDE ; virtual PLinkStub GetLinkStubCleanUpHdl() SAL_OVERRIDE ; @@ -225,7 +223,6 @@ class AbstractTakeProgress_Impl : public AbstractTakeProgress { DECL_ABSTDLG_BASE(AbstractTakeProgress_Impl,TakeProgress) virtual void Update() SAL_OVERRIDE ; - virtual void Sync() SAL_OVERRIDE ; virtual void SetFile( const INetURLObject& rURL ) SAL_OVERRIDE ; virtual PLinkStub GetLinkStubCleanUpHdl() SAL_OVERRIDE ; diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 799003635427..d3b5879b2d9d 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -994,27 +994,13 @@ void doc_paintTile(LibreOfficeKitDocument* pThis, pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); -#elif defined(ANDROID) - InitSvpForLibreOfficeKit(); - - ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), DeviceFormat::FULLCOLOR) ; - - boost::shared_array<sal_uInt8> aBuffer(pBuffer, NoDelete< sal_uInt8 >()); - - pDevice->SetOutputSizePixelScaleOffsetAndBuffer( - Size(nCanvasWidth, nCanvasHeight), Fraction(1.0), Point(), - aBuffer); - - pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, - nTilePosX, nTilePosY, nTileWidth, nTileHeight); #else - InitSvpForLibreOfficeKit(); - ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), DeviceFormat::FULLCOLOR) ; +#if !defined(ANDROID) // Set background to transparent by default. - memset(pBuffer, 0, nCanvasWidth * nCanvasHeight * 4); pDevice->SetBackground(Wallpaper(Color(COL_TRANSPARENT))); +#endif pDevice->SetOutputSizePixelScaleOffsetAndBuffer( Size(nCanvasWidth, nCanvasHeight), Fraction(1.0), Point(), @@ -1023,19 +1009,7 @@ void doc_paintTile(LibreOfficeKitDocument* pThis, pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); - // Overwrite pBuffer's alpha channel with the separate alpha buffer. - for (int nRow = 0; nRow < nCanvasHeight; ++nRow) - { - for (int nCol = 0; nCol < nCanvasWidth; ++nCol) - { - const int nOffset = (nCanvasWidth * nRow) + nCol; - // VCL's transparent is 0, RGBA's transparent is 0xff. - pBuffer[nOffset * 4 +3] = 0xff - aAlpha[nOffset]; - } - } -#endif - - static bool bDebug = getenv("LOK_DEBUG") != 0; + static bool bDebug = getenv("LOK_DEBUG") != nullptr; if (bDebug) { // Draw a small red rectangle in the top left corner so that it's easy to see where a new tile begins. @@ -1047,6 +1021,7 @@ void doc_paintTile(LibreOfficeKitDocument* pThis, pDevice->DrawRect(aRect); pDevice->Pop(); } +#endif #else (void) pBuffer; @@ -1719,12 +1694,14 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, if (!aSearchedFontName.equals(aFontName.toUtf8().getStr())) continue; - VirtualDevice aDevice(nullptr, Size(1, 1), 0); + auto aDevice( + VclPtr<VirtualDevice>::Create( + nullptr, Size(1, 1), DeviceFormat::FULLCOLOR)); ::Rectangle aRect; vcl::Font aFont(rInfo); aFont.SetSize(Size(0, 25)); - aDevice.SetFont(aFont); - aDevice.GetTextBoundRect(aRect, aFontName); + aDevice->SetFont(aFont); + aDevice->GetTextBoundRect(aRect, aFontName); int nFontWidth = aRect.BottomRight().X() + 1; *pFontWidth = nFontWidth; int nFontHeight = aRect.BottomRight().Y() + 1; @@ -1733,8 +1710,8 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, unsigned char* pBuffer = static_cast<unsigned char*>(malloc(4 * nFontWidth * nFontHeight)); memset(pBuffer, 0, nFontWidth * nFontHeight * 4); - aDevice.SetBackground(Wallpaper(COL_TRANSPARENT)); - aDevice.SetOutputSizePixelScaleOffsetAndBuffer( + aDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); + aDevice->SetOutputSizePixelScaleOffsetAndBuffer( Size(nFontWidth, nFontHeight), Fraction(1.0), Point(), pBuffer); aDevice->DrawText(Point(0,0), aFontName); diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx index 8ac20a190434..3b2dd2dae85c 100644 --- a/include/vcl/abstdlg.hxx +++ b/include/vcl/abstdlg.hxx @@ -53,7 +53,6 @@ class VCL_DLLPUBLIC VclAbstractRefreshableDialog : public VclAbstractDialog { public: virtual void Update() = 0; - virtual void Sync() = 0; }; class VCL_DLLPUBLIC AbstractPasswordToOpenModifyDialog : public VclAbstractDialog |