2010-10-12 15:51:52 +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.
|
2000-09-18 16:07:07 +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/.
|
2000-09-18 16:07:07 +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:
|
2000-09-18 16:07:07 +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 .
|
|
|
|
*/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2005-03-15 10:21:57 +00:00
|
|
|
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
|
2008-03-12 10:59:12 +00:00
|
|
|
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
|
2005-03-15 10:21:57 +00:00
|
|
|
|
2004-01-20 11:53:29 +00:00
|
|
|
#include "View.hxx"
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/unolingu.hxx>
|
2002-04-24 06:17:33 +00:00
|
|
|
#include <sfx2/request.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <svx/obj3d.hxx>
|
|
|
|
#include <svx/fmview.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/outliner.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <svx/svxids.hrc>
|
|
|
|
#include <svx/svdograf.hxx>
|
|
|
|
#include <svx/svdoole2.hxx>
|
|
|
|
#include <svx/svdundo.hxx>
|
2014-01-02 23:52:37 +01:00
|
|
|
|
|
|
|
#include <vcl/settings.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <vcl/msgbox.hxx>
|
2014-01-02 23:52:37 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#include <sfx2/app.hxx>
|
|
|
|
#include <svx/svdpagv.hxx>
|
|
|
|
#include <sfx2/docfile.hxx>
|
|
|
|
#include <svx/svdoutl.hxx>
|
2004-03-30 14:55:49 +00:00
|
|
|
#include <svx/sdr/contact/displayinfo.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-03-12 10:59:12 +00:00
|
|
|
#include <svx/svdetc.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/editstat.hxx>
|
2008-03-12 10:59:12 +00:00
|
|
|
|
2002-04-24 06:17:33 +00:00
|
|
|
#include <svx/dialogs.hrc>
|
2004-10-04 17:46:54 +00:00
|
|
|
#include <sfx2/viewfrm.hxx>
|
2013-04-10 08:20:16 +00:00
|
|
|
#include <sfx2/sidebar/EnumContext.hxx>
|
2004-03-30 14:55:49 +00:00
|
|
|
#include <svx/svdopage.hxx>
|
2004-10-04 17:46:54 +00:00
|
|
|
#include <toolkit/helper/vclunohelper.hxx>
|
2004-03-30 14:55:49 +00:00
|
|
|
#include <svx/xlndsit.hxx>
|
|
|
|
#include <svx/xlineit0.hxx>
|
|
|
|
#include <svx/xlnclit.hxx>
|
2013-04-10 08:20:16 +00:00
|
|
|
#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
|
2006-11-14 13:45:44 +00:00
|
|
|
#include <vcl/virdev.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
#include "app.hrc"
|
2001-03-08 10:28:38 +00:00
|
|
|
#include "strings.hrc"
|
2004-01-20 11:53:29 +00:00
|
|
|
#include "Window.hxx"
|
|
|
|
#include "Client.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "drawdoc.hxx"
|
2004-01-20 11:53:29 +00:00
|
|
|
#include "DrawDocShell.hxx"
|
2013-04-19 15:49:58 -04:00
|
|
|
#include "sdmod.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "sdpage.hxx"
|
|
|
|
#include "glob.hrc"
|
|
|
|
#include "sdresid.hxx"
|
2004-01-20 11:53:29 +00:00
|
|
|
#include "DrawViewShell.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "futext.hxx"
|
|
|
|
#include "fuinsfil.hxx"
|
2004-11-26 19:34:44 +00:00
|
|
|
#include "slideshow.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "stlpool.hxx"
|
2004-01-20 11:53:29 +00:00
|
|
|
#include "FrameView.hxx"
|
2004-07-13 14:16:29 +00:00
|
|
|
#include "ViewClipboard.hxx"
|
2006-01-10 13:38:10 +00:00
|
|
|
#include "undo/undomanager.hxx"
|
2004-07-12 14:21:57 +00:00
|
|
|
#include <svx/sdr/contact/viewobjectcontact.hxx>
|
|
|
|
#include <svx/sdr/contact/viewcontact.hxx>
|
2013-04-10 08:20:16 +00:00
|
|
|
#include <svx/svdotable.hxx>
|
2004-11-26 19:34:44 +00:00
|
|
|
#include "EventMultiplexer.hxx"
|
|
|
|
#include "ViewShellBase.hxx"
|
2006-03-21 16:48:11 +00:00
|
|
|
#include "ViewShellManager.hxx"
|
2004-10-04 17:46:54 +00:00
|
|
|
|
2008-08-19 23:21:35 +00:00
|
|
|
#include <basegfx/polygon/b2dpolygontools.hxx>
|
|
|
|
#include <basegfx/color/bcolor.hxx>
|
|
|
|
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
|
|
|
|
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
|
|
|
|
#include <drawinglayer/primitive2d/groupprimitive2d.hxx>
|
|
|
|
#include <svx/sdr/contact/objectcontact.hxx>
|
2013-04-10 08:20:16 +00:00
|
|
|
#include <svx/sdr/table/tablecontroller.hxx>
|
2008-08-19 23:21:35 +00:00
|
|
|
#include <basegfx/matrix/b2dhommatrix.hxx>
|
|
|
|
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
|
|
|
|
#include <svx/unoapi.hxx>
|
2009-09-22 18:14:05 +02:00
|
|
|
#include <basegfx/matrix/b2dhommatrixtools.hxx>
|
2013-04-29 11:30:03 +00:00
|
|
|
#include "DrawController.hxx"
|
2008-08-19 23:21:35 +00:00
|
|
|
|
2015-09-18 09:09:12 +01:00
|
|
|
#include <memory>
|
2008-08-19 23:21:35 +00:00
|
|
|
#include <numeric>
|
|
|
|
|
2004-10-04 17:46:54 +00:00
|
|
|
using namespace com::sun::star;
|
2008-03-12 10:59:12 +00:00
|
|
|
using namespace com::sun::star::uno;
|
2013-04-10 08:20:16 +00:00
|
|
|
using namespace sdr::table;
|
2004-01-20 11:53:29 +00:00
|
|
|
namespace sd {
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-01-20 11:53:29 +00:00
|
|
|
TYPEINIT1(View, FmFormView);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-02-01 19:58:05 +04:00
|
|
|
View::View(SdDrawDocument& rDrawDoc, OutputDevice* pOutDev,
|
2004-01-20 11:53:29 +00:00
|
|
|
ViewShell* pViewShell)
|
2012-02-01 19:58:05 +04:00
|
|
|
: FmFormView(&rDrawDoc, pOutDev),
|
|
|
|
mrDoc(rDrawDoc),
|
|
|
|
mpDocSh(rDrawDoc.GetDocSh()),
|
2006-12-12 18:20:07 +00:00
|
|
|
mpViewSh(pViewShell),
|
|
|
|
mpDragSrcMarkList(NULL),
|
|
|
|
mpDropMarkerObj(NULL),
|
|
|
|
mpDropMarker(NULL),
|
|
|
|
mnDragSrcPgNum(SDRPAGE_NOTFOUND),
|
|
|
|
mnAction(DND_ACTION_NONE),
|
|
|
|
mnLockRedrawSmph(0),
|
2014-01-28 20:00:21 +01:00
|
|
|
mbIsDropAllowed(true),
|
2007-07-06 12:14:57 +00:00
|
|
|
maSmartTags(*this),
|
2004-07-13 14:16:29 +00:00
|
|
|
mpClipboard (new ViewClipboard (*this))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2007-02-12 13:32:41 +00:00
|
|
|
// #i73602# Use default from the configuration
|
|
|
|
SetBufferedOverlayAllowed(getOptionsDrawinglayer().IsOverlayBuffer_DrawImpress());
|
2004-05-10 13:37:22 +00:00
|
|
|
|
2007-06-26 10:47:26 +00:00
|
|
|
// #i74769#, #i75172# Use default from the configuration
|
|
|
|
SetBufferedOutputAllowed(getOptionsDrawinglayer().IsPaintBuffer_DrawImpress());
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
EnableExtendedKeyInputDispatcher(false);
|
|
|
|
EnableExtendedMouseEventDispatcher(false);
|
|
|
|
EnableExtendedCommandEventDispatcher(false);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
SetUseIncompatiblePathCreateInterface(false);
|
|
|
|
SetMarkHdlWhenTextEdit(true);
|
|
|
|
EnableTextEditOnObjectsWithoutTextIfTextTool(true);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
SetMinMoveDistancePixel(2);
|
|
|
|
SetHitTolerancePixel(2);
|
2013-08-11 21:13:38 +04:00
|
|
|
SetMeasureLayer(SD_RESSTR(STR_LAYER_MEASURELINES));
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-03-19 22:24:19 +01:00
|
|
|
// Timer for delayed drop (has to be for MAC)
|
2014-11-18 15:11:29 +00:00
|
|
|
maDropErrorIdle.SetIdleHdl( LINK(this, View, DropErrorHdl) );
|
2015-02-26 07:28:54 +00:00
|
|
|
maDropErrorIdle.SetPriority(SchedulerPriority::MEDIUM);
|
2014-11-18 15:11:29 +00:00
|
|
|
maDropInsertFileIdle.SetIdleHdl( LINK(this, View, DropInsertFileHdl) );
|
2015-02-26 07:28:54 +00:00
|
|
|
maDropInsertFileIdle.SetPriority(SchedulerPriority::MEDIUM);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2006-11-14 13:45:44 +00:00
|
|
|
void View::ImplClearDrawDropMarker()
|
|
|
|
{
|
2006-12-12 18:20:07 +00:00
|
|
|
if(mpDropMarker)
|
2006-11-14 13:45:44 +00:00
|
|
|
{
|
2006-12-12 18:20:07 +00:00
|
|
|
delete mpDropMarker;
|
|
|
|
mpDropMarker = 0L;
|
2006-11-14 13:45:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-01-20 11:53:29 +00:00
|
|
|
View::~View()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2007-07-06 12:14:57 +00:00
|
|
|
maSmartTags.Dispose();
|
|
|
|
|
2001-08-21 13:57:26 +00:00
|
|
|
// release content of selection clipboard, if we own the content
|
2014-04-24 10:52:02 +02:00
|
|
|
UpdateSelectionClipboard( true );
|
2001-08-21 13:57:26 +00:00
|
|
|
|
2014-11-18 15:11:29 +00:00
|
|
|
maDropErrorIdle.Stop();
|
|
|
|
maDropInsertFileIdle.Stop();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-11-14 13:45:44 +00:00
|
|
|
ImplClearDrawDropMarker();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-11-14 13:45:44 +00:00
|
|
|
while(PaintWindowCount())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-03-19 22:24:19 +01:00
|
|
|
// remove all registered OutDevs
|
2006-11-14 13:45:44 +00:00
|
|
|
DeleteWindowFromPaintView(GetFirstOutputDevice() /*GetWin(0)*/);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-04-30 07:18:59 +03:00
|
|
|
class ViewRedirector : public sdr::contact::ViewObjectContactRedirector
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ViewRedirector();
|
|
|
|
virtual ~ViewRedirector();
|
|
|
|
|
|
|
|
// all default implementations just call the same methods at the original. To do something
|
2015-01-08 23:08:34 +01:00
|
|
|
// different, override the method and at least do what the method does.
|
2008-08-19 23:21:35 +00:00
|
|
|
virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
|
|
|
|
const sdr::contact::ViewObjectContact& rOriginal,
|
2014-03-27 18:12:18 +01:00
|
|
|
const sdr::contact::DisplayInfo& rDisplayInfo) SAL_OVERRIDE;
|
2004-07-12 14:21:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ViewRedirector::ViewRedirector()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
ViewRedirector::~ViewRedirector()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-08-19 23:21:35 +00:00
|
|
|
drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedPrimitive2DSequence(
|
|
|
|
const sdr::contact::ViewObjectContact& rOriginal,
|
|
|
|
const sdr::contact::DisplayInfo& rDisplayInfo)
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
|
|
|
SdrObject* pObject = rOriginal.GetViewContact().TryToGetSdrObject();
|
2008-08-19 23:21:35 +00:00
|
|
|
drawinglayer::primitive2d::Primitive2DSequence xRetval;
|
2004-07-12 14:21:57 +00:00
|
|
|
|
2008-08-19 23:21:35 +00:00
|
|
|
if(pObject && pObject->GetPage())
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
const bool bDoCreateGeometry(pObject->GetPage()->checkVisibility( rOriginal, rDisplayInfo, true ));
|
|
|
|
|
|
|
|
if(!bDoCreateGeometry && !(( pObject->GetObjInventor() == SdrInventor ) && ( pObject->GetObjIdentifier() == OBJ_PAGE )) )
|
|
|
|
return xRetval;
|
|
|
|
|
|
|
|
PresObjKind eKind(PRESOBJ_NONE);
|
|
|
|
const bool bSubContentProcessing(rDisplayInfo.GetSubContentActive());
|
|
|
|
const bool bIsMasterPageObject(pObject->GetPage()->IsMasterPage());
|
|
|
|
const bool bIsPrinting(rOriginal.GetObjectContact().isOutputToPrinter());
|
|
|
|
const SdrPageView* pPageView = rOriginal.GetObjectContact().TryToGetSdrPageView();
|
|
|
|
const SdrPage* pVisualizedPage = GetSdrPageFromXDrawPage(rOriginal.GetObjectContact().getViewInformation2D().getVisualizedPage());
|
|
|
|
const SdPage* pObjectsSdPage = dynamic_cast< SdPage* >(pObject->GetPage());
|
|
|
|
const bool bIsInsidePageObj(pPageView && pPageView->GetPage() != pVisualizedPage);
|
|
|
|
|
|
|
|
// check if we need to draw a placeholder border. Never do it for
|
|
|
|
// objects inside a SdrPageObj and never when printing
|
|
|
|
if(!bIsInsidePageObj && !bIsPrinting)
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
bool bCreateOutline(false);
|
|
|
|
|
2015-09-30 16:10:07 +02:00
|
|
|
if( pObject->IsEmptyPresObj() && dynamic_cast< SdrTextObj *>( pObject ) != nullptr )
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
if( !bSubContentProcessing || !pObject->IsNotVisibleAsMaster() )
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
eKind = pObjectsSdPage ? pObjectsSdPage->GetPresObjKind(pObject) : PRESOBJ_NONE;
|
2010-02-11 17:35:16 +01:00
|
|
|
bCreateOutline = true;
|
2004-07-12 14:21:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if( ( pObject->GetObjInventor() == SdrInventor ) && ( pObject->GetObjIdentifier() == OBJ_TEXT ) )
|
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
if( pObjectsSdPage )
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
eKind = pObjectsSdPage->GetPresObjKind(pObject);
|
2004-07-12 14:21:57 +00:00
|
|
|
|
|
|
|
if((eKind == PRESOBJ_FOOTER) || (eKind == PRESOBJ_HEADER) || (eKind == PRESOBJ_DATETIME) || (eKind == PRESOBJ_SLIDENUMBER) )
|
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
if( !bSubContentProcessing )
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
|
|
|
// only draw a boundary for header&footer objects on the masterpage itself
|
2008-08-19 23:21:35 +00:00
|
|
|
bCreateOutline = true;
|
2004-07-12 14:21:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-03-06 15:41:59 +00:00
|
|
|
else if( ( pObject->GetObjInventor() == SdrInventor ) && ( pObject->GetObjIdentifier() == OBJ_PAGE ) )
|
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
// only for handout page, else this frame will be created for each
|
|
|
|
// page preview object in SlideSorter and PagePane
|
|
|
|
if(pObjectsSdPage && PK_HANDOUT == pObjectsSdPage->GetPageKind())
|
|
|
|
{
|
|
|
|
bCreateOutline = true;
|
|
|
|
}
|
2008-03-06 15:41:59 +00:00
|
|
|
}
|
2004-07-12 14:21:57 +00:00
|
|
|
|
2008-08-19 23:21:35 +00:00
|
|
|
if(bCreateOutline)
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
// empty presentation objects get a gray frame
|
|
|
|
const svtools::ColorConfig aColorConfig;
|
|
|
|
const svtools::ColorConfigValue aColor( aColorConfig.GetColorValue( svtools::OBJECTBOUNDARIES ) );
|
2004-07-12 14:21:57 +00:00
|
|
|
|
|
|
|
if( aColor.bIsVisible )
|
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
// get basic object transformation
|
|
|
|
const basegfx::BColor aRGBColor(Color(aColor.nColor).getBColor());
|
|
|
|
basegfx::B2DHomMatrix aObjectMatrix;
|
|
|
|
basegfx::B2DPolyPolygon aObjectPolyPolygon;
|
|
|
|
pObject->TRGetBaseGeometry(aObjectMatrix, aObjectPolyPolygon);
|
2004-07-12 14:21:57 +00:00
|
|
|
|
2008-08-19 23:21:35 +00:00
|
|
|
// create dashed border
|
2008-03-06 15:41:59 +00:00
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
// create object polygon
|
2010-01-27 11:51:56 +01:00
|
|
|
basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon());
|
2008-08-19 23:21:35 +00:00
|
|
|
aPolygon.transform(aObjectMatrix);
|
|
|
|
|
|
|
|
// create line and stroke attribute
|
|
|
|
::std::vector< double > aDotDashArray;
|
|
|
|
|
|
|
|
aDotDashArray.push_back(160.0);
|
|
|
|
aDotDashArray.push_back(80.0);
|
|
|
|
|
|
|
|
const double fFullDotDashLen(::std::accumulate(aDotDashArray.begin(), aDotDashArray.end(), 0.0));
|
|
|
|
const drawinglayer::attribute::LineAttribute aLine(aRGBColor);
|
|
|
|
const drawinglayer::attribute::StrokeAttribute aStroke(aDotDashArray, fFullDotDashLen);
|
|
|
|
|
|
|
|
// create primitive and add
|
|
|
|
const drawinglayer::primitive2d::Primitive2DReference xRef(new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
|
|
|
|
aPolygon,
|
|
|
|
aLine,
|
|
|
|
aStroke));
|
|
|
|
drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xRef);
|
2008-03-06 15:41:59 +00:00
|
|
|
}
|
2004-07-12 14:21:57 +00:00
|
|
|
|
2008-08-19 23:21:35 +00:00
|
|
|
// now paint the placeholder description, but only when masterpage
|
|
|
|
// is displayed as page directly (MasterPage view)
|
|
|
|
if(!bSubContentProcessing && bIsMasterPageObject)
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
OUString aObjectString;
|
2004-07-12 14:21:57 +00:00
|
|
|
|
2008-08-19 23:21:35 +00:00
|
|
|
switch( eKind )
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
case PRESOBJ_TITLE:
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PK_STANDARD)
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
static OUString aTitleAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_TITLE));
|
2008-08-19 23:21:35 +00:00
|
|
|
aObjectString = aTitleAreaStr;
|
2004-07-12 14:21:57 +00:00
|
|
|
}
|
2008-08-19 23:21:35 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PRESOBJ_OUTLINE:
|
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
static OUString aOutlineAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_OUTLINE));
|
2008-08-19 23:21:35 +00:00
|
|
|
aObjectString = aOutlineAreaStr;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PRESOBJ_FOOTER:
|
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
static OUString aFooterAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_FOOTER));
|
2008-08-19 23:21:35 +00:00
|
|
|
aObjectString = aFooterAreaStr;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PRESOBJ_HEADER:
|
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
static OUString aHeaderAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_HEADER));
|
2008-08-19 23:21:35 +00:00
|
|
|
aObjectString = aHeaderAreaStr;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PRESOBJ_DATETIME:
|
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
static OUString aDateTimeStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_DATETIME));
|
2008-08-19 23:21:35 +00:00
|
|
|
aObjectString = aDateTimeStr;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PRESOBJ_NOTES:
|
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
static OUString aDateTimeStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_NOTES));
|
2008-08-19 23:21:35 +00:00
|
|
|
aObjectString = aDateTimeStr;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case PRESOBJ_SLIDENUMBER:
|
|
|
|
{
|
|
|
|
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PK_STANDARD)
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
static OUString aSlideAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_SLIDE));
|
2008-08-19 23:21:35 +00:00
|
|
|
aObjectString = aSlideAreaStr;
|
2004-07-12 14:21:57 +00:00
|
|
|
}
|
2008-08-19 23:21:35 +00:00
|
|
|
else
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
static OUString aNumberAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_NUMBER));
|
2008-08-19 23:21:35 +00:00
|
|
|
aObjectString = aNumberAreaStr;
|
2004-07-12 14:21:57 +00:00
|
|
|
}
|
2008-08-19 23:21:35 +00:00
|
|
|
break;
|
2004-07-12 14:21:57 +00:00
|
|
|
}
|
2008-08-19 23:21:35 +00:00
|
|
|
default:
|
2004-07-12 14:21:57 +00:00
|
|
|
{
|
2008-08-19 23:21:35 +00:00
|
|
|
break;
|
2004-07-12 14:21:57 +00:00
|
|
|
}
|
|
|
|
}
|
2008-08-19 23:21:35 +00:00
|
|
|
|
2013-08-11 21:13:38 +04:00
|
|
|
if( !aObjectString.isEmpty() )
|
2008-08-19 23:21:35 +00:00
|
|
|
{
|
|
|
|
// decompose object matrix to be able to place text correctly
|
|
|
|
basegfx::B2DTuple aScale;
|
|
|
|
basegfx::B2DTuple aTranslate;
|
|
|
|
double fRotate, fShearX;
|
|
|
|
aObjectMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
|
|
|
|
|
|
|
|
// create font
|
|
|
|
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObject );
|
|
|
|
const SdrTextVertAdjust eTVA(pTextObj ? pTextObj->GetTextVerticalAdjust() : SDRTEXTVERTADJUST_CENTER);
|
2014-09-16 10:09:58 +02:00
|
|
|
vcl::Font aScaledVclFont;
|
2008-08-19 23:21:35 +00:00
|
|
|
|
|
|
|
// use a text size factor to get more reliable text sizes from the text layouter
|
|
|
|
// (and from vcl), tipp from HDU
|
|
|
|
static sal_uInt32 nTextSizeFactor(100);
|
|
|
|
|
|
|
|
// use a factor to get more linear text size calculations
|
|
|
|
aScaledVclFont.SetHeight( 500 * nTextSizeFactor );
|
|
|
|
|
|
|
|
// get basic geometry and get text size
|
|
|
|
drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
|
|
|
|
aTextLayouter.setFont(aScaledVclFont);
|
2013-08-11 21:13:38 +04:00
|
|
|
const sal_Int32 nTextLength(aObjectString.getLength());
|
2008-08-19 23:21:35 +00:00
|
|
|
|
|
|
|
// do not forget to use the factor again to get the width for the 500
|
|
|
|
const double fTextWidth(aTextLayouter.getTextWidth(aObjectString, 0, nTextLength) * (1.0 / nTextSizeFactor));
|
|
|
|
const double fTextHeight(aTextLayouter.getTextHeight() * (1.0 / nTextSizeFactor));
|
|
|
|
|
|
|
|
// calculate text primitive position. If text is at bottom, use top for
|
|
|
|
// the extra text and vice versa
|
|
|
|
const double fHorDist(125);
|
|
|
|
const double fVerDist(125);
|
|
|
|
const double fPosX((aTranslate.getX() + aScale.getX()) - fTextWidth - fHorDist);
|
|
|
|
const double fPosY((SDRTEXTVERTADJUST_BOTTOM == eTVA)
|
|
|
|
? aTranslate.getY() - fVerDist + fTextHeight
|
|
|
|
: (aTranslate.getY() + aScale.getY()) - fVerDist);
|
|
|
|
|
|
|
|
// get font attributes; use normally scaled font
|
|
|
|
const basegfx::BColor aFontColor(aRGBColor);
|
2014-09-16 10:09:58 +02:00
|
|
|
vcl::Font aVclFont;
|
2009-09-17 10:29:02 +00:00
|
|
|
basegfx::B2DVector aTextSizeAttribute;
|
2008-08-19 23:21:35 +00:00
|
|
|
|
|
|
|
aVclFont.SetHeight( 500 );
|
|
|
|
|
2009-11-12 11:26:43 +01:00
|
|
|
const drawinglayer::attribute::FontAttribute aFontAttribute(
|
|
|
|
drawinglayer::primitive2d::getFontAttributeFromVclFont(
|
2009-09-17 10:29:02 +00:00
|
|
|
aTextSizeAttribute,
|
|
|
|
aVclFont,
|
|
|
|
false,
|
|
|
|
false));
|
2008-08-19 23:21:35 +00:00
|
|
|
|
|
|
|
// fill text matrix
|
2009-09-22 18:14:05 +02:00
|
|
|
const basegfx::B2DHomMatrix aTextMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
|
2009-10-22 17:29:01 +02:00
|
|
|
aTextSizeAttribute.getX(), aTextSizeAttribute.getY(),
|
|
|
|
fShearX,
|
|
|
|
fRotate,
|
|
|
|
fPosX, fPosY));
|
2008-08-19 23:21:35 +00:00
|
|
|
|
|
|
|
// create DXTextArray (can be empty one)
|
2015-04-28 22:42:16 +02:00
|
|
|
const ::std::vector< double > aDXArray{};
|
2008-08-19 23:21:35 +00:00
|
|
|
|
|
|
|
// create locale; this may need some more information in the future
|
|
|
|
const ::com::sun::star::lang::Locale aLocale;
|
|
|
|
|
|
|
|
// create primitive and add
|
2009-09-17 10:29:02 +00:00
|
|
|
const drawinglayer::primitive2d::Primitive2DReference xRef(
|
|
|
|
new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
|
|
|
|
aTextMatrix,
|
|
|
|
aObjectString,
|
|
|
|
0,
|
|
|
|
nTextLength,
|
|
|
|
aDXArray,
|
2009-11-12 11:26:43 +01:00
|
|
|
aFontAttribute,
|
2009-09-17 10:29:02 +00:00
|
|
|
aLocale,
|
|
|
|
aFontColor));
|
2008-08-19 23:21:35 +00:00
|
|
|
drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xRef);
|
|
|
|
}
|
2004-07-12 14:21:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-08-19 23:21:35 +00:00
|
|
|
|
|
|
|
if(bDoCreateGeometry)
|
|
|
|
{
|
|
|
|
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(
|
|
|
|
xRetval,
|
|
|
|
sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
|
|
|
|
rOriginal,
|
|
|
|
rDisplayInfo));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// not a SdrObject visualisation (maybe e.g. page) or no page
|
|
|
|
xRetval = sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(rOriginal, rDisplayInfo);
|
2004-07-12 14:21:57 +00:00
|
|
|
}
|
|
|
|
|
2008-08-19 23:21:35 +00:00
|
|
|
return xRetval;
|
2004-07-12 14:21:57 +00:00
|
|
|
}
|
|
|
|
|
2013-03-19 22:24:19 +01:00
|
|
|
/**
|
|
|
|
* The event will be forwarded to the View
|
|
|
|
*/
|
2014-09-27 14:52:40 +02:00
|
|
|
void View::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0L*/)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-03-19 22:24:19 +01:00
|
|
|
// execute ??
|
2006-12-12 18:20:07 +00:00
|
|
|
if (mnLockRedrawSmph == 0)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-11-14 13:45:44 +00:00
|
|
|
SdrPageView* pPgView = GetSdrPageView();
|
2002-04-12 11:24:04 +00:00
|
|
|
|
|
|
|
if (pPgView)
|
|
|
|
{
|
2014-10-30 09:37:00 +02:00
|
|
|
SdPage* pPage = static_cast<SdPage*>( pPgView->GetPage() );
|
2002-04-12 11:24:04 +00:00
|
|
|
if( pPage )
|
|
|
|
{
|
2012-02-01 19:58:05 +04:00
|
|
|
SdrOutliner& rOutl = mrDoc.GetDrawOutliner(NULL);
|
2008-02-12 15:30:16 +00:00
|
|
|
bool bScreenDisplay(true);
|
|
|
|
|
|
|
|
if(bScreenDisplay && pOutDev && OUTDEV_PRINTER == pOutDev->GetOutDevType())
|
|
|
|
{
|
|
|
|
// #i75566# printing; suppress AutoColor BackgroundColor generation
|
|
|
|
// for visibility reasons by giving GetPageBackgroundColor()
|
|
|
|
// the needed hint
|
|
|
|
bScreenDisplay = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(bScreenDisplay && pOutDev && pOutDev->GetPDFWriter())
|
|
|
|
{
|
|
|
|
// #i75566# PDF export; suppress AutoColor BackgroundColor generation (see above)
|
|
|
|
bScreenDisplay = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// #i75566# Name change GetBackgroundColor -> GetPageBackgroundColor and
|
|
|
|
// hint value if screen display. Only then the AutoColor mechanisms shall be applied
|
|
|
|
rOutl.SetBackgroundColor( pPage->GetPageBackgroundColor(pPgView, bScreenDisplay) );
|
2002-04-12 11:24:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-07-12 14:21:57 +00:00
|
|
|
ViewRedirector aViewRedirector;
|
2008-08-19 23:21:35 +00:00
|
|
|
FmFormView::CompleteRedraw(pOutDev, rReg, pRedirector ? pRedirector : &aViewRedirector);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2013-03-19 22:24:19 +01:00
|
|
|
// or save?
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
SdViewRedrawRec* pRec = new SdViewRedrawRec;
|
2006-12-12 18:20:07 +00:00
|
|
|
pRec->mpOut = pOutDev;
|
2000-09-18 16:07:07 +00:00
|
|
|
pRec->aRect = rReg.GetBoundRect();
|
2011-05-03 18:23:32 -04:30
|
|
|
maLockedRedraws.push_back(pRec);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-01-20 11:53:29 +00:00
|
|
|
void View::MarkListHasChanged()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
FmFormView::MarkListHasChanged();
|
2007-07-06 12:14:57 +00:00
|
|
|
|
|
|
|
if( GetMarkedObjectCount() > 0 )
|
|
|
|
maSmartTags.deselect();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool View::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bOk = FmFormView::SetAttributes(rSet, bReplaceAll);
|
2015-02-11 13:20:49 +02:00
|
|
|
return bOk;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool View::GetAttributes( SfxItemSet& rTargetSet, bool bOnlyHardAttr ) const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-02-11 13:20:49 +02:00
|
|
|
return FmFormView::GetAttributes( rTargetSet, bOnlyHardAttr );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2013-03-19 22:24:19 +01:00
|
|
|
/**
|
|
|
|
* Is a presentation object selected?
|
|
|
|
*/
|
2014-04-24 10:52:02 +02:00
|
|
|
bool View::IsPresObjSelected(bool bOnPage, bool bOnMasterPage, bool bCheckPresObjListOnly, bool bCheckLayoutOnly) const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
SdrMarkList* pMarkList;
|
|
|
|
|
2006-12-12 18:20:07 +00:00
|
|
|
if (mnDragSrcPgNum != SDRPAGE_NOTFOUND &&
|
|
|
|
mnDragSrcPgNum != GetSdrPageView()->GetPage()->GetPageNum())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-03-19 22:24:19 +01:00
|
|
|
/* Drag&Drop is in progress
|
|
|
|
Source and destination page are different:
|
|
|
|
we use the saved mark list */
|
2006-12-12 18:20:07 +00:00
|
|
|
pMarkList = mpDragSrcMarkList;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-03-19 22:24:19 +01:00
|
|
|
// We use the current mark list
|
2004-07-12 14:21:57 +00:00
|
|
|
pMarkList = new SdrMarkList(GetMarkedObjectList());
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SdrMark* pMark;
|
|
|
|
SdPage* pPage;
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bSelected = false;
|
|
|
|
bool bMasterPage = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-08-05 22:30:24 +02:00
|
|
|
for (size_t nMark = pMarkList->GetMarkCount(); nMark && !bSelected; )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-08-05 22:30:24 +02:00
|
|
|
--nMark;
|
2013-03-19 22:24:19 +01:00
|
|
|
// Backwards through mark list
|
2000-09-18 16:07:07 +00:00
|
|
|
pMark = pMarkList->GetMark(nMark);
|
2014-12-20 21:45:16 +01:00
|
|
|
SdrObject* pObj = pMark->GetMarkedSdrObj();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-09-28 11:22:20 +00:00
|
|
|
if ( pObj && ( bCheckPresObjListOnly || pObj->IsEmptyPresObj() || pObj->GetUserCall() ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-30 09:37:00 +02:00
|
|
|
pPage = static_cast<SdPage*>( pObj->GetPage() );
|
2011-11-06 13:20:56 +04:00
|
|
|
bMasterPage = pPage && pPage->IsMasterPage();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-12-11 07:05:03 +00:00
|
|
|
if ( (bMasterPage && bOnMasterPage) || (!bMasterPage && bOnPage) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-03-30 14:55:49 +00:00
|
|
|
if ( pPage && pPage->IsPresObj(pObj) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-03-30 14:55:49 +00:00
|
|
|
if( bCheckLayoutOnly )
|
|
|
|
{
|
|
|
|
PresObjKind eKind = pPage->GetPresObjKind(pObj);
|
|
|
|
|
|
|
|
if((eKind != PRESOBJ_FOOTER) && (eKind != PRESOBJ_HEADER) && (eKind != PRESOBJ_DATETIME) && (eKind != PRESOBJ_SLIDENUMBER) )
|
2014-04-24 10:52:02 +02:00
|
|
|
bSelected = true;
|
2004-03-30 14:55:49 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-04-24 10:52:02 +02:00
|
|
|
bSelected = true;
|
2004-03-30 14:55:49 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-12-12 18:20:07 +00:00
|
|
|
if (pMarkList != mpDragSrcMarkList)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
delete pMarkList;
|
|
|
|
}
|
|
|
|
|
2015-02-11 13:20:49 +02:00
|
|
|
return bSelected;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2004-01-20 11:53:29 +00:00
|
|
|
void View::SelectAll()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( IsTextEdit() )
|
|
|
|
{
|
|
|
|
OutlinerView* pOLV = GetTextEditOutlinerView();
|
2004-01-20 11:53:29 +00:00
|
|
|
const ::Outliner* pOutliner = GetTextEditOutliner();
|
2013-05-08 18:12:32 +02:00
|
|
|
pOLV->SelectRange( 0, pOutliner->GetParagraphCount() );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
MarkAll();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-01-20 11:53:29 +00:00
|
|
|
void View::ModelHasChanged()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-03-19 22:24:19 +01:00
|
|
|
// First, notify SdrView
|
2000-09-18 16:07:07 +00:00
|
|
|
FmFormView::ModelHasChanged();
|
|
|
|
}
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool View::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-03-19 22:24:19 +01:00
|
|
|
// forward to SdrView
|
2000-09-18 16:07:07 +00:00
|
|
|
return FmFormView::SetStyleSheet(pStyleSheet, bDontRemoveHardAttr);
|
|
|
|
}
|
|
|
|
|
2013-03-19 22:24:19 +01:00
|
|
|
/**
|
|
|
|
* Start text input
|
|
|
|
*/
|
2015-03-24 16:05:55 +02:00
|
|
|
static void SetSpellOptions( const SdDrawDocument& rDoc, EEControlBits& rCntrl )
|
2008-03-12 10:59:12 +00:00
|
|
|
{
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bOnlineSpell = rDoc.GetOnlineSpell();
|
2008-03-12 10:59:12 +00:00
|
|
|
|
|
|
|
if( bOnlineSpell )
|
2015-03-24 16:05:55 +02:00
|
|
|
rCntrl |= EEControlBits::ONLINESPELLING;
|
2008-03-12 10:59:12 +00:00
|
|
|
else
|
2015-03-24 16:05:55 +02:00
|
|
|
rCntrl &= ~EEControlBits::ONLINESPELLING;
|
2008-03-12 10:59:12 +00:00
|
|
|
}
|
|
|
|
|
2014-06-06 15:13:26 +01:00
|
|
|
void OutlinerMasterViewFilter::Start(SdrOutliner *pOutl)
|
|
|
|
{
|
|
|
|
m_pOutl = pOutl;
|
|
|
|
OutlinerView* pOutlView = m_pOutl->GetView(0);
|
|
|
|
m_bReadOnly = pOutlView->IsReadOnly();
|
|
|
|
pOutlView->SetReadOnly(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void OutlinerMasterViewFilter::End()
|
|
|
|
{
|
|
|
|
if (m_pOutl)
|
|
|
|
{
|
|
|
|
OutlinerView* pOutlView = m_pOutl->GetView(0);
|
|
|
|
pOutlView->SetReadOnly(m_bReadOnly);
|
|
|
|
m_pOutl = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool View::SdrBeginTextEdit(
|
2014-09-23 11:20:40 +02:00
|
|
|
SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
|
2014-03-10 11:09:59 +02:00
|
|
|
bool bIsNewObj,
|
2008-03-12 10:59:12 +00:00
|
|
|
SdrOutliner* pOutl, OutlinerView* pGivenOutlinerView,
|
2014-03-10 11:09:59 +02:00
|
|
|
bool bDontDeleteOutliner, bool bOnlyOneView, bool bGrabFocus )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-06-17 09:45:57 +01:00
|
|
|
SdrPage* pPage = pObj ? pObj->GetPage() : NULL;
|
2014-06-06 15:13:26 +01:00
|
|
|
bool bMasterPage = pPage && pPage->IsMasterPage();
|
|
|
|
|
2008-04-03 14:21:22 +00:00
|
|
|
GetViewShell()->GetViewShellBase().GetEventMultiplexer()->MultiplexEvent(
|
2015-06-08 16:27:49 +02:00
|
|
|
sd::tools::EventMultiplexerEvent::EID_BEGIN_TEXT_EDIT, static_cast<void*>(pObj) );
|
2004-11-26 19:34:44 +00:00
|
|
|
|
2008-03-12 10:59:12 +00:00
|
|
|
if( pOutl==NULL && pObj )
|
2014-10-29 09:08:21 +00:00
|
|
|
pOutl = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pObj->GetModel());
|
2008-03-12 10:59:12 +00:00
|
|
|
|
|
|
|
// make draw&impress specific initialisations
|
|
|
|
if( pOutl )
|
|
|
|
{
|
2014-10-30 09:37:00 +02:00
|
|
|
pOutl->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>( mrDoc.GetStyleSheetPool() ));
|
2008-03-12 10:59:12 +00:00
|
|
|
pOutl->SetCalcFieldValueHdl(LINK(SD_MOD(), SdModule, CalcFieldValueHdl));
|
2015-03-24 16:05:55 +02:00
|
|
|
EEControlBits nCntrl = pOutl->GetControlWord();
|
|
|
|
nCntrl |= EEControlBits::ALLOWBIGOBJS;
|
|
|
|
nCntrl |= EEControlBits::MARKFIELDS;
|
|
|
|
nCntrl |= EEControlBits::AUTOCORRECT;
|
2008-03-12 10:59:12 +00:00
|
|
|
|
2015-03-24 16:05:55 +02:00
|
|
|
nCntrl &= ~EEControlBits::ULSPACESUMMATION;
|
2012-02-01 19:58:05 +04:00
|
|
|
if ( mrDoc.IsSummationOfParagraphs() )
|
2015-03-24 16:05:55 +02:00
|
|
|
nCntrl |= EEControlBits::ULSPACESUMMATION;
|
2008-03-12 10:59:12 +00:00
|
|
|
|
2012-02-01 19:58:05 +04:00
|
|
|
SetSpellOptions( mrDoc, nCntrl );
|
2008-03-12 10:59:12 +00:00
|
|
|
|
|
|
|
pOutl->SetControlWord(nCntrl);
|
|
|
|
|
|
|
|
Reference< linguistic2::XSpellChecker1 > xSpellChecker( LinguMgr::GetSpellChecker() );
|
|
|
|
if ( xSpellChecker.is() )
|
|
|
|
pOutl->SetSpeller( xSpellChecker );
|
|
|
|
|
|
|
|
Reference< linguistic2::XHyphenator > xHyphenator( LinguMgr::GetHyphenator() );
|
|
|
|
if( xHyphenator.is() )
|
|
|
|
pOutl->SetHyphenator( xHyphenator );
|
|
|
|
|
2012-11-22 12:26:52 +01:00
|
|
|
pOutl->SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() );
|
2008-03-12 10:59:12 +00:00
|
|
|
}
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bReturn = FmFormView::SdrBeginTextEdit(
|
2008-03-12 10:59:12 +00:00
|
|
|
pObj, pPV, pWin, bIsNewObj, pOutl,
|
2006-11-14 13:45:44 +00:00
|
|
|
pGivenOutlinerView, bDontDeleteOutliner,
|
|
|
|
bOnlyOneView, bGrabFocus);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-04-29 11:30:03 +00:00
|
|
|
if ( mpViewSh )
|
|
|
|
{
|
|
|
|
mpViewSh->GetViewShellBase().GetDrawController().FireSelectionChangeListener();
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
if (bReturn)
|
|
|
|
{
|
2004-01-20 11:53:29 +00:00
|
|
|
::Outliner* pOL = GetTextEditOutliner();
|
2002-04-15 07:52:48 +00:00
|
|
|
|
|
|
|
if( pObj && pObj->GetPage() )
|
2008-03-12 10:59:12 +00:00
|
|
|
{
|
|
|
|
Color aBackground;
|
|
|
|
if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_TABLE )
|
|
|
|
{
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
aBackground = GetTextEditBackgroundColor(*this);
|
2008-03-12 10:59:12 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aBackground = pObj->GetPage()->GetPageBackgroundColor(pPV);
|
|
|
|
}
|
2013-04-10 08:20:16 +00:00
|
|
|
if (pOL != NULL)
|
|
|
|
pOL->SetBackgroundColor( aBackground );
|
2008-03-12 10:59:12 +00:00
|
|
|
}
|
2002-04-15 07:52:48 +00:00
|
|
|
|
2013-04-10 08:20:16 +00:00
|
|
|
if (pOL != NULL)
|
|
|
|
{
|
|
|
|
pOL->SetParaInsertedHdl(LINK(this, View, OnParagraphInsertedHdl));
|
|
|
|
pOL->SetParaRemovingHdl(LINK(this, View, OnParagraphRemovingHdl));
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-12-03 10:49:15 +00:00
|
|
|
if (bMasterPage && bReturn && pOutl)
|
|
|
|
{
|
|
|
|
const SdrTextObj* pTextObj = pOutl->GetTextObj();
|
|
|
|
const SdPage* pSdPage = pTextObj ? static_cast<const SdPage*>(pTextObj->GetPage()) : NULL;
|
|
|
|
const PresObjKind eKind = pSdPage ? pSdPage->GetPresObjKind(const_cast<SdrTextObj*>(pTextObj)) : PRESOBJ_NONE;
|
|
|
|
switch (eKind)
|
|
|
|
{
|
|
|
|
case PRESOBJ_TITLE:
|
|
|
|
case PRESOBJ_OUTLINE:
|
|
|
|
case PRESOBJ_TEXT:
|
|
|
|
maMasterViewFilter.Start(pOutl);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2014-06-06 15:13:26 +01:00
|
|
|
|
|
|
|
return bReturn;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2008-03-12 10:59:12 +00:00
|
|
|
/** ends current text editing */
|
2014-06-06 15:13:26 +01:00
|
|
|
SdrEndTextEditKind View::SdrEndTextEdit(bool bDontDeleteReally)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-06-06 15:13:26 +01:00
|
|
|
maMasterViewFilter.End();
|
|
|
|
|
2008-03-12 10:59:12 +00:00
|
|
|
SdrObjectWeakRef xObj( GetTextEditObject() );
|
2004-11-26 19:34:44 +00:00
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bDefaultTextRestored = RestoreDefaultText( dynamic_cast< SdrTextObj* >( GetTextEditObject() ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-03-12 10:59:12 +00:00
|
|
|
SdrEndTextEditKind eKind = FmFormView::SdrEndTextEdit(bDontDeleteReally);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-03-12 10:59:12 +00:00
|
|
|
if( bDefaultTextRestored )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2008-03-12 10:59:12 +00:00
|
|
|
if( xObj.is() && !xObj->IsEmptyPresObj() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-01-28 20:00:21 +01:00
|
|
|
xObj->SetEmptyPresObj( true );
|
2004-08-31 12:50:39 +00:00
|
|
|
}
|
2008-03-12 10:59:12 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
eKind = SDRENDTEXTEDIT_UNCHANGED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if( xObj.is() && xObj->IsEmptyPresObj() )
|
|
|
|
{
|
|
|
|
SdrTextObj* pObj = dynamic_cast< SdrTextObj* >( xObj.get() );
|
|
|
|
if( pObj && pObj->HasText() )
|
2008-06-06 11:11:54 +00:00
|
|
|
{
|
|
|
|
SdrPage* pPage = pObj->GetPage();
|
|
|
|
if( !pPage || !pPage->IsMasterPage() )
|
2014-01-28 20:00:21 +01:00
|
|
|
pObj->SetEmptyPresObj( false );
|
2008-06-06 11:11:54 +00:00
|
|
|
}
|
2004-08-31 12:50:39 +00:00
|
|
|
}
|
2001-03-26 13:37:56 +00:00
|
|
|
|
2013-04-10 08:20:16 +00:00
|
|
|
GetViewShell()->GetViewShellBase().GetEventMultiplexer()->MultiplexEvent(
|
|
|
|
sd::tools::EventMultiplexerEvent::EID_END_TEXT_EDIT,
|
2015-06-08 16:27:49 +02:00
|
|
|
static_cast<void*>(xObj.get()) );
|
2008-03-12 10:59:12 +00:00
|
|
|
|
|
|
|
if( xObj.is() )
|
2004-08-31 12:50:39 +00:00
|
|
|
{
|
2013-04-29 11:30:03 +00:00
|
|
|
if ( mpViewSh )
|
|
|
|
{
|
|
|
|
mpViewSh->GetViewShellBase().GetDrawController().FireSelectionChangeListener();
|
|
|
|
}
|
|
|
|
|
2008-03-12 10:59:12 +00:00
|
|
|
SdPage* pPage = dynamic_cast< SdPage* >( xObj->GetPage() );
|
|
|
|
if( pPage )
|
|
|
|
pPage->onEndTextEdit( xObj.get() );
|
|
|
|
}
|
|
|
|
|
2015-02-11 13:20:49 +02:00
|
|
|
return eKind;
|
2008-03-12 10:59:12 +00:00
|
|
|
}
|
2006-01-10 13:38:10 +00:00
|
|
|
|
2008-03-12 10:59:12 +00:00
|
|
|
/** restores the default text if the given text object is currently in edit mode and
|
2013-02-22 11:12:12 +01:00
|
|
|
no text has been entered already. Is only useful just before text edit ends. */
|
2008-03-12 10:59:12 +00:00
|
|
|
bool View::RestoreDefaultText( SdrTextObj* pTextObj )
|
|
|
|
{
|
|
|
|
bool bRestored = false;
|
2004-03-30 14:55:49 +00:00
|
|
|
|
2008-03-12 10:59:12 +00:00
|
|
|
if( pTextObj && (pTextObj == GetTextEditObject()) )
|
|
|
|
{
|
|
|
|
if( !pTextObj->HasText() )
|
2005-03-01 16:35:46 +00:00
|
|
|
{
|
2008-03-12 10:59:12 +00:00
|
|
|
SdPage* pPage = dynamic_cast< SdPage* >( pTextObj->GetPage() );
|
|
|
|
|
|
|
|
if(pPage)
|
2005-03-01 16:35:46 +00:00
|
|
|
{
|
2008-03-12 10:59:12 +00:00
|
|
|
bRestored = pPage->RestoreDefaultText( pTextObj );
|
|
|
|
if( bRestored )
|
2006-01-10 13:38:10 +00:00
|
|
|
{
|
2008-03-12 10:59:12 +00:00
|
|
|
SdrOutliner* pOutliner = GetTextEditOutliner();
|
|
|
|
pTextObj->SetTextEditOutliner( pOutliner );
|
|
|
|
OutlinerParaObject* pParaObj = pTextObj->GetOutlinerParaObject();
|
|
|
|
if (pOutliner)
|
|
|
|
pOutliner->SetText(*pParaObj);
|
2006-01-10 13:38:10 +00:00
|
|
|
}
|
2005-03-01 16:35:46 +00:00
|
|
|
}
|
|
|
|
}
|
2006-01-10 13:38:10 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-03-12 10:59:12 +00:00
|
|
|
return bRestored;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2013-03-19 22:24:19 +01:00
|
|
|
/**
|
|
|
|
* Sets the original size of the marked objects.
|
|
|
|
*/
|
2004-01-20 11:53:29 +00:00
|
|
|
void View::SetMarkedOriginalSize()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-02-01 19:58:05 +04:00
|
|
|
SdrUndoGroup* pUndoGroup = new SdrUndoGroup(mrDoc);
|
2014-08-05 22:30:24 +02:00
|
|
|
const size_t nCount = GetMarkedObjectCount();
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bOK = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-08-05 22:30:24 +02:00
|
|
|
for( size_t i = 0; i < nCount; ++i )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-12 14:21:57 +00:00
|
|
|
SdrObject* pObj = GetMarkedObjectByIndex(i);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2003-03-27 09:58:12 +00:00
|
|
|
if( pObj->GetObjInventor() == SdrInventor )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2003-03-27 09:58:12 +00:00
|
|
|
if( pObj->GetObjIdentifier() == OBJ_OLE2 )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-10-30 09:37:00 +02:00
|
|
|
uno::Reference < embed::XEmbeddedObject > xObj = static_cast<SdrOle2Obj*>(pObj)->GetObjRef();
|
2004-10-04 17:46:54 +00:00
|
|
|
if( xObj.is() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-31 08:05:05 +00:00
|
|
|
// TODO/LEAN: working with VisualArea can switch object to running state
|
2006-10-13 10:03:02 +00:00
|
|
|
|
2014-10-30 09:37:00 +02:00
|
|
|
sal_Int64 nAspect = static_cast<SdrOle2Obj*>(pObj)->GetAspect();
|
2006-10-13 10:03:02 +00:00
|
|
|
Size aOleSize;
|
|
|
|
|
|
|
|
if ( nAspect == embed::Aspects::MSOLE_ICON )
|
|
|
|
{
|
|
|
|
MapMode aMap100( MAP_100TH_MM );
|
2014-10-30 09:37:00 +02:00
|
|
|
aOleSize = static_cast<SdrOle2Obj*>(pObj)->GetOrigObjSize( &aMap100 );
|
2014-04-24 10:52:02 +02:00
|
|
|
bOK = true;
|
2006-10-13 10:03:02 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
|
|
|
|
try
|
|
|
|
{
|
|
|
|
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
|
|
|
|
aOleSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aUnit, MAP_100TH_MM );
|
2014-04-24 10:52:02 +02:00
|
|
|
bOK = true;
|
2006-10-13 10:03:02 +00:00
|
|
|
}
|
|
|
|
catch( embed::NoVisualAreaSizeException& )
|
|
|
|
{}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bOK )
|
2005-03-15 10:21:57 +00:00
|
|
|
{
|
|
|
|
Rectangle aDrawRect( pObj->GetLogicRect() );
|
|
|
|
|
2012-02-01 19:58:05 +04:00
|
|
|
pUndoGroup->AddAction( mrDoc.GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) );
|
2014-10-23 17:41:47 +02:00
|
|
|
pObj->Resize( aDrawRect.TopLeft(), Fraction( aOleSize.Width(), aDrawRect.GetWidth() ),
|
|
|
|
Fraction( aOleSize.Height(), aDrawRect.GetHeight() ) );
|
2005-03-15 10:21:57 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2003-03-27 09:58:12 +00:00
|
|
|
else if( pObj->GetObjIdentifier() == OBJ_GRAF )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2003-03-27 09:58:12 +00:00
|
|
|
const MapMode aMap100( MAP_100TH_MM );
|
|
|
|
Size aSize;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2003-03-27 09:58:12 +00:00
|
|
|
if ( static_cast< SdrGrafObj* >( pObj )->GetGrafPrefMapMode().GetMapUnit() == MAP_PIXEL )
|
|
|
|
aSize = Application::GetDefaultDevice()->PixelToLogic( static_cast< SdrGrafObj* >( pObj )->GetGrafPrefSize(), aMap100 );
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
{
|
2003-03-27 09:58:12 +00:00
|
|
|
aSize = OutputDevice::LogicToLogic( static_cast< SdrGrafObj* >( pObj )->GetGrafPrefSize(),
|
|
|
|
static_cast< SdrGrafObj* >( pObj )->GetGrafPrefMapMode(),
|
|
|
|
aMap100 );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2006-01-10 13:38:10 +00:00
|
|
|
pUndoGroup->AddAction( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj ) );
|
2003-03-27 09:58:12 +00:00
|
|
|
Rectangle aRect( pObj->GetLogicRect() );
|
|
|
|
aRect.SetSize( aSize );
|
|
|
|
pObj->SetLogicRect( aRect );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bOK = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-27 09:58:12 +00:00
|
|
|
if( bOK )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
pUndoGroup->SetComment(SD_RESSTR(STR_UNDO_ORIGINALSIZE));
|
2006-12-12 18:20:07 +00:00
|
|
|
mpDocSh->GetUndoManager()->AddUndoAction(pUndoGroup);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
delete pUndoGroup;
|
|
|
|
}
|
|
|
|
|
2013-03-19 22:24:19 +01:00
|
|
|
/**
|
|
|
|
* Connect OLE object to client.
|
|
|
|
*/
|
2004-01-20 11:53:29 +00:00
|
|
|
void View::DoConnect(SdrOle2Obj* pObj)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 18:20:07 +00:00
|
|
|
if (mpViewSh)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-10-04 17:46:54 +00:00
|
|
|
uno::Reference < embed::XEmbeddedObject > xObj( pObj->GetObjRef() );
|
|
|
|
if( xObj.is() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 18:20:07 +00:00
|
|
|
::sd::Window* pWindow = mpViewSh->GetActiveWindow();
|
|
|
|
SfxInPlaceClient* pSdClient = mpViewSh-> GetViewShellBase().FindIPClient( xObj, pWindow );
|
2004-10-04 17:46:54 +00:00
|
|
|
if ( !pSdClient )
|
2001-07-03 13:18:02 +00:00
|
|
|
{
|
2006-12-12 18:20:07 +00:00
|
|
|
pSdClient = new Client(pObj, mpViewSh, pWindow);
|
2001-08-13 11:49:54 +00:00
|
|
|
Rectangle aRect = pObj->GetLogicRect();
|
|
|
|
{
|
2005-01-31 08:05:05 +00:00
|
|
|
// TODO/LEAN: working with visual area can switch object to running state
|
2001-08-13 11:49:54 +00:00
|
|
|
Size aDrawSize = aRect.GetSize();
|
2005-03-15 10:21:57 +00:00
|
|
|
awt::Size aSz;
|
2004-10-04 17:46:54 +00:00
|
|
|
|
2012-02-01 19:58:05 +04:00
|
|
|
MapMode aMapMode( mrDoc.GetScaleUnit() );
|
2006-10-13 10:03:02 +00:00
|
|
|
Size aObjAreaSize = pObj->GetOrigObjSize( &aMapMode );
|
2001-08-13 11:49:54 +00:00
|
|
|
|
2014-10-23 17:41:47 +02:00
|
|
|
Fraction aScaleWidth (aDrawSize.Width(), aObjAreaSize.Width() );
|
|
|
|
Fraction aScaleHeight(aDrawSize.Height(), aObjAreaSize.Height() );
|
|
|
|
aScaleWidth.ReduceInaccurate(10); // compatible to SdrOle2Obj
|
|
|
|
aScaleHeight.ReduceInaccurate(10);
|
2004-10-04 17:46:54 +00:00
|
|
|
pSdClient->SetSizeScale(aScaleWidth, aScaleHeight);
|
2006-02-01 17:40:47 +00:00
|
|
|
|
2013-03-19 22:24:19 +01:00
|
|
|
// visible area is only changed in-place!
|
2006-02-01 17:40:47 +00:00
|
|
|
// the object area must be set after the scaling, since it triggers resize
|
|
|
|
aRect.SetSize(aObjAreaSize);
|
|
|
|
pSdClient->SetObjArea(aRect);
|
2001-08-13 11:49:54 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool View::IsMorphingAllowed() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-12 14:21:57 +00:00
|
|
|
const SdrMarkList& rMarkList = GetMarkedObjectList();
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bRet = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( rMarkList.GetMarkCount() == 2 )
|
|
|
|
{
|
2006-07-25 10:53:13 +00:00
|
|
|
const SdrObject* pObj1 = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
|
|
|
|
const SdrObject* pObj2 = rMarkList.GetMark( 1 )->GetMarkedSdrObj();
|
2011-01-17 11:41:00 +01:00
|
|
|
const sal_uInt16 nKind1 = pObj1->GetObjIdentifier();
|
|
|
|
const sal_uInt16 nKind2 = pObj2->GetObjIdentifier();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( ( nKind1 != OBJ_TEXT && nKind2 != OBJ_TEXT ) &&
|
|
|
|
( nKind1 != OBJ_TITLETEXT && nKind2 != OBJ_TITLETEXT ) &&
|
|
|
|
( nKind1 != OBJ_OUTLINETEXT && nKind2 != OBJ_OUTLINETEXT ) &&
|
|
|
|
( nKind1 != OBJ_GRUP && nKind2 != OBJ_GRUP ) &&
|
|
|
|
( nKind1 != OBJ_LINE && nKind2 != OBJ_LINE ) &&
|
|
|
|
( nKind1 != OBJ_PLIN && nKind2 != OBJ_PLIN ) &&
|
|
|
|
( nKind1 != OBJ_PATHLINE && nKind2 != OBJ_PATHLINE ) &&
|
|
|
|
( nKind1 != OBJ_FREELINE && nKind2 != OBJ_FREELINE ) &&
|
|
|
|
( nKind1 != OBJ_PATHPLIN && nKind2 != OBJ_PATHPLIN ) &&
|
|
|
|
( nKind1 != OBJ_MEASURE && nKind2 != OBJ_MEASURE ) &&
|
|
|
|
( nKind1 != OBJ_EDGE && nKind2 != OBJ_EDGE ) &&
|
|
|
|
( nKind1 != OBJ_GRAF && nKind2 != OBJ_GRAF ) &&
|
|
|
|
( nKind1 != OBJ_OLE2 && nKind2 != OBJ_OLE2 ) &&
|
|
|
|
( nKind1 != OBJ_CAPTION && nKind2 != OBJ_CAPTION ) &&
|
2015-09-30 16:10:07 +02:00
|
|
|
dynamic_cast< const E3dObject *>( pObj1 ) == nullptr && dynamic_cast< const E3dObject *>( pObj2 ) == nullptr )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-02-01 19:58:05 +04:00
|
|
|
SfxItemSet aSet1( mrDoc.GetPool(), XATTR_FILLSTYLE, XATTR_FILLSTYLE );
|
|
|
|
SfxItemSet aSet2( mrDoc.GetPool(), XATTR_FILLSTYLE, XATTR_FILLSTYLE );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2003-11-24 16:19:42 +00:00
|
|
|
aSet1.Put(pObj1->GetMergedItemSet());
|
|
|
|
aSet2.Put(pObj2->GetMergedItemSet());
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-10-30 09:37:00 +02:00
|
|
|
const drawing::FillStyle eFillStyle1 = static_cast<const XFillStyleItem&>( aSet1.Get( XATTR_FILLSTYLE ) ).GetValue();
|
|
|
|
const drawing::FillStyle eFillStyle2 = static_cast<const XFillStyleItem&>( aSet2.Get( XATTR_FILLSTYLE ) ).GetValue();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-07-18 18:07:36 +02:00
|
|
|
if( ( eFillStyle1 == drawing::FillStyle_NONE || eFillStyle1 == drawing::FillStyle_SOLID ) &&
|
|
|
|
( eFillStyle2 == drawing::FillStyle_NONE || eFillStyle2 == drawing::FillStyle_SOLID ) )
|
2014-04-24 10:52:02 +02:00
|
|
|
bRet = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool View::IsVectorizeAllowed() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-12 14:21:57 +00:00
|
|
|
const SdrMarkList& rMarkList = GetMarkedObjectList();
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bRet = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if( rMarkList.GetMarkCount() == 1 )
|
|
|
|
{
|
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
|
|
|
const SdrGrafObj* pObj = dynamic_cast< const SdrGrafObj* >(rMarkList.GetMark( 0 )->GetMarkedSdrObj());
|
2000-09-18 16:07:07 +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
|
|
|
if(pObj)
|
|
|
|
{
|
|
|
|
if(GRAPHIC_BITMAP == pObj->GetGraphicType() && !pObj->isEmbeddedSvg())
|
|
|
|
{
|
2014-04-24 10:52:02 +02:00
|
|
|
bRet = true;
|
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
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2004-01-20 11:53:29 +00:00
|
|
|
void View::onAccessibilityOptionsChanged()
|
2002-04-24 06:17:33 +00:00
|
|
|
{
|
2006-12-12 18:20:07 +00:00
|
|
|
if( mpViewSh )
|
2002-04-24 06:17:33 +00:00
|
|
|
{
|
2006-12-12 18:20:07 +00:00
|
|
|
::sd::Window* pWindow = mpViewSh->GetActiveWindow();
|
2002-04-24 06:17:33 +00:00
|
|
|
if( pWindow )
|
|
|
|
{
|
|
|
|
const StyleSettings& rStyleSettings = pWindow->GetSettings().GetStyleSettings();
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nOutputSlot, nPreviewSlot;
|
2002-04-24 06:17:33 +00:00
|
|
|
|
2002-04-26 10:21:25 +00:00
|
|
|
SvtAccessibilityOptions& aAccOptions = getAccessibilityOptions();
|
2002-04-24 06:17:33 +00:00
|
|
|
|
2006-12-12 18:20:07 +00:00
|
|
|
if( mpViewSh->GetViewFrame() && mpViewSh->GetViewFrame()->GetDispatcher() )
|
2002-04-24 06:17:33 +00:00
|
|
|
{
|
2002-12-03 16:29:14 +00:00
|
|
|
if( rStyleSettings.GetHighContrastMode() )
|
2002-07-24 11:08:31 +00:00
|
|
|
{
|
|
|
|
nOutputSlot = SID_OUTPUT_QUALITY_CONTRAST;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
nOutputSlot = SID_OUTPUT_QUALITY_COLOR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( rStyleSettings.GetHighContrastMode() && aAccOptions.GetIsForPagePreviews() )
|
|
|
|
{
|
|
|
|
nPreviewSlot = SID_PREVIEW_QUALITY_CONTRAST;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
nPreviewSlot = SID_PREVIEW_QUALITY_COLOR;
|
|
|
|
}
|
|
|
|
|
2014-10-11 16:01:26 +02:00
|
|
|
mpViewSh->GetViewFrame()->GetDispatcher()->Execute( nOutputSlot, SfxCallMode::ASYNCHRON );
|
|
|
|
mpViewSh->GetViewFrame()->GetDispatcher()->Execute( nPreviewSlot, SfxCallMode::ASYNCHRON );
|
2002-04-24 06:17:33 +00:00
|
|
|
}
|
|
|
|
|
2006-12-12 18:20:07 +00:00
|
|
|
mpViewSh->Invalidate();
|
2002-04-24 06:17:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2004-01-20 11:53:29 +00:00
|
|
|
|
2015-07-12 21:13:57 +02:00
|
|
|
IMPL_LINK_TYPED( View, OnParagraphInsertedHdl, ::Outliner *, pOutliner, void )
|
2004-11-26 19:34:44 +00:00
|
|
|
{
|
|
|
|
Paragraph* pPara = pOutliner->GetHdlParagraph();
|
|
|
|
SdrObject* pObj = GetTextEditObject();
|
|
|
|
|
|
|
|
if( pPara && pObj )
|
|
|
|
{
|
|
|
|
SdPage* pPage = dynamic_cast< SdPage* >( pObj->GetPage() );
|
|
|
|
if( pPage )
|
|
|
|
pPage->onParagraphInserted( pOutliner, pPara, pObj );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-03-19 22:24:19 +01:00
|
|
|
/**
|
|
|
|
* Handler for the deletion of the pages (paragraphs).
|
|
|
|
*/
|
2015-07-12 21:13:57 +02:00
|
|
|
IMPL_LINK_TYPED( View, OnParagraphRemovingHdl, ::Outliner *, pOutliner, void )
|
2004-11-26 19:34:44 +00:00
|
|
|
{
|
|
|
|
Paragraph* pPara = pOutliner->GetHdlParagraph();
|
|
|
|
SdrObject* pObj = GetTextEditObject();
|
|
|
|
|
|
|
|
if( pPara && pObj )
|
|
|
|
{
|
|
|
|
SdPage* pPage = dynamic_cast< SdPage* >( pObj->GetPage() );
|
|
|
|
if( pPage )
|
|
|
|
pPage->onParagraphRemoving( pOutliner, pPara, pObj );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-10 13:38:10 +00:00
|
|
|
bool View::isRecordingUndo() const
|
|
|
|
{
|
2012-02-01 19:58:05 +04:00
|
|
|
if( mrDoc.IsUndoEnabled() )
|
2009-06-04 16:21:29 +00:00
|
|
|
{
|
2012-02-01 19:58:05 +04:00
|
|
|
sd::UndoManager* pUndoManager = mrDoc.GetUndoManager();
|
2010-10-22 15:00:39 +02:00
|
|
|
return pUndoManager && pUndoManager->IsInListAction();
|
2009-06-04 16:21:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2006-01-10 13:38:10 +00:00
|
|
|
}
|
2004-11-26 19:34:44 +00:00
|
|
|
|
2007-07-06 12:14:57 +00:00
|
|
|
void View::AddCustomHdl()
|
|
|
|
{
|
2015-03-07 10:50:27 +01:00
|
|
|
maSmartTags.addCustomHandles( maHdlList );
|
2007-07-06 12:14:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void View::updateHandles()
|
|
|
|
{
|
|
|
|
AdjustMarkHdl();
|
|
|
|
}
|
|
|
|
|
|
|
|
SdrViewContext View::GetContext() const
|
|
|
|
{
|
|
|
|
SdrViewContext eContext = SDRCONTEXT_STANDARD;
|
|
|
|
if( maSmartTags.getContext( eContext ) )
|
|
|
|
return eContext;
|
|
|
|
else
|
|
|
|
return FmFormView::GetContext();
|
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool View::HasMarkablePoints() const
|
2007-07-06 12:14:57 +00:00
|
|
|
{
|
|
|
|
if( maSmartTags.HasMarkablePoints() )
|
|
|
|
return true;
|
|
|
|
else
|
|
|
|
return FmFormView::HasMarkablePoints();
|
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uLong View::GetMarkablePointCount() const
|
2007-07-06 12:14:57 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uLong nCount = FmFormView::GetMarkablePointCount();
|
2007-07-06 12:14:57 +00:00
|
|
|
nCount += maSmartTags.GetMarkablePointCount();
|
|
|
|
return nCount;
|
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool View::HasMarkedPoints() const
|
2007-07-06 12:14:57 +00:00
|
|
|
{
|
|
|
|
if( maSmartTags.HasMarkedPoints() )
|
|
|
|
return true;
|
|
|
|
else
|
|
|
|
return FmFormView::HasMarkedPoints();
|
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uLong View::GetMarkedPointCount() const
|
2007-07-06 12:14:57 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uLong nCount = FmFormView::GetMarkedPointCount();
|
2007-07-06 12:14:57 +00:00
|
|
|
nCount += maSmartTags.GetMarkedPointCount();
|
|
|
|
return nCount;
|
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool View::IsPointMarkable(const SdrHdl& rHdl) const
|
2007-07-06 12:14:57 +00:00
|
|
|
{
|
2015-04-29 09:55:11 +02:00
|
|
|
if( SmartTagSet::IsPointMarkable( rHdl ) )
|
2007-07-06 12:14:57 +00:00
|
|
|
return true;
|
|
|
|
else
|
|
|
|
return FmFormView::IsPointMarkable( rHdl );
|
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bool View::MarkPoint(SdrHdl& rHdl, bool bUnmark )
|
2007-07-06 12:14:57 +00:00
|
|
|
{
|
|
|
|
if( maSmartTags.MarkPoint( rHdl, bUnmark ) )
|
|
|
|
return true;
|
|
|
|
else
|
|
|
|
return FmFormView::MarkPoint( rHdl, bUnmark );
|
|
|
|
}
|
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool View::MarkPoints(const Rectangle* pRect, bool bUnmark)
|
2007-07-06 12:14:57 +00:00
|
|
|
{
|
|
|
|
if( maSmartTags.MarkPoints( pRect, bUnmark ) )
|
|
|
|
return true;
|
|
|
|
else
|
|
|
|
return FmFormView::MarkPoints( pRect, bUnmark );
|
|
|
|
}
|
|
|
|
|
|
|
|
void View::CheckPossibilities()
|
|
|
|
{
|
|
|
|
FmFormView::CheckPossibilities();
|
|
|
|
maSmartTags.CheckPossibilities();
|
|
|
|
}
|
|
|
|
|
2008-06-06 11:11:54 +00:00
|
|
|
void View::OnBeginPasteOrDrop( PasteOrDropInfos* /*pInfos*/ )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/** this is called after a paste or drop operation, make sure that the newly inserted paragraphs
|
|
|
|
get the correct style sheet. */
|
|
|
|
void View::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
|
|
|
|
{
|
2015-09-07 16:33:39 +02:00
|
|
|
/* Style Sheet handling */
|
2008-06-06 11:11:54 +00:00
|
|
|
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( GetTextEditObject() );
|
|
|
|
SdrOutliner* pOutliner = GetTextEditOutliner();
|
|
|
|
if( pOutliner && pTextObj && pTextObj->GetPage() )
|
|
|
|
{
|
|
|
|
SdPage* pPage = static_cast< SdPage* >( pTextObj->GetPage() );
|
|
|
|
|
|
|
|
SfxStyleSheet* pStyleSheet = 0;
|
|
|
|
|
|
|
|
const PresObjKind eKind = pPage->GetPresObjKind(pTextObj);
|
|
|
|
if( eKind != PRESOBJ_NONE )
|
|
|
|
pStyleSheet = pPage->GetStyleSheetForPresObj(eKind);
|
|
|
|
else
|
|
|
|
pStyleSheet = pTextObj->GetStyleSheet();
|
|
|
|
|
|
|
|
if( eKind == PRESOBJ_OUTLINE )
|
|
|
|
{
|
|
|
|
// for outline shapes, set the correct outline style sheet for each
|
|
|
|
// new paragraph, depending on the paragraph depth
|
2012-02-01 19:58:05 +04:00
|
|
|
SfxStyleSheetBasePool* pStylePool = GetDoc().GetStyleSheetPool();
|
2008-06-06 11:11:54 +00:00
|
|
|
|
2013-05-08 18:12:32 +02:00
|
|
|
for ( sal_Int32 nPara = pInfos->nStartPara; nPara <= pInfos->nEndPara; nPara++ )
|
2008-06-06 11:11:54 +00:00
|
|
|
{
|
|
|
|
sal_Int16 nDepth = pOutliner->GetDepth( nPara );
|
|
|
|
|
|
|
|
SfxStyleSheet* pStyle = 0;
|
|
|
|
if( nDepth > 0 )
|
|
|
|
{
|
2013-08-11 21:13:38 +04:00
|
|
|
OUString aStyleSheetName( pStyleSheet->GetName() );
|
|
|
|
if (!aStyleSheetName.isEmpty())
|
|
|
|
aStyleSheetName = aStyleSheetName.copy(0, aStyleSheetName.getLength() - 1);
|
2013-02-20 00:20:41 +01:00
|
|
|
aStyleSheetName += OUString::number( nDepth );
|
2008-06-06 11:11:54 +00:00
|
|
|
pStyle = static_cast<SfxStyleSheet*>( pStylePool->Find( aStyleSheetName, pStyleSheet->GetFamily() ) );
|
|
|
|
DBG_ASSERT( pStyle, "sd::View::OnEndPasteOrDrop(), Style not found!" );
|
|
|
|
}
|
|
|
|
|
|
|
|
if( !pStyle )
|
|
|
|
pStyle = pStyleSheet;
|
|
|
|
|
|
|
|
pOutliner->SetStyleSheet( nPara, pStyle );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// just put the object style on each new paragraph
|
2013-05-08 18:12:32 +02:00
|
|
|
for ( sal_Int32 nPara = pInfos->nStartPara; nPara <= pInfos->nEndPara; nPara++ )
|
2008-06-06 11:11:54 +00:00
|
|
|
{
|
|
|
|
pOutliner->SetStyleSheet( nPara, pStyleSheet );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-29 08:10:49 +00:00
|
|
|
bool View::ShouldToggleOn(
|
|
|
|
const bool bBulletOnOffMode,
|
|
|
|
const bool bNormalBullet)
|
2013-04-10 08:20:16 +00:00
|
|
|
{
|
|
|
|
// If setting bullets/numbering by the dialog, always should toggle on.
|
|
|
|
if (!bBulletOnOffMode)
|
2014-01-28 20:00:21 +01:00
|
|
|
return true;
|
2013-04-10 08:20:16 +00:00
|
|
|
SdrModel* pSdrModel = GetModel();
|
|
|
|
if (!pSdrModel)
|
2014-01-28 20:00:21 +01:00
|
|
|
return false;
|
2013-04-10 08:20:16 +00:00
|
|
|
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bToggleOn = false;
|
2015-09-25 14:48:27 +01:00
|
|
|
std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel));
|
2014-08-05 22:30:24 +02:00
|
|
|
const size_t nMarkCount = GetMarkedObjectCount();
|
|
|
|
for (size_t nIndex = 0; nIndex < nMarkCount && !bToggleOn; ++nIndex)
|
2013-04-10 08:20:16 +00:00
|
|
|
{
|
|
|
|
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(GetMarkedObjectByIndex(nIndex));
|
|
|
|
if (!pTextObj || pTextObj->IsTextEditActive())
|
|
|
|
continue;
|
2015-09-30 16:10:07 +02:00
|
|
|
if( dynamic_cast< const SdrTableObj *>( pTextObj ) != nullptr)
|
2013-04-10 08:20:16 +00:00
|
|
|
{
|
|
|
|
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >(pTextObj);
|
|
|
|
if (!pTableObj)
|
|
|
|
continue;
|
|
|
|
CellPos aStart, aEnd;
|
|
|
|
SvxTableController* pTableController = dynamic_cast< SvxTableController* >(getSelectionController().get());
|
|
|
|
if (pTableController)
|
|
|
|
{
|
|
|
|
pTableController->getSelectedCells(aStart, aEnd);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-04-14 14:00:46 +02:00
|
|
|
aStart = SdrTableObj::getFirstCell();
|
2013-04-10 08:20:16 +00:00
|
|
|
aEnd = pTableObj->getLastCell();
|
|
|
|
}
|
|
|
|
sal_Int32 nColCount = pTableObj->getColumnCount();
|
|
|
|
for (sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow && !bToggleOn; nRow++)
|
|
|
|
{
|
|
|
|
for (sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol && !bToggleOn; nCol++)
|
|
|
|
{
|
|
|
|
sal_Int32 nCellIndex = nRow * nColCount + nCol;
|
|
|
|
SdrText* pText = pTableObj->getText(nCellIndex);
|
|
|
|
if (!pText || !pText->GetOutlinerParaObject())
|
|
|
|
continue;
|
|
|
|
pOutliner->SetText(*(pText->GetOutlinerParaObject()));
|
|
|
|
sal_Int16 nStatus = pOutliner->GetBulletsNumberingStatus();
|
2015-04-24 12:33:05 +02:00
|
|
|
bToggleOn = (bNormalBullet && nStatus != 0) || (!bNormalBullet && nStatus != 1) || bToggleOn;
|
2013-04-10 08:20:16 +00:00
|
|
|
pOutliner->Clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
OutlinerParaObject* pParaObj = pTextObj->GetOutlinerParaObject();
|
|
|
|
if (!pParaObj)
|
|
|
|
continue;
|
|
|
|
pOutliner->SetText(*pParaObj);
|
|
|
|
sal_Int16 nStatus = pOutliner->GetBulletsNumberingStatus();
|
2015-04-24 12:33:05 +02:00
|
|
|
bToggleOn = (bNormalBullet && nStatus != 0) || (!bNormalBullet && nStatus != 1) || bToggleOn;
|
2013-04-10 08:20:16 +00:00
|
|
|
pOutliner->Clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bToggleOn;
|
|
|
|
}
|
|
|
|
|
2013-05-29 08:10:49 +00:00
|
|
|
void View::ChangeMarkedObjectsBulletsNumbering(
|
|
|
|
const bool bToggle,
|
|
|
|
const bool bHandleBullets,
|
2015-06-10 15:21:43 +03:00
|
|
|
const SvxNumRule* pNumRule )
|
2013-04-10 08:20:16 +00:00
|
|
|
{
|
|
|
|
SdrModel* pSdrModel = GetModel();
|
2014-09-23 11:20:40 +02:00
|
|
|
vcl::Window* pWindow = dynamic_cast< vcl::Window* >(GetFirstOutputDevice());
|
2013-04-10 08:20:16 +00:00
|
|
|
if (!pSdrModel || !pWindow)
|
|
|
|
return;
|
|
|
|
|
2013-05-29 08:10:49 +00:00
|
|
|
const bool bUndoEnabled = pSdrModel->IsUndoEnabled();
|
|
|
|
SdrUndoGroup* pUndoGroup = bUndoEnabled ? new SdrUndoGroup(*pSdrModel) : 0;
|
|
|
|
|
2015-06-10 15:21:43 +03:00
|
|
|
const bool bToggleOn = ShouldToggleOn( bToggle, bHandleBullets );
|
2013-05-29 08:10:49 +00:00
|
|
|
|
2015-09-25 14:48:27 +01:00
|
|
|
std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel));
|
|
|
|
std::unique_ptr<OutlinerView> pOutlinerView(new OutlinerView(pOutliner.get(), pWindow));
|
2013-04-10 08:20:16 +00:00
|
|
|
|
2014-08-05 22:30:24 +02:00
|
|
|
const size_t nMarkCount = GetMarkedObjectCount();
|
|
|
|
for (size_t nIndex = 0; nIndex < nMarkCount; ++nIndex)
|
2013-04-10 08:20:16 +00:00
|
|
|
{
|
|
|
|
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(GetMarkedObjectByIndex(nIndex));
|
|
|
|
if (!pTextObj || pTextObj->IsTextEditActive())
|
|
|
|
continue;
|
2015-09-30 16:10:07 +02:00
|
|
|
if( dynamic_cast< SdrTableObj *>( pTextObj ) != nullptr)
|
2013-04-10 08:20:16 +00:00
|
|
|
{
|
|
|
|
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >(pTextObj);
|
|
|
|
if (!pTableObj)
|
|
|
|
continue;
|
|
|
|
CellPos aStart, aEnd;
|
|
|
|
SvxTableController* pTableController = dynamic_cast< SvxTableController* >(getSelectionController().get());
|
|
|
|
if (pTableController)
|
|
|
|
{
|
|
|
|
pTableController->getSelectedCells(aStart, aEnd);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-04-14 14:00:46 +02:00
|
|
|
aStart = SdrTableObj::getFirstCell();
|
2013-04-10 08:20:16 +00:00
|
|
|
aEnd = pTableObj->getLastCell();
|
|
|
|
}
|
|
|
|
sal_Int32 nColCount = pTableObj->getColumnCount();
|
|
|
|
for (sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++)
|
|
|
|
{
|
|
|
|
for (sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++)
|
|
|
|
{
|
|
|
|
sal_Int32 nCellIndex = nRow * nColCount + nCol;
|
|
|
|
SdrText* pText = pTableObj->getText(nCellIndex);
|
|
|
|
if (!pText || !pText->GetOutlinerParaObject())
|
|
|
|
continue;
|
|
|
|
|
|
|
|
pOutliner->SetText(*(pText->GetOutlinerParaObject()));
|
|
|
|
if (bUndoEnabled)
|
|
|
|
{
|
|
|
|
SdrUndoObjSetText* pTxtUndo = dynamic_cast< SdrUndoObjSetText* >(pSdrModel->GetSdrUndoFactory().CreateUndoObjectSetText(*pTextObj, nCellIndex));
|
|
|
|
pUndoGroup->AddAction(pTxtUndo);
|
|
|
|
}
|
2013-05-29 08:10:49 +00:00
|
|
|
if ( !bToggleOn )
|
|
|
|
{
|
|
|
|
pOutlinerView->SwitchOffBulletsNumbering();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pOutlinerView->ApplyBulletsNumbering( bHandleBullets, pNumRule, bToggle );
|
|
|
|
}
|
2013-04-10 08:20:16 +00:00
|
|
|
sal_uInt32 nParaCount = pOutliner->GetParagraphCount();
|
|
|
|
pText->SetOutlinerParaObject(pOutliner->CreateParaObject(0, (sal_uInt16)nParaCount));
|
|
|
|
pOutliner->Clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Broadcast the object change event.
|
|
|
|
if (!pTextObj->AdjustTextFrameWidthAndHeight())
|
|
|
|
{
|
|
|
|
pTextObj->SetChanged();
|
|
|
|
pTextObj->BroadcastObjectChange();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
OutlinerParaObject* pParaObj = pTextObj->GetOutlinerParaObject();
|
|
|
|
if (!pParaObj)
|
|
|
|
continue;
|
|
|
|
pOutliner->SetText(*pParaObj);
|
|
|
|
if (bUndoEnabled)
|
|
|
|
{
|
|
|
|
SdrUndoObjSetText* pTxtUndo = dynamic_cast< SdrUndoObjSetText* >(pSdrModel->GetSdrUndoFactory().CreateUndoObjectSetText(*pTextObj, 0));
|
|
|
|
pUndoGroup->AddAction(pTxtUndo);
|
|
|
|
}
|
2013-05-29 08:10:49 +00:00
|
|
|
if ( !bToggleOn )
|
|
|
|
{
|
|
|
|
pOutlinerView->SwitchOffBulletsNumbering();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pOutlinerView->ApplyBulletsNumbering( bHandleBullets, pNumRule, bToggle );
|
|
|
|
}
|
2013-04-10 08:20:16 +00:00
|
|
|
sal_uInt32 nParaCount = pOutliner->GetParagraphCount();
|
|
|
|
pTextObj->SetOutlinerParaObject(pOutliner->CreateParaObject(0, (sal_uInt16)nParaCount));
|
|
|
|
pOutliner->Clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-29 08:10:49 +00:00
|
|
|
if ( bUndoEnabled && pUndoGroup->GetActionCount() > 0 )
|
2013-04-10 08:20:16 +00:00
|
|
|
{
|
|
|
|
pSdrModel->BegUndo();
|
|
|
|
pSdrModel->AddUndo(pUndoGroup);
|
|
|
|
pSdrModel->EndUndo();
|
|
|
|
}
|
2013-10-06 20:21:59 +01:00
|
|
|
else
|
|
|
|
delete pUndoGroup;
|
2013-04-10 08:20:16 +00:00
|
|
|
}
|
|
|
|
|
2004-01-20 11:53:29 +00:00
|
|
|
} // end of namespace sd
|
2010-10-12 15:51:52 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|