diff options
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_Icon.cpp')
-rw-r--r-- | fpdfsdk/src/pdfwindow/PWL_Icon.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp index db5355c59e..6afd76c5c6 100644 --- a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp @@ -4,14 +4,10 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "fpdfsdk/include/pdfwindow/PDFWindow.h" #include "fpdfsdk/include/pdfwindow/PWL_Icon.h" #include "fpdfsdk/include/pdfwindow/PWL_Utils.h" #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" -/* ------------------------------- CPWL_Image ---------------------------------- - */ - CPWL_Image::CPWL_Image() : m_pPDFStream(NULL) {} CPWL_Image::~CPWL_Image() {} @@ -83,15 +79,15 @@ CFX_Matrix CPWL_Image::GetImageMatrix() { } CFX_ByteString CPWL_Image::GetImageAlias() { - if (m_sImageAlias.IsEmpty()) { - if (m_pPDFStream) { - if (CPDF_Dictionary* pDict = m_pPDFStream->GetDict()) { - return pDict->GetString("Name"); - } - } - } else + if (!m_sImageAlias.IsEmpty()) return m_sImageAlias; + if (m_pPDFStream) { + if (CPDF_Dictionary* pDict = m_pPDFStream->GetDict()) { + return pDict->GetString("Name"); + } + } + return CFX_ByteString(); } @@ -109,9 +105,6 @@ void CPWL_Image::GetImageOffset(FX_FLOAT& x, FX_FLOAT& y) { y = 0.0f; } -/* ------------------------------- CPWL_Icon ---------------------------------- - */ - CPWL_Icon::CPWL_Icon() : m_pIconFit(NULL) {} CPWL_Icon::~CPWL_Icon() {} @@ -132,7 +125,6 @@ FX_BOOL CPWL_Icon::IsProportionalScale() { void CPWL_Icon::GetIconPosition(FX_FLOAT& fLeft, FX_FLOAT& fBottom) { if (m_pIconFit) { - // m_pIconFit->GetIconPosition(fLeft,fBottom); fLeft = 0.0f; fBottom = 0.0f; CPDF_Array* pA = |