2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
2007-04-11 17:03:48 +00:00
|
|
|
*
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
* 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/.
|
2007-04-11 17:03:48 +00:00
|
|
|
*
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
* This file incorporates work covered by the following license notice:
|
2007-04-11 17:03:48 +00:00
|
|
|
*
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
* 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 .
|
|
|
|
*/
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2013-10-23 19:10:20 +02:00
|
|
|
#ifndef INCLUDED_VCL_PRINT_HXX
|
|
|
|
#define INCLUDED_VCL_PRINT_HXX
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2011-11-21 09:00:21 +01:00
|
|
|
#include <rtl/ustring.hxx>
|
|
|
|
|
2013-11-09 15:31:59 -06:00
|
|
|
#include <tools/errcode.hxx>
|
|
|
|
#include <tools/solar.h>
|
|
|
|
#include <vcl/dllapi.h>
|
|
|
|
#include <vcl/outdev.hxx>
|
|
|
|
#include <vcl/prntypes.hxx>
|
|
|
|
#include <vcl/jobset.hxx>
|
|
|
|
#include <vcl/gdimtf.hxx>
|
|
|
|
#include <tools/stream.hxx>
|
|
|
|
#include <tools/multisel.hxx>
|
|
|
|
|
|
|
|
#include <com/sun/star/beans/PropertyValue.hpp>
|
|
|
|
#include <com/sun/star/view/PrintableState.hpp>
|
2008-10-01 18:22:22 +00:00
|
|
|
|
2015-02-06 09:46:57 +00:00
|
|
|
#include <memory>
|
2009-04-15 19:11:23 +00:00
|
|
|
#include <set>
|
2015-01-01 19:58:59 +00:00
|
|
|
#include <unordered_map>
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
class SalInfoPrinter;
|
|
|
|
struct SalPrinterQueueInfo;
|
|
|
|
class SalPrinter;
|
|
|
|
class VirtualDevice;
|
2014-09-23 11:20:40 +02:00
|
|
|
namespace vcl { class Window; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2008-10-01 18:22:22 +00:00
|
|
|
namespace vcl {
|
2009-07-06 10:54:21 +00:00
|
|
|
class PrinterController;
|
2008-10-01 18:22:22 +00:00
|
|
|
class PrintDialog;
|
|
|
|
}
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
enum PrinterSupport { SUPPORT_SET_ORIENTATION, SUPPORT_SET_PAPERBIN,
|
|
|
|
SUPPORT_SET_PAPERSIZE, SUPPORT_SET_PAPER,
|
|
|
|
SUPPORT_COPY, SUPPORT_COLLATECOPY,
|
|
|
|
SUPPORT_SETUPDIALOG, SUPPORT_FAX, SUPPORT_PDF };
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 17:03:48 +00:00
|
|
|
class VCL_DLLPUBLIC PrinterPage
|
|
|
|
{
|
|
|
|
GDIMetaFile* mpMtf;
|
|
|
|
JobSetup maJobSetup;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool mbNewJobSetup;
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
PrinterPage() : mpMtf( new GDIMetaFile() ) {}
|
2014-02-21 12:53:51 +01:00
|
|
|
PrinterPage( GDIMetaFile* pMtf, bool bNewJobSetup, const JobSetup& rSetup ) :
|
2007-04-11 17:03:48 +00:00
|
|
|
mpMtf( pMtf ), maJobSetup( rSetup ), mbNewJobSetup( bNewJobSetup ) {}
|
|
|
|
~PrinterPage() { delete mpMtf; }
|
|
|
|
|
|
|
|
GDIMetaFile* GetGDIMetaFile() const { return mpMtf; }
|
|
|
|
const JobSetup& GetJobSetup() const { return maJobSetup; }
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsNewJobSetup() const { return mbNewJobSetup; }
|
2007-04-11 17:03:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 17:03:48 +00:00
|
|
|
class VCL_DLLPUBLIC QueueInfo
|
|
|
|
{
|
|
|
|
friend class Printer;
|
|
|
|
|
|
|
|
private:
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString maPrinterName;
|
|
|
|
OUString maDriver;
|
|
|
|
OUString maLocation;
|
|
|
|
OUString maComment;
|
2015-05-19 15:15:13 +02:00
|
|
|
PrintQueueFlags mnStatus;
|
2014-04-07 23:11:35 +10:00
|
|
|
sal_uInt32 mnJobs;
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
public:
|
2014-04-07 23:11:35 +10:00
|
|
|
QueueInfo();
|
|
|
|
QueueInfo( const QueueInfo& rInfo );
|
|
|
|
~QueueInfo();
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& GetPrinterName() const { return maPrinterName; }
|
|
|
|
const OUString& GetDriver() const { return maDriver; }
|
|
|
|
const OUString& GetLocation() const { return maLocation; }
|
|
|
|
const OUString& GetComment() const { return maComment; }
|
2015-05-19 15:15:13 +02:00
|
|
|
PrintQueueFlags GetStatus() const { return mnStatus; }
|
2014-04-07 23:11:35 +10:00
|
|
|
sal_uInt32 GetJobs() const { return mnJobs; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
bool operator==( const QueueInfo& rInfo ) const;
|
|
|
|
|
2014-01-30 13:46:42 +02:00
|
|
|
friend VCL_DLLPUBLIC SvStream& ReadQueueInfo( SvStream& rIStream, QueueInfo& rInfo );
|
2014-01-14 13:52:54 +02:00
|
|
|
friend VCL_DLLPUBLIC SvStream& WriteQueueInfo( SvStream& rOStream, const QueueInfo& rInfo );
|
2007-04-11 17:03:48 +00:00
|
|
|
};
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 17:03:48 +00:00
|
|
|
enum PrinterTransparencyMode
|
|
|
|
{
|
|
|
|
PRINTER_TRANSPARENCY_AUTO = 0,
|
|
|
|
PRINTER_TRANSPARENCY_NONE = 1
|
|
|
|
};
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
enum PrinterGradientMode
|
|
|
|
{
|
|
|
|
PRINTER_GRADIENT_STRIPES = 0,
|
|
|
|
PRINTER_GRADIENT_COLOR = 1
|
|
|
|
};
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
enum PrinterBitmapMode
|
|
|
|
{
|
|
|
|
PRINTER_BITMAP_OPTIMAL = 0,
|
|
|
|
PRINTER_BITMAP_NORMAL = 1,
|
|
|
|
PRINTER_BITMAP_RESOLUTION = 2
|
|
|
|
};
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
class VCL_DLLPUBLIC PrinterOptions
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool mbReduceTransparency;
|
2007-04-11 17:03:48 +00:00
|
|
|
PrinterTransparencyMode meReducedTransparencyMode;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool mbReduceGradients;
|
2007-04-11 17:03:48 +00:00
|
|
|
PrinterGradientMode meReducedGradientsMode;
|
2014-03-15 00:50:41 +11:00
|
|
|
sal_uInt16 mnReducedGradientStepCount;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool mbReduceBitmaps;
|
2007-04-11 17:03:48 +00:00
|
|
|
PrinterBitmapMode meReducedBitmapMode;
|
2014-03-15 00:50:41 +11:00
|
|
|
sal_uInt16 mnReducedBitmapResolution;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool mbReducedBitmapsIncludeTransparency;
|
|
|
|
bool mbConvertToGreyscales;
|
|
|
|
bool mbPDFAsStandardPrintJobFormat;
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
PrinterOptions();
|
|
|
|
~PrinterOptions();
|
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsReduceTransparency() const { return mbReduceTransparency; }
|
|
|
|
void SetReduceTransparency( bool bSet ) { mbReduceTransparency = bSet; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
PrinterTransparencyMode GetReducedTransparencyMode() const { return meReducedTransparencyMode; }
|
|
|
|
void SetReducedTransparencyMode( PrinterTransparencyMode eMode ) { meReducedTransparencyMode = eMode; }
|
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsReduceGradients() const { return mbReduceGradients; }
|
|
|
|
void SetReduceGradients( bool bSet ) { mbReduceGradients = bSet; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
PrinterGradientMode GetReducedGradientMode() const { return meReducedGradientsMode; }
|
|
|
|
void SetReducedGradientMode( PrinterGradientMode eMode ) { meReducedGradientsMode = eMode; }
|
|
|
|
|
2014-03-15 00:50:41 +11:00
|
|
|
sal_uInt16 GetReducedGradientStepCount() const { return mnReducedGradientStepCount; }
|
2010-09-29 15:46:40 +08:00
|
|
|
void SetReducedGradientStepCount( sal_uInt16 nStepCount ) { mnReducedGradientStepCount = nStepCount; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsReduceBitmaps() const { return mbReduceBitmaps; }
|
|
|
|
void SetReduceBitmaps( bool bSet ) { mbReduceBitmaps = bSet; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
PrinterBitmapMode GetReducedBitmapMode() const { return meReducedBitmapMode; }
|
|
|
|
void SetReducedBitmapMode( PrinterBitmapMode eMode ) { meReducedBitmapMode = eMode; }
|
|
|
|
|
2014-03-15 00:50:41 +11:00
|
|
|
sal_uInt16 GetReducedBitmapResolution() const { return mnReducedBitmapResolution; }
|
2010-09-29 15:46:40 +08:00
|
|
|
void SetReducedBitmapResolution( sal_uInt16 nResolution ) { mnReducedBitmapResolution = nResolution; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsReducedBitmapIncludesTransparency() const { return mbReducedBitmapsIncludeTransparency; }
|
|
|
|
void SetReducedBitmapIncludesTransparency( bool bSet ) { mbReducedBitmapsIncludeTransparency = bSet; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsConvertToGreyscales() const { return mbConvertToGreyscales; }
|
|
|
|
void SetConvertToGreyscales( bool bSet ) { mbConvertToGreyscales = bSet; }
|
2010-11-03 17:10:14 +01:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsPDFAsStandardPrintJobFormat() const { return mbPDFAsStandardPrintJobFormat; }
|
|
|
|
void SetPDFAsStandardPrintJobFormat( bool bSet ) { mbPDFAsStandardPrintJobFormat = bSet; }
|
2012-11-29 11:50:54 +00:00
|
|
|
|
2010-11-03 17:10:14 +01:00
|
|
|
// read printer options from configuration, parameter decides whether the set for
|
|
|
|
// print "to printer" or "to file" should be read.
|
2013-03-03 17:11:39 +01:00
|
|
|
// returns true if config was read, false if an error occurred
|
2010-11-03 17:10:14 +01:00
|
|
|
bool ReadFromConfig( bool bFile );
|
2007-04-11 17:03:48 +00:00
|
|
|
};
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 17:03:48 +00:00
|
|
|
class VCL_DLLPUBLIC Printer : public OutputDevice
|
|
|
|
{
|
2014-09-27 14:52:40 +02:00
|
|
|
friend class ::OutputDevice;
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
SalInfoPrinter* mpInfoPrinter;
|
|
|
|
SalPrinter* mpPrinter;
|
|
|
|
SalGraphics* mpJobGraphics;
|
2015-03-19 13:54:12 +02:00
|
|
|
VclPtr<Printer> mpPrev;
|
|
|
|
VclPtr<Printer> mpNext;
|
|
|
|
VclPtr<VirtualDevice> mpDisplayDev;
|
2007-04-11 17:03:48 +00:00
|
|
|
PrinterOptions* mpPrinterOptions;
|
2014-03-14 21:31:59 +11:00
|
|
|
OUString maPrinterName;
|
|
|
|
OUString maDriver;
|
|
|
|
OUString maPrintFile;
|
|
|
|
OUString maJobName;
|
2007-04-11 17:03:48 +00:00
|
|
|
JobSetup maJobSetup;
|
|
|
|
Point maPageOffset;
|
|
|
|
Size maPaperSize;
|
2014-03-14 21:31:59 +11:00
|
|
|
sal_uLong mnError;
|
|
|
|
sal_uInt16 mnCurPage;
|
|
|
|
sal_uInt16 mnCurPrintPage;
|
|
|
|
sal_uInt16 mnPageQueueSize;
|
|
|
|
sal_uInt16 mnCopyCount;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool mbDefPrinter;
|
|
|
|
bool mbPrinting;
|
|
|
|
bool mbJobActive;
|
|
|
|
bool mbCollateCopy;
|
|
|
|
bool mbPrintFile;
|
|
|
|
bool mbInPrintPage;
|
|
|
|
bool mbNewJobSetup;
|
|
|
|
bool mbIsQueuePrinter;
|
2015-04-30 10:20:00 +02:00
|
|
|
Link<> maErrorHdl;
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
SAL_DLLPRIVATE void ImplInitData();
|
|
|
|
SAL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
|
2014-09-23 11:20:40 +02:00
|
|
|
SAL_DLLPRIVATE void ImplInitDisplay( const vcl::Window* pWindow );
|
2013-04-07 12:06:47 +02:00
|
|
|
SAL_DLLPRIVATE static SalPrinterQueueInfo* ImplGetQueueInfo( const OUString& rPrinterName,
|
|
|
|
const OUString* pDriver );
|
2007-04-11 17:03:48 +00:00
|
|
|
SAL_DLLPRIVATE void ImplUpdatePageData();
|
|
|
|
SAL_DLLPRIVATE void ImplUpdateFontList();
|
2009-09-08 15:20:56 +00:00
|
|
|
SAL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, bool bMatchNearest );
|
2008-10-01 18:22:22 +00:00
|
|
|
|
2015-02-06 09:46:57 +00:00
|
|
|
SAL_DLLPRIVATE bool StartJob( const OUString& rJobName, std::shared_ptr<vcl::PrinterController>& );
|
2008-10-01 18:22:22 +00:00
|
|
|
|
2011-01-12 15:07:10 +01:00
|
|
|
static SAL_DLLPRIVATE sal_uLong ImplSalPrinterErrorCodeToVCL( sal_uLong nError );
|
2008-10-01 18:22:22 +00:00
|
|
|
|
2009-06-12 15:22:27 +00:00
|
|
|
private:
|
2014-02-21 12:53:51 +01:00
|
|
|
SAL_DLLPRIVATE bool EndJob();
|
2015-02-07 12:34:15 +01:00
|
|
|
Printer( const Printer& rPrinter ) SAL_DELETED_FUNCTION;
|
|
|
|
Printer& operator =( const Printer& rPrinter ) SAL_DELETED_FUNCTION;
|
2014-03-14 21:31:59 +11:00
|
|
|
|
2009-06-12 15:22:27 +00:00
|
|
|
public:
|
|
|
|
SAL_DLLPRIVATE void ImplStartPage();
|
|
|
|
SAL_DLLPRIVATE void ImplEndPage();
|
2014-03-14 21:31:59 +11:00
|
|
|
|
|
|
|
protected:
|
2014-04-25 00:53:01 +10:00
|
|
|
virtual bool AcquireGraphics() const SAL_OVERRIDE;
|
2014-04-25 01:29:54 +10:00
|
|
|
virtual void ReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
|
|
|
|
virtual void ImplReleaseFonts() SAL_OVERRIDE;
|
2014-04-25 00:53:01 +10:00
|
|
|
|
2014-04-21 21:44:19 +10:00
|
|
|
virtual long GetGradientStepCount( long nMinRect ) SAL_OVERRIDE;
|
2014-04-01 01:28:02 +11:00
|
|
|
virtual bool UsePolyPolygonForComplexGradient() SAL_OVERRIDE;
|
2015-01-06 15:05:36 +00:00
|
|
|
virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly ) SAL_OVERRIDE;
|
2014-04-06 20:57:49 +10:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
void ScaleBitmap ( Bitmap&, SalTwoRect& ) SAL_OVERRIDE { };
|
2014-03-14 21:31:59 +11:00
|
|
|
|
2007-04-11 17:03:48 +00:00
|
|
|
public:
|
|
|
|
void DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient );
|
2014-04-23 00:51:39 +10:00
|
|
|
virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const SAL_OVERRIDE;
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
void SetSelfAsQueuePrinter( bool bQueuePrinter ) { mbIsQueuePrinter = bQueuePrinter; }
|
|
|
|
bool IsQueuePrinter() const { return mbIsQueuePrinter; }
|
2014-04-28 22:00:10 +10:00
|
|
|
virtual void DrawDeviceMask ( const Bitmap& rMask, const Color& rMaskColor,
|
2014-04-17 02:56:10 +10:00
|
|
|
const Point& rDestPt, const Size& rDestSize,
|
|
|
|
const Point& rSrcPtPixel, const Size& rSrcSizePixel ) SAL_OVERRIDE;
|
2014-03-28 23:30:02 +11:00
|
|
|
|
2014-03-15 00:50:41 +11:00
|
|
|
bool DrawTransformBitmapExDirect(
|
|
|
|
const basegfx::B2DHomMatrix& aFullTransform,
|
2014-03-26 16:37:00 +01:00
|
|
|
const BitmapEx& rBitmapEx) SAL_OVERRIDE;
|
2014-03-15 00:50:41 +11:00
|
|
|
|
2014-04-21 21:30:39 +10:00
|
|
|
bool TransformAndReduceBitmapExToTargetRange(
|
2014-03-15 00:50:41 +11:00
|
|
|
const basegfx::B2DHomMatrix& aFullTransform,
|
|
|
|
basegfx::B2DRange &aVisibleRange,
|
2014-03-26 16:37:00 +01:00
|
|
|
double &fMaximumArea) SAL_OVERRIDE;
|
2014-03-15 00:50:41 +11:00
|
|
|
|
2014-03-23 21:50:42 +11:00
|
|
|
void DrawDeviceBitmap(
|
|
|
|
const Point& rDestPt, const Size& rDestSize,
|
|
|
|
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
|
2014-03-27 18:12:18 +01:00
|
|
|
BitmapEx& rBitmapEx ) SAL_OVERRIDE;
|
2014-03-15 00:50:41 +11:00
|
|
|
|
2014-09-28 07:51:19 +02:00
|
|
|
virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ) SAL_OVERRIDE;
|
2014-03-28 23:30:02 +11:00
|
|
|
|
2014-04-18 20:55:59 +10:00
|
|
|
virtual void InitFont() const SAL_OVERRIDE;
|
2014-04-19 12:19:39 +10:00
|
|
|
virtual void SetFontOrientation( ImplFontEntry* const pFontEntry ) const SAL_OVERRIDE;
|
2014-04-18 20:55:59 +10:00
|
|
|
|
2007-04-11 17:03:48 +00:00
|
|
|
public:
|
|
|
|
Printer();
|
|
|
|
Printer( const JobSetup& rJobSetup );
|
|
|
|
Printer( const QueueInfo& rQueueInfo );
|
2013-04-07 12:06:47 +02:00
|
|
|
Printer( const OUString& rPrinterName );
|
2007-04-11 17:03:48 +00:00
|
|
|
virtual ~Printer();
|
2015-03-19 13:54:12 +02:00
|
|
|
virtual void dispose() SAL_OVERRIDE;
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
static const std::vector< OUString >& GetPrinterQueues();
|
|
|
|
static const QueueInfo* GetQueueInfo( const OUString& rPrinterName, bool bStatusUpdate );
|
2014-03-15 00:50:41 +11:00
|
|
|
static OUString GetDefaultPrinterName();
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2015-01-21 12:15:26 +02:00
|
|
|
void Error();
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2014-03-15 00:50:41 +11:00
|
|
|
const OUString& GetName() const { return maPrinterName; }
|
|
|
|
const OUString& GetDriverName() const { return maDriver; }
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsDefPrinter() const { return mbDefPrinter; }
|
2015-03-19 13:54:12 +02:00
|
|
|
bool IsDisplayPrinter() const { return mpDisplayDev != nullptr; }
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsValid() const { return !IsDisplayPrinter(); }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2015-05-20 10:30:18 +02:00
|
|
|
sal_uLong GetCapabilities( PrinterCapType nType ) const;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool HasSupport( PrinterSupport eFeature ) const;
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SetJobSetup( const JobSetup& rSetup );
|
2007-04-11 17:03:48 +00:00
|
|
|
const JobSetup& GetJobSetup() const { return maJobSetup; }
|
|
|
|
|
2014-09-23 11:20:40 +02:00
|
|
|
bool Setup( vcl::Window* pWindow = NULL );
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SetPrinterProps( const Printer* pPrinter );
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2010-11-04 18:48:18 +01:00
|
|
|
// SetPrinterOptions is used internally only now
|
|
|
|
// in earlier times it was used only to set the options loaded directly from the configuration
|
|
|
|
// in SfxPrinter::InitJob, this is now handled internally
|
|
|
|
// should the need arise to set the printer options outside vcl, also a method would have to be devised
|
|
|
|
// to not override these again internally
|
|
|
|
SAL_DLLPRIVATE void SetPrinterOptions( const PrinterOptions& rOptions );
|
2007-04-11 17:03:48 +00:00
|
|
|
const PrinterOptions& GetPrinterOptions() const { return( *mpPrinterOptions ); }
|
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SetOrientation( Orientation eOrient );
|
2007-04-11 17:03:48 +00:00
|
|
|
Orientation GetOrientation() const;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SetDuplexMode( DuplexMode );
|
2007-04-11 17:03:48 +00:00
|
|
|
// returns the angle that a landscape page will be turned counterclockwise
|
|
|
|
// wrt to portrait. The return value may be only valid for
|
|
|
|
// the current paper
|
|
|
|
int GetLandscapeAngle() const;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SetPaperBin( sal_uInt16 nPaperBin );
|
2014-03-15 00:50:41 +11:00
|
|
|
sal_uInt16 GetPaperBin() const;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SetPaper( Paper ePaper );
|
|
|
|
bool SetPaperSizeUser( const Size& rSize );
|
|
|
|
bool SetPaperSizeUser( const Size& rSize, bool bMatchNearest );
|
2014-03-15 00:50:41 +11:00
|
|
|
Paper GetPaper() const;
|
|
|
|
static OUString GetPaperName( Paper ePaper );
|
2011-01-19 16:33:54 +01:00
|
|
|
// return a UI string for the current paper; i_bPaperUser == false means an empty string for PAPER_USER
|
2014-03-15 00:50:41 +11:00
|
|
|
OUString GetPaperName( bool i_bPaperUser = true ) const;
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
// returns number of available paper formats
|
|
|
|
int GetPaperInfoCount() const;
|
|
|
|
// returns info about paper format nPaper
|
2009-06-12 09:36:34 +00:00
|
|
|
const PaperInfo& GetPaperInfo( int nPaper ) const;
|
2014-03-15 00:50:41 +11:00
|
|
|
sal_uInt16 GetPaperBinCount() const;
|
|
|
|
OUString GetPaperBinName( sal_uInt16 nPaperBin ) const;
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
const Size& GetPaperSizePixel() const { return maPaperSize; }
|
|
|
|
Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
|
|
|
|
const Point& GetPageOffsetPixel() const { return maPageOffset; }
|
|
|
|
Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
|
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SetCopyCount( sal_uInt16 nCopy, bool bCollate = false );
|
2014-03-15 00:50:41 +11:00
|
|
|
sal_uInt16 GetCopyCount() const { return mnCopyCount; }
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsCollateCopy() const { return mbCollateCopy; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsPrinting() const { return mbPrinting; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2014-03-15 00:50:41 +11:00
|
|
|
const OUString& GetCurJobName() const { return maJobName; }
|
|
|
|
sal_uInt16 GetCurPage() const { return mnCurPage; }
|
2014-02-21 12:53:51 +01:00
|
|
|
bool IsJobActive() const { return mbJobActive; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2014-03-15 00:50:41 +11:00
|
|
|
sal_uLong GetError() const { return ERRCODE_TOERROR(mnError); }
|
|
|
|
sal_uLong GetErrorCode() const { return mnError; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
2015-04-30 10:20:00 +02:00
|
|
|
void SetErrorHdl( const Link<>& rLink ) { maErrorHdl = rLink; }
|
|
|
|
const Link<>& GetErrorHdl() const { return maErrorHdl; }
|
2007-04-11 17:03:48 +00:00
|
|
|
|
|
|
|
/** checks the printer list and updates it necessary
|
|
|
|
*
|
2015-01-09 16:29:43 +02:00
|
|
|
* sends a DataChanged event of type DataChangedEventType::PRINTER
|
2007-04-11 17:03:48 +00:00
|
|
|
* if the printer list changed
|
|
|
|
*/
|
2014-03-15 00:50:41 +11:00
|
|
|
static void updatePrinters();
|
2008-10-01 18:22:22 +00:00
|
|
|
|
|
|
|
/** execute a print job
|
|
|
|
|
|
|
|
starts a print job asynchronously (that is will return
|
|
|
|
|
|
|
|
*/
|
2015-02-06 09:46:57 +00:00
|
|
|
static void PrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
|
2014-03-15 00:50:41 +11:00
|
|
|
const JobSetup& i_rInitSetup );
|
2008-10-01 18:22:22 +00:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual bool HasMirroredGraphics() const SAL_OVERRIDE;
|
2014-02-07 22:32:58 +11:00
|
|
|
|
2014-03-15 02:08:55 +11:00
|
|
|
virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
|
2014-03-26 16:37:00 +01:00
|
|
|
const Point& rSrcPt, const Size& rSrcSize ) SAL_OVERRIDE;
|
2014-03-15 02:08:55 +11:00
|
|
|
virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
|
|
|
|
const Point& rSrcPt, const Size& rSrcSize,
|
2014-03-26 16:37:00 +01:00
|
|
|
const OutputDevice& rOutDev ) SAL_OVERRIDE;
|
2014-03-15 02:08:55 +11:00
|
|
|
virtual void CopyArea( const Point& rDestPt,
|
|
|
|
const Point& rSrcPt, const Size& rSrcSize,
|
2015-05-18 14:41:05 +02:00
|
|
|
bool bWindowInvalidate = false ) SAL_OVERRIDE;
|
2014-03-15 02:08:55 +11:00
|
|
|
|
2015-05-18 15:41:24 +02:00
|
|
|
virtual void DrawImage( const Point&, const Image&, DrawImageFlags ) SAL_OVERRIDE;
|
2014-04-21 22:00:31 +10:00
|
|
|
virtual void DrawImage( const Point&, const Size&,
|
2015-05-18 15:41:24 +02:00
|
|
|
const Image&, DrawImageFlags ) SAL_OVERRIDE;
|
2014-04-21 22:00:31 +10:00
|
|
|
|
2014-03-15 02:08:55 +11:00
|
|
|
|
2015-02-19 16:39:06 +01:00
|
|
|
// These 3 together are more modular PrintJob(), allowing printing more documents as one print job
|
|
|
|
// by repeated calls to ExecutePrintJob(). Used by mailmerge.
|
2015-05-06 13:01:57 +01:00
|
|
|
static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
|
2015-02-19 16:39:06 +01:00
|
|
|
const JobSetup& i_rInitSetup );
|
|
|
|
static bool ExecutePrintJob( std::shared_ptr<vcl::PrinterController> i_pController );
|
|
|
|
static void FinishPrintJob( std::shared_ptr<vcl::PrinterController> i_pController );
|
|
|
|
|
2008-10-01 18:22:22 +00:00
|
|
|
// implementation detail of PrintJob being asynchronous
|
|
|
|
// not exported, not usable outside vcl
|
2015-02-19 16:39:06 +01:00
|
|
|
static void SAL_DLLPRIVATE ImplPrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
|
2014-03-15 00:50:41 +11:00
|
|
|
const JobSetup& i_rInitSetup );
|
2008-10-01 18:22:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
namespace vcl
|
|
|
|
{
|
2009-07-06 10:54:21 +00:00
|
|
|
class ImplPrinterControllerData;
|
2008-10-01 18:22:22 +00:00
|
|
|
|
2009-07-06 10:54:21 +00:00
|
|
|
class VCL_DLLPUBLIC PrinterController
|
2008-10-01 18:22:22 +00:00
|
|
|
{
|
2009-07-06 10:54:21 +00:00
|
|
|
ImplPrinterControllerData* mpImplData;
|
2009-06-09 15:06:57 +00:00
|
|
|
protected:
|
2015-03-16 15:24:04 +00:00
|
|
|
PrinterController( const VclPtr<Printer>& );
|
2008-10-01 18:22:22 +00:00
|
|
|
public:
|
2009-07-30 13:52:50 +00:00
|
|
|
enum NupOrderType
|
2010-10-11 16:19:35 +02:00
|
|
|
{ LRTB, TBLR, TBRL, RLTB };
|
2009-06-09 18:58:38 +00:00
|
|
|
struct MultiPageSetup
|
|
|
|
{
|
|
|
|
// all metrics in 100th mm
|
2009-07-30 13:52:50 +00:00
|
|
|
int nRows;
|
|
|
|
int nColumns;
|
|
|
|
int nRepeat;
|
|
|
|
Size aPaperSize;
|
|
|
|
long nLeftMargin;
|
|
|
|
long nTopMargin;
|
|
|
|
long nRightMargin;
|
|
|
|
long nBottomMargin;
|
|
|
|
long nHorizontalSpacing;
|
|
|
|
long nVerticalSpacing;
|
|
|
|
bool bDrawBorder;
|
|
|
|
PrinterController::NupOrderType nOrder;
|
2009-06-09 18:58:38 +00:00
|
|
|
|
|
|
|
MultiPageSetup()
|
2009-06-10 13:22:04 +00:00
|
|
|
: nRows( 1 ), nColumns( 1 ), nRepeat( 1 ), aPaperSize( 21000, 29700 )
|
2009-07-28 11:54:16 +00:00
|
|
|
, nLeftMargin( 0 ), nTopMargin( 0 )
|
|
|
|
, nRightMargin( 0 ), nBottomMargin( 0 )
|
2009-08-25 08:52:05 +00:00
|
|
|
, nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
|
2009-07-28 11:54:16 +00:00
|
|
|
, bDrawBorder( false )
|
2009-07-30 13:52:50 +00:00
|
|
|
, nOrder( LRTB )
|
2009-06-09 18:58:38 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2009-08-17 17:34:09 +00:00
|
|
|
struct PageSize
|
|
|
|
{
|
|
|
|
Size aSize; // in 100th mm
|
|
|
|
bool bFullPaper; // full paper, not only imageable area is printed
|
|
|
|
|
|
|
|
PageSize( const Size& i_rSize = Size( 21000, 29700 ),
|
|
|
|
bool i_bFullPaper = false
|
|
|
|
) : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {}
|
|
|
|
};
|
|
|
|
|
2009-07-06 10:54:21 +00:00
|
|
|
virtual ~PrinterController();
|
2008-10-01 18:22:22 +00:00
|
|
|
|
2015-03-16 15:24:04 +00:00
|
|
|
const VclPtr<Printer>& getPrinter() const;
|
2008-10-30 14:31:29 +00:00
|
|
|
/* for implementations: get current job properties as changed by e.g. print dialog
|
|
|
|
this gets the current set of properties initially told to Printer::PrintJob
|
|
|
|
|
|
|
|
For convenience a second sequence will be merged in to get a combined sequence.
|
|
|
|
In case of duplicate property names, the value of i_MergeList wins.
|
|
|
|
*/
|
2014-02-04 19:55:39 +00:00
|
|
|
css::uno::Sequence< css::beans::PropertyValue >
|
|
|
|
getJobProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rMergeList ) const;
|
2008-10-30 14:31:29 +00:00
|
|
|
|
2009-04-15 19:11:23 +00:00
|
|
|
/* get the PropertyValue of a Property
|
2008-10-30 14:31:29 +00:00
|
|
|
*/
|
2014-02-04 19:55:39 +00:00
|
|
|
css::beans::PropertyValue* getValue( const OUString& i_rPropertyName );
|
|
|
|
const css::beans::PropertyValue* getValue( const OUString& i_rPropertyName ) const;
|
2009-11-18 19:19:29 +01:00
|
|
|
/* get a bool property
|
|
|
|
in case the property is unknown or not convertible to bool, i_bFallback is returned
|
|
|
|
*/
|
2014-02-21 12:53:51 +01:00
|
|
|
bool getBoolProperty( const OUString& i_rPropertyName, bool i_bFallback ) const;
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
/* get an int property
|
|
|
|
in case the property is unknown or not convertible to bool, i_nFallback is returned
|
|
|
|
*/
|
2013-04-07 12:06:47 +02:00
|
|
|
sal_Int32 getIntProperty( const OUString& i_rPropertyName, sal_Int32 i_nFallback ) const;
|
2008-10-30 14:31:29 +00:00
|
|
|
|
2009-06-24 15:18:33 +00:00
|
|
|
/* set a property value - can also be used to add another UI property
|
|
|
|
*/
|
2014-02-04 19:55:39 +00:00
|
|
|
void setValue( const OUString& i_rPropertyName, const css::uno::Any& i_rValue );
|
|
|
|
void setValue( const css::beans::PropertyValue& i_rValue );
|
2009-06-24 15:18:33 +00:00
|
|
|
|
|
|
|
/* return the currently active UI options. These are the same that were passed to setUIOptions.
|
2008-10-30 14:31:29 +00:00
|
|
|
*/
|
2014-02-04 19:55:39 +00:00
|
|
|
const css::uno::Sequence< css::beans::PropertyValue >& getUIOptions() const;
|
2008-10-30 14:31:29 +00:00
|
|
|
/* set possible UI options. should only be done once before passing the PrinterListener
|
|
|
|
to Printer::PrintJob
|
|
|
|
*/
|
2014-02-04 19:55:39 +00:00
|
|
|
void setUIOptions( const css::uno::Sequence< css::beans::PropertyValue >& );
|
2008-10-30 14:31:29 +00:00
|
|
|
/* enable/disable an option; this can be used to implement dialog logic.
|
|
|
|
*/
|
2013-04-07 12:06:47 +02:00
|
|
|
bool isUIOptionEnabled( const OUString& rPropName ) const;
|
|
|
|
bool isUIChoiceEnabled( const OUString& rPropName, sal_Int32 nChoice ) const;
|
2009-10-19 14:46:44 +02:00
|
|
|
/* returns the property name rPropName depends on or an empty string
|
|
|
|
if no dependency exists.
|
|
|
|
*/
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString getDependency( const OUString& rPropName ) const;
|
2009-10-19 14:46:44 +02:00
|
|
|
/* makeEnabled will chage the property rPropName depends on to the value
|
|
|
|
that makes rPropName enabled. If the dependency itself is also disabled,
|
|
|
|
no action will be performed.
|
|
|
|
|
|
|
|
returns the property name rPropName depends on or an empty string
|
|
|
|
if no change was made.
|
|
|
|
*/
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString makeEnabled( const OUString& rPropName );
|
2008-10-30 14:31:29 +00:00
|
|
|
|
2015-01-08 23:08:34 +01:00
|
|
|
virtual int getPageCount() const = 0; /// App must override this
|
2008-10-01 18:22:22 +00:00
|
|
|
/* get the page parameters, namely the jobsetup that should be active for the page
|
|
|
|
(describing among others the physical page size) and the "page size". In writer
|
|
|
|
case this would probably be the same as the JobSetup since writer sets the page size
|
|
|
|
draw/impress for example print their page on the paper set on the printer,
|
|
|
|
possibly adjusting the page size to fit. That means the page size can be different from
|
|
|
|
the paper size.
|
2015-01-08 23:08:34 +01:00
|
|
|
App must override this, return page size in 1/100th mm
|
2008-10-01 18:22:22 +00:00
|
|
|
*/
|
2014-02-04 19:55:39 +00:00
|
|
|
virtual css::uno::Sequence< css::beans::PropertyValue > getPageParameters( int i_nPage ) const = 0;
|
2015-01-08 23:08:34 +01:00
|
|
|
virtual void printPage(int i_nPage) const = 0; /// App must override this
|
2009-06-26 10:50:42 +00:00
|
|
|
virtual void jobStarted(); // will be called after a possible dialog has been shown and the real printjob starts
|
|
|
|
virtual void jobFinished( com::sun::star::view::PrintableState );
|
|
|
|
|
|
|
|
com::sun::star::view::PrintableState getJobState() const;
|
2008-10-01 18:22:22 +00:00
|
|
|
|
2009-07-06 10:54:21 +00:00
|
|
|
void abortJob();
|
|
|
|
|
2009-08-05 15:02:39 +00:00
|
|
|
bool isShowDialogs() const;
|
2009-08-05 15:46:46 +00:00
|
|
|
bool isDirectPrint() const;
|
2009-08-05 15:02:39 +00:00
|
|
|
|
2009-03-18 14:46:10 +00:00
|
|
|
// implementation details, not usable outside vcl
|
2010-12-06 17:06:23 +01:00
|
|
|
// don't use outside vcl. Some of these are exported for
|
2010-08-16 20:31:58 +02:00
|
|
|
// the benefit of vcl's plugins.
|
|
|
|
// Still: DO NOT USE OUTSIDE VCL
|
2010-12-06 17:06:23 +01:00
|
|
|
VCL_PLUGIN_PUBLIC int getFilteredPageCount();
|
2009-08-17 17:34:09 +00:00
|
|
|
SAL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf, bool i_bMayUseCache = false );
|
2010-12-06 17:06:23 +01:00
|
|
|
VCL_PLUGIN_PUBLIC PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache = false );
|
2011-11-23 09:25:09 +01:00
|
|
|
VCL_PLUGIN_PUBLIC void printFilteredPage( int i_nPage );
|
2015-03-16 15:24:04 +00:00
|
|
|
SAL_DLLPRIVATE void setPrinter( const VclPtr<Printer>& );
|
2015-04-30 10:20:00 +02:00
|
|
|
SAL_DLLPRIVATE void setOptionChangeHdl( const Link<>& );
|
2010-12-06 17:06:23 +01:00
|
|
|
VCL_PLUGIN_PUBLIC void createProgressDialog();
|
|
|
|
VCL_PLUGIN_PUBLIC bool isProgressCanceled() const;
|
2009-06-24 17:37:07 +00:00
|
|
|
SAL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
|
|
|
|
SAL_DLLPRIVATE const MultiPageSetup& getMultipage() const;
|
2014-02-21 12:53:51 +01:00
|
|
|
VCL_PLUGIN_PUBLIC void setLastPage( bool i_bLastPage );
|
|
|
|
SAL_DLLPRIVATE void setReversePrint( bool i_bReverse );
|
2009-07-30 15:11:07 +00:00
|
|
|
SAL_DLLPRIVATE bool getReversePrint() const;
|
2014-02-21 12:53:51 +01:00
|
|
|
SAL_DLLPRIVATE void setPapersizeFromSetup( bool i_bPapersizeFromSetup );
|
2013-05-20 11:00:19 +01:00
|
|
|
SAL_DLLPRIVATE bool getPapersizeFromSetup() const;
|
2009-06-24 17:37:07 +00:00
|
|
|
SAL_DLLPRIVATE void pushPropertiesToPrinter();
|
2013-05-17 15:20:11 +01:00
|
|
|
SAL_DLLPRIVATE void resetPaperToLastConfigured();
|
2010-12-06 17:06:23 +01:00
|
|
|
VCL_PLUGIN_PUBLIC void setJobState( com::sun::star::view::PrintableState );
|
2014-09-23 11:20:40 +02:00
|
|
|
SAL_DLLPRIVATE bool setupPrinter( vcl::Window* i_pDlgParent );
|
2009-08-10 16:48:53 +00:00
|
|
|
|
|
|
|
SAL_DLLPRIVATE int getPageCountProtected() const;
|
2014-02-04 19:55:39 +00:00
|
|
|
SAL_DLLPRIVATE css::uno::Sequence< css::beans::PropertyValue > getPageParametersProtected( int i_nPage ) const;
|
2009-09-12 11:22:22 +00:00
|
|
|
|
2015-05-19 10:43:01 +02:00
|
|
|
SAL_DLLPRIVATE DrawModeFlags removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut );
|
2010-11-03 17:10:14 +01:00
|
|
|
SAL_DLLPRIVATE void resetPrinterOptions( bool i_bFileOutput );
|
2007-04-11 17:03:48 +00:00
|
|
|
};
|
|
|
|
|
2009-04-15 19:11:23 +00:00
|
|
|
class VCL_DLLPUBLIC PrinterOptionsHelper
|
|
|
|
{
|
|
|
|
protected:
|
2015-01-01 19:58:59 +00:00
|
|
|
std::unordered_map< OUString, css::uno::Any, OUStringHash > m_aPropertyMap;
|
2014-02-04 19:55:39 +00:00
|
|
|
css::uno::Sequence< css::beans::PropertyValue > m_aUIProperties;
|
2009-04-15 19:11:23 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
PrinterOptionsHelper() {} // create without ui properties
|
2014-02-04 19:55:39 +00:00
|
|
|
PrinterOptionsHelper( const css::uno::Sequence< css::beans::PropertyValue >& i_rUIProperties )
|
2009-04-15 19:11:23 +00:00
|
|
|
: m_aUIProperties( i_rUIProperties )
|
|
|
|
{}
|
|
|
|
~PrinterOptionsHelper()
|
|
|
|
{}
|
|
|
|
|
|
|
|
/* process a new set of properties
|
2010-12-04 13:22:40 +09:00
|
|
|
* merges changed properties and returns "true" if any occurred
|
2009-04-15 19:11:23 +00:00
|
|
|
* if the optional output set is not NULL then the names of the changed properties are returned
|
|
|
|
**/
|
2014-02-04 19:55:39 +00:00
|
|
|
bool processProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp,
|
2013-04-07 12:06:47 +02:00
|
|
|
std::set< OUString >* o_pChangeProp = NULL );
|
2009-04-15 19:11:23 +00:00
|
|
|
/* append to a sequence of property values the ui property sequence passed at creation
|
|
|
|
* as the "ExtraPrintUIOptions" property. if that sequence was empty, no "ExtraPrintUIOptions" property
|
|
|
|
* will be appended.
|
|
|
|
**/
|
2014-02-04 19:55:39 +00:00
|
|
|
void appendPrintUIOptions( css::uno::Sequence< css::beans::PropertyValue >& io_rProps ) const;
|
2009-04-15 19:11:23 +00:00
|
|
|
|
|
|
|
// returns an empty Any for not existing properties
|
2014-02-04 19:55:39 +00:00
|
|
|
css::uno::Any getValue( const OUString& i_rPropertyName ) const;
|
2009-04-15 19:11:23 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool getBoolValue( const OUString& i_rPropertyName, bool i_bDefault = false ) const;
|
2009-04-15 19:11:23 +00:00
|
|
|
// convenience for fixed strings
|
2014-02-21 12:53:51 +01:00
|
|
|
bool getBoolValue( const char* i_pPropName, bool i_bDefault = false ) const
|
2013-04-07 12:06:47 +02:00
|
|
|
{ return getBoolValue( OUString::createFromAscii( i_pPropName ), i_bDefault ); }
|
2009-04-15 19:11:23 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
sal_Int64 getIntValue( const OUString& i_rPropertyName, sal_Int64 i_nDefault = 0 ) const;
|
2009-04-15 19:11:23 +00:00
|
|
|
// convenience for fixed strings
|
2009-04-23 15:53:27 +00:00
|
|
|
sal_Int64 getIntValue( const char* i_pPropName, sal_Int64 i_nDefault = 0 ) const
|
2013-04-07 12:06:47 +02:00
|
|
|
{ return getIntValue( OUString::createFromAscii( i_pPropName ), i_nDefault ); }
|
2009-04-15 19:11:23 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString getStringValue( const OUString& i_rPropertyName, const OUString& i_rDefault = OUString() ) const;
|
2009-04-15 19:11:23 +00:00
|
|
|
// convenience for fixed strings
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString getStringValue( const char* i_pPropName, const OUString& i_rDefault = OUString() ) const
|
|
|
|
{ return getStringValue( OUString::createFromAscii( i_pPropName ), i_rDefault ); }
|
2009-04-15 19:11:23 +00:00
|
|
|
|
|
|
|
// helper functions for user to create a single control
|
2009-07-28 19:01:04 +00:00
|
|
|
struct UIControlOptions
|
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString maDependsOnName;
|
2009-07-28 19:01:04 +00:00
|
|
|
sal_Int32 mnDependsOnEntry;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool mbAttachToDependency;
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString maGroupHint;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool mbInternalOnly;
|
|
|
|
bool mbEnabled;
|
2014-02-04 19:55:39 +00:00
|
|
|
css::uno::Sequence< css::beans::PropertyValue > maAddProps;
|
2009-07-28 19:01:04 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
UIControlOptions( const OUString& i_rDependsOnName = OUString(),
|
2009-07-28 19:01:04 +00:00
|
|
|
sal_Int32 i_nDependsOnEntry = -1,
|
2014-02-21 12:53:51 +01:00
|
|
|
bool i_bAttachToDependency = false,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rGroupHint = OUString(),
|
2014-02-21 12:53:51 +01:00
|
|
|
bool i_bInternalOnly = false,
|
|
|
|
bool i_bEnabled = true
|
2009-07-28 19:01:04 +00:00
|
|
|
)
|
|
|
|
: maDependsOnName( i_rDependsOnName )
|
|
|
|
, mnDependsOnEntry( i_nDependsOnEntry )
|
|
|
|
, mbAttachToDependency( i_bAttachToDependency )
|
|
|
|
, maGroupHint( i_rGroupHint )
|
2009-12-08 13:00:42 +01:00
|
|
|
, mbInternalOnly( i_bInternalOnly )
|
|
|
|
, mbEnabled( i_bEnabled ) {}
|
2009-07-28 19:01:04 +00:00
|
|
|
};
|
2009-04-15 19:11:23 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
// note: in the following helper functions HelpIds are expected as an OUString
|
|
|
|
// the normal HelpId form is OString (byte string instead of UTF16 string)
|
2010-11-02 17:03:34 +01:00
|
|
|
// this is because the whole interface is base on UNO properties; in fact the structures
|
|
|
|
// are passed over UNO interfaces. UNO does not know a byte string, hence the string is
|
|
|
|
// transported via UTF16 strings.
|
|
|
|
|
2012-09-10 16:59:55 +01:00
|
|
|
// Show general control
|
2014-02-04 19:55:39 +00:00
|
|
|
static css::uno::Any setUIControlOpt( const css::uno::Sequence< OUString >& i_rIDs,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rTitle,
|
2014-02-04 19:55:39 +00:00
|
|
|
const css::uno::Sequence< OUString >& i_rHelpId,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rType,
|
2014-02-04 19:55:39 +00:00
|
|
|
const css::beans::PropertyValue* i_pValue = NULL,
|
2009-07-28 19:01:04 +00:00
|
|
|
const UIControlOptions& i_rControlOptions = UIControlOptions()
|
2009-04-15 19:11:23 +00:00
|
|
|
);
|
2012-09-10 16:59:55 +01:00
|
|
|
|
|
|
|
// Show and set the title of a TagPage of id i_rID
|
2014-02-04 19:55:39 +00:00
|
|
|
static css::uno::Any setGroupControlOpt(const OUString& i_rID,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rTitle,
|
|
|
|
const OUString& i_rHelpId);
|
2012-09-10 16:59:55 +01:00
|
|
|
|
|
|
|
// Show and set the label of a VclFrame of id i_rID
|
2014-02-04 19:55:39 +00:00
|
|
|
static css::uno::Any setSubgroupControlOpt(const OUString& i_rID,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rTitle,
|
|
|
|
const OUString& i_rHelpId,
|
2012-09-10 16:59:55 +01:00
|
|
|
const UIControlOptions& i_rControlOptions = UIControlOptions());
|
|
|
|
|
|
|
|
// Show a bool option as a checkbox
|
2014-02-04 19:55:39 +00:00
|
|
|
static css::uno::Any setBoolControlOpt(const OUString& i_rID,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rTitle,
|
|
|
|
const OUString& i_rHelpId,
|
|
|
|
const OUString& i_rProperty,
|
2014-02-21 12:53:51 +01:00
|
|
|
bool i_bValue,
|
2012-09-10 16:59:55 +01:00
|
|
|
const UIControlOptions& i_rControlOptions = UIControlOptions());
|
|
|
|
|
|
|
|
// Show a set of choices in a list box
|
2014-02-04 19:55:39 +00:00
|
|
|
static css::uno::Any setChoiceListControlOpt(const OUString& i_rID,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rTitle,
|
2014-02-04 19:55:39 +00:00
|
|
|
const css::uno::Sequence< OUString >& i_rHelpId,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rProperty,
|
2014-02-04 19:55:39 +00:00
|
|
|
const css::uno::Sequence< OUString >& i_rChoices,
|
2012-09-10 16:59:55 +01:00
|
|
|
sal_Int32 i_nValue,
|
2014-02-04 19:55:39 +00:00
|
|
|
const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
|
2012-09-10 16:59:55 +01:00
|
|
|
const UIControlOptions& i_rControlOptions = UIControlOptions());
|
|
|
|
|
|
|
|
// show a set of choices as radio buttons
|
2014-02-04 19:55:39 +00:00
|
|
|
static css::uno::Any setChoiceRadiosControlOpt(const css::uno::Sequence< OUString >& i_rIDs,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rTitle,
|
2014-02-04 19:55:39 +00:00
|
|
|
const css::uno::Sequence< OUString >& i_rHelpId,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rProperty,
|
2014-02-04 19:55:39 +00:00
|
|
|
const css::uno::Sequence< OUString >& i_rChoices,
|
2012-09-10 16:59:55 +01:00
|
|
|
sal_Int32 i_nValue,
|
2014-02-04 19:55:39 +00:00
|
|
|
const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
|
2012-09-10 16:59:55 +01:00
|
|
|
const UIControlOptions& i_rControlOptions = UIControlOptions());
|
|
|
|
|
|
|
|
|
|
|
|
// show an integer range (e.g. a spin field)
|
2009-05-22 07:04:13 +00:00
|
|
|
// note: max value < min value means do not apply min/max values
|
2014-02-04 19:55:39 +00:00
|
|
|
static css::uno::Any setRangeControlOpt(const OUString& i_rID,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rTitle,
|
|
|
|
const OUString& i_rHelpId,
|
|
|
|
const OUString& i_rProperty,
|
2012-09-10 16:59:55 +01:00
|
|
|
sal_Int32 i_nValue,
|
|
|
|
sal_Int32 i_nMinValue = -1,
|
|
|
|
sal_Int32 i_nMaxValue = -2,
|
|
|
|
const UIControlOptions& i_rControlOptions = UIControlOptions());
|
|
|
|
|
|
|
|
// show a string field
|
|
|
|
// note: max value < min value means do not apply min/max values
|
2014-02-04 19:55:39 +00:00
|
|
|
static css::uno::Any setEditControlOpt(const OUString& i_rID,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& i_rTitle,
|
|
|
|
const OUString& i_rHelpId,
|
|
|
|
const OUString& i_rProperty,
|
|
|
|
const OUString& i_rValue,
|
2012-09-10 16:59:55 +01:00
|
|
|
const UIControlOptions& i_rControlOptions = UIControlOptions());
|
2009-04-15 19:11:23 +00:00
|
|
|
};
|
|
|
|
|
2008-10-01 18:22:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-10-23 19:10:20 +02:00
|
|
|
#endif // INCLUDED_VCL_PRINT_HXX
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|