[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2022-09-06 Thread Khaled Hosny (via logerrit)
 vcl/Library_vcl.mk  |1 
 vcl/inc/pdf/pdffontcache.hxx|   71 
 vcl/inc/pdf/pdfwriter_impl.hxx  |3 -
 vcl/source/gdi/pdffontcache.cxx |   66 -
 4 files changed, 1 insertion(+), 140 deletions(-)

New commits:
commit 789b517819495a9efff5538de7e8e5106fc64f81
Author: Khaled Hosny 
AuthorDate: Mon Sep 5 21:33:25 2022 +0200
Commit: خالد حسني 
CommitDate: Tue Sep 6 15:07:04 2022 +0200

vcl: Drop now unused PDFFontCache

Change-Id: I7959103f43d993e39bff03e7c71289c37a5cfa3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139458
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 5416cbb361c5..b4135d502b2e 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -286,7 +286,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/gdi/oldprintadaptor \
 vcl/source/gdi/pdfbuildin_fonts \
 vcl/source/gdi/pdfextoutdevdata \
-vcl/source/gdi/pdffontcache \
 vcl/source/gdi/pdfwriter \
 vcl/source/gdi/pdfwriter_impl2 \
 vcl/source/gdi/pdfwriter_impl \
diff --git a/vcl/inc/pdf/pdffontcache.hxx b/vcl/inc/pdf/pdffontcache.hxx
deleted file mode 100644
index a6b58d8e7b00..
--- a/vcl/inc/pdf/pdffontcache.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#pragma once
-
-#include 
-
-#include 
-
-#include 
-
-#include 
-
-namespace vcl
-{
-class PDFFontCache
-{
-struct FontIdentifier
-{
-sal_IntPtr  m_nFontId;
-boolm_bVertical;
-std::type_info* m_typeFontFace;
-
-FontIdentifier( const vcl::font::PhysicalFontFace*, bool bVertical 
);
-
-// Less than needed for std::set and std::map
-bool operator<( const FontIdentifier& rRight ) const
-{
-std::type_info *pType = rRight.m_typeFontFace;
-
-return m_nFontId < rRight.m_nFontId ||
-   ( m_nFontId == rRight.m_nFontId &&
-   ( m_typeFontFace->before( *pType ) ||
-   ( *m_typeFontFace == *pType && m_bVertical < 
rRight.m_bVertical ) ) );
-}
-};
-struct FontData
-{
-std::vector< sal_Int32 >  m_nWidths;
-Ucs2UIntMap  m_aGlyphIdToIndex;
-};
-typedef std::map< FontIdentifier, sal_uInt32 > FontToIndexMap;
-
-std::vector< FontData > m_aFonts;
-FontToIndexMap  m_aFontToIndex;
-
-FontData& getFont( const vcl::font::PhysicalFontFace*, bool bVertical 
);
-public:
-PDFFontCache() {}
-
-sal_Int32 getGlyphWidth( const vcl::font::PhysicalFontFace*, 
sal_GlyphId, bool bVertical, SalGraphics* );
-};
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx
index 048b03cf2351..af77b58da544 100644
--- a/vcl/inc/pdf/pdfwriter_impl.hxx
+++ b/vcl/inc/pdf/pdfwriter_impl.hxx
@@ -57,7 +57,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 class StyleSettings;
 class FontSubsetInfo;
@@ -741,7 +741,6 @@ private:
 std::map m_aSubsets;
 std::map m_aSystemFonts;
 sal_Int32   m_nNextFID;
-PDFFontCachem_aFontCache;
 
 /// Cache some most recent bitmaps we've exported, in case we encounter 
them again..
 o3tl::lru_maphttp://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at 

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2021-08-26 Thread Tomaž Vajngerl (via logerrit)
 vcl/Library_vcl.mk |1 +
 vcl/inc/pdf/PdfConfig.hxx  |   18 ++
 vcl/source/filter/ipdf/pdfread.cxx |   19 ++-
 vcl/source/gdi/pdfwriter_impl.cxx  |   10 +++---
 vcl/source/pdf/PdfConfig.cxx   |   33 +
 5 files changed, 61 insertions(+), 20 deletions(-)

New commits:
commit 47df2d88d3dee617d76d05e4fcf6063e57a3b199
Author: Tomaž Vajngerl 
AuthorDate: Thu Aug 26 16:47:31 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Aug 27 07:06:58 2021 +0200

Take the PDF graphic rendering DPI into account when exporting

Change-Id: I1d3465fc7357e6991161d5a96bcd70c53c55f244
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121087
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 0f714a0ec9b3..bda2d5c6b872 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -299,6 +299,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/gdi/scrptrun \
 vcl/source/gdi/CommonSalLayout \
 vcl/source/gdi/TypeSerializer \
+vcl/source/pdf/PdfConfig \
 vcl/source/pdf/ResourceDict \
 vcl/source/pdf/Matrix3 \
 vcl/source/pdf/XmpMetadata \
diff --git a/vcl/inc/pdf/PdfConfig.hxx b/vcl/inc/pdf/PdfConfig.hxx
new file mode 100644
index ..235fd008ea2b
--- /dev/null
+++ b/vcl/inc/pdf/PdfConfig.hxx
@@ -0,0 +1,18 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+namespace vcl::pdf
+{
+double getDefaultPdfResolutionDpi();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index e1206e985eaa..9b44a6476878 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -11,6 +11,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -116,26 +117,10 @@ BinaryDataContainer createBinaryDataContainer(SvStream& 
rStream)
 
 namespace vcl
 {
-/// Get the default PDF rendering resolution in DPI.
-static double getDefaultPdfResolutionDpi()
-{
-// If an overriding default is set, use it.
-const char* envar = ::getenv("PDFIMPORT_RESOLUTION_DPI");
-if (envar)
-{
-const double dpi = atof(envar);
-if (dpi > 0)
-return dpi;
-}
-
-// Fallback to a sensible default.
-return 96.;
-}
-
 size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector& 
rBitmaps,
 const size_t nFirstPage, int nPages, const 
basegfx::B2DTuple* pSizeHint)
 {
-static const double fResolutionDPI = getDefaultPdfResolutionDpi();
+static const double fResolutionDPI = 
vcl::pdf::getDefaultPdfResolutionDpi();
 auto pPdfium = vcl::pdf::PDFiumLibrary::get();
 if (!pPdfium)
 {
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index ed44cdfde1ce..41fc6b88d4ef 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -77,6 +77,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "pdfwriter_impl.hxx"
@@ -8407,11 +8408,14 @@ void PDFWriterImpl::writeReferenceXObject(const 
ReferenceXObjectEmit& rEmit)
 return;
 
 // Count /Matrix and /BBox.
-// vcl::ImportPDF() works with 96 DPI so use the same values here, too.
+// vcl::ImportPDF() uses getDefaultPdfResolutionDpi to set the desired
+// rendering DPI so we have to take into account that here too.
+static const double fResolutionDPI = 
vcl::pdf::getDefaultPdfResolutionDpi();
+
 sal_Int32 nOldDPIX = GetDPIX();
-SetDPIX(96);
 sal_Int32 nOldDPIY = GetDPIY();
-SetDPIY(96);
+SetDPIX(fResolutionDPI);
+SetDPIY(fResolutionDPI);
 Size aSize = PixelToLogic(rEmit.m_aPixelSize, 
MapMode(m_aMapMode.GetMapUnit()));
 SetDPIX(nOldDPIX);
 SetDPIY(nOldDPIY);
diff --git a/vcl/source/pdf/PdfConfig.cxx b/vcl/source/pdf/PdfConfig.cxx
new file mode 100644
index ..e74d30cfe22a
--- /dev/null
+++ b/vcl/source/pdf/PdfConfig.cxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+#include 
+
+namespace vcl::pdf
+{
+/// Get the default PDF rendering resolution in DPI.
+double getDefaultPdfResolutionDpi()
+{
+// If an overriding default is set, use it.
+const char* envar = 

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2021-01-21 Thread Tomaž Vajngerl (via logerrit)
 vcl/Library_vcl.mk |1 +
 vcl/inc/graphic/VectorGraphicLoader.hxx|   24 
 vcl/source/gdi/impgraph.cxx|   29 ++---
 vcl/source/graphic/VectorGraphicLoader.cxx |   26 ++
 4 files changed, 73 insertions(+), 7 deletions(-)

New commits:
commit 9ae99dd8bcb682ca86e51ea89744f3a1c1de1d03
Author: Tomaž Vajngerl 
AuthorDate: Fri Jan 1 23:44:57 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Jan 22 07:48:28 2021 +0100

vcl: create PDF from DataContainer, use that when swapping in

VectorGraphicLoader is a set of functions that "load" a vector
graphic (starting with PDF) from a BinaryDataContainer. Usually
this only needs to create VectorGraphicData and set the correct
type, as loading will be done on-demand.

Use the VectorGraphicLoader function when swapping-in so this is
an alternative to calling LoadNative on GfxLink, which loads
into a new Graphic via. GraphicFilter, which is something we
really want to avoid.

Change-Id: If529c8ddca2b31660da4ea28d8e75bb20bf3c778
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109598
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index e58e6b8b3d17..a27af8f6d031 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -337,6 +337,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/graphic/UnoGraphicProvider \
 vcl/source/graphic/UnoGraphicTransformer \
 vcl/source/graphic/VectorGraphicSearch \
+vcl/source/graphic/VectorGraphicLoader \
 vcl/source/bitmap/impvect \
 vcl/source/bitmap/bitmap \
 vcl/source/bitmap/BitmapEx \
diff --git a/vcl/inc/graphic/VectorGraphicLoader.hxx 
b/vcl/inc/graphic/VectorGraphicLoader.hxx
new file mode 100644
index ..b6f38120885c
--- /dev/null
+++ b/vcl/inc/graphic/VectorGraphicLoader.hxx
@@ -0,0 +1,24 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+
+namespace vcl
+{
+std::shared_ptr
+loadPdfFromDataContainer(BinaryDataContainer const& rDataContainer);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 794d5ca68a22..6fe065896d3f 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define GRAPHIC_MTFTOBMP_MAXEXT 2048
 #define GRAPHIC_STREAMBUFSIZE   8192UL
@@ -1422,16 +1423,30 @@ bool ImpGraphic::swapIn()
 }
 else if (mpGfxLink && mpGfxLink->IsNative())
 {
-Graphic aGraphic;
-if (!mpGfxLink->LoadNative(aGraphic))
-return false;
+if (mpGfxLink->GetType() == GfxLinkType::NativePdf)
+{
+maVectorGraphicData = 
vcl::loadPdfFromDataContainer(mpGfxLink->getDataContainer());
 
-ImpGraphic* pImpGraphic = aGraphic.ImplGetImpGraphic();
+// Set to 0, to force recalculation
+mnSizeBytes = 0;
+mnChecksum = 0;
 
-if (meType != pImpGraphic->meType)
-return false;
+restoreFromSwapInfo();
 
-updateFromLoadedGraphic(pImpGraphic);
+mbSwapOut = false;
+}
+else
+{
+Graphic aGraphic;
+if (!mpGfxLink->LoadNative(aGraphic))
+return false;
+
+ImpGraphic* pImpGraphic = aGraphic.ImplGetImpGraphic();
+if (meType != pImpGraphic->meType)
+return false;
+
+updateFromLoadedGraphic(pImpGraphic);
+}
 
 maLastUsed = std::chrono::high_resolution_clock::now();
 bReturn = true;
diff --git a/vcl/source/graphic/VectorGraphicLoader.cxx 
b/vcl/source/graphic/VectorGraphicLoader.cxx
new file mode 100644
index ..988c3db803be
--- /dev/null
+++ b/vcl/source/graphic/VectorGraphicLoader.cxx
@@ -0,0 +1,26 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+#include 
+
+namespace vcl
+{
+std::shared_ptr
+loadPdfFromDataContainer(BinaryDataContainer const& rDataContainer)
+{
+if (rDataContainer.isEmpty())
+return std::shared_ptr();
+
+return std::make_shared(rDataContainer, 
VectorGraphicDataType::Pdf);
+}
+}
+
+/* 

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2020-06-18 Thread Miklos Vajna (via logerrit)
 vcl/Library_vcl.mk |1 
 vcl/inc/pdf/objectcontainer.hxx|   36 
 vcl/inc/pdf/objectcopier.hxx   |   48 ++
 vcl/source/gdi/pdfobjectcopier.cxx |  273 +
 vcl/source/gdi/pdfwriter_impl.cxx  |  233 ---
 vcl/source/gdi/pdfwriter_impl.hxx  |   22 --
 6 files changed, 368 insertions(+), 245 deletions(-)

New commits:
commit 8277073ce3e33788d93b3df490a8f03d1814863b
Author: Miklos Vajna 
AuthorDate: Thu Jun 18 12:12:52 2020 +0200
Commit: Miklos Vajna 
CommitDate: Thu Jun 18 14:36:29 2020 +0200

sd signature line: extract copyExternalResources() from the pdf export code

Because I would like to reuse this in the "sign existing pdf" code, in
vcl::filter::PDFDocument::WriteAppearanceObject().

Change-Id: Ia5e5c1e452bb0d0486bde2a082375b5131eea8c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96595
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 430cc4d9c0b5..b294042fb90b 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -297,6 +297,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/gdi/pdfwriter \
 vcl/source/gdi/pdfwriter_impl2 \
 vcl/source/gdi/pdfwriter_impl \
+vcl/source/gdi/pdfobjectcopier \
 vcl/source/gdi/print2 \
 vcl/source/gdi/print3 \
 vcl/source/gdi/print \
diff --git a/vcl/inc/pdf/objectcontainer.hxx b/vcl/inc/pdf/objectcontainer.hxx
new file mode 100644
index ..ca4898737e10
--- /dev/null
+++ b/vcl/inc/pdf/objectcontainer.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+namespace vcl
+{
+/// Allows creating, updating and writing PDF objects in a container.
+class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI PDFObjectContainer
+{
+public:
+/* adds an entry to m_aObjects and returns its index+1,
+ * sets the offset to ~0
+ */
+virtual sal_Int32 createObject() = 0;
+/* sets the offset of object n to the current position of output file+1
+ */
+virtual bool updateObject(sal_Int32 n) = 0;
+
+// Write pBuffer to the end of the output.
+virtual bool writeBuffer(const void* pBuffer, sal_uInt64 nBytes) = 0;
+
+protected:
+~PDFObjectContainer() noexcept = default;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/pdf/objectcopier.hxx b/vcl/inc/pdf/objectcopier.hxx
new file mode 100644
index ..b99fbb4886b3
--- /dev/null
+++ b/vcl/inc/pdf/objectcopier.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+#include 
+#include 
+#include 
+
+class SvMemoryStream;
+
+namespace vcl
+{
+class PDFObjectContainer;
+namespace filter
+{
+class PDFObjectElement;
+}
+
+/// Copies objects from one PDF file into an other one.
+class VCL_DLLPUBLIC PDFObjectCopier
+{
+PDFObjectContainer& m_rContainer;
+
+public:
+PDFObjectCopier(PDFObjectContainer& rContainer);
+
+/// Copies resources of a given kind from an external page to the output,
+/// returning what has to be included in the new resource dictionary.
+OString copyExternalResources(filter::PDFObjectElement& rPage, const 
OString& rKind,
+  std::map& 
rCopiedResources);
+
+/// Copies a single resource from an external document, returns the new
+/// object ID in our document.
+sal_Int32 copyExternalResource(SvMemoryStream& rDocBuffer, 
filter::PDFObjectElement& rObject,
+   std::map& 
rCopiedResources);
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/pdfobjectcopier.cxx 
b/vcl/source/gdi/pdfobjectcopier.cxx
new file mode 100644
index ..4ba93b3a746d
--- /dev/null
+++ b/vcl/source/gdi/pdfobjectcopier.cxx
@@ -0,0 +1,273 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+namespace vcl
+{

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2020-04-20 Thread Julien Nabet (via logerrit)
 vcl/Library_vcl.mk|2 +-
 vcl/inc/font/OpenTypeFeatureDefinitionList.hxx|8 
 vcl/source/font/FeatureCollector.cxx  |6 +++---
 vcl/source/font/OpenTypeFeatureDefinitionList.cxx |   14 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit d7a2c6eb94f2c1b8ae5c71457a032faf2d3ae643
Author: Julien Nabet 
AuthorDate: Mon Apr 20 16:54:13 2020 +0200
Commit: Julien Nabet 
CommitDate: Mon Apr 20 18:34:57 2020 +0200

Various typos in vcl OpenTypeFeature

Name of files:
vcl/inc/font/OpenTypeFeatureDefinitonList.hxx
vcl/source/font/OpenTypeFeatureDefinitonList.cxx

Class names:
OpenTypeFeatureDefinitonListPrivate
OpenTypeFeatureDefinitonList.hxx

Change-Id: I5feb8ccc818b84b1b777b5b1e82c0a32a898aa72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92581
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 50bdf3b3ca72..64812f920d47 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -438,7 +438,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/font/Feature \
 vcl/source/font/FeatureCollector \
 vcl/source/font/FeatureParser \
-vcl/source/font/OpenTypeFeatureDefinitonList \
+vcl/source/font/OpenTypeFeatureDefinitionList \
 vcl/source/font/PhysicalFontCollection \
 vcl/source/font/PhysicalFontFace \
 vcl/source/font/PhysicalFontFamily \
diff --git a/vcl/inc/font/OpenTypeFeatureDefinitonList.hxx 
b/vcl/inc/font/OpenTypeFeatureDefinitionList.hxx
similarity index 84%
rename from vcl/inc/font/OpenTypeFeatureDefinitonList.hxx
rename to vcl/inc/font/OpenTypeFeatureDefinitionList.hxx
index f587887427ed..8c318c92773f 100644
--- a/vcl/inc/font/OpenTypeFeatureDefinitonList.hxx
+++ b/vcl/inc/font/OpenTypeFeatureDefinitionList.hxx
@@ -20,7 +20,7 @@ namespace vcl
 {
 namespace font
 {
-class OpenTypeFeatureDefinitonListPrivate
+class OpenTypeFeatureDefinitionListPrivate
 {
 private:
 std::vector m_aFeatureDefinition;
@@ -33,13 +33,13 @@ private:
 static FeatureDefinition handleSpecialFeatureCode(sal_uInt32 nFeatureCode);
 
 public:
-OpenTypeFeatureDefinitonListPrivate();
+OpenTypeFeatureDefinitionListPrivate();
 FeatureDefinition getDefinition(sal_uInt32 nFeatureCode);
 bool isRequired(sal_uInt32 nFeatureCode);
 };
 
-class VCL_DLLPUBLIC OpenTypeFeatureDefinitonList
-: public rtl::Static
+class VCL_DLLPUBLIC OpenTypeFeatureDefinitionList
+: public rtl::Static
 {
 };
 
diff --git a/vcl/source/font/FeatureCollector.cxx 
b/vcl/source/font/FeatureCollector.cxx
index a606d629aa6c..4d875608206e 100644
--- a/vcl/source/font/FeatureCollector.cxx
+++ b/vcl/source/font/FeatureCollector.cxx
@@ -8,7 +8,7 @@
  */
 
 #include 
-#include 
+#include 
 
 #include 
 #include 
@@ -93,7 +93,7 @@ void FeatureCollector::collectForLanguage(hb_tag_t aTableTag, 
sal_uInt32 nScript
 
 for (hb_tag_t aFeatureTag : aFeatureTags)
 {
-if (OpenTypeFeatureDefinitonList::get().isRequired(aFeatureTag))
+if (OpenTypeFeatureDefinitionList::get().isRequired(aFeatureTag))
 continue;
 
 m_rFontFeatures.emplace_back();
@@ -101,7 +101,7 @@ void FeatureCollector::collectForLanguage(hb_tag_t 
aTableTag, sal_uInt32 nScript
 rFeature.m_aID = { aFeatureTag, aScriptTag, aLanguageTag };
 
 FeatureDefinition aDefinition
-= OpenTypeFeatureDefinitonList::get().getDefinition(aFeatureTag);
+= OpenTypeFeatureDefinitionList::get().getDefinition(aFeatureTag);
 if (aDefinition)
 {
 rFeature.m_aDefinition = aDefinition;
diff --git a/vcl/source/font/OpenTypeFeatureDefinitonList.cxx 
b/vcl/source/font/OpenTypeFeatureDefinitionList.cxx
similarity index 94%
rename from vcl/source/font/OpenTypeFeatureDefinitonList.cxx
rename to vcl/source/font/OpenTypeFeatureDefinitionList.cxx
index 6b9584bb73d8..9400594a324f 100644
--- a/vcl/source/font/OpenTypeFeatureDefinitonList.cxx
+++ b/vcl/source/font/OpenTypeFeatureDefinitionList.cxx
@@ -8,7 +8,7 @@
  *
  */
 
-#include 
+#include 
 #include 
 
 #include 
@@ -17,9 +17,9 @@
 
 namespace vcl::font
 {
-OpenTypeFeatureDefinitonListPrivate::OpenTypeFeatureDefinitonListPrivate() { 
init(); }
+OpenTypeFeatureDefinitionListPrivate::OpenTypeFeatureDefinitionListPrivate() { 
init(); }
 
-void OpenTypeFeatureDefinitonListPrivate::init()
+void OpenTypeFeatureDefinitionListPrivate::init()
 {
 m_aFeatureDefinition.assign({
 { featureCode("aalt"), STR_FONT_FEATURE_ID_AALT },
@@ -150,13 +150,13 @@ OUString getNumericLowerPart(sal_uInt32 nFeatureCode)
 
 } // end anonymous namespace
 
-bool OpenTypeFeatureDefinitonListPrivate::isSpecialFeatureCode(sal_uInt32 
nFeatureCode)
+bool OpenTypeFeatureDefinitionListPrivate::isSpecialFeatureCode(sal_uInt32 
nFeatureCode)
 {
 return isCharacterVariantCode(nFeatureCode) || 

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2020-02-25 Thread Tomaž Vajngerl (via logerrit)
 vcl/Library_vcl.mk   |1 
 vcl/inc/graphic/GraphicID.hxx|   47 
 vcl/inc/impgraph.hxx |   21 ---
 vcl/source/gdi/impgraph.cxx  |   83 
 vcl/source/graphic/GraphicID.cxx |  112 +++
 5 files changed, 161 insertions(+), 103 deletions(-)

New commits:
commit b6bc43f354bcbe6a98db9fb372fd47bc5b23f4d8
Author: Tomaž Vajngerl 
AuthorDate: Mon Feb 24 23:02:20 2020 +0100
Commit: Tomaž Vajngerl 
CommitDate: Tue Feb 25 19:30:53 2020 +0100

vcl: move GraphicID out of impgraph.{cxx,hxx}

Change-Id: I0b3b17736a76be290f6e5b77ee547b7e650d4489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89449
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index a38c84874ff9..79f2002c8c9d 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -318,6 +318,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/gdi/TypeSerializer \
 vcl/source/pdf/ResourceDict \
 vcl/source/pdf/Matrix3 \
+vcl/source/graphic/GraphicID \
 vcl/source/graphic/GraphicLoader \
 vcl/source/graphic/GraphicObject \
 vcl/source/graphic/GraphicObject2 \
diff --git a/vcl/inc/graphic/GraphicID.hxx b/vcl/inc/graphic/GraphicID.hxx
new file mode 100644
index ..87ac6a50f37a
--- /dev/null
+++ b/vcl/inc/graphic/GraphicID.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+
+class ImpGraphic;
+
+class GraphicID
+{
+private:
+sal_uInt32 mnID1;
+sal_uInt32 mnID2;
+sal_uInt32 mnID3;
+BitmapChecksum mnID4;
+
+public:
+GraphicID(ImpGraphic const& rGraphic);
+
+bool operator==(const GraphicID& rID) const
+{
+return rID.mnID1 == mnID1 && rID.mnID2 == mnID2 && rID.mnID3 == mnID3 
&& rID.mnID4 == mnID4;
+}
+
+OString getIDString() const;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index 90e658c67308..56c663d2d687 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include "graphic/Manager.hxx"
+#include "graphic/GraphicID.hxx"
 
 struct ImpSwapInfo
 {
@@ -45,26 +46,6 @@ struct ImpSwapFile;
 class GraphicConversionParameters;
 class ImpGraphic;
 
-class GraphicID
-{
-private:
-sal_uInt32  mnID1;
-sal_uInt32  mnID2;
-sal_uInt32  mnID3;
-BitmapChecksum  mnID4;
-
-public:
-GraphicID(ImpGraphic const & rGraphic);
-
-bool operator==(const GraphicID& rID) const
-{
-return rID.mnID1 == mnID1 && rID.mnID2 == mnID2 &&
-   rID.mnID3 == mnID3 && rID.mnID4 == mnID4;
-}
-
-OString getIDString() const;
-};
-
 class ImpGraphic final
 {
 friend class Graphic;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 7e9c96feddf2..df736a274d87 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -69,89 +69,6 @@ struct ImpSwapFile
 ~ImpSwapFile();
 };
 
-GraphicID::GraphicID(ImpGraphic const & rGraphic)
-{
-rGraphic.ensureAvailable();
-
-mnID1 = static_cast(rGraphic.ImplGetType()) << 28;
-mnID2 = mnID3 = mnID4 = 0;
-
-if (rGraphic.ImplGetType() == GraphicType::Bitmap)
-{
-if (rGraphic.getVectorGraphicData().get())
-{
-const VectorGraphicDataPtr& rVectorGraphicDataPtr = 
rGraphic.getVectorGraphicData();
-const basegfx::B2DRange& rRange = 
rVectorGraphicDataPtr->getRange();
-
-mnID1 |= rVectorGraphicDataPtr->getVectorGraphicDataArrayLength();
-mnID2 = basegfx::fround(rRange.getWidth());
-mnID3 = basegfx::fround(rRange.getHeight());
-mnID4 = vcl_get_checksum(0, 
rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), 
rVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
-}
-else if (rGraphic.hasPdfData())
-{
-std::shared_ptr> pPdfData = 
rGraphic.getPdfData();
-const BitmapEx& 

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2019-12-30 Thread Tomaž Vajngerl (via logerrit)
 vcl/Library_vcl.mk|1 
 vcl/inc/pdf/Matrix3.hxx   |   54 +++
 vcl/source/gdi/pdfwriter_impl.cxx |  130 --
 vcl/source/gdi/pdfwriter_impl.hxx |2 
 vcl/source/pdf/Matrix3.cxx|  117 ++
 5 files changed, 173 insertions(+), 131 deletions(-)

New commits:
commit 5a068e585429c9aabfbb36f7c9f028c0acc578aa
Author: Tomaž Vajngerl 
AuthorDate: Mon Dec 30 20:38:21 2019 +0100
Commit: Tomaž Vajngerl 
CommitDate: Tue Dec 31 00:10:00 2019 +0100

pdf: extract Matrix3 to it's own files

Change-Id: Ic855b01d8b812e4604b266427c4f646cd1625b86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86036
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index d557ce3f0bc4..e2a3fc9fb889 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -317,6 +317,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/gdi/CommonSalLayout \
 vcl/source/gdi/TypeSerializer \
 vcl/source/pdf/ResourceDict \
+vcl/source/pdf/Matrix3 \
 vcl/source/graphic/GraphicLoader \
 vcl/source/graphic/GraphicObject \
 vcl/source/graphic/GraphicObject2 \
diff --git a/vcl/inc/pdf/Matrix3.hxx b/vcl/inc/pdf/Matrix3.hxx
new file mode 100644
index ..c36332015c13
--- /dev/null
+++ b/vcl/inc/pdf/Matrix3.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_VCL_INC_PDF_MATRIX3_HXX
+#define INCLUDED_VCL_INC_PDF_MATRIX3_HXX
+
+#include 
+#include 
+
+namespace vcl::pdf
+{
+// matrix helper class
+// TODO: use basegfx matrix class instead or derive from it
+
+/*  for sparse matrices of the form (2D linear transformations)
+ *  f[0] f[1] 0
+ *  f[2] f[3] 0
+ *  f[4] f[5] 1
+ */
+class Matrix3
+{
+double f[6];
+
+void set(const double* pn)
+{
+for (int i = 0; i < 6; i++)
+f[i] = pn[i];
+}
+
+public:
+Matrix3();
+
+void skew(double alpha, double beta);
+void scale(double sx, double sy);
+void rotate(double angle);
+void translate(double tx, double ty);
+void invert();
+
+double get(size_t i) const { return f[i]; }
+
+Point transform(const Point& rPoint) const;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 1ec13034a9bf..c5078143874c 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -543,136 +543,6 @@ void PDFWriterImpl::appendNonStrokingColor( const Color& 
rColor, OStringBuffer&
 }
 }
 
-// matrix helper class
-// TODO: use basegfx matrix class instead or derive from it
-namespace vcl // TODO: use anonymous namespace to keep this class local
-{
-/*  for sparse matrices of the form (2D linear transformations)
- *  f[0] f[1] 0
- *  f[2] f[3] 0
- *  f[4] f[5] 1
- */
-class Matrix3
-{
-double f[6];
-
-void set( const double *pn ) { for( int i = 0 ; i < 6; i++ ) f[i] = pn[i]; 
}
-public:
-Matrix3();
-
-void skew( double alpha, double beta );
-void scale( double sx, double sy );
-void rotate( double angle );
-void translate( double tx, double ty );
-void invert();
-
-double get(size_t i) const
-{
-return f[i];
-}
-
-Point transform( const Point& rPoint ) const;
-};
-}
-
-Matrix3::Matrix3()
-{
-// initialize to unity
-f[0] = 1.0;
-f[1] = 0.0;
-f[2] = 0.0;
-f[3] = 1.0;
-f[4] = 0.0;
-f[5] = 0.0;
-}
-
-Point Matrix3::transform( const Point& rOrig ) const
-{
-double x = static_cast(rOrig.X()), y = 
static_cast(rOrig.Y());
-return Point( static_cast(x*f[0] + y*f[2] + f[4]), 
static_cast(x*f[1] + y*f[3] + f[5]) );
-}
-
-void Matrix3::skew( double alpha, double beta )
-{
-double fn[6];
-double tb = tan( beta );
-fn[0] = f[0] + f[2]*tb;
-fn[1] = f[1];
-fn[2] = f[2] + f[3]*tb;
-fn[3] = f[3];
-fn[4] = f[4] + f[5]*tb;
-fn[5] = f[5];
-if( alpha != 0.0 )
-{
-double ta = tan( alpha );
-fn[1] += f[0]*ta;
-fn[3] += f[2]*ta;
-fn[5] += f[4]*ta;
-}
-set( fn );
-}
-
-void Matrix3::scale( double sx, double sy )
-{
-double fn[6];
-fn[0] = sx*f[0];
-fn[1] = sy*f[1];
-fn[2] = sx*f[2];
-fn[3] = sy*f[3];
-fn[4] = sx*f[4];
-fn[5] = sy*f[5];
-set( fn );
-}
-
-void Matrix3::rotate( double angle )
-{
-double fn[6];
-double fSin = sin(angle);
-double fCos = cos(angle);
-fn[0] = f[0]*fCos - f[1]*fSin;
-fn[1] = f[0]*fSin + f[1]*fCos;
-fn[2] = f[2]*fCos - f[3]*fSin;
-fn[3] = 

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2019-12-29 Thread Tomaž Vajngerl (via logerrit)
 vcl/Library_vcl.mk|1 
 vcl/inc/pdf/ResourceDict.hxx  |   42 ++
 vcl/source/gdi/pdfwriter_impl.cxx |   39 
 vcl/source/gdi/pdfwriter_impl.hxx |   12 ---
 vcl/source/pdf/ResourceDict.cxx   |   60 ++
 5 files changed, 104 insertions(+), 50 deletions(-)

New commits:
commit 7c648f0d455e64e87861683454a3cc2c132a010a
Author: Tomaž Vajngerl 
AuthorDate: Sun Dec 29 19:40:01 2019 +0100
Commit: Tomaž Vajngerl 
CommitDate: Sun Dec 29 21:40:00 2019 +0100

pdf: move struct ResourceDict to it's own file

Change-Id: I60ee0e17c7945e053b9ada69d7abda57714dd388
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85958
Reviewed-by: Tomaž Vajngerl 
Tested-by: Tomaž Vajngerl 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 0bc271576da7..d557ce3f0bc4 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -316,6 +316,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/gdi/scrptrun \
 vcl/source/gdi/CommonSalLayout \
 vcl/source/gdi/TypeSerializer \
+vcl/source/pdf/ResourceDict \
 vcl/source/graphic/GraphicLoader \
 vcl/source/graphic/GraphicObject \
 vcl/source/graphic/GraphicObject2 \
diff --git a/vcl/inc/pdf/ResourceDict.hxx b/vcl/inc/pdf/ResourceDict.hxx
new file mode 100644
index ..8334e1f52c39
--- /dev/null
+++ b/vcl/inc/pdf/ResourceDict.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_VCL_INC_PDF_RESOURCEDICT_HXX
+#define INCLUDED_VCL_INC_PDF_RESOURCEDICT_HXX
+
+#include 
+#include 
+#include 
+
+namespace vcl::pdf
+{
+enum ResourceKind
+{
+ResXObject,
+ResExtGState,
+ResShading,
+ResPattern
+};
+
+struct ResourceDict
+{
+// note: handle fonts globally for performance
+std::map m_aXObjects;
+std::map m_aExtGStates;
+std::map m_aShadings;
+std::map m_aPatterns;
+
+void append(OStringBuffer& rBuffer, sal_Int32 nFontDictObject);
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 553c109dcafb..3d500ce15e99 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -683,45 +683,6 @@ void Matrix3::append( PDFWriterImpl::PDFPage const & 
rPage, OStringBuffer& rBuff
 rPage.appendPoint( Point( static_cast(f[4]), static_cast(f[5]) 
), rBuffer );
 }
 
-static void appendResourceMap( OStringBuffer& rBuf, const char* pPrefix, 
std::map const & rList )
-{
-if( rList.empty() )
-return;
-rBuf.append( '/' );
-rBuf.append( pPrefix );
-rBuf.append( "<<" );
-int ni = 0;
-for (auto const& item : rList)
-{
-if( !item.first.isEmpty() && item.second > 0 )
-{
-rBuf.append( '/' );
-rBuf.append( item.first );
-rBuf.append( ' ' );
-rBuf.append( item.second );
-rBuf.append( " 0 R" );
-if( ((++ni) & 7) == 0 )
-rBuf.append( '\n' );
-}
-}
-rBuf.append( ">>\n" );
-}
-
-void PDFWriterImpl::ResourceDict::append( OStringBuffer& rBuf, sal_Int32 
nFontDictObject )
-{
-rBuf.append( "<>\n" );
-};
-
 PDFWriterImpl::PDFPage::PDFPage( PDFWriterImpl* pWriter, double nPageWidth, 
double nPageHeight, PDFWriter::Orientation eOrientation )
 :
 m_pWriter( pWriter ),
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx 
b/vcl/source/gdi/pdfwriter_impl.hxx
index 4ce2112715a9..0420567ef5ba 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 #include 
@@ -103,17 +104,6 @@ class PDFWriterImpl : public VirtualDevice
 friend class PDFStreamIf;
 
 public:
-enum ResourceKind { ResXObject, ResExtGState, ResShading, ResPattern };
-struct ResourceDict
-{
-// note: handle fonts globally for performance
-std::map m_aXObjects;
-std::map m_aExtGStates;
-std::map m_aShadings;
-std::map m_aPatterns;
-
-void append( OStringBuffer&, sal_Int32 nFontDictObject );
-};
 
 struct PDFPage
 {
diff --git a/vcl/source/pdf/ResourceDict.cxx b/vcl/source/pdf/ResourceDict.cxx
new file mode 100644
index ..3490da30b899
--- /dev/null
+++ b/vcl/source/pdf/ResourceDict.cxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. 

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2018-04-15 Thread Chris Sherlock
 vcl/Library_vcl.mk |2 
 vcl/inc/BitmapFastScaleFilter.hxx  |   41 +++
 vcl/inc/BitmapInterpolateScaleFilter.hxx   |   41 +++
 vcl/source/bitmap/BitmapFastScaleFilter.cxx|  130 ++
 vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx |  236 ++
 vcl/source/gdi/bitmap3.cxx |  265 -
 vcl/source/gdi/bitmapex.cxx|7 
 7 files changed, 460 insertions(+), 262 deletions(-)

New commits:
commit d246aa574571409046619254292698184c2545a3
Author: Chris Sherlock 
Date:   Sun Apr 15 10:14:10 2018 +1000

vcl: move Bitmap::ImplScaleFast() and Bitmap::ImplScaleInterpolate()

Bitmap::ImplScaleFast() -> BitmapFastScaleFilter
Bitmap::ImplScaleInterpolate() -> BitmapInterpolateScaleFilter

Change-Id: Ieb39cc21df5d98563945968cec81b7c51f64177f
Reviewed-on: https://gerrit.libreoffice.org/52899
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 3a819cefab26..93d1faf1826e 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -313,10 +313,12 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/graphic/UnoGraphicTransformer \
 vcl/source/bitmap/bitmap \
 vcl/source/bitmap/bitmapfilter \
+vcl/source/bitmap/BitmapInterpolateScaleFilter \
 vcl/source/bitmap/BitmapLightenFilter \
 vcl/source/bitmap/BitmapDisabledImageFilter \
 vcl/source/bitmap/BitmapColorizeFilter \
 vcl/source/bitmap/bitmappaint \
+   vcl/source/bitmap/BitmapFastScaleFilter \
 vcl/source/bitmap/BitmapScaleSuperFilter \
 vcl/source/bitmap/BitmapScaleConvolutionFilter \
 vcl/source/bitmap/BitmapSymmetryCheck \
diff --git a/vcl/inc/BitmapFastScaleFilter.hxx 
b/vcl/inc/BitmapFastScaleFilter.hxx
new file mode 100644
index ..c1ee11bf1a84
--- /dev/null
+++ b/vcl/inc/BitmapFastScaleFilter.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef VCL_INC_BITMAPFASTSCALEFILTER_HXX
+#define VCL_INC_BITMAPFASTSCALEFILTER_HXX
+
+#include 
+#include 
+
+class VCL_DLLPUBLIC BitmapFastScaleFilter : public BitmapFilter
+{
+public:
+explicit BitmapFastScaleFilter(double fScaleX, double fScaleY)
+: mfScaleX(fScaleX)
+, mfScaleY(fScaleY)
+{
+}
+
+explicit BitmapFastScaleFilter(Size aSize)
+: maSize(aSize)
+{
+}
+
+virtual BitmapEx execute(BitmapEx const& rBitmapEx) override;
+
+private:
+double mfScaleX;
+double mfScaleY;
+Size maSize;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/BitmapInterpolateScaleFilter.hxx 
b/vcl/inc/BitmapInterpolateScaleFilter.hxx
new file mode 100644
index ..0fbe9ac3f4a8
--- /dev/null
+++ b/vcl/inc/BitmapInterpolateScaleFilter.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef VCL_INC_BITMAPINTERPOLATESCALEFILTER_HXX
+#define VCL_INC_BITMAPINTERPOLATESCALEFILTER_HXX
+
+#include 
+#include 
+
+class VCL_DLLPUBLIC BitmapInterpolateScaleFilter : public BitmapFilter
+{
+public:
+explicit BitmapInterpolateScaleFilter(double fScaleX, double fScaleY)
+: mfScaleX(fScaleX)
+, mfScaleY(fScaleY)
+{
+}
+
+explicit BitmapInterpolateScaleFilter(Size aSize)
+: maSize(aSize)
+{
+}
+
+virtual BitmapEx execute(BitmapEx const& rBitmapEx) override;
+
+private:
+double mfScaleX;
+double mfScaleY;
+Size maSize;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/bitmap/BitmapFastScaleFilter.cxx 
b/vcl/source/bitmap/BitmapFastScaleFilter.cxx
new file mode 100644
index ..6bf1700a476f
--- /dev/null
+++ b/vcl/source/bitmap/BitmapFastScaleFilter.cxx
@@ -0,0 +1,130 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache 

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2016-01-25 Thread Chris Sherlock
 vcl/Library_vcl.mk   |2 
 vcl/inc/dndevdis.hxx |  105 --
 vcl/inc/dndeventdispatcher.hxx   |  105 ++
 vcl/source/control/lstbox.cxx|2 
 vcl/source/window/accessibility.cxx  |2 
 vcl/source/window/dndevdis.cxx   |  473 ---
 vcl/source/window/dndeventdispatcher.cxx |  473 +++
 vcl/source/window/mouse.cxx  |2 
 8 files changed, 582 insertions(+), 582 deletions(-)

New commits:
commit d3947708e1a3b9c1b4a7073b7fe5ff3d6b05bdf0
Author: Chris Sherlock 
Date:   Mon Jan 25 19:20:01 2016 +1100

vcl: move dndevdis.{hxx|cxx} to dndeventdispatcher.{hxx|cxx}

Change-Id: Ia9d41552a8361e086d6fcb379e041522d40fb7e9

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 488630e..1a5dc2f 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -160,7 +160,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/window/decoview \
 vcl/source/window/dialog \
 vcl/source/window/dlgctrl \
-vcl/source/window/dndevdis \
+vcl/source/window/dndeventdispatcher \
 vcl/source/window/dndlcon \
 vcl/source/window/dockingarea \
 vcl/source/window/dockmgr \
diff --git a/vcl/inc/dndevdis.hxx b/vcl/inc/dndeventdispatcher.hxx
similarity index 100%
rename from vcl/inc/dndevdis.hxx
rename to vcl/inc/dndeventdispatcher.hxx
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index a435b85..6c7d3d8 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -33,7 +33,7 @@
 #include "svdata.hxx"
 #include "controldata.hxx"
 #include "ilstbox.hxx"
-#include "dndevdis.hxx"
+#include "dndeventdispatcher.hxx"
 
 #include 
 
diff --git a/vcl/source/window/accessibility.cxx 
b/vcl/source/window/accessibility.cxx
index a36f0aa..a74fc30 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -72,7 +72,7 @@
 #include "helpwin.hxx"
 #include "sallayout.hxx"
 #include "dndlcon.hxx"
-#include "dndevdis.hxx"
+#include "dndeventdispatcher.hxx"
 
 #include "com/sun/star/accessibility/XAccessible.hpp"
 #include "com/sun/star/accessibility/AccessibleRole.hpp"
diff --git a/vcl/source/window/dndevdis.cxx 
b/vcl/source/window/dndeventdispatcher.cxx
similarity index 99%
rename from vcl/source/window/dndevdis.cxx
rename to vcl/source/window/dndeventdispatcher.cxx
index 20476e3..04a8ea9a 100644
--- a/vcl/source/window/dndevdis.cxx
+++ b/vcl/source/window/dndeventdispatcher.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
+#include "dndeventdispatcher.hxx"
 #include 
 #include 
 #include 
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 330cb70..5c9fca3 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -38,7 +38,7 @@
 #include 
 #include 
 #include 
-#include 
+#include "dndeventdispatcher.hxx"
 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2016-01-25 Thread Chris Sherlock
 vcl/Library_vcl.mk |2 
 vcl/inc/dndlcon.hxx|  112 --
 vcl/inc/dndlistenercontainer.hxx   |  112 ++
 vcl/inc/pch/precompiled_vcl.hxx|   12 
 vcl/source/window/accessibility.cxx|2 
 vcl/source/window/dndeventdispatcher.cxx   |2 
 vcl/source/window/dndlcon.cxx  |  500 -
 vcl/source/window/dndlistenercontainer.cxx |  500 +
 vcl/source/window/mouse.cxx|3 
 vcl/source/window/window.cxx   |2 
 vcl/source/window/winproc.cxx  |2 
 11 files changed, 623 insertions(+), 626 deletions(-)

New commits:
commit 4c8e866a6ea3cbafd2a8c89538f53a76eeb81d55
Author: Chris Sherlock 
Date:   Mon Jan 25 19:34:52 2016 +1100

git: rename dndlcon.{hxx|cxx} to dndlistenercontainer.{hxx|cxx}

Change-Id: I549a17f68971f68313c6665fb4b04a88f7084ad6

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 1a5dc2f..e53ce10 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -161,7 +161,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/window/dialog \
 vcl/source/window/dlgctrl \
 vcl/source/window/dndeventdispatcher \
-vcl/source/window/dndlcon \
+vcl/source/window/dndlistenercontainer \
 vcl/source/window/dockingarea \
 vcl/source/window/dockmgr \
 vcl/source/window/dockwin \
diff --git a/vcl/inc/dndlcon.hxx b/vcl/inc/dndlistenercontainer.hxx
similarity index 100%
rename from vcl/inc/dndlcon.hxx
rename to vcl/inc/dndlistenercontainer.hxx
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index 13c88b1..5b1302c 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2016-01-10 11:16:04 using:
+ Generated on 2016-01-25 19:34:08 using:
  ./bin/update_pch vcl vcl --cutoff=6 --exclude:system --include:module 
--include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -36,7 +36,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -44,19 +43,18 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -72,7 +70,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -181,6 +178,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -219,7 +217,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -260,7 +257,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -292,7 +289,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/vcl/source/window/accessibility.cxx 
b/vcl/source/window/accessibility.cxx
index a74fc30..f31a6f9 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -71,7 +71,7 @@
 #include "brdwin.hxx"
 #include "helpwin.hxx"
 #include "sallayout.hxx"
-#include "dndlcon.hxx"
+#include "dndlistenercontainer.hxx"
 #include "dndeventdispatcher.hxx"
 
 #include "com/sun/star/accessibility/XAccessible.hpp"
diff --git a/vcl/source/window/dndeventdispatcher.cxx 
b/vcl/source/window/dndeventdispatcher.cxx
index 04a8ea9a..165ad27 100644
--- a/vcl/source/window/dndeventdispatcher.cxx
+++ b/vcl/source/window/dndeventdispatcher.cxx
@@ -18,7 +18,7 @@
  */
 
 #include "dndeventdispatcher.hxx"
-#include 
+#include "dndlistenercontainer.hxx"
 #include 
 #include 
 
diff --git a/vcl/source/window/dndlcon.cxx 
b/vcl/source/window/dndlistenercontainer.cxx
similarity index 99%
rename from vcl/source/window/dndlcon.cxx
rename to vcl/source/window/dndlistenercontainer.cxx
index 24503c4..76ef78d 100644
--- a/vcl/source/window/dndlcon.cxx
+++ b/vcl/source/window/dndlistenercontainer.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
+#include "dndlistenercontainer.hxx"
 
 using namespace ::cppu;
 using namespace ::com::sun::star::uno;
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 5c9fca3..3c94759 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -37,7 +37,8 @@
 #include 
 #include 
 #include 
-#include 
+
+#include "dndlistenercontainer.hxx"
 #include "dndeventdispatcher.hxx"
 
 #include 
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index be6a3e4..460d8af 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -55,7 +55,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 

[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2016-01-25 Thread Chris Sherlock
 vcl/Library_vcl.mk |4 
 vcl/inc/ilstbox.hxx|  608 ---
 vcl/inc/listbox.hxx|  608 +++
 vcl/source/control/combobox.cxx|2 
 vcl/source/control/ilstbox.cxx | 3150 -
 vcl/source/control/imp_listbox.cxx | 3150 +
 vcl/source/control/listbox.cxx | 1518 +
 vcl/source/control/lstbox.cxx  | 1518 -
 8 files changed, 5279 insertions(+), 5279 deletions(-)

New commits:
commit 0b99d78015760b72e033f25e8ae126d96fd572a3
Author: Chris Sherlock 
Date:   Mon Jan 25 20:24:35 2016 +1100

vcl: rename private ilstbox.hxx header to listbox.hxx

It actually was deliberately named "ilstbox.hxx", it wasn't a typo
as it stands for Implementation (the "i") and lstbox is
abbreviated, I assume because the original developers were
contorting themselves into getting filenames into DOS 8.3 chars...

Change-Id: I04e5927e9df754f5115829645ca0013792bf3c54

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index e53ce10..ebce791 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -210,10 +210,10 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/control/fixed \
 vcl/source/control/fixedhyper \
 vcl/source/control/group \
-vcl/source/control/ilstbox \
 vcl/source/control/imgctrl \
 vcl/source/control/longcurr \
-vcl/source/control/lstbox \
+vcl/source/control/imp_listbox \
+vcl/source/control/listbox \
 vcl/source/control/menubtn \
 vcl/source/control/morebtn \
 vcl/source/control/quickselectionengine \
diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/listbox.hxx
similarity index 100%
rename from vcl/inc/ilstbox.hxx
rename to vcl/inc/listbox.hxx
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 7e46076..9d0bc7e 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -33,7 +33,7 @@
 #include 
 
 #include 
-#include 
+#include "listbox.hxx"
 #include 
 
 
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/imp_listbox.cxx
similarity index 99%
rename from vcl/source/control/ilstbox.cxx
rename to vcl/source/control/imp_listbox.cxx
index 9079284..18e1756 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -28,7 +28,7 @@
 #include 
 #include 
 
-#include 
+#include "listbox.hxx"
 #include 
 #include 
 #include 
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/listbox.cxx
similarity index 99%
rename from vcl/source/control/lstbox.cxx
rename to vcl/source/control/listbox.cxx
index 6c7d3d8..aa4f16e 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -32,7 +32,7 @@
 
 #include "svdata.hxx"
 #include "controldata.hxx"
-#include "ilstbox.hxx"
+#include "listbox.hxx"
 #include "dndeventdispatcher.hxx"
 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2016-01-24 Thread Chris Sherlock
 vcl/Library_vcl.mk  |2 
 vcl/inc/cvtsvm.hxx  |   98 -
 vcl/inc/svmconverter.hxx|   98 +
 vcl/source/gdi/cvtsvm.cxx   | 2471 ---
 vcl/source/gdi/gdimtf.cxx   |3 
 vcl/source/gdi/svmconverter.cxx | 2472 
 6 files changed, 2573 insertions(+), 2571 deletions(-)

New commits:
commit 85e82f2eadc2a7f2291535cc59afad4985729c4a
Author: Chris Sherlock 
Date:   Mon Jan 25 18:43:49 2016 +1100

vcl: rename cvtsvm.{cxx|hxx} file to svmconverter.{cxx|hxx}

Change-Id: Id896ae1360a7becaabfaab605f9f6c560813717b

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 7093bac..488630e 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -267,7 +267,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/gdi/bmpfast \
 vcl/source/gdi/configsettings \
 vcl/source/gdi/cvtgrf \
-vcl/source/gdi/cvtsvm \
+vcl/source/gdi/svmconverter \
 vcl/source/gdi/dibtools \
 vcl/source/gdi/embeddedfontshelper \
 vcl/source/gdi/extoutdevdata \
diff --git a/vcl/inc/cvtsvm.hxx b/vcl/inc/svmconverter.hxx
similarity index 100%
rename from vcl/inc/cvtsvm.hxx
rename to vcl/inc/svmconverter.hxx
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 8309d6b..f8f0499 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -33,7 +33,8 @@
 #include 
 #include 
 
-#include 
+#include "svmconverter.hxx"
+
 #include 
 #include 
 #include 
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/svmconverter.cxx
similarity index 99%
rename from vcl/source/gdi/cvtsvm.cxx
rename to vcl/source/gdi/svmconverter.cxx
index 1df3d78..83f19b0 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -30,7 +30,8 @@
 #include 
 #include 
 
-#include 
+#include "svmconverter.hxx"
+
 #include 
 
 // Inlines
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2013-07-24 Thread Julien Nabet
 vcl/Library_vcl.mk  |2 -
 vcl/inc/pch/precompiled_vcl.hxx |1 
 vcl/source/control/edit.cxx |   53 +---
 3 files changed, 8 insertions(+), 48 deletions(-)

New commits:
commit b525ef35b14ffd2f162c539cc8c62cb0934ab214
Author: Julien Nabet serval2...@yahoo.fr
Date:   Wed Jul 24 19:47:37 2013 +0200

fdo#46037: no more comphelper/configurationhelper.hxx in vcl

Change-Id: I809915fae3ffc117c854ec90632f70c76031aa60
Reviewed-on: https://gerrit.libreoffice.org/5079
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index dd0f0e0..f5bc19f 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -35,7 +35,7 @@ endif
 
 $(eval $(call 
gb_Library_set_precompiled_header,vcl,$(SRCDIR)/vcl/inc/pch/precompiled_vcl))
 
-$(eval $(call gb_Library_use_custom_headers,vcl,vcl/generic/fontmanager))
+$(eval $(call gb_Library_use_custom_headers,vcl,officecfg/registry 
vcl/generic/fontmanager))
 
 $(eval $(call gb_Library_set_include,vcl,\
 $$(INCLUDE) \
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index 76d533e..921e3dc 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -270,7 +270,6 @@
 #include com/sun/star/xml/sax/Writer.hpp
 #include com/sun/star/xml/sax/XDocumentHandler.hpp
 #include comphelper/componentcontext.hxx
-#include comphelper/configurationhelper.hxx
 #include comphelper/namedvaluecollection.hxx
 #include comphelper/processfactory.hxx
 #include comphelper/scopeguard.hxx
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index a27fe60..260cdaa 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -55,7 +55,6 @@
 
 #include com/sun/star/uno/Any.hxx
 
-#include comphelper/configurationhelper.hxx
 #include comphelper/processfactory.hxx
 #include comphelper/string.hxx
 
@@ -66,6 +65,8 @@
 #include vcl/unohelp.hxx
 #include vcl/unohelp2.hxx
 
+#include officecfg/Office/Common.hxx
+
 
 
 
@@ -904,50 +905,10 @@ void Edit::ImplInsertText( const OUString rStr, const 
Selection* pNewSel, sal_B
 
 // determine if input-sequence-checking should be applied or not
 //
-static OUString sModule( /org.openoffice.Office.Common/I18N );
-static OUString sRelNode( CTL );
-static OUString sCTLSequenceChecking( CTLSequenceChecking );
-static OUString sCTLSequenceCheckingRestricted( 
CTLSequenceCheckingRestricted );
-static OUString sCTLSequenceCheckingTypeAndReplace( 
CTLSequenceCheckingTypeAndReplace );
-static OUString sCTLFont( CTLFont );
-//
-sal_Bool bCTLSequenceChecking   = sal_False;
-sal_Bool bCTLSequenceCheckingRestricted = sal_False;
-sal_Bool bCTLSequenceCheckingTypeAndReplace = sal_False;
-sal_Bool bCTLFontEnabled= sal_False;
-bool bIsInputSequenceChecking   = false;
-//
-// get access to the configuration of this office module
-try
-{
-uno::Reference uno::XComponentContext  xContext = 
::comphelper::getProcessComponentContext();
-uno::Reference container::XNameAccess  xModuleCfg( 
::comphelper::ConfigurationHelper::openConfig(
-xContext,
-sModule,
-
::comphelper::ConfigurationHelper::E_READONLY ),
-uno::UNO_QUERY );
-
-//!! get values from configuration.
-//!! we can't use SvtCTLOptions here since vcl must not be linked
-//!! against svtools. (It is already the other way around.)
-Any aCTLSequenceChecking= 
::comphelper::ConfigurationHelper::readRelativeKey( xModuleCfg, sRelNode, 
sCTLSequenceChecking );
-Any aCTLSequenceCheckingRestricted  = 
::comphelper::ConfigurationHelper::readRelativeKey( xModuleCfg, sRelNode, 
sCTLSequenceCheckingRestricted );
-Any aCTLSequenceCheckingTypeAndReplace  = 
::comphelper::ConfigurationHelper::readRelativeKey( xModuleCfg, sRelNode, 
sCTLSequenceCheckingTypeAndReplace );
-Any aCTLFontEnabled = 
::comphelper::ConfigurationHelper::readRelativeKey( xModuleCfg, sRelNode, 
sCTLFont );
-aCTLSequenceChecking= bCTLSequenceChecking;
-aCTLSequenceCheckingRestricted  = 
bCTLSequenceCheckingRestricted;
-aCTLSequenceCheckingTypeAndReplace  = 
bCTLSequenceCheckingTypeAndReplace;
-aCTLFontEnabled = bCTLFontEnabled;
-}
-catch(...)
-{
-bIsInputSequenceChecking = false;   // continue with inserting the 
new text
-}
-//
 uno::Reference  i18n::XBreakIterator  xBI(