summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-04-09 22:17:49 -0400
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-06-04 12:36:28 -0400
commit8af72f0ffd527897f89ae3f5645375c64302faac (patch)
treeca63318b0dc8143f387a6d5a949114792f05307c
parentc7b6966a4006af40042383ae3241f3bc8f9c5af5 (diff)
svx: more informative logging
Change-Id: Ia9f2fa1fbb24ad3466bd082b778244f451c90745 (cherry picked from commit bd2092d664550e24965773289cd9de00e05225ff)
-rw-r--r--svx/source/svdraw/svdpdf.cxx25
-rw-r--r--svx/source/svdraw/svdpdf.hxx4
2 files changed, 14 insertions, 15 deletions
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 111fc6461094..03f6b4528eec 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -231,29 +231,29 @@ void ImpSdrPdfImport::DoLoopActions(SvdProgressInfo* pProgrInfo, sal_uInt32* pAc
if (pPageObject == nullptr)
continue;
- SAL_WARN("sd.filter", "Got page object number: " << nPageObjectIndex);
+ SAL_WARN("sd.filter", "Got page object number: ");
- // Process everything but text, which is done separately below.
const int nPageObjectType = FPDFPageObj_GetType(pPageObject);
switch (nPageObjectType)
{
case FPDF_PAGEOBJ_TEXT:
- ImportText(pPageObject);
+ ImportText(pPageObject, nPageObjectIndex);
break;
case FPDF_PAGEOBJ_PATH:
- SAL_WARN("sd.filter", "Got page object PATH");
+ SAL_WARN("sd.filter", "Got page object PATH: " << nPageObjectIndex);
break;
case FPDF_PAGEOBJ_IMAGE:
- ImportImage(pPageObject);
+ ImportImage(pPageObject, nPageObjectIndex);
break;
case FPDF_PAGEOBJ_SHADING:
- SAL_WARN("sd.filter", "Got page object SHADING");
+ SAL_WARN("sd.filter", "Got page object SHADING: " << nPageObjectIndex);
break;
case FPDF_PAGEOBJ_FORM:
- SAL_WARN("sd.filter", "Got page object FORM");
+ SAL_WARN("sd.filter", "Got page object FORM: " << nPageObjectIndex);
break;
default:
- SAL_WARN("sd.filter", "Unknown PDF page object type: " << nPageObjectType);
+ SAL_WARN("sd.filter", "Unknown PDF page object type: "
+ << nPageObjectType << ": " << nPageObjectIndex);
break;
}
}
@@ -1017,10 +1017,9 @@ void ImpSdrPdfImport::checkClip()
}
bool ImpSdrPdfImport::isClip() const { return !maClip.getB2DRange().isEmpty(); }
-
-void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject)
+void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, int nPageObjectIndex)
{
- SAL_WARN("sd.filter", "Got page object TEXT");
+ SAL_WARN("sd.filter", "Got page object TEXT: " << nPageObjectIndex);
float left;
float bottom;
float right;
@@ -1160,9 +1159,9 @@ void ImpSdrPdfImport::MapScaling()
mnMapScalingOfs = nCount;
}
-void ImpSdrPdfImport::ImportImage(FPDF_PAGEOBJECT pPageObject)
+void ImpSdrPdfImport::ImportImage(FPDF_PAGEOBJECT pPageObject, int nPageObjectIndex)
{
- SAL_WARN("sd.filter", "Got page object IMAGE");
+ SAL_WARN("sd.filter", "Got page object IMAGE: " << nPageObjectIndex);
std::unique_ptr<void, FPDFBitmapDeleter> bitmap(FPDFImageObj_GetBitmapBgra(pPageObject));
if (!bitmap)
{
diff --git a/svx/source/svdraw/svdpdf.hxx b/svx/source/svdraw/svdpdf.hxx
index bc6025a2384e..92e1e1d6e740 100644
--- a/svx/source/svdraw/svdpdf.hxx
+++ b/svx/source/svdraw/svdpdf.hxx
@@ -99,10 +99,10 @@ class ImpSdrPdfImport final
void checkClip();
bool isClip() const;
- void ImportImage(FPDF_PAGEOBJECT pPageObject);
+ void ImportImage(FPDF_PAGEOBJECT pPageObject, int nPageObjectIndex);
void SetupPageScale(const double dPageWidth, const double dPageHeight);
- void ImportText(FPDF_PAGEOBJECT pPageObject);
+ void ImportText(FPDF_PAGEOBJECT pPageObject, int nPageObjectIndex);
void ImportText(const Point& rPos, const OUString& rStr);
void SetAttributes(SdrObject* pObj, bool bForceTextAttr = false);
void InsertObj(SdrObject* pObj, bool bScale = true);