2010-10-12 15:53:47 +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
2012-01-02 10:55:27 +00:00
# include <comphelper/string.hxx>
2010-01-06 19:26:54 +01:00
# include <svl/intitem.hxx>
# include <editeng/editeng.hxx>
# include <editeng/editview.hxx>
# include <editeng/editdata.hxx>
# include <editeng/eerdll.hxx>
# include <editeng/lrspitem.hxx>
# include <editeng/fhgtitem.hxx>
2000-09-18 16:07:07 +00:00
# include <math.h>
2009-10-16 00:05:16 +02:00
# include <svl/style.hxx>
2000-09-18 16:07:07 +00:00
# include <vcl/wrkwin.hxx>
2010-01-06 19:26:54 +01:00
# include <editeng/outliner.hxx>
2000-09-18 16:07:07 +00:00
# include <paralist.hxx>
2010-01-06 19:26:54 +01:00
# include <editeng/outlobj.hxx>
2000-09-18 16:07:07 +00:00
# include <outleeng.hxx>
# include <outlundo.hxx>
2010-01-06 19:26:54 +01:00
# include <editeng/eeitem.hxx>
# include <editeng/editstat.hxx>
# include <editeng/scripttypeitem.hxx>
# include <editeng/editobj.hxx>
2009-10-16 00:05:16 +02:00
# include <svl/itemset.hxx>
# include <svl/whiter.hxx>
2000-09-18 16:07:07 +00:00
# include <vcl/metric.hxx>
2010-01-06 19:26:54 +01:00
# include <editeng/numitem.hxx>
2013-02-12 13:41:53 -05:00
# include <editeng/adjustitem.hxx>
2000-09-18 16:07:07 +00:00
# include <vcl/graph.hxx>
2004-11-26 17:13:51 +00:00
# include <vcl/gdimtf.hxx>
# include <vcl/metaact.hxx>
2009-12-15 21:55:40 +01:00
# include <svtools/grfmgr.hxx>
2010-01-06 19:26:54 +01:00
# include <editeng/svxfont.hxx>
2013-02-12 13:41:53 -05:00
# include <editeng/brushitem.hxx>
2009-10-16 00:05:16 +02:00
# include <svl/itempool.hxx>
2001-08-01 09:34:48 +00:00
2011-02-16 16:34:02 -05:00
// calculate if it's RTL or not
2002-08-01 13:48:55 +00:00
# include <unicode/ubidi.h>
2011-03-01 13:21:42 -04:30
# include <cassert>
2010-12-27 08:04:47 -08:00
using : : std : : advance ;
2011-03-12 02:42:58 +01:00
static const sal_uInt16 nDefStyles = 3 ; // Special treatment for the first 3 levels
2011-01-13 14:12:48 +01:00
static const sal_uInt16 nDefBulletIndent = 800 ;
static const sal_uInt16 nDefBulletWidth = 700 ;
static const sal_uInt16 pDefBulletIndents [ nDefStyles ] = { 1400 , 800 , 800 } ;
static const sal_uInt16 pDefBulletWidths [ nDefStyles ] = { 1000 , 850 , 700 } ;
2000-09-18 16:07:07 +00:00
2008-06-06 11:30:58 +00:00
// ----------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
// Outliner
// ----------------------------------------------------------------------
DBG_NAME ( Outliner ) ;
2008-06-06 11:30:58 +00:00
void Outliner : : ImplCheckDepth ( sal_Int16 & rnDepth ) const
2001-05-30 16:23:37 +00:00
{
if ( rnDepth < nMinDepth )
rnDepth = nMinDepth ;
else if ( rnDepth > nMaxDepth )
rnDepth = nMaxDepth ;
}
2013-08-14 13:44:38 +01:00
Paragraph * Outliner : : Insert ( const OUString & rText , sal_Int32 nAbsPos , sal_Int16 nDepth )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
DBG_ASSERT ( pParaList - > GetParagraphCount ( ) , " Insert:No Paras " ) ;
Paragraph * pPara ;
2001-05-30 16:23:37 +00:00
ImplCheckDepth ( nDepth ) ;
2000-09-18 16:07:07 +00:00
2013-05-08 18:12:32 +02:00
sal_Int32 nParagraphCount = pParaList - > GetParagraphCount ( ) ;
2000-09-18 16:07:07 +00:00
if ( nAbsPos > nParagraphCount )
nAbsPos = nParagraphCount ;
if ( bFirstParaIsEmpty )
{
pPara = pParaList - > GetParagraph ( 0 ) ;
if ( pPara - > GetDepth ( ) ! = nDepth )
{
nDepthChangedHdlPrevDepth = pPara - > GetDepth ( ) ;
2008-06-06 11:30:58 +00:00
mnDepthChangeHdlPrevFlags = pPara - > nFlags ;
2000-09-18 16:07:07 +00:00
pPara - > SetDepth ( nDepth ) ;
pHdlParagraph = pPara ;
DepthChangedHdl ( ) ;
}
pPara - > nFlags | = PARAFLAG_HOLDDEPTH ;
SetText ( rText , pPara ) ;
}
else
{
2011-01-13 14:12:48 +01:00
sal_Bool bUpdate = pEditEngine - > GetUpdateMode ( ) ;
pEditEngine - > SetUpdateMode ( sal_False ) ;
ImplBlockInsertionCallbacks ( sal_True ) ;
2000-09-18 16:07:07 +00:00
pPara = new Paragraph ( nDepth ) ;
pParaList - > Insert ( pPara , nAbsPos ) ;
2013-05-08 18:12:32 +02:00
pEditEngine - > InsertParagraph ( nAbsPos , String ( ) ) ;
2000-09-18 16:07:07 +00:00
DBG_ASSERT ( pPara = = pParaList - > GetParagraph ( nAbsPos ) , " Insert:Failed " ) ;
2013-05-08 18:12:32 +02:00
ImplInitDepth ( nAbsPos , nDepth , sal_False ) ;
2000-09-18 16:07:07 +00:00
pHdlParagraph = pPara ;
ParagraphInsertedHdl ( ) ;
pPara - > nFlags | = PARAFLAG_HOLDDEPTH ;
SetText ( rText , pPara ) ;
2011-01-13 14:12:48 +01:00
ImplBlockInsertionCallbacks ( sal_False ) ;
2000-09-18 16:07:07 +00:00
pEditEngine - > SetUpdateMode ( bUpdate ) ;
}
2011-01-13 14:12:48 +01:00
bFirstParaIsEmpty = sal_False ;
2008-11-10 15:06:12 +00:00
DBG_ASSERT ( pEditEngine - > GetParagraphCount ( ) = = pParaList - > GetParagraphCount ( ) , " SetText failed " ) ;
2000-09-18 16:07:07 +00:00
return pPara ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : ParagraphInserted ( sal_Int32 nPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
if ( bBlockInsCallback )
return ;
if ( bPasting | | pEditEngine - > IsInUndo ( ) )
{
2008-06-06 11:30:58 +00:00
Paragraph * pPara = new Paragraph ( - 1 ) ;
2000-09-18 16:07:07 +00:00
pParaList - > Insert ( pPara , nPara ) ;
if ( pEditEngine - > IsInUndo ( ) )
{
pPara - > nFlags = PARAFLAG_SETBULLETTEXT ;
2011-01-13 14:12:48 +01:00
pPara - > bVisible = sal_True ;
2008-06-06 11:30:58 +00:00
const SfxInt16Item & rLevel = ( const SfxInt16Item & ) pEditEngine - > GetParaAttrib ( nPara , EE_PARA_OUTLLEVEL ) ;
2000-09-18 16:07:07 +00:00
pPara - > SetDepth ( rLevel . GetValue ( ) ) ;
}
}
else
{
2008-06-06 11:30:58 +00:00
sal_Int16 nDepth = - 1 ;
2008-07-22 06:42:36 +00:00
Paragraph * pParaBefore = pParaList - > GetParagraph ( nPara - 1 ) ;
if ( pParaBefore )
nDepth = pParaBefore - > GetDepth ( ) ;
2000-09-18 16:07:07 +00:00
Paragraph * pPara = new Paragraph ( nDepth ) ;
pParaList - > Insert ( pPara , nPara ) ;
if ( ! pEditEngine - > IsInUndo ( ) )
{
2011-01-13 14:12:48 +01:00
ImplCalcBulletText ( nPara , sal_True , sal_False ) ;
2000-09-18 16:07:07 +00:00
pHdlParagraph = pPara ;
ParagraphInsertedHdl ( ) ;
}
}
}
2013-05-08 18:12:32 +02:00
void Outliner : : ParagraphDeleted ( sal_Int32 nPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
if ( bBlockInsCallback | | ( nPara = = EE_PARA_ALL ) )
return ;
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2008-07-22 06:42:36 +00:00
if ( ! pPara )
return ;
2008-06-06 11:30:58 +00:00
sal_Int16 nDepth = pPara - > GetDepth ( ) ;
2000-09-18 16:07:07 +00:00
if ( ! pEditEngine - > IsInUndo ( ) )
{
pHdlParagraph = pPara ;
ParagraphRemovingHdl ( ) ;
}
pParaList - > Remove ( nPara ) ;
delete pPara ;
2001-01-31 11:58:15 +00:00
if ( ! pEditEngine - > IsInUndo ( ) & & ! bPasting )
2000-09-18 16:07:07 +00:00
{
pPara = pParaList - > GetParagraph ( nPara ) ;
if ( pPara & & ( pPara - > GetDepth ( ) > nDepth ) )
{
2011-01-13 14:12:48 +01:00
ImplCalcBulletText ( nPara , sal_True , sal_False ) ;
2011-02-16 16:34:02 -05:00
// Search for next on the this level ...
2000-09-18 16:07:07 +00:00
while ( pPara & & pPara - > GetDepth ( ) > nDepth )
pPara = pParaList - > GetParagraph ( + + nPara ) ;
}
if ( pPara & & ( pPara - > GetDepth ( ) = = nDepth ) )
2011-01-13 14:12:48 +01:00
ImplCalcBulletText ( nPara , sal_True , sal_False ) ;
2000-09-18 16:07:07 +00:00
}
}
2011-01-13 14:12:48 +01:00
void Outliner : : Init ( sal_uInt16 nMode )
2000-09-18 16:07:07 +00:00
{
nOutlinerMode = nMode ;
Clear ( ) ;
2011-01-13 14:12:48 +01:00
sal_uLong nCtrl = pEditEngine - > GetControlWord ( ) ;
2000-09-18 16:07:07 +00:00
nCtrl & = ~ ( EE_CNTRL_OUTLINER | EE_CNTRL_OUTLINER2 ) ;
2008-06-06 11:30:58 +00:00
SetMaxDepth ( 9 ) ;
2000-09-18 16:07:07 +00:00
switch ( ImplGetOutlinerMode ( ) )
{
case OUTLINERMODE_TEXTOBJECT :
case OUTLINERMODE_TITLEOBJECT :
2008-06-06 11:30:58 +00:00
break ;
2000-09-18 16:07:07 +00:00
case OUTLINERMODE_OUTLINEOBJECT :
nCtrl | = EE_CNTRL_OUTLINER2 ;
2008-06-06 11:30:58 +00:00
break ;
2000-09-18 16:07:07 +00:00
case OUTLINERMODE_OUTLINEVIEW :
nCtrl | = EE_CNTRL_OUTLINER ;
2008-06-06 11:30:58 +00:00
break ;
2011-03-01 19:07:44 +01:00
default : OSL_FAIL ( " Outliner::Init - Invalid Mode! " ) ;
2000-09-18 16:07:07 +00:00
}
pEditEngine - > SetControlWord ( nCtrl ) ;
2012-09-06 10:38:22 +00:00
const bool bWasUndoEnabled ( IsUndoEnabled ( ) ) ;
2012-08-10 13:33:02 +00:00
EnableUndo ( false ) ;
2011-01-13 14:12:48 +01:00
ImplInitDepth ( 0 , GetMinDepth ( ) , sal_False ) ;
2001-02-01 14:17:25 +00:00
GetUndoManager ( ) . Clear ( ) ;
2012-09-06 10:38:22 +00:00
EnableUndo ( bWasUndoEnabled ) ;
2000-09-18 16:07:07 +00:00
}
2011-01-13 14:12:48 +01:00
void Outliner : : SetMaxDepth ( sal_Int16 nDepth , sal_Bool bCheckParagraphs )
2000-09-18 16:07:07 +00:00
{
if ( nMaxDepth ! = nDepth )
{
2013-04-11 00:21:40 -03:00
nMaxDepth = std : : min ( nDepth , ( sal_Int16 ) ( SVX_MAX_NUM - 1 ) ) ;
2000-09-18 16:07:07 +00:00
if ( bCheckParagraphs )
{
2013-05-08 18:12:32 +02:00
sal_Int32 nParagraphs = pParaList - > GetParagraphCount ( ) ;
for ( sal_Int32 nPara = 0 ; nPara < nParagraphs ; nPara + + )
2000-09-18 16:07:07 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2008-07-22 06:42:36 +00:00
if ( pPara & & pPara - > GetDepth ( ) > nMaxDepth )
2000-09-18 16:07:07 +00:00
{
SetDepth ( pPara , nMaxDepth ) ;
}
}
}
}
}
2013-05-08 18:12:32 +02:00
sal_Int16 Outliner : : GetDepth ( sal_Int32 nPara ) const
2000-09-18 16:07:07 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
DBG_ASSERT ( pPara , " Outliner::GetDepth - Paragraph not found! " ) ;
2008-06-06 11:30:58 +00:00
return pPara ? pPara - > GetDepth ( ) : - 1 ;
2000-09-18 16:07:07 +00:00
}
2008-06-06 11:30:58 +00:00
void Outliner : : SetDepth ( Paragraph * pPara , sal_Int16 nNewDepth )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2001-05-30 16:23:37 +00:00
ImplCheckDepth ( nNewDepth ) ;
2000-09-18 16:07:07 +00:00
if ( nNewDepth ! = pPara - > GetDepth ( ) )
{
nDepthChangedHdlPrevDepth = pPara - > GetDepth ( ) ;
2008-06-06 11:30:58 +00:00
mnDepthChangeHdlPrevFlags = pPara - > nFlags ;
2000-09-18 16:07:07 +00:00
pHdlParagraph = pPara ;
2013-05-08 18:12:32 +02:00
sal_Int32 nPara = GetAbsPos ( pPara ) ;
2011-01-13 14:12:48 +01:00
ImplInitDepth ( nPara , nNewDepth , sal_True ) ;
ImplCalcBulletText ( nPara , sal_False , sal_False ) ;
2008-06-06 11:30:58 +00:00
if ( ImplGetOutlinerMode ( ) = = OUTLINERMODE_OUTLINEOBJECT )
ImplSetLevelDependendStyleSheet ( nPara ) ;
2000-09-18 16:07:07 +00:00
DepthChangedHdl ( ) ;
}
}
2013-05-08 18:12:32 +02:00
sal_Int16 Outliner : : GetNumberingStartValue ( sal_Int32 nPara )
2008-06-06 11:30:58 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
DBG_ASSERT ( pPara , " Outliner::GetNumberingStartValue - Paragraph not found! " ) ;
return pPara ? pPara - > GetNumberingStartValue ( ) : - 1 ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : SetNumberingStartValue ( sal_Int32 nPara , sal_Int16 nNumberingStartValue )
2008-06-06 11:30:58 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
DBG_ASSERT ( pPara , " Outliner::GetNumberingStartValue - Paragraph not found! " ) ;
if ( pPara & & pPara - > GetNumberingStartValue ( ) ! = nNumberingStartValue )
{
if ( IsUndoEnabled ( ) & & ! IsInUndo ( ) )
InsertUndo ( new OutlinerUndoChangeParaNumberingRestart ( this , nPara ,
pPara - > GetNumberingStartValue ( ) , nNumberingStartValue ,
pPara - > IsParaIsNumberingRestart ( ) , pPara - > IsParaIsNumberingRestart ( ) ) ) ;
pPara - > SetNumberingStartValue ( nNumberingStartValue ) ;
2013-05-08 18:12:32 +02:00
ImplCheckParagraphs ( nPara , pParaList - > GetParagraphCount ( ) ) ;
2008-06-06 11:30:58 +00:00
pEditEngine - > SetModified ( ) ;
}
}
2013-05-08 18:12:32 +02:00
sal_Bool Outliner : : IsParaIsNumberingRestart ( sal_Int32 nPara )
2008-06-06 11:30:58 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
DBG_ASSERT ( pPara , " Outliner::IsParaIsNumberingRestart - Paragraph not found! " ) ;
return pPara ? pPara - > IsParaIsNumberingRestart ( ) : sal_False ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : SetParaIsNumberingRestart ( sal_Int32 nPara , sal_Bool bParaIsNumberingRestart )
2008-06-06 11:30:58 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
DBG_ASSERT ( pPara , " Outliner::SetParaIsNumberingRestart - Paragraph not found! " ) ;
if ( pPara & & ( pPara - > IsParaIsNumberingRestart ( ) ! = bParaIsNumberingRestart ) )
{
if ( IsUndoEnabled ( ) & & ! IsInUndo ( ) )
InsertUndo ( new OutlinerUndoChangeParaNumberingRestart ( this , nPara ,
pPara - > GetNumberingStartValue ( ) , pPara - > GetNumberingStartValue ( ) ,
pPara - > IsParaIsNumberingRestart ( ) , bParaIsNumberingRestart ) ) ;
pPara - > SetParaIsNumberingRestart ( bParaIsNumberingRestart ) ;
2013-05-08 18:12:32 +02:00
ImplCheckParagraphs ( nPara , pParaList - > GetParagraphCount ( ) ) ;
2008-06-06 11:30:58 +00:00
pEditEngine - > SetModified ( ) ;
}
}
2013-05-29 08:10:49 +00:00
sal_Int32 Outliner : : GetBulletsNumberingStatus (
const sal_Int32 nParaStart ,
const sal_Int32 nParaEnd ) const
2013-04-10 08:20:16 +00:00
{
2013-05-29 08:10:49 +00:00
if ( nParaStart > nParaEnd
| | nParaEnd > = pParaList - > GetParagraphCount ( ) )
2013-04-10 08:20:16 +00:00
{
2013-05-29 08:10:49 +00:00
DBG_ASSERT ( false , " <Outliner::GetBulletsNumberingStatus> - unexpected parameter values " ) ;
return 2 ;
}
sal_Int32 nBulletsCount = 0 ;
sal_Int32 nNumberingCount = 0 ;
for ( sal_Int32 nPara = nParaStart ; nPara < = nParaEnd ; + + nPara )
{
if ( ! pParaList - > GetParagraph ( nPara ) )
2013-04-10 08:20:16 +00:00
{
break ;
}
2013-05-29 08:10:49 +00:00
const SvxNumberFormat * pFmt = GetNumberFormat ( nPara ) ;
if ( ! pFmt )
2013-04-10 08:20:16 +00:00
{
2013-05-29 08:10:49 +00:00
// At least, exists one paragraph that has no Bullets/Numbering.
break ;
2013-04-10 08:20:16 +00:00
}
2013-05-29 08:10:49 +00:00
else if ( ( pFmt - > GetNumberingType ( ) = = SVX_NUM_BITMAP ) | | ( pFmt - > GetNumberingType ( ) = = SVX_NUM_CHAR_SPECIAL ) )
{
// Having Bullets in this paragraph.
nBulletsCount + + ;
}
else
{
// Having Numbering in this paragraph.
nNumberingCount + + ;
}
}
const sal_Int32 nParaCount = nParaEnd - nParaStart + 1 ;
if ( nBulletsCount = = nParaCount )
{
return 0 ;
}
else if ( nNumberingCount = = nParaCount )
{
return 1 ;
2013-04-10 08:20:16 +00:00
}
2013-05-29 08:10:49 +00:00
return 2 ;
}
sal_Int32 Outliner : : GetBulletsNumberingStatus ( ) const
{
return pParaList - > GetParagraphCount ( ) > 0
? GetBulletsNumberingStatus ( 0 , pParaList - > GetParagraphCount ( ) - 1 )
: 2 ;
2013-04-10 08:20:16 +00:00
}
2013-05-08 18:12:32 +02:00
OutlinerParaObject * Outliner : : CreateParaObject ( sal_Int32 nStartPara , sal_Int32 nCount ) const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2013-05-08 18:12:32 +02:00
if ( static_cast < sal_uLong > ( nStartPara ) + nCount >
static_cast < sal_uLong > ( pParaList - > GetParagraphCount ( ) ) )
nCount = pParaList - > GetParagraphCount ( ) - nStartPara ;
2000-09-18 16:07:07 +00:00
2006-01-24 15:50:45 +00:00
// When a new OutlinerParaObject is created because a paragraph is just beeing deleted,
// it can happen that the ParaList is not updated yet...
2005-11-08 15:35:13 +00:00
if ( ( nStartPara + nCount ) > pEditEngine - > GetParagraphCount ( ) )
nCount = pEditEngine - > GetParagraphCount ( ) - nStartPara ;
2000-09-18 16:07:07 +00:00
if ( ! nCount )
return NULL ;
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
EditTextObject * pText = pEditEngine - > CreateTextObject ( nStartPara , nCount ) ;
const bool bIsEditDoc ( OUTLINERMODE_TEXTOBJECT = = ImplGetOutlinerMode ( ) ) ;
ParagraphDataVector aParagraphDataVector ( nCount ) ;
2013-05-08 18:12:32 +02:00
const sal_Int32 nLastPara ( nStartPara + nCount - 1 ) ;
2000-09-18 16:07:07 +00:00
2013-05-08 18:12:32 +02:00
for ( sal_Int32 nPara ( nStartPara ) ; nPara < = nLastPara ; nPara + + )
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
{
aParagraphDataVector [ nPara - nStartPara ] = * GetParagraph ( nPara ) ;
}
OutlinerParaObject * pPObj = new OutlinerParaObject ( * pText , aParagraphDataVector , bIsEditDoc ) ;
pPObj - > SetOutlinerMode ( GetMode ( ) ) ;
delete pText ;
2000-09-18 16:07:07 +00:00
return pPObj ;
}
2013-08-14 13:44:38 +01:00
void Outliner : : SetText ( const OUString & rText , Paragraph * pPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2008-11-10 15:06:12 +00:00
DBG_ASSERT ( pPara , " SetText:No Para " ) ;
2000-09-18 16:07:07 +00:00
2011-01-13 14:12:48 +01:00
sal_Bool bUpdate = pEditEngine - > GetUpdateMode ( ) ;
pEditEngine - > SetUpdateMode ( sal_False ) ;
ImplBlockInsertionCallbacks ( sal_True ) ;
2000-09-18 16:07:07 +00:00
2013-05-08 18:12:32 +02:00
sal_Int32 nPara = pParaList - > GetAbsPos ( pPara ) ;
2000-09-18 16:07:07 +00:00
2013-08-14 13:44:38 +01:00
if ( rText . isEmpty ( ) )
2000-09-18 16:07:07 +00:00
{
pEditEngine - > SetText ( nPara , rText ) ;
2011-01-13 14:12:48 +01:00
ImplInitDepth ( nPara , pPara - > GetDepth ( ) , sal_False ) ;
2000-09-18 16:07:07 +00:00
}
else
{
2013-08-14 13:44:38 +01:00
OUString aText ( convertLineEnd ( rText , LINEEND_LF ) ) ;
2000-09-18 16:07:07 +00:00
2013-08-14 13:44:38 +01:00
if ( aText [ aText . getLength ( ) - 1 ] = = ' \x0A ' )
aText = aText . copy ( 0 , aText . getLength ( ) - 1 ) ; // Delete the last break
2000-09-18 16:07:07 +00:00
2012-01-02 10:55:27 +00:00
sal_uInt16 nCount = comphelper : : string : : getTokenCount ( aText , ' \x0A ' ) ;
2011-01-13 14:12:48 +01:00
sal_uInt16 nPos = 0 ;
2013-05-08 18:12:32 +02:00
sal_Int32 nInsPos = nPara + 1 ;
2000-09-18 16:07:07 +00:00
while ( nCount > nPos )
{
2013-08-14 13:44:38 +01:00
OUString aStr = aText . getToken ( nPos , ' \x0A ' ) ;
2000-09-18 16:07:07 +00:00
2008-06-06 11:30:58 +00:00
sal_Int16 nCurDepth ;
2000-09-18 16:07:07 +00:00
if ( nPos )
{
2008-06-06 11:30:58 +00:00
pPara = new Paragraph ( - 1 ) ;
nCurDepth = - 1 ;
2000-09-18 16:07:07 +00:00
}
else
nCurDepth = pPara - > GetDepth ( ) ;
2011-02-16 16:34:02 -05:00
// In the outliner mode, filter the tabs and set the indentation
// about a LRSpaceItem. In EditEngine mode intend over old tabs
2000-09-18 16:07:07 +00:00
if ( ( ImplGetOutlinerMode ( ) = = OUTLINERMODE_OUTLINEOBJECT ) | |
( ImplGetOutlinerMode ( ) = = OUTLINERMODE_OUTLINEVIEW ) )
{
2011-02-16 16:34:02 -05:00
// Extract Tabs
2011-01-13 14:12:48 +01:00
sal_uInt16 nTabs = 0 ;
2013-08-14 13:44:38 +01:00
while ( ( nTabs < aStr . getLength ( ) ) & & ( aStr [ nTabs ] = = ' \t ' ) )
2000-09-18 16:07:07 +00:00
nTabs + + ;
if ( nTabs )
2013-08-14 13:44:38 +01:00
aStr = aStr . copy ( nTabs ) ;
2000-09-18 16:07:07 +00:00
2011-02-16 16:34:02 -05:00
// Keep depth? (see Outliner::Insert)
2000-09-18 16:07:07 +00:00
if ( ! ( pPara - > nFlags & PARAFLAG_HOLDDEPTH ) )
{
2008-06-06 11:30:58 +00:00
nCurDepth = nTabs - 1 ;
2001-05-30 16:23:37 +00:00
ImplCheckDepth ( nCurDepth ) ;
2000-09-18 16:07:07 +00:00
pPara - > SetDepth ( nCurDepth ) ;
pPara - > nFlags & = ( ~ PARAFLAG_HOLDDEPTH ) ;
}
}
2011-02-16 16:34:02 -05:00
if ( nPos ) // not with the first paragraph
2000-09-18 16:07:07 +00:00
{
pParaList - > Insert ( pPara , nInsPos ) ;
pEditEngine - > InsertParagraph ( nInsPos , aStr ) ;
pHdlParagraph = pPara ;
ParagraphInsertedHdl ( ) ;
}
else
{
nInsPos - - ;
pEditEngine - > SetText ( nInsPos , aStr ) ;
}
2011-01-13 14:12:48 +01:00
ImplInitDepth ( nInsPos , nCurDepth , sal_False ) ;
2000-09-18 16:07:07 +00:00
nInsPos + + ;
nPos + + ;
}
}
2008-11-10 15:06:12 +00:00
DBG_ASSERT ( pParaList - > GetParagraphCount ( ) = = pEditEngine - > GetParagraphCount ( ) , " SetText failed! " ) ;
2011-01-13 14:12:48 +01:00
bFirstParaIsEmpty = sal_False ;
ImplBlockInsertionCallbacks ( sal_False ) ;
2000-09-18 16:07:07 +00:00
pEditEngine - > SetUpdateMode ( bUpdate ) ;
}
2011-02-16 16:34:02 -05:00
// pView == 0 -> Ignore tabs
2000-09-18 16:07:07 +00:00
2013-05-08 18:12:32 +02:00
bool Outliner : : ImpConvertEdtToOut ( sal_Int32 nPara , EditView * pView )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2008-06-06 11:30:58 +00:00
bool bConverted = false ;
2011-01-13 14:12:48 +01:00
sal_uInt16 nTabs = 0 ;
2000-09-18 16:07:07 +00:00
ESelection aDelSel ;
2013-08-14 13:44:38 +01:00
OUString aName ;
OUString aHeading_US ( " heading " ) ;
OUString aNumber_US ( " Numbering " ) ;
2000-09-18 16:07:07 +00:00
2013-08-14 13:44:38 +01:00
OUString aStr ( pEditEngine - > GetText ( nPara ) ) ;
const sal_Unicode * pPtr = aStr . getStr ( ) ;
2000-09-18 16:07:07 +00:00
2011-01-13 14:12:48 +01:00
sal_uInt16 nHeadingNumberStart = 0 ;
sal_uInt16 nNumberingNumberStart = 0 ;
2013-05-08 18:12:32 +02:00
SfxStyleSheet * pStyle = pEditEngine - > GetStyleSheet ( nPara ) ;
2000-09-18 16:07:07 +00:00
if ( pStyle )
{
aName = pStyle - > GetName ( ) ;
2013-08-14 13:44:38 +01:00
sal_Int32 nSearch ;
if ( ( nSearch = aName . indexOf ( aHeading_US ) ) ! = - 1 )
nHeadingNumberStart = nSearch + aHeading_US . getLength ( ) ;
else if ( ( nSearch = aName . indexOf ( aNumber_US ) ) ! = - 1 )
nNumberingNumberStart = nSearch + aNumber_US . getLength ( ) ;
2000-09-18 16:07:07 +00:00
}
if ( nHeadingNumberStart | | nNumberingNumberStart )
{
2011-02-16 16:34:02 -05:00
// PowerPoint import ?
2013-08-14 13:44:38 +01:00
if ( nHeadingNumberStart & & ( aStr . getLength ( ) > = 2 ) & &
2000-09-18 16:07:07 +00:00
( pPtr [ 0 ] ! = ' \t ' ) & & ( pPtr [ 1 ] = = ' \t ' ) )
{
2011-02-16 16:34:02 -05:00
// Extract Bullet and Tab
2013-05-08 18:12:32 +02:00
aDelSel = ESelection ( nPara , 0 , nPara , 2 ) ;
2000-09-18 16:07:07 +00:00
}
2011-01-13 14:12:48 +01:00
sal_uInt16 nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart ;
2013-08-14 13:44:38 +01:00
OUString aLevel = comphelper : : string : : stripStart ( aName . copy ( nPos ) , ' ' ) ;
nTabs = sal : : static_int_cast < sal_uInt16 > ( aLevel . toInt32 ( ) ) ;
2000-09-18 16:07:07 +00:00
if ( nTabs )
2011-02-16 16:34:02 -05:00
nTabs - - ; // Level 0 = "heading 1"
2011-01-13 14:12:48 +01:00
bConverted = sal_True ;
2000-09-18 16:07:07 +00:00
}
else
{
2011-02-16 16:34:02 -05:00
// filter leading tabs
2000-09-18 16:07:07 +00:00
while ( * pPtr = = ' \t ' )
{
pPtr + + ;
nTabs + + ;
}
2011-02-16 16:34:02 -05:00
// Remove tabs from the text
2000-09-18 16:07:07 +00:00
if ( nTabs )
2013-05-08 18:12:32 +02:00
aDelSel = ESelection ( nPara , 0 , nPara , nTabs ) ;
2000-09-18 16:07:07 +00:00
}
if ( aDelSel . HasRange ( ) )
{
if ( pView )
{
pView - > SetSelection ( aDelSel ) ;
pView - > DeleteSelected ( ) ;
}
else
pEditEngine - > QuickDelete ( aDelSel ) ;
}
2013-05-08 18:12:32 +02:00
const SfxInt16Item & rLevel = ( const SfxInt16Item & ) pEditEngine - > GetParaAttrib ( nPara , EE_PARA_OUTLLEVEL ) ;
2008-06-06 11:30:58 +00:00
sal_Int16 nOutlLevel = rLevel . GetValue ( ) ;
2002-01-16 09:35:41 +00:00
2008-06-06 11:30:58 +00:00
ImplCheckDepth ( nOutlLevel ) ;
2013-05-08 18:12:32 +02:00
ImplInitDepth ( nPara , nOutlLevel , sal_False ) ;
2000-09-18 16:07:07 +00:00
return bConverted ;
}
void Outliner : : SetText ( const OutlinerParaObject & rPObj )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-01-13 14:12:48 +01:00
sal_Bool bUpdate = pEditEngine - > GetUpdateMode ( ) ;
pEditEngine - > SetUpdateMode ( sal_False ) ;
2000-09-18 16:07:07 +00:00
2011-01-13 14:12:48 +01:00
sal_Bool bUndo = pEditEngine - > IsUndoEnabled ( ) ;
EnableUndo ( sal_False ) ;
2000-09-18 16:07:07 +00:00
Init ( rPObj . GetOutlinerMode ( ) ) ;
2011-01-13 14:12:48 +01:00
ImplBlockInsertionCallbacks ( sal_True ) ;
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
pEditEngine - > SetText ( rPObj . GetTextObject ( ) ) ;
2006-10-12 12:02:06 +00:00
2011-01-13 14:12:48 +01:00
bFirstParaIsEmpty = sal_False ;
2000-09-18 16:07:07 +00:00
2011-01-13 14:12:48 +01:00
pParaList - > Clear ( sal_True ) ;
2013-05-08 18:12:32 +02:00
for ( sal_Int32 nCurPara = 0 ; nCurPara < rPObj . Count ( ) ; nCurPara + + )
2000-09-18 16:07:07 +00:00
{
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
Paragraph * pPara = new Paragraph ( rPObj . GetParagraphData ( nCurPara ) ) ;
2008-10-01 06:50:54 +00:00
ImplCheckDepth ( pPara - > nDepth ) ;
2011-02-27 21:14:03 -04:30
pParaList - > Append ( pPara ) ;
2000-09-18 16:07:07 +00:00
ImplCheckNumBulletItem ( nCurPara ) ;
}
2013-05-08 18:12:32 +02:00
ImplCheckParagraphs ( 0 , pParaList - > GetParagraphCount ( ) ) ;
2000-09-18 16:07:07 +00:00
EnableUndo ( bUndo ) ;
2011-01-13 14:12:48 +01:00
ImplBlockInsertionCallbacks ( sal_False ) ;
2000-09-18 16:07:07 +00:00
pEditEngine - > SetUpdateMode ( bUpdate ) ;
2008-11-10 15:06:12 +00:00
DBG_ASSERT ( pParaList - > GetParagraphCount ( ) = = rPObj . Count ( ) , " SetText failed " ) ;
DBG_ASSERT ( pEditEngine - > GetParagraphCount ( ) = = rPObj . Count ( ) , " SetText failed " ) ;
2000-09-18 16:07:07 +00:00
}
void Outliner : : AddText ( const OutlinerParaObject & rPObj )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
Paragraph * pPara ;
2011-01-13 14:12:48 +01:00
sal_Bool bUpdate = pEditEngine - > GetUpdateMode ( ) ;
pEditEngine - > SetUpdateMode ( sal_False ) ;
2000-09-18 16:07:07 +00:00
2011-01-13 14:12:48 +01:00
ImplBlockInsertionCallbacks ( sal_True ) ;
2013-05-08 18:12:32 +02:00
sal_Int32 nPara ;
2000-09-18 16:07:07 +00:00
if ( bFirstParaIsEmpty )
{
2011-01-13 14:12:48 +01:00
pParaList - > Clear ( sal_True ) ;
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
pEditEngine - > SetText ( rPObj . GetTextObject ( ) ) ;
2000-09-18 16:07:07 +00:00
nPara = 0 ;
}
else
{
nPara = pParaList - > GetParagraphCount ( ) ;
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
pEditEngine - > InsertParagraph ( EE_PARA_APPEND , rPObj . GetTextObject ( ) ) ;
2000-09-18 16:07:07 +00:00
}
2011-01-13 14:12:48 +01:00
bFirstParaIsEmpty = sal_False ;
2000-09-18 16:07:07 +00:00
2013-05-08 18:12:32 +02:00
for ( sal_Int32 n = 0 ; n < rPObj . Count ( ) ; n + + )
2000-09-18 16:07:07 +00:00
{
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
pPara = new Paragraph ( rPObj . GetParagraphData ( n ) ) ;
2011-03-01 13:21:42 -04:30
pParaList - > Append ( pPara ) ;
2013-05-08 18:12:32 +02:00
sal_Int32 nP = nPara + n ;
2008-11-10 15:06:12 +00:00
DBG_ASSERT ( pParaList - > GetAbsPos ( pPara ) = = nP , " AddText:Out of sync " ) ;
2011-01-13 14:12:48 +01:00
ImplInitDepth ( nP , pPara - > GetDepth ( ) , sal_False ) ;
2000-09-18 16:07:07 +00:00
}
DBG_ASSERT ( pEditEngine - > GetParagraphCount ( ) = = pParaList - > GetParagraphCount ( ) , " SetText: OutOfSync " ) ;
2013-05-08 18:12:32 +02:00
ImplCheckParagraphs ( nPara , pParaList - > GetParagraphCount ( ) ) ;
2000-09-18 16:07:07 +00:00
2011-01-13 14:12:48 +01:00
ImplBlockInsertionCallbacks ( sal_False ) ;
2000-09-18 16:07:07 +00:00
pEditEngine - > SetUpdateMode ( bUpdate ) ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : FieldClicked ( const SvxFieldItem & rField , sal_Int32 nPara , sal_uInt16 nPos )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
if ( aFieldClickedHdl . IsSet ( ) )
{
EditFieldInfo aFldInfo ( this , rField , nPara , nPos ) ;
2011-01-13 14:12:48 +01:00
aFldInfo . SetSimpleClick ( sal_True ) ;
2000-09-18 16:07:07 +00:00
aFieldClickedHdl . Call ( & aFldInfo ) ;
}
}
2013-05-08 18:12:32 +02:00
void Outliner : : FieldSelected ( const SvxFieldItem & rField , sal_Int32 nPara , sal_uInt16 nPos )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
if ( ! aFieldClickedHdl . IsSet ( ) )
return ;
EditFieldInfo aFldInfo ( this , rField , nPara , nPos ) ;
2011-01-13 14:12:48 +01:00
aFldInfo . SetSimpleClick ( sal_False ) ;
2000-09-18 16:07:07 +00:00
aFieldClickedHdl . Call ( & aFldInfo ) ;
}
2013-05-08 18:12:32 +02:00
OUString Outliner : : CalcFieldValue ( const SvxFieldItem & rField , sal_Int32 nPara , sal_uInt16 nPos , Color * & rpTxtColor , Color * & rpFldColor )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
if ( ! aCalcFieldValueHdl . IsSet ( ) )
2013-04-07 12:06:47 +02:00
return OUString ( ' ' ) ;
2000-09-18 16:07:07 +00:00
EditFieldInfo aFldInfo ( this , rField , nPara , nPos ) ;
2011-02-16 16:34:02 -05:00
// The FldColor is preset with COL_LIGHTGRAY.
2000-09-18 16:07:07 +00:00
if ( rpFldColor )
aFldInfo . SetFldColor ( * rpFldColor ) ;
aCalcFieldValueHdl . Call ( & aFldInfo ) ;
if ( aFldInfo . GetTxtColor ( ) )
{
delete rpTxtColor ;
rpTxtColor = new Color ( * aFldInfo . GetTxtColor ( ) ) ;
}
delete rpFldColor ;
rpFldColor = aFldInfo . GetFldColor ( ) ? new Color ( * aFldInfo . GetFldColor ( ) ) : 0 ;
return aFldInfo . GetRepresentation ( ) ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : SetStyleSheet ( sal_Int32 nPara , SfxStyleSheet * pStyle )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2008-07-22 06:42:36 +00:00
if ( pPara )
{
2013-05-08 18:12:32 +02:00
pEditEngine - > SetStyleSheet ( nPara , pStyle ) ;
2008-07-22 06:42:36 +00:00
pPara - > nFlags | = PARAFLAG_SETBULLETTEXT ;
2013-05-08 18:12:32 +02:00
ImplCheckNumBulletItem ( nPara ) ;
2008-07-22 06:42:36 +00:00
}
2000-09-18 16:07:07 +00:00
}
2013-05-08 18:12:32 +02:00
void Outliner : : ImplCheckNumBulletItem ( sal_Int32 nPara )
2000-09-18 16:07:07 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2008-07-22 06:42:36 +00:00
if ( pPara )
pPara - > aBulSize . Width ( ) = - 1 ;
2000-09-18 16:07:07 +00:00
}
2013-05-08 18:12:32 +02:00
void Outliner : : ImplSetLevelDependendStyleSheet ( sal_Int32 nPara , SfxStyleSheet * pLevelStyle )
2000-09-18 16:07:07 +00:00
{
2001-11-14 10:01:23 +00:00
DBG_CHKTHIS ( Outliner , 0 ) ;
DBG_ASSERT ( ( ImplGetOutlinerMode ( ) = = OUTLINERMODE_OUTLINEOBJECT ) | | ( ImplGetOutlinerMode ( ) = = OUTLINERMODE_OUTLINEVIEW ) , " SetLevelDependendStyleSheet: Wrong Mode! " ) ;
SfxStyleSheet * pStyle = pLevelStyle ;
if ( ! pStyle )
pStyle = GetStyleSheet ( nPara ) ;
2000-09-18 16:07:07 +00:00
2001-11-14 10:01:23 +00:00
if ( pStyle )
2000-09-18 16:07:07 +00:00
{
2008-06-06 11:30:58 +00:00
sal_Int16 nDepth = GetDepth ( nPara ) ;
if ( nDepth < 0 )
nDepth = 0 ;
2001-11-14 10:01:23 +00:00
String aNewStyleSheetName ( pStyle - > GetName ( ) ) ;
2000-09-18 16:07:07 +00:00
aNewStyleSheetName . Erase ( aNewStyleSheetName . Len ( ) - 1 , 1 ) ;
2013-02-20 00:21:37 +01:00
aNewStyleSheetName + = OUString : : number ( nDepth + 1 ) ;
2001-11-14 10:01:23 +00:00
SfxStyleSheet * pNewStyle = ( SfxStyleSheet * ) GetStyleSheetPool ( ) - > Find ( aNewStyleSheetName , pStyle - > GetFamily ( ) ) ;
2000-09-18 16:07:07 +00:00
DBG_ASSERT ( pNewStyle , " AutoStyleSheetName - Style not found! " ) ;
2001-11-14 10:01:23 +00:00
if ( pNewStyle & & ( pNewStyle ! = GetStyleSheet ( nPara ) ) )
2000-10-11 11:59:46 +00:00
{
2013-02-24 16:08:05 +01:00
SfxItemSet aOldAttrs ( GetParaAttribs ( nPara ) ) ;
2000-09-18 16:07:07 +00:00
SetStyleSheet ( nPara , pNewStyle ) ;
2000-10-11 11:59:46 +00:00
if ( aOldAttrs . GetItemState ( EE_PARA_NUMBULLET ) = = SFX_ITEM_ON )
{
2001-11-14 10:01:23 +00:00
SfxItemSet aAttrs ( GetParaAttribs ( nPara ) ) ;
2000-10-11 11:59:46 +00:00
aAttrs . Put ( aOldAttrs . Get ( EE_PARA_NUMBULLET ) ) ;
2001-11-14 10:01:23 +00:00
SetParaAttribs ( nPara , aAttrs ) ;
2000-10-11 11:59:46 +00:00
}
}
2000-09-18 16:07:07 +00:00
}
}
2013-05-08 18:12:32 +02:00
void Outliner : : ImplInitDepth ( sal_Int32 nPara , sal_Int16 nDepth , sal_Bool bCreateUndo , sal_Bool bUndoAction )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2001-05-30 16:23:37 +00:00
DBG_ASSERT ( ( nDepth > = nMinDepth ) & & ( nDepth < = nMaxDepth ) , " ImplInitDepth - Depth is invalid! " ) ;
2000-09-18 16:07:07 +00:00
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2008-07-22 06:42:36 +00:00
if ( ! pPara )
return ;
2008-06-06 11:30:58 +00:00
sal_Int16 nOldDepth = pPara - > GetDepth ( ) ;
2000-09-18 16:07:07 +00:00
pPara - > SetDepth ( nDepth ) ;
2011-02-16 16:34:02 -05:00
// For IsInUndo attributes and style do not have to be set, there
// the old values are restored by the EditEngine.
2000-09-18 16:07:07 +00:00
if ( ! IsInUndo ( ) )
{
2011-01-13 14:12:48 +01:00
sal_Bool bUpdate = pEditEngine - > GetUpdateMode ( ) ;
pEditEngine - > SetUpdateMode ( sal_False ) ;
2000-09-18 16:07:07 +00:00
2011-01-13 14:12:48 +01:00
sal_Bool bUndo = bCreateUndo & & IsUndoEnabled ( ) ;
2000-09-18 16:07:07 +00:00
if ( bUndo & & bUndoAction )
UndoActionStart ( OLUNDO_DEPTH ) ;
SfxItemSet aAttrs ( pEditEngine - > GetParaAttribs ( nPara ) ) ;
2008-06-06 11:30:58 +00:00
aAttrs . Put ( SfxInt16Item ( EE_PARA_OUTLLEVEL , nDepth ) ) ;
2000-09-18 16:07:07 +00:00
pEditEngine - > SetParaAttribs ( nPara , aAttrs ) ;
ImplCheckNumBulletItem ( nPara ) ;
2011-01-13 14:12:48 +01:00
ImplCalcBulletText ( nPara , sal_False , sal_False ) ;
2000-09-18 16:07:07 +00:00
if ( bUndo )
{
InsertUndo ( new OutlinerUndoChangeDepth ( this , nPara , nOldDepth , nDepth ) ) ;
if ( bUndoAction )
UndoActionEnd ( OLUNDO_DEPTH ) ;
}
pEditEngine - > SetUpdateMode ( bUpdate ) ;
}
}
2013-05-08 18:12:32 +02:00
void Outliner : : SetParaAttribs ( sal_Int32 nPara , const SfxItemSet & rSet )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2008-06-06 11:30:58 +00:00
pEditEngine - > SetParaAttribs ( nPara , rSet ) ;
2000-09-18 16:07:07 +00:00
}
2011-01-13 14:12:48 +01:00
sal_Bool Outliner : : Expand ( Paragraph * pPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-12-07 02:33:51 -08:00
if ( pParaList - > HasHiddenChildren ( pPara ) )
2000-09-18 16:07:07 +00:00
{
2006-10-12 12:02:06 +00:00
OLUndoExpand * pUndo = 0 ;
2011-01-13 14:12:48 +01:00
sal_Bool bUndo = IsUndoEnabled ( ) & & ! IsInUndo ( ) ;
2000-09-18 16:07:07 +00:00
if ( bUndo )
{
UndoActionStart ( OLUNDO_EXPAND ) ;
pUndo = new OLUndoExpand ( this , OLUNDO_EXPAND ) ;
pUndo - > pParas = 0 ;
2013-05-08 18:12:32 +02:00
pUndo - > nCount = pParaList - > GetAbsPos ( pPara ) ;
2000-09-18 16:07:07 +00:00
}
pHdlParagraph = pPara ;
2011-01-13 14:12:48 +01:00
bIsExpanding = sal_True ;
2000-09-18 16:07:07 +00:00
pParaList - > Expand ( pPara ) ;
ExpandHdl ( ) ;
InvalidateBullet ( pPara , pParaList - > GetAbsPos ( pPara ) ) ;
if ( bUndo )
{
InsertUndo ( pUndo ) ;
UndoActionEnd ( OLUNDO_EXPAND ) ;
}
2011-01-13 14:12:48 +01:00
return sal_True ;
2000-09-18 16:07:07 +00:00
}
2011-01-13 14:12:48 +01:00
return sal_False ;
2000-09-18 16:07:07 +00:00
}
2011-01-13 14:12:48 +01:00
sal_Bool Outliner : : Collapse ( Paragraph * pPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-12-07 02:33:51 -08:00
if ( pParaList - > HasVisibleChildren ( pPara ) ) // expanded
2000-09-18 16:07:07 +00:00
{
2006-10-12 12:02:06 +00:00
OLUndoExpand * pUndo = 0 ;
2011-01-13 14:12:48 +01:00
sal_Bool bUndo = sal_False ;
2006-10-12 12:02:06 +00:00
2000-09-18 16:07:07 +00:00
if ( ! IsInUndo ( ) & & IsUndoEnabled ( ) )
2011-01-13 14:12:48 +01:00
bUndo = sal_True ;
2000-09-18 16:07:07 +00:00
if ( bUndo )
{
UndoActionStart ( OLUNDO_COLLAPSE ) ;
pUndo = new OLUndoExpand ( this , OLUNDO_COLLAPSE ) ;
pUndo - > pParas = 0 ;
2013-05-08 18:12:32 +02:00
pUndo - > nCount = pParaList - > GetAbsPos ( pPara ) ;
2000-09-18 16:07:07 +00:00
}
2006-10-12 12:02:06 +00:00
2000-09-18 16:07:07 +00:00
pHdlParagraph = pPara ;
2011-01-13 14:12:48 +01:00
bIsExpanding = sal_False ;
2000-09-18 16:07:07 +00:00
pParaList - > Collapse ( pPara ) ;
ExpandHdl ( ) ;
InvalidateBullet ( pPara , pParaList - > GetAbsPos ( pPara ) ) ;
if ( bUndo )
{
InsertUndo ( pUndo ) ;
UndoActionEnd ( OLUNDO_COLLAPSE ) ;
}
2011-01-13 14:12:48 +01:00
return sal_True ;
2000-09-18 16:07:07 +00:00
}
2011-01-13 14:12:48 +01:00
return sal_False ;
2000-09-18 16:07:07 +00:00
}
2013-05-08 18:12:32 +02:00
Font Outliner : : ImpCalcBulletFont ( sal_Int32 nPara ) const
2000-09-18 16:07:07 +00:00
{
2008-06-06 11:30:58 +00:00
const SvxNumberFormat * pFmt = GetNumberFormat ( nPara ) ;
2001-03-29 14:12:06 +00:00
DBG_ASSERT ( pFmt & & ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_BITMAP ) & & ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_NUMBER_NONE ) , " ImpCalcBulletFont: Missing or BitmapBullet! " ) ;
2000-09-18 16:07:07 +00:00
2011-02-16 16:34:02 -05:00
Font aStdFont ;
2003-04-17 14:58:29 +00:00
if ( ! pEditEngine - > IsFlatMode ( ) )
{
ESelection aSel ( nPara , 0 , nPara , 0 ) ;
aStdFont = EditEngine : : CreateFontFromItemSet ( pEditEngine - > GetAttribs ( aSel ) , GetScriptType ( aSel ) ) ;
}
else
{
aStdFont = pEditEngine - > GetStandardFont ( nPara ) ;
}
2000-09-18 16:07:07 +00:00
2000-10-19 10:11:17 +00:00
Font aBulletFont ;
2013-08-22 15:29:10 +01:00
const Font * pSourceFont = 0 ;
2001-02-23 11:29:54 +00:00
if ( pFmt - > GetNumberingType ( ) = = SVX_NUM_CHAR_SPECIAL )
2001-11-28 10:24:50 +00:00
{
2013-08-22 15:29:10 +01:00
pSourceFont = pFmt - > GetBulletFont ( ) ;
}
if ( pSourceFont )
{
aBulletFont = * pSourceFont ;
2001-11-28 10:24:50 +00:00
}
2000-10-19 10:11:17 +00:00
else
2001-11-28 10:24:50 +00:00
{
aBulletFont = aStdFont ;
aBulletFont . SetUnderline ( UNDERLINE_NONE ) ;
2009-01-05 17:49:45 +00:00
aBulletFont . SetOverline ( UNDERLINE_NONE ) ;
2001-11-28 10:24:50 +00:00
aBulletFont . SetStrikeout ( STRIKEOUT_NONE ) ;
aBulletFont . SetEmphasisMark ( EMPHASISMARK_NONE ) ;
aBulletFont . SetRelief ( RELIEF_NONE ) ;
}
2011-02-16 16:34:02 -05:00
// Use original scale...
2011-03-12 18:57:32 -06:00
sal_uInt16 nStretchX , nStretchY ;
2013-03-09 22:02:47 +04:00
GetGlobalCharStretching ( nStretchX , nStretchY ) ;
2010-09-17 10:11:31 +02:00
2011-03-12 02:42:58 +01:00
sal_uInt16 nScale = pFmt - > GetBulletRelSize ( ) * nStretchY / 100 ;
2011-01-13 14:12:48 +01:00
sal_uLong nScaledLineHeight = aStdFont . GetSize ( ) . Height ( ) ;
2001-11-28 10:24:50 +00:00
nScaledLineHeight * = nScale * 10 ;
nScaledLineHeight / = 1000 ;
2000-10-19 10:11:17 +00:00
2000-09-18 16:07:07 +00:00
aBulletFont . SetAlign ( ALIGN_BOTTOM ) ;
aBulletFont . SetSize ( Size ( 0 , nScaledLineHeight ) ) ;
2011-01-13 14:12:48 +01:00
sal_Bool bVertical = IsVertical ( ) ;
2000-11-24 10:30:28 +00:00
aBulletFont . SetVertical ( bVertical ) ;
aBulletFont . SetOrientation ( bVertical ? 2700 : 0 ) ;
2000-11-20 11:17:53 +00:00
2002-08-05 13:52:26 +00:00
Color aColor ( COL_AUTO ) ;
2000-11-20 11:17:53 +00:00
if ( ! pEditEngine - > IsFlatMode ( ) & & ! ( pEditEngine - > GetControlWord ( ) & EE_CNTRL_NOCOLORS ) )
2002-02-25 15:10:51 +00:00
{
2000-11-20 11:17:53 +00:00
aColor = pFmt - > GetBulletColor ( ) ;
2002-02-25 15:10:51 +00:00
}
2002-08-05 13:52:26 +00:00
if ( ( aColor = = COL_AUTO ) | | ( IsForceAutoColor ( ) ) )
aColor = pEditEngine - > GetAutoColor ( ) ;
2000-11-20 11:17:53 +00:00
aBulletFont . SetColor ( aColor ) ;
2000-09-18 16:07:07 +00:00
return aBulletFont ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : PaintBullet ( sal_Int32 nPara , const Point & rStartPos ,
2000-09-18 16:07:07 +00:00
const Point & rOrigin , short nOrientation , OutputDevice * pOutDev )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2008-06-06 11:30:58 +00:00
bool bDrawBullet = false ;
if ( pEditEngine )
{
const SfxBoolItem & rBulletState = ( const SfxBoolItem & ) pEditEngine - > GetParaAttrib ( nPara , EE_PARA_BULLETSTATE ) ;
bDrawBullet = rBulletState . GetValue ( ) ? true : false ;
}
2013-05-29 08:10:49 +00:00
if ( ImplHasNumberFormat ( nPara ) & & bDrawBullet )
2000-09-18 16:07:07 +00:00
{
2011-01-13 14:12:48 +01:00
sal_Bool bVertical = IsVertical ( ) ;
2000-11-24 10:30:28 +00:00
2011-01-13 14:12:48 +01:00
sal_Bool bRightToLeftPara = pEditEngine - > IsRightToLeft ( nPara ) ;
2002-07-24 12:18:20 +00:00
2011-01-13 14:12:48 +01:00
Rectangle aBulletArea ( ImpCalcBulletArea ( nPara , sal_True , sal_False ) ) ;
2011-03-12 02:42:58 +01:00
sal_uInt16 nStretchX , nStretchY ;
2010-09-17 10:11:31 +02:00
GetGlobalCharStretching ( nStretchX , nStretchY ) ;
aBulletArea = Rectangle ( Point ( aBulletArea . Left ( ) * nStretchX / 100 ,
aBulletArea . Top ( ) ) ,
Size ( aBulletArea . GetWidth ( ) * nStretchX / 100 ,
aBulletArea . GetHeight ( ) ) ) ;
2000-09-18 16:07:07 +00:00
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2008-06-06 11:30:58 +00:00
const SvxNumberFormat * pFmt = GetNumberFormat ( nPara ) ;
2001-04-11 12:12:05 +00:00
if ( pFmt & & ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_NUMBER_NONE ) )
2000-09-18 16:07:07 +00:00
{
2001-02-23 11:29:54 +00:00
if ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_BITMAP )
2000-09-18 16:07:07 +00:00
{
Font aBulletFont ( ImpCalcBulletFont ( nPara ) ) ;
2011-02-16 16:34:02 -05:00
// Use baseline
2011-01-13 14:12:48 +01:00
sal_Bool bSymbol = pFmt - > GetNumberingType ( ) = = SVX_NUM_CHAR_SPECIAL ;
2003-03-27 14:06:05 +00:00
aBulletFont . SetAlign ( bSymbol ? ALIGN_BOTTOM : ALIGN_BASELINE ) ;
2000-09-18 16:07:07 +00:00
Font aOldFont = pOutDev - > GetFont ( ) ;
pOutDev - > SetFont ( aBulletFont ) ;
2003-03-27 14:06:05 +00:00
ParagraphInfos aParaInfos = pEditEngine - > GetParagraphInfos ( nPara ) ;
2000-11-24 10:30:28 +00:00
Point aTextPos ;
if ( ! bVertical )
2001-07-31 12:31:16 +00:00
{
2003-03-27 14:06:05 +00:00
// aTextPos.Y() = rStartPos.Y() + aBulletArea.Bottom();
aTextPos . Y ( ) = rStartPos . Y ( ) + ( bSymbol ? aBulletArea . Bottom ( ) : aParaInfos . nFirstLineMaxAscent ) ;
2002-07-24 12:18:20 +00:00
if ( ! bRightToLeftPara )
aTextPos . X ( ) = rStartPos . X ( ) + aBulletArea . Left ( ) ;
else
2013-02-23 17:58:11 +03:00
aTextPos . X ( ) = rStartPos . X ( ) + GetPaperSize ( ) . Width ( ) - aBulletArea . Right ( ) ;
2001-07-31 12:31:16 +00:00
}
2000-11-24 10:30:28 +00:00
else
{
2003-03-27 14:06:05 +00:00
// aTextPos.X() = rStartPos.X() - aBulletArea.Bottom();
aTextPos . X ( ) = rStartPos . X ( ) - ( bSymbol ? aBulletArea . Bottom ( ) : aParaInfos . nFirstLineMaxAscent ) ;
2001-07-31 12:31:16 +00:00
aTextPos . Y ( ) = rStartPos . Y ( ) + aBulletArea . Left ( ) ;
2000-11-24 10:30:28 +00:00
}
2000-09-18 16:07:07 +00:00
2008-08-19 22:02:20 +00:00
if ( nOrientation )
2000-09-18 16:07:07 +00:00
{
2011-02-16 16:34:02 -05:00
// Both TopLeft and bottom left is not quite correct,
// since in EditEngine baseline ...
2008-08-19 22:02:20 +00:00
double nRealOrientation = nOrientation * F_PI1800 ;
double nCos = cos ( nRealOrientation ) ;
double nSin = sin ( nRealOrientation ) ;
Point aRotatedPos ;
// Translation...
aTextPos - = rOrigin ;
// Rotation...
aRotatedPos . X ( ) = ( long ) ( nCos * aTextPos . X ( ) + nSin * aTextPos . Y ( ) ) ;
aRotatedPos . Y ( ) = ( long ) - ( nSin * aTextPos . X ( ) - nCos * aTextPos . Y ( ) ) ;
aTextPos = aRotatedPos ;
// Translation...
aTextPos + = rOrigin ;
Font aRotatedFont ( aBulletFont ) ;
aRotatedFont . SetOrientation ( nOrientation ) ;
pOutDev - > SetFont ( aRotatedFont ) ;
}
2000-09-18 16:07:07 +00:00
2011-02-16 16:34:02 -05:00
// VCL will take care of brackets and so on...
2011-01-13 14:12:48 +01:00
sal_uLong nLayoutMode = pOutDev - > GetLayoutMode ( ) ;
2008-08-19 22:02:20 +00:00
nLayoutMode & = ~ ( TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_COMPLEX_DISABLED | TEXT_LAYOUT_BIDI_STRONG ) ;
if ( bRightToLeftPara )
2013-03-11 09:06:45 +03:00
nLayoutMode | = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT | TEXT_LAYOUT_BIDI_STRONG ;
2008-08-19 22:02:20 +00:00
pOutDev - > SetLayoutMode ( nLayoutMode ) ;
2003-04-17 14:58:29 +00:00
2008-08-19 22:02:20 +00:00
if ( bStrippingPortions )
2000-09-18 16:07:07 +00:00
{
2008-08-19 22:02:20 +00:00
const Font aSvxFont ( pOutDev - > GetFont ( ) ) ;
2012-06-29 09:16:03 +01:00
sal_Int32 * pBuf = new sal_Int32 [ pPara - > GetText ( ) . getLength ( ) ] ;
2000-09-18 16:07:07 +00:00
pOutDev - > GetTextArray ( pPara - > GetText ( ) , pBuf ) ;
2002-08-01 13:48:55 +00:00
2008-08-19 22:02:20 +00:00
if ( bSymbol )
{
// aTextPos is Bottom, go to Baseline
FontMetric aMetric ( pOutDev - > GetFontMetric ( ) ) ;
aTextPos . Y ( ) - = aMetric . GetDescent ( ) ;
}
2012-06-29 09:16:03 +01:00
DrawingText ( aTextPos , pPara - > GetText ( ) , 0 , pPara - > GetText ( ) . getLength ( ) , pBuf ,
2013-02-23 17:58:11 +03:00
aSvxFont , nPara , 0xFFFF , bRightToLeftPara , 0 , 0 , false , false , true , 0 , Color ( ) , Color ( ) ) ;
2002-08-01 13:48:55 +00:00
2002-07-17 09:24:35 +00:00
delete [ ] pBuf ;
2000-09-18 16:07:07 +00:00
}
2008-08-19 22:02:20 +00:00
else
{
pOutDev - > DrawText ( aTextPos , pPara - > GetText ( ) ) ;
}
2000-09-18 16:07:07 +00:00
pOutDev - > SetFont ( aOldFont ) ;
}
else
{
2008-08-19 22:02:20 +00:00
if ( pFmt - > GetBrush ( ) - > GetGraphicObject ( ) )
2000-09-18 16:07:07 +00:00
{
2008-08-19 22:02:20 +00:00
Point aBulletPos ;
if ( ! bVertical )
2001-07-31 12:31:16 +00:00
{
2008-08-19 22:02:20 +00:00
aBulletPos . Y ( ) = rStartPos . Y ( ) + aBulletArea . Top ( ) ;
if ( ! bRightToLeftPara )
aBulletPos . X ( ) = rStartPos . X ( ) + aBulletArea . Left ( ) ;
2001-07-31 12:31:16 +00:00
else
2008-08-19 22:02:20 +00:00
aBulletPos . X ( ) = rStartPos . X ( ) + GetPaperSize ( ) . Width ( ) - aBulletArea . Right ( ) ;
}
else
{
aBulletPos . X ( ) = rStartPos . X ( ) - aBulletArea . Bottom ( ) ;
aBulletPos . Y ( ) = rStartPos . Y ( ) + aBulletArea . Left ( ) ;
}
if ( bStrippingPortions )
{
if ( aDrawBulletHdl . IsSet ( ) )
2001-07-31 12:52:07 +00:00
{
2008-08-19 22:02:20 +00:00
// call something analog to aDrawPortionHdl (if set) and feed it something
// analog to DrawPortionInfo...
// created aDrawBulletHdl, Set/GetDrawBulletHdl.
// created DrawBulletInfo and added handling to sdrtextdecomposition.cxx
DrawBulletInfo aDrawBulletInfo (
* pFmt - > GetBrush ( ) - > GetGraphicObject ( ) ,
aBulletPos ,
pPara - > aBulSize ) ;
aDrawBulletHdl . Call ( & aDrawBulletInfo ) ;
2001-07-31 12:52:07 +00:00
}
2008-08-19 22:02:20 +00:00
}
else
{
2011-02-16 16:34:02 -05:00
// Remove CAST when KA made the Draw-Method const
2001-07-31 12:31:16 +00:00
( ( GraphicObject * ) pFmt - > GetBrush ( ) - > GetGraphicObject ( ) ) - > Draw ( pOutDev , aBulletPos , pPara - > aBulSize ) ;
}
2000-09-18 16:07:07 +00:00
}
}
}
2011-02-16 16:34:02 -05:00
// In case of collapsed subparagraphs paint a line before the text.
2011-12-07 02:33:51 -08:00
if ( pParaList - > HasChildren ( pPara ) & & ! pParaList - > HasVisibleChildren ( pPara ) & &
2000-09-18 16:07:07 +00:00
! bStrippingPortions & & ! nOrientation )
{
2001-07-31 12:52:07 +00:00
long nWidth = pOutDev - > PixelToLogic ( Size ( 10 , 0 ) ) . Width ( ) ;
Point aStartPos , aEndPos ;
if ( ! bVertical )
{
aStartPos . Y ( ) = rStartPos . Y ( ) + aBulletArea . Bottom ( ) ;
2002-07-24 12:18:20 +00:00
if ( ! bRightToLeftPara )
aStartPos . X ( ) = rStartPos . X ( ) + aBulletArea . Right ( ) ;
else
aStartPos . X ( ) = rStartPos . X ( ) + GetPaperSize ( ) . Width ( ) - aBulletArea . Left ( ) ;
2001-07-31 12:52:07 +00:00
aEndPos = aStartPos ;
aEndPos . X ( ) + = nWidth ;
}
else
{
aStartPos . X ( ) = rStartPos . X ( ) - aBulletArea . Bottom ( ) ;
aStartPos . Y ( ) = rStartPos . Y ( ) + aBulletArea . Right ( ) ;
aEndPos = aStartPos ;
aEndPos . Y ( ) + = nWidth ;
}
2000-09-18 16:07:07 +00:00
const Color & rOldLineColor = pOutDev - > GetLineColor ( ) ;
pOutDev - > SetLineColor ( Color ( COL_BLACK ) ) ;
2001-07-31 12:52:07 +00:00
pOutDev - > DrawLine ( aStartPos , aEndPos ) ;
2000-09-18 16:07:07 +00:00
pOutDev - > SetLineColor ( rOldLineColor ) ;
}
}
}
2013-05-08 18:12:32 +02:00
void Outliner : : InvalidateBullet ( Paragraph * /*pPara*/ , sal_Int32 nPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2013-05-08 18:12:32 +02:00
long nLineHeight = ( long ) pEditEngine - > GetLineHeight ( nPara ) ;
2010-12-27 08:04:47 -08:00
for ( size_t i = 0 , n = aViewList . size ( ) ; i < n ; + + i )
2000-09-18 16:07:07 +00:00
{
2010-12-27 08:04:47 -08:00
OutlinerView * pView = aViewList [ i ] ;
2013-05-08 18:12:32 +02:00
Point aPos ( pView - > pEditView - > GetWindowPosTopLeft ( nPara ) ) ;
2000-09-18 16:07:07 +00:00
Rectangle aRect ( pView - > GetOutputArea ( ) ) ;
aRect . Right ( ) = aPos . X ( ) ;
aRect . Top ( ) = aPos . Y ( ) ;
aRect . Bottom ( ) = aPos . Y ( ) ;
aRect . Bottom ( ) + = nLineHeight ;
pView - > GetWindow ( ) - > Invalidate ( aRect ) ;
}
}
2011-01-13 14:12:48 +01:00
sal_uLong Outliner : : Read ( SvStream & rInput , const String & rBaseURL , sal_uInt16 eFormat , SvKeyValueIterator * pHTTPHeaderAttrs )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-01-13 14:12:48 +01:00
sal_Bool bOldUndo = pEditEngine - > IsUndoEnabled ( ) ;
EnableUndo ( sal_False ) ;
2000-09-18 16:07:07 +00:00
2011-01-13 14:12:48 +01:00
sal_Bool bUpdate = pEditEngine - > GetUpdateMode ( ) ;
pEditEngine - > SetUpdateMode ( sal_False ) ;
2000-09-18 16:07:07 +00:00
Clear ( ) ;
2011-01-13 14:12:48 +01:00
ImplBlockInsertionCallbacks ( sal_True ) ;
sal_uLong nRet = pEditEngine - > Read ( rInput , rBaseURL , ( EETextFormat ) eFormat , pHTTPHeaderAttrs ) ;
2000-09-18 16:07:07 +00:00
2011-01-13 14:12:48 +01:00
bFirstParaIsEmpty = sal_False ;
2000-09-18 16:07:07 +00:00
2013-05-08 18:12:32 +02:00
sal_Int32 nParas = pEditEngine - > GetParagraphCount ( ) ;
2011-01-13 14:12:48 +01:00
pParaList - > Clear ( sal_True ) ;
2013-05-08 18:12:32 +02:00
for ( sal_Int32 n = 0 ; n < nParas ; n + + )
2000-09-18 16:07:07 +00:00
{
Paragraph * pPara = new Paragraph ( 0 ) ;
2011-03-01 13:21:42 -04:30
pParaList - > Append ( pPara ) ;
2000-09-18 16:07:07 +00:00
if ( eFormat = = EE_FORMAT_BIN )
{
const SfxItemSet & rAttrs = pEditEngine - > GetParaAttribs ( n ) ;
2008-06-06 11:30:58 +00:00
const SfxInt16Item & rLevel = ( const SfxInt16Item & ) rAttrs . Get ( EE_PARA_OUTLLEVEL ) ;
sal_Int16 nDepth = rLevel . GetValue ( ) ;
2011-01-13 14:12:48 +01:00
ImplInitDepth ( n , nDepth , sal_False ) ;
2000-09-18 16:07:07 +00:00
}
}
if ( eFormat ! = EE_FORMAT_BIN )
{
ImpFilterIndents ( 0 , nParas - 1 ) ;
}
2011-01-13 14:12:48 +01:00
ImplBlockInsertionCallbacks ( sal_False ) ;
2000-09-18 16:07:07 +00:00
pEditEngine - > SetUpdateMode ( bUpdate ) ;
EnableUndo ( bOldUndo ) ;
return nRet ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : ImpFilterIndents ( sal_Int32 nFirstPara , sal_Int32 nLastPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-01-13 14:12:48 +01:00
sal_Bool bUpdate = pEditEngine - > GetUpdateMode ( ) ;
pEditEngine - > SetUpdateMode ( sal_False ) ;
2000-09-18 16:07:07 +00:00
Paragraph * pLastConverted = NULL ;
2013-05-08 18:12:32 +02:00
for ( sal_Int32 nPara = nFirstPara ; nPara < = nLastPara ; nPara + + )
2000-09-18 16:07:07 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2008-07-22 06:42:36 +00:00
if ( pPara )
{
if ( ImpConvertEdtToOut ( nPara ) )
{
pLastConverted = pPara ;
}
else if ( pLastConverted )
{
2011-02-16 16:34:02 -05:00
// Arrange normal paragraphs below the heading ...
2008-07-22 06:42:36 +00:00
pPara - > SetDepth ( pLastConverted - > GetDepth ( ) ) ;
}
2000-09-18 16:07:07 +00:00
2013-05-08 18:12:32 +02:00
ImplInitDepth ( nPara , pPara - > GetDepth ( ) , sal_False ) ;
2008-07-22 06:42:36 +00:00
}
2000-09-18 16:07:07 +00:00
}
pEditEngine - > SetUpdateMode ( bUpdate ) ;
}
2010-10-20 14:54:59 +02:00
: : svl : : IUndoManager & Outliner : : GetUndoManager ( )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
return pEditEngine - > GetUndoManager ( ) ;
}
2012-08-09 08:42:27 +00:00
: : svl : : IUndoManager * Outliner : : SetUndoManager ( : : svl : : IUndoManager * pNew )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
return pEditEngine - > SetUndoManager ( pNew ) ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : ImpTextPasted ( sal_Int32 nStartPara , sal_Int32 nCount )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-01-13 14:12:48 +01:00
sal_Bool bUpdate = pEditEngine - > GetUpdateMode ( ) ;
pEditEngine - > SetUpdateMode ( sal_False ) ;
2000-09-18 16:07:07 +00:00
2013-05-08 18:12:32 +02:00
const sal_Int32 nStart = nStartPara ;
2000-09-18 16:07:07 +00:00
Paragraph * pPara = pParaList - > GetParagraph ( nStartPara ) ;
2008-06-06 11:30:58 +00:00
2000-09-18 16:07:07 +00:00
while ( nCount & & pPara )
{
if ( ImplGetOutlinerMode ( ) ! = OUTLINERMODE_TEXTOBJECT )
{
2008-06-06 11:30:58 +00:00
nDepthChangedHdlPrevDepth = pPara - > GetDepth ( ) ;
mnDepthChangeHdlPrevFlags = pPara - > nFlags ;
2000-09-18 16:07:07 +00:00
2008-06-06 11:30:58 +00:00
ImpConvertEdtToOut ( nStartPara ) ;
pHdlParagraph = pPara ;
if ( nStartPara = = nStart )
2001-08-01 10:40:44 +00:00
{
2008-06-06 11:30:58 +00:00
// the existing paragraph has changed depth or flags
if ( ( pPara - > GetDepth ( ) ! = nDepthChangedHdlPrevDepth ) | | ( pPara - > nFlags ! = mnDepthChangeHdlPrevFlags ) )
DepthChangedHdl ( ) ;
2001-08-01 10:40:44 +00:00
}
2000-09-18 16:07:07 +00:00
}
2011-02-16 16:34:02 -05:00
else // EditEngine mode
2000-09-18 16:07:07 +00:00
{
2008-06-06 11:30:58 +00:00
sal_Int16 nDepth = - 1 ;
2013-05-08 18:12:32 +02:00
const SfxItemSet & rAttrs = pEditEngine - > GetParaAttribs ( nStartPara ) ;
2000-09-18 16:07:07 +00:00
if ( rAttrs . GetItemState ( EE_PARA_OUTLLEVEL ) = = SFX_ITEM_ON )
{
2008-06-06 11:30:58 +00:00
const SfxInt16Item & rLevel = ( const SfxInt16Item & ) rAttrs . Get ( EE_PARA_OUTLLEVEL ) ;
2000-09-18 16:07:07 +00:00
nDepth = rLevel . GetValue ( ) ;
}
2001-01-31 11:58:15 +00:00
if ( nDepth ! = GetDepth ( nStartPara ) )
2013-05-08 18:12:32 +02:00
ImplInitDepth ( nStartPara , nDepth , sal_False ) ;
2000-09-18 16:07:07 +00:00
}
nCount - - ;
nStartPara + + ;
pPara = pParaList - > GetParagraph ( nStartPara ) ;
}
pEditEngine - > SetUpdateMode ( bUpdate ) ;
DBG_ASSERT ( pParaList - > GetParagraphCount ( ) = = pEditEngine - > GetParagraphCount ( ) , " ImpTextPasted failed " ) ;
}
long Outliner : : IndentingPagesHdl ( OutlinerView * pView )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
if ( ! aIndentingPagesHdl . IsSet ( ) )
return 1 ;
return aIndentingPagesHdl . Call ( pView ) ;
}
2011-01-13 14:12:48 +01:00
sal_Bool Outliner : : ImpCanIndentSelectedPages ( OutlinerView * pCurView )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-02-16 16:34:02 -05:00
// The selected pages must already be set in advance through
// ImpCalcSelectedPages
2000-09-18 16:07:07 +00:00
2011-02-16 16:34:02 -05:00
// If the first paragraph is on level 0 it can not indented in any case,
// possible there might be indentations in the following on the 0 level.
2006-10-12 12:02:06 +00:00
if ( ( mnFirstSelPage = = 0 ) & & ( ImplGetOutlinerMode ( ) ! = OUTLINERMODE_TEXTOBJECT ) )
2000-09-18 16:07:07 +00:00
{
2011-02-16 16:34:02 -05:00
if ( nDepthChangedHdlPrevDepth = = 1 ) // is the only page
2011-01-13 14:12:48 +01:00
return sal_False ;
2000-09-18 16:07:07 +00:00
else
2011-03-12 02:42:58 +01:00
pCurView - > ImpCalcSelectedPages ( sal_False ) ; // without the first
2000-09-18 16:07:07 +00:00
}
2011-01-13 14:12:48 +01:00
return ( sal_Bool ) IndentingPagesHdl ( pCurView ) ;
2000-09-18 16:07:07 +00:00
}
2011-01-13 14:12:48 +01:00
sal_Bool Outliner : : ImpCanDeleteSelectedPages ( OutlinerView * pCurView )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-02-16 16:34:02 -05:00
// The selected pages must already be set in advance through
// ImpCalcSelectedPages
2011-01-13 14:12:48 +01:00
return ( sal_Bool ) RemovingPagesHdl ( pCurView ) ;
2000-09-18 16:07:07 +00:00
}
2011-01-13 14:12:48 +01:00
Outliner : : Outliner ( SfxItemPool * pPool , sal_uInt16 nMode )
2008-06-06 11:30:58 +00:00
: nMinDepth ( - 1 )
2000-09-18 16:07:07 +00:00
{
DBG_CTOR ( Outliner , 0 ) ;
2011-01-13 14:12:48 +01:00
bStrippingPortions = sal_False ;
bPasting = sal_False ;
2000-09-18 16:07:07 +00:00
nFirstPage = 1 ;
2011-01-13 14:12:48 +01:00
bBlockInsCallback = sal_False ;
2000-09-18 16:07:07 +00:00
nMaxDepth = 9 ;
pParaList = new ParagraphList ;
pParaList - > SetVisibleStateChangedHdl ( LINK ( this , Outliner , ParaVisibleStateChangedHdl ) ) ;
Paragraph * pPara = new Paragraph ( 0 ) ;
2011-03-01 13:21:42 -04:30
pParaList - > Append ( pPara ) ;
2011-01-13 14:12:48 +01:00
bFirstParaIsEmpty = sal_True ;
2000-09-18 16:07:07 +00:00
pEditEngine = new OutlinerEditEng ( this , pPool ) ;
2001-08-17 09:54:10 +00:00
pEditEngine - > SetBeginMovingParagraphsHdl ( LINK ( this , Outliner , BeginMovingParagraphsHdl ) ) ;
pEditEngine - > SetEndMovingParagraphsHdl ( LINK ( this , Outliner , EndMovingParagraphsHdl ) ) ;
2001-11-14 10:01:23 +00:00
pEditEngine - > SetBeginPasteOrDropHdl ( LINK ( this , Outliner , BeginPasteOrDropHdl ) ) ;
pEditEngine - > SetEndPasteOrDropHdl ( LINK ( this , Outliner , EndPasteOrDropHdl ) ) ;
2000-09-18 16:07:07 +00:00
Init ( nMode ) ;
}
Outliner : : ~ Outliner ( )
{
DBG_DTOR ( Outliner , 0 ) ;
2011-01-13 14:12:48 +01:00
pParaList - > Clear ( sal_True ) ;
2000-09-18 16:07:07 +00:00
delete pParaList ;
delete pEditEngine ;
}
2010-12-27 08:04:47 -08:00
size_t Outliner : : InsertView ( OutlinerView * pView , size_t nIndex )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2010-12-27 08:04:47 -08:00
size_t ActualIndex ;
2011-02-16 16:34:02 -05:00
2010-12-27 08:04:47 -08:00
if ( nIndex > = aViewList . size ( ) )
{
aViewList . push_back ( pView ) ;
ActualIndex = aViewList . size ( ) - 1 ;
}
else
{
ViewList : : iterator it = aViewList . begin ( ) ;
advance ( it , nIndex ) ;
ActualIndex = nIndex ;
}
2011-01-13 14:12:48 +01:00
pEditEngine - > InsertView ( pView - > pEditView , ( sal_uInt16 ) nIndex ) ;
2010-12-27 08:04:47 -08:00
return ActualIndex ;
2000-09-18 16:07:07 +00:00
}
OutlinerView * Outliner : : RemoveView ( OutlinerView * pView )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2012-05-02 21:57:04 +02:00
for ( ViewList : : iterator it = aViewList . begin ( ) ; it ! = aViewList . end ( ) ; + + it )
2000-09-18 16:07:07 +00:00
{
2010-12-27 08:04:47 -08:00
if ( * it = = pView )
{
2011-02-16 16:34:02 -05:00
pView - > pEditView - > HideCursor ( ) ; // HACK
2010-12-27 08:04:47 -08:00
pEditEngine - > RemoveView ( pView - > pEditView ) ;
aViewList . erase ( it ) ;
break ;
}
2000-09-18 16:07:07 +00:00
}
2011-02-16 16:34:02 -05:00
return NULL ; // return superfluous
2000-09-18 16:07:07 +00:00
}
2010-12-27 08:04:47 -08:00
OutlinerView * Outliner : : RemoveView ( size_t nIndex )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-01-13 14:12:48 +01:00
EditView * pEditView = pEditEngine - > GetView ( ( sal_uInt16 ) nIndex ) ;
2011-02-16 16:34:02 -05:00
pEditView - > HideCursor ( ) ; // HACK
2000-09-18 16:07:07 +00:00
2011-01-13 14:12:48 +01:00
pEditEngine - > RemoveView ( ( sal_uInt16 ) nIndex ) ;
2010-12-27 08:04:47 -08:00
{
ViewList : : iterator it = aViewList . begin ( ) ;
advance ( it , nIndex ) ;
aViewList . erase ( it ) ;
}
2011-02-16 16:34:02 -05:00
return NULL ; // return superfluous
2000-09-18 16:07:07 +00:00
}
2010-12-27 08:04:47 -08:00
OutlinerView * Outliner : : GetView ( size_t nIndex ) const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2010-12-27 08:04:47 -08:00
return ( nIndex > = aViewList . size ( ) ) ? NULL : aViewList [ nIndex ] ;
2000-09-18 16:07:07 +00:00
}
2010-12-27 08:04:47 -08:00
size_t Outliner : : GetViewCount ( ) const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2010-12-27 08:04:47 -08:00
return aViewList . size ( ) ;
2000-09-18 16:07:07 +00:00
}
void Outliner : : ParagraphInsertedHdl ( )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2006-01-10 13:48:19 +00:00
if ( ! IsInUndo ( ) )
aParaInsertedHdl . Call ( this ) ;
2000-09-18 16:07:07 +00:00
}
void Outliner : : ParagraphRemovingHdl ( )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2006-01-10 13:48:19 +00:00
if ( ! IsInUndo ( ) )
aParaRemovingHdl . Call ( this ) ;
2000-09-18 16:07:07 +00:00
}
void Outliner : : DepthChangedHdl ( )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2006-01-10 13:48:19 +00:00
if ( ! IsInUndo ( ) )
aDepthChangedHdl . Call ( this ) ;
2000-09-18 16:07:07 +00:00
}
2013-05-08 18:12:32 +02:00
sal_Int32 Outliner : : GetAbsPos ( Paragraph * pPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2008-11-10 15:06:12 +00:00
DBG_ASSERT ( pPara , " GetAbsPos:No Para " ) ;
2000-09-18 16:07:07 +00:00
return pParaList - > GetAbsPos ( pPara ) ;
}
2013-05-08 18:12:32 +02:00
sal_Int32 Outliner : : GetParagraphCount ( ) const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
return pParaList - > GetParagraphCount ( ) ;
}
2013-05-08 18:12:32 +02:00
Paragraph * Outliner : : GetParagraph ( sal_Int32 nAbsPos ) const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
return pParaList - > GetParagraph ( nAbsPos ) ;
}
2011-12-07 02:33:51 -08:00
sal_Bool Outliner : : HasChildren ( Paragraph * pParagraph ) const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-12-07 02:33:51 -08:00
return pParaList - > HasChildren ( pParagraph ) ;
2000-09-18 16:07:07 +00:00
}
2013-05-29 08:10:49 +00:00
bool Outliner : : ImplHasNumberFormat ( sal_Int32 nPara ) const
2000-09-18 16:07:07 +00:00
{
2008-06-06 11:30:58 +00:00
return GetNumberFormat ( nPara ) ! = 0 ;
2000-09-18 16:07:07 +00:00
}
2013-05-08 18:12:32 +02:00
const SvxNumberFormat * Outliner : : GetNumberFormat ( sal_Int32 nPara ) const
2001-08-01 09:34:48 +00:00
{
2001-08-23 13:39:24 +00:00
const SvxNumberFormat * pFmt = NULL ;
2008-06-06 11:30:58 +00:00
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2013-03-23 16:58:37 +01:00
if ( ! pPara )
2008-07-25 06:21:06 +00:00
return NULL ;
2013-03-23 16:58:37 +01:00
sal_Int16 nDepth = pPara - > GetDepth ( ) ;
2001-08-01 09:34:48 +00:00
2008-06-06 11:30:58 +00:00
if ( nDepth > = 0 )
2001-08-23 13:39:24 +00:00
{
const SvxNumBulletItem & rNumBullet = ( const SvxNumBulletItem & ) pEditEngine - > GetParaAttrib ( nPara , EE_PARA_NUMBULLET ) ;
if ( rNumBullet . GetNumRule ( ) - > GetLevelCount ( ) > nDepth )
pFmt = rNumBullet . GetNumRule ( ) - > Get ( nDepth ) ;
2001-08-01 09:34:48 +00:00
}
2001-08-23 13:39:24 +00:00
return pFmt ;
2001-08-01 09:34:48 +00:00
}
2013-05-08 18:12:32 +02:00
Size Outliner : : ImplGetBulletSize ( sal_Int32 nPara )
2000-09-18 16:07:07 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2008-07-22 06:42:36 +00:00
if ( ! pPara )
return Size ( ) ;
2000-09-18 16:07:07 +00:00
if ( pPara - > aBulSize . Width ( ) = = - 1 )
{
2008-06-06 11:30:58 +00:00
const SvxNumberFormat * pFmt = GetNumberFormat ( nPara ) ;
2000-09-18 16:07:07 +00:00
DBG_ASSERT ( pFmt , " ImplGetBulletSize - no Bullet! " ) ;
2001-04-11 12:12:05 +00:00
if ( pFmt - > GetNumberingType ( ) = = SVX_NUM_NUMBER_NONE )
{
pPara - > aBulSize = Size ( 0 , 0 ) ;
}
else if ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_BITMAP )
2000-09-18 16:07:07 +00:00
{
String aBulletText = ImplGetBulletText ( nPara ) ;
OutputDevice * pRefDev = pEditEngine - > GetRefDevice ( ) ;
Font aBulletFont ( ImpCalcBulletFont ( nPara ) ) ;
Font aRefFont ( pRefDev - > GetFont ( ) ) ;
pRefDev - > SetFont ( aBulletFont ) ;
pPara - > aBulSize . Width ( ) = pRefDev - > GetTextWidth ( aBulletText ) ;
pPara - > aBulSize . Height ( ) = pRefDev - > GetTextHeight ( ) ;
pRefDev - > SetFont ( aRefFont ) ;
}
else
{
pPara - > aBulSize = OutputDevice : : LogicToLogic ( pFmt - > GetGraphicSize ( ) , MAP_100TH_MM , pEditEngine - > GetRefDevice ( ) - > GetMapMode ( ) ) ;
}
}
return pPara - > aBulSize ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : ImplCheckParagraphs ( sal_Int32 nStart , sal_Int32 nEnd )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2013-05-08 18:12:32 +02:00
for ( sal_Int32 n = nStart ; n < nEnd ; n + + )
2000-09-18 16:07:07 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( n ) ;
2009-05-19 09:31:27 +00:00
if ( pPara )
{
pPara - > Invalidate ( ) ;
2011-01-13 14:12:48 +01:00
ImplCalcBulletText ( n , sal_False , sal_False ) ;
2009-05-19 09:31:27 +00:00
}
2000-09-18 16:07:07 +00:00
}
}
void Outliner : : SetRefDevice ( OutputDevice * pRefDev )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
pEditEngine - > SetRefDevice ( pRefDev ) ;
2013-05-08 18:12:32 +02:00
for ( sal_Int32 n = pParaList - > GetParagraphCount ( ) ; n ; )
2000-09-18 16:07:07 +00:00
{
Paragraph * pPara = pParaList - > GetParagraph ( - - n ) ;
pPara - > Invalidate ( ) ;
}
}
2013-05-08 18:12:32 +02:00
void Outliner : : ParaAttribsChanged ( sal_Int32 nPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-02-16 16:34:02 -05:00
// The Outliner does not have an undo of its own, when paragraphs are
// separated/merged. When ParagraphInserted the attribute EE_PARA_OUTLLEVEL
// may not be set, this is however needed when the depth of the paragraph
// is to be determined.
2000-09-18 16:07:07 +00:00
if ( pEditEngine - > IsInUndo ( ) )
{
if ( pParaList - > GetParagraphCount ( ) = = pEditEngine - > GetParagraphCount ( ) )
{
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2008-06-06 11:30:58 +00:00
const SfxInt16Item & rLevel = ( const SfxInt16Item & ) pEditEngine - > GetParaAttrib ( nPara , EE_PARA_OUTLLEVEL ) ;
2008-07-22 06:42:36 +00:00
if ( pPara & & pPara - > GetDepth ( ) ! = rLevel . GetValue ( ) )
2000-09-18 16:07:07 +00:00
{
pPara - > SetDepth ( rLevel . GetValue ( ) ) ;
2011-01-13 14:12:48 +01:00
ImplCalcBulletText ( nPara , sal_True , sal_True ) ;
2000-09-18 16:07:07 +00:00
}
}
}
}
void Outliner : : StyleSheetChanged ( SfxStyleSheet * pStyle )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-02-16 16:34:02 -05:00
// The EditEngine calls StyleSheetChanged also for derived styles.
// Here all the paragraphs, which had the said template, used to be
// hunted by a ImpRecalcParaAttribs, why?
// => only the Bullet-representation can really change...
2013-05-08 18:12:32 +02:00
sal_Int32 nParas = pParaList - > GetParagraphCount ( ) ;
for ( sal_Int32 nPara = 0 ; nPara < nParas ; nPara + + )
2000-09-18 16:07:07 +00:00
{
if ( pEditEngine - > GetStyleSheet ( nPara ) = = pStyle )
{
ImplCheckNumBulletItem ( nPara ) ;
2011-01-13 14:12:48 +01:00
ImplCalcBulletText ( nPara , sal_False , sal_False ) ;
2011-02-16 16:34:02 -05:00
// EditEngine formats changed paragraphs before calling this method,
2003-03-27 14:06:05 +00:00
// so they are not reformatted now and use wrong bullet indent
pEditEngine - > QuickMarkInvalid ( ESelection ( nPara , 0 , nPara , 0 ) ) ;
2000-09-18 16:07:07 +00:00
}
}
}
2013-05-08 18:12:32 +02:00
Rectangle Outliner : : ImpCalcBulletArea ( sal_Int32 nPara , sal_Bool bAdjust , sal_Bool bReturnPaperPos )
2000-09-18 16:07:07 +00:00
{
2011-02-16 16:34:02 -05:00
// Bullet area within the paragraph ...
2000-09-18 16:07:07 +00:00
Rectangle aBulletArea ;
2008-06-06 11:30:58 +00:00
const SvxNumberFormat * pFmt = GetNumberFormat ( nPara ) ;
2000-09-18 16:07:07 +00:00
if ( pFmt )
{
Point aTopLeft ;
Size aBulletSize ( ImplGetBulletSize ( nPara ) ) ;
2011-01-13 14:12:48 +01:00
sal_Bool bOutlineMode = ( pEditEngine - > GetControlWord ( ) & EE_CNTRL_OUTLINER ) ! = 0 ;
2001-08-21 10:04:46 +00:00
2008-06-06 11:30:58 +00:00
// the ODF attribut text:space-before which holds the spacing to add to the left of the label
const short nSpaceBefore = pFmt - > GetAbsLSpace ( ) + pFmt - > GetFirstLineOffset ( ) ;
2000-09-18 16:07:07 +00:00
2008-06-06 11:30:58 +00:00
const SvxLRSpaceItem & rLR = ( const SvxLRSpaceItem & ) pEditEngine - > GetParaAttrib ( nPara , bOutlineMode ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE ) ;
aTopLeft . X ( ) = rLR . GetTxtLeft ( ) + rLR . GetTxtFirstLineOfst ( ) + nSpaceBefore ;
2000-09-18 16:07:07 +00:00
2013-04-11 00:21:40 -03:00
long nBulletWidth = std : : max ( ( long ) - rLR . GetTxtFirstLineOfst ( ) , ( long ) ( ( - pFmt - > GetFirstLineOffset ( ) ) + pFmt - > GetCharTextDistance ( ) ) ) ;
2011-02-16 16:34:02 -05:00
if ( nBulletWidth < aBulletSize . Width ( ) ) // The Bullet creates its space
2000-09-18 16:07:07 +00:00
nBulletWidth = aBulletSize . Width ( ) ;
2001-08-21 10:04:46 +00:00
if ( bAdjust & & ! bOutlineMode )
2000-09-18 16:07:07 +00:00
{
2011-02-16 16:34:02 -05:00
// Adjust when centered or align right
2000-09-18 16:07:07 +00:00
const SvxAdjustItem & rItem = ( const SvxAdjustItem & ) pEditEngine - > GetParaAttrib ( nPara , EE_PARA_JUST ) ;
2003-06-12 07:24:00 +00:00
if ( ( ! pEditEngine - > IsRightToLeft ( nPara ) & & ( rItem . GetAdjust ( ) ! = SVX_ADJUST_LEFT ) ) | |
( pEditEngine - > IsRightToLeft ( nPara ) & & ( rItem . GetAdjust ( ) ! = SVX_ADJUST_RIGHT ) ) )
{
2000-09-18 16:07:07 +00:00
aTopLeft . X ( ) = pEditEngine - > GetFirstLineStartX ( nPara ) - nBulletWidth ;
2003-06-12 07:24:00 +00:00
}
2000-09-18 16:07:07 +00:00
}
2011-02-16 16:34:02 -05:00
// Vertical:
2000-09-18 16:07:07 +00:00
ParagraphInfos aInfos = pEditEngine - > GetParagraphInfos ( nPara ) ;
if ( aInfos . bValid )
{
2011-02-16 16:34:02 -05:00
aTopLeft . Y ( ) = /* aInfos.nFirstLineOffset + */ // nFirstLineOffset is already added to the StartPos (PaintBullet) from the EditEngine
2001-08-15 14:52:50 +00:00
aInfos . nFirstLineHeight - aInfos . nFirstLineTextHeight
2000-10-11 10:58:13 +00:00
+ aInfos . nFirstLineTextHeight / 2
- aBulletSize . Height ( ) / 2 ;
2011-02-16 16:34:02 -05:00
// may prefer to print out on the baseline ...
2001-04-11 12:12:05 +00:00
if ( ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_NUMBER_NONE ) & & ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_BITMAP ) & & ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_CHAR_SPECIAL ) )
2000-09-18 16:07:07 +00:00
{
Font aBulletFont ( ImpCalcBulletFont ( nPara ) ) ;
if ( aBulletFont . GetCharSet ( ) ! = RTL_TEXTENCODING_SYMBOL )
{
OutputDevice * pRefDev = pEditEngine - > GetRefDevice ( ) ;
Font aOldFont = pRefDev - > GetFont ( ) ;
pRefDev - > SetFont ( aBulletFont ) ;
FontMetric aMetric ( pRefDev - > GetFontMetric ( ) ) ;
2011-02-16 16:34:02 -05:00
// Leading on the first line ...
2001-08-15 14:52:50 +00:00
aTopLeft . Y ( ) = /* aInfos.nFirstLineOffset + */ aInfos . nFirstLineMaxAscent ;
2000-09-18 16:07:07 +00:00
aTopLeft . Y ( ) - = aMetric . GetAscent ( ) ;
pRefDev - > SetFont ( aOldFont ) ;
}
}
}
// Horizontal:
if ( pFmt - > GetNumAdjust ( ) = = SVX_ADJUST_RIGHT )
{
aTopLeft . X ( ) + = nBulletWidth - aBulletSize . Width ( ) ;
}
else if ( pFmt - > GetNumAdjust ( ) = = SVX_ADJUST_CENTER )
{
aTopLeft . X ( ) + = ( nBulletWidth - aBulletSize . Width ( ) ) / 2 ;
}
2011-02-16 16:34:02 -05:00
if ( aTopLeft . X ( ) < 0 ) // then push
2000-09-18 16:07:07 +00:00
aTopLeft . X ( ) = 0 ;
aBulletArea = Rectangle ( aTopLeft , aBulletSize ) ;
}
2002-07-24 12:18:20 +00:00
if ( bReturnPaperPos )
{
Size aBulletSize ( aBulletArea . GetSize ( ) ) ;
Point aBulletDocPos ( aBulletArea . TopLeft ( ) ) ;
aBulletDocPos . Y ( ) + = pEditEngine - > GetDocPosTopLeft ( nPara ) . Y ( ) ;
Point aBulletPos ( aBulletDocPos ) ;
if ( IsVertical ( ) )
{
aBulletPos . Y ( ) = aBulletDocPos . X ( ) ;
aBulletPos . X ( ) = GetPaperSize ( ) . Width ( ) - aBulletDocPos . Y ( ) ;
// Rotate:
aBulletPos . X ( ) - = aBulletSize . Height ( ) ;
Size aSz ( aBulletSize ) ;
aBulletSize . Width ( ) = aSz . Height ( ) ;
aBulletSize . Height ( ) = aSz . Width ( ) ;
}
else if ( pEditEngine - > IsRightToLeft ( nPara ) )
{
aBulletPos . X ( ) = GetPaperSize ( ) . Width ( ) - aBulletDocPos . X ( ) - aBulletSize . Width ( ) ;
}
aBulletArea = Rectangle ( aBulletPos , aBulletSize ) ;
}
2000-09-18 16:07:07 +00:00
return aBulletArea ;
}
void Outliner : : ExpandHdl ( )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
aExpandHdl . Call ( this ) ;
}
2013-05-08 18:12:32 +02:00
EBulletInfo Outliner : : GetBulletInfo ( sal_Int32 nPara )
2002-02-28 17:51:59 +00:00
{
EBulletInfo aInfo ;
aInfo . nParagraph = nPara ;
2013-05-29 08:10:49 +00:00
aInfo . bVisible = ImplHasNumberFormat ( nPara ) ;
2002-02-28 17:51:59 +00:00
2008-06-06 11:30:58 +00:00
const SvxNumberFormat * pFmt = GetNumberFormat ( nPara ) ;
2002-02-28 17:51:59 +00:00
aInfo . nType = pFmt ? pFmt - > GetNumberingType ( ) : 0 ;
2002-04-25 09:19:06 +00:00
if ( pFmt )
2002-02-28 17:51:59 +00:00
{
2002-04-25 09:19:06 +00:00
if ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_BITMAP )
{
aInfo . aText = ImplGetBulletText ( nPara ) ;
2002-04-26 09:31:41 +00:00
if ( pFmt - > GetBulletFont ( ) )
aInfo . aFont = * pFmt - > GetBulletFont ( ) ;
2002-04-25 09:19:06 +00:00
}
else if ( pFmt - > GetBrush ( ) - > GetGraphicObject ( ) )
{
aInfo . aGraphic = pFmt - > GetBrush ( ) - > GetGraphicObject ( ) - > GetGraphic ( ) ;
}
2002-02-28 17:51:59 +00:00
}
if ( aInfo . bVisible )
{
2011-01-13 14:12:48 +01:00
aInfo . aBounds = ImpCalcBulletArea ( nPara , sal_True , sal_True ) ;
2002-02-28 17:51:59 +00:00
}
return aInfo ;
}
2013-08-14 13:44:38 +01:00
OUString Outliner : : GetText ( Paragraph * pParagraph , sal_Int32 nCount ) const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2013-08-14 13:44:38 +01:00
OUString aText ;
2013-05-08 18:12:32 +02:00
sal_Int32 nStartPara = pParaList - > GetAbsPos ( pParagraph ) ;
for ( sal_Int32 n = 0 ; n < nCount ; n + + )
2000-09-18 16:07:07 +00:00
{
aText + = pEditEngine - > GetText ( nStartPara + n ) ;
2013-05-08 18:12:32 +02:00
if ( ( n + 1 ) < nCount )
2013-08-14 13:44:38 +01:00
aText + = " \n " ;
2000-09-18 16:07:07 +00:00
}
return aText ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : Remove ( Paragraph * pPara , sal_Int32 nParaCount )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2013-05-08 18:12:32 +02:00
sal_Int32 nPos = pParaList - > GetAbsPos ( pPara ) ;
2000-09-18 16:07:07 +00:00
if ( ! nPos & & ( nParaCount > = pParaList - > GetParagraphCount ( ) ) )
{
Clear ( ) ;
}
else
{
2013-05-08 18:12:32 +02:00
for ( sal_Int32 n = 0 ; n < nParaCount ; n + + )
pEditEngine - > RemoveParagraph ( nPos ) ;
2000-09-18 16:07:07 +00:00
}
}
void Outliner : : StripPortions ( )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-01-13 14:12:48 +01:00
bStrippingPortions = sal_True ;
2000-09-18 16:07:07 +00:00
pEditEngine - > StripPortions ( ) ;
2011-01-13 14:12:48 +01:00
bStrippingPortions = sal_False ;
2000-09-18 16:07:07 +00:00
}
2013-08-14 13:44:38 +01:00
void Outliner : : DrawingText ( const Point & rStartPos , const OUString & rText , sal_uInt16 nTextStart , sal_uInt16 nTextLen , const sal_Int32 * pDXArray , const SvxFont & rFont ,
2013-05-08 18:12:32 +02:00
sal_Int32 nPara , sal_uInt16 nIndex , sal_uInt8 nRightToLeft ,
2008-08-19 22:02:20 +00:00
const EEngineData : : WrongSpellVector * pWrongSpellVector ,
const SvxFieldData * pFieldData ,
bool bEndOfLine ,
bool bEndOfParagraph ,
bool bEndOfBullet ,
const : : com : : sun : : star : : lang : : Locale * pLocale ,
2009-01-05 17:49:45 +00:00
const Color & rOverlineColor ,
2008-08-19 22:02:20 +00:00
const Color & rTextLineColor )
2002-05-03 11:42:09 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2002-08-01 13:48:55 +00:00
2008-08-19 22:02:20 +00:00
if ( aDrawPortionHdl . IsSet ( ) )
{
DrawPortionInfo aInfo ( rStartPos , rText , nTextStart , nTextLen , rFont , nPara , nIndex , pDXArray , pWrongSpellVector ,
2010-09-14 15:28:33 +02:00
pFieldData , pLocale , rOverlineColor , rTextLineColor , nRightToLeft , false , 0 , bEndOfLine , bEndOfParagraph , bEndOfBullet ) ;
aDrawPortionHdl . Call ( & aInfo ) ;
}
}
void Outliner : : DrawingTab ( const Point & rStartPos , long nWidth , const String & rChar , const SvxFont & rFont ,
2013-05-08 18:12:32 +02:00
sal_Int32 nPara , xub_StrLen nIndex , sal_uInt8 nRightToLeft , bool bEndOfLine , bool bEndOfParagraph ,
2010-09-14 15:28:33 +02:00
const Color & rOverlineColor , const Color & rTextLineColor )
{
if ( aDrawPortionHdl . IsSet ( ) )
{
DrawPortionInfo aInfo ( rStartPos , rChar , 0 , rChar . Len ( ) , rFont , nPara , nIndex , NULL , NULL ,
NULL , NULL , rOverlineColor , rTextLineColor , nRightToLeft , true , nWidth , bEndOfLine , bEndOfParagraph , false ) ;
2002-08-01 13:48:55 +00:00
2008-08-19 22:02:20 +00:00
aDrawPortionHdl . Call ( & aInfo ) ;
}
2002-05-03 11:42:09 +00:00
}
2000-09-18 16:07:07 +00:00
long Outliner : : RemovingPagesHdl ( OutlinerView * pView )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2011-01-13 14:12:48 +01:00
return aRemovingPagesHdl . IsSet ( ) ? aRemovingPagesHdl . Call ( pView ) : sal_True ;
2000-09-18 16:07:07 +00:00
}
2013-05-08 18:12:32 +02:00
sal_Bool Outliner : : ImpCanDeleteSelectedPages ( OutlinerView * pCurView , sal_Int32 _nFirstPage , sal_Int32 nPages )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
nDepthChangedHdlPrevDepth = nPages ;
2006-10-12 12:02:06 +00:00
mnFirstSelPage = _nFirstPage ;
pHdlParagraph = 0 ;
2011-01-13 14:12:48 +01:00
return ( sal_Bool ) RemovingPagesHdl ( pCurView ) ;
2000-09-18 16:07:07 +00:00
}
2013-05-08 18:12:32 +02:00
SfxItemSet Outliner : : GetParaAttribs ( sal_Int32 nPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2008-06-06 11:30:58 +00:00
return pEditEngine - > GetParaAttribs ( nPara ) ;
2000-09-18 16:07:07 +00:00
}
IMPL_LINK ( Outliner , ParaVisibleStateChangedHdl , Paragraph * , pPara )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2013-05-08 18:12:32 +02:00
sal_Int32 nPara = pParaList - > GetAbsPos ( pPara ) ;
pEditEngine - > ShowParagraph ( nPara , pPara - > IsVisible ( ) ) ;
2000-09-18 16:07:07 +00:00
return 0 ;
}
2012-03-01 18:00:32 +01:00
IMPL_LINK_NOARG ( Outliner , BeginMovingParagraphsHdl )
2001-08-17 09:54:10 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
2006-01-10 13:48:19 +00:00
if ( ! IsInUndo ( ) )
GetBeginMovingHdl ( ) . Call ( this ) ;
2001-08-17 09:54:10 +00:00
return 0 ;
}
2001-11-14 10:01:23 +00:00
IMPL_LINK ( Outliner , BeginPasteOrDropHdl , PasteOrDropInfos * , pInfos )
{
2008-06-06 11:30:58 +00:00
UndoActionStart ( EDITUNDO_DRAGANDDROP ) ;
maBeginPasteOrDropHdl . Call ( pInfos ) ;
2001-11-14 10:01:23 +00:00
return 0 ;
}
IMPL_LINK ( Outliner , EndPasteOrDropHdl , PasteOrDropInfos * , pInfos )
{
2011-01-13 14:12:48 +01:00
bPasting = sal_False ;
2008-06-06 11:30:58 +00:00
ImpTextPasted ( pInfos - > nStartPara , pInfos - > nEndPara - pInfos - > nStartPara + 1 ) ;
maEndPasteOrDropHdl . Call ( pInfos ) ;
UndoActionEnd ( EDITUNDO_DRAGANDDROP ) ;
2001-11-14 10:01:23 +00:00
return 0 ;
}
2001-08-17 09:54:10 +00:00
IMPL_LINK ( Outliner , EndMovingParagraphsHdl , MoveParagraphsInfo * , pInfos )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
pParaList - > MoveParagraphs ( pInfos - > nStartPara , pInfos - > nDestPara , pInfos - > nEndPara - pInfos - > nStartPara + 1 ) ;
2013-05-08 18:12:32 +02:00
sal_Int32 nChangesStart = std : : min ( pInfos - > nStartPara , pInfos - > nDestPara ) ;
sal_Int32 nParas = pParaList - > GetParagraphCount ( ) ;
for ( sal_Int32 n = nChangesStart ; n < nParas ; n + + )
2011-01-13 14:12:48 +01:00
ImplCalcBulletText ( n , sal_False , sal_False ) ;
2001-08-17 09:54:10 +00:00
2006-01-10 13:48:19 +00:00
if ( ! IsInUndo ( ) )
aEndMovingHdl . Call ( this ) ;
2001-08-17 09:54:10 +00:00
return 0 ;
}
2009-10-14 15:14:05 +00:00
static bool isSameNumbering ( const SvxNumberFormat & rN1 , const SvxNumberFormat & rN2 )
{
if ( rN1 . GetNumberingType ( ) ! = rN2 . GetNumberingType ( ) )
return false ;
if ( rN1 . GetNumStr ( 1 ) ! = rN2 . GetNumStr ( 1 ) )
return false ;
if ( ( rN1 . GetPrefix ( ) ! = rN2 . GetPrefix ( ) ) | | ( rN1 . GetSuffix ( ) ! = rN2 . GetSuffix ( ) ) )
return false ;
return true ;
}
2013-05-08 18:12:32 +02:00
sal_uInt16 Outliner : : ImplGetNumbering ( sal_Int32 nPara , const SvxNumberFormat * pParaFmt )
2008-06-06 11:30:58 +00:00
{
sal_uInt16 nNumber = pParaFmt - > GetStart ( ) - 1 ;
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
const sal_Int16 nParaDepth = pPara - > GetDepth ( ) ;
do
{
pPara = pParaList - > GetParagraph ( nPara ) ;
const sal_Int16 nDepth = pPara - > GetDepth ( ) ;
2009-10-14 15:14:05 +00:00
// ignore paragraphs that are below our paragraph or have no numbering
if ( ( nDepth > nParaDepth ) | | ( nDepth = = - 1 ) )
2008-06-06 11:30:58 +00:00
continue ;
// stop on paragraphs that are above our paragraph
if ( nDepth < nParaDepth )
break ;
const SvxNumberFormat * pFmt = GetNumberFormat ( nPara ) ;
2009-10-14 15:14:05 +00:00
if ( pFmt = = 0 )
continue ; // ignore paragraphs without bullets
2012-09-19 07:09:20 +00:00
// check if numbering less than or equal to pParaFmt
if ( ! isSameNumbering ( * pFmt , * pParaFmt ) | | ( pFmt - > GetStart ( ) < pParaFmt - > GetStart ( ) ) )
2009-10-14 15:14:05 +00:00
break ;
2008-06-06 11:30:58 +00:00
2012-09-19 07:09:20 +00:00
if ( pFmt - > GetStart ( ) > pParaFmt - > GetStart ( ) )
{
nNumber + = pFmt - > GetStart ( ) - pParaFmt - > GetStart ( ) ;
pParaFmt = pFmt ;
}
2008-06-06 11:30:58 +00:00
const SfxBoolItem & rBulletState = ( const SfxBoolItem & ) pEditEngine - > GetParaAttrib ( nPara , EE_PARA_BULLETSTATE ) ;
if ( rBulletState . GetValue ( ) )
nNumber + = 1 ;
// same depth, same number format, check for restart
const sal_Int16 nNumberingStartValue = pPara - > GetNumberingStartValue ( ) ;
if ( ( nNumberingStartValue ! = - 1 ) | | pPara - > IsParaIsNumberingRestart ( ) )
{
if ( nNumberingStartValue ! = - 1 )
nNumber + = nNumberingStartValue - 1 ;
break ;
}
}
while ( nPara - - ) ;
return nNumber ;
}
2013-05-08 18:12:32 +02:00
void Outliner : : ImplCalcBulletText ( sal_Int32 nPara , sal_Bool bRecalcLevel , sal_Bool bRecalcChildren )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
while ( pPara )
{
2013-08-14 13:44:38 +01:00
OUString aBulletText ;
2008-06-06 11:30:58 +00:00
const SvxNumberFormat * pFmt = GetNumberFormat ( nPara ) ;
2001-02-23 11:29:54 +00:00
if ( pFmt & & ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_BITMAP ) )
2000-09-18 16:07:07 +00:00
{
aBulletText + = pFmt - > GetPrefix ( ) ;
2001-03-29 14:12:06 +00:00
if ( pFmt - > GetNumberingType ( ) = = SVX_NUM_CHAR_SPECIAL )
{
2013-08-14 13:44:38 +01:00
aBulletText + = OUString ( pFmt - > GetBulletChar ( ) ) ;
2001-03-29 14:12:06 +00:00
}
else if ( pFmt - > GetNumberingType ( ) ! = SVX_NUM_NUMBER_NONE )
2000-09-18 16:07:07 +00:00
{
2008-06-06 11:30:58 +00:00
aBulletText + = pFmt - > GetNumStr ( ImplGetNumbering ( nPara , pFmt ) ) ;
2000-09-18 16:07:07 +00:00
}
aBulletText + = pFmt - > GetSuffix ( ) ;
}
2012-06-29 09:16:03 +01:00
if ( ! pPara - > GetText ( ) . equals ( aBulletText ) )
2000-09-18 16:07:07 +00:00
pPara - > SetText ( aBulletText ) ;
pPara - > nFlags & = ( ~ PARAFLAG_SETBULLETTEXT ) ;
if ( bRecalcLevel )
{
2008-06-06 11:30:58 +00:00
sal_Int16 nDepth = pPara - > GetDepth ( ) ;
2000-09-18 16:07:07 +00:00
pPara = pParaList - > GetParagraph ( + + nPara ) ;
2011-12-07 02:33:51 -08:00
if ( ! bRecalcChildren )
2000-09-18 16:07:07 +00:00
{
while ( pPara & & ( pPara - > GetDepth ( ) > nDepth ) )
pPara = pParaList - > GetParagraph ( + + nPara ) ;
}
if ( pPara & & ( pPara - > GetDepth ( ) < nDepth ) )
pPara = NULL ;
}
else
{
pPara = NULL ;
}
}
}
void Outliner : : Clear ( )
{
DBG_CHKTHIS ( Outliner , 0 ) ;
if ( ! bFirstParaIsEmpty )
{
2011-01-13 14:12:48 +01:00
ImplBlockInsertionCallbacks ( sal_True ) ;
2000-09-18 16:07:07 +00:00
pEditEngine - > Clear ( ) ;
2011-01-13 14:12:48 +01:00
pParaList - > Clear ( sal_True ) ;
2011-03-01 13:21:42 -04:30
pParaList - > Append ( new Paragraph ( nMinDepth ) ) ;
2011-01-13 14:12:48 +01:00
bFirstParaIsEmpty = sal_True ;
ImplBlockInsertionCallbacks ( sal_False ) ;
2000-09-18 16:07:07 +00:00
}
else
{
2008-07-22 06:42:36 +00:00
Paragraph * pPara = pParaList - > GetParagraph ( 0 ) ;
if ( pPara )
pPara - > SetDepth ( nMinDepth ) ;
2000-09-18 16:07:07 +00:00
}
}
2011-01-13 14:12:48 +01:00
void Outliner : : SetFlatMode ( sal_Bool bFlat )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS ( Outliner , 0 ) ;
if ( bFlat ! = pEditEngine - > IsFlatMode ( ) )
{
2013-05-08 18:12:32 +02:00
for ( sal_Int32 nPara = pParaList - > GetParagraphCount ( ) ; nPara ; )
2000-09-18 16:07:07 +00:00
pParaList - > GetParagraph ( - - nPara ) - > aBulSize . Width ( ) = - 1 ;
pEditEngine - > SetFlatMode ( bFlat ) ;
}
}
2013-05-08 18:12:32 +02:00
String Outliner : : ImplGetBulletText ( sal_Int32 nPara )
2000-09-18 16:07:07 +00:00
{
2008-07-22 06:42:36 +00:00
String aRes ;
2000-09-18 16:07:07 +00:00
Paragraph * pPara = pParaList - > GetParagraph ( nPara ) ;
2008-07-22 06:42:36 +00:00
if ( pPara )
{
2011-02-16 16:34:02 -05:00
// Enable optimization again ...
2000-09-18 16:07:07 +00:00
// if( pPara->nFlags & PARAFLAG_SETBULLETTEXT )
2011-01-13 14:12:48 +01:00
ImplCalcBulletText ( nPara , sal_False , sal_False ) ;
2008-07-22 06:42:36 +00:00
aRes = pPara - > GetText ( ) ;
}
return aRes ;
2000-09-18 16:07:07 +00:00
}
2001-01-16 17:59:02 +00:00
// this is needed for StarOffice Api
2013-05-08 18:12:32 +02:00
void Outliner : : SetLevelDependendStyleSheet ( sal_Int32 nPara )
2001-01-16 17:59:02 +00:00
{
2001-09-25 09:11:38 +00:00
SfxItemSet aOldAttrs ( pEditEngine - > GetParaAttribs ( nPara ) ) ;
2001-01-16 17:59:02 +00:00
ImplSetLevelDependendStyleSheet ( nPara ) ;
2001-09-25 09:11:38 +00:00
pEditEngine - > SetParaAttribs ( nPara , aOldAttrs ) ;
2001-02-23 11:29:54 +00:00
}
2002-05-27 13:37:37 +00:00
2011-01-13 14:12:48 +01:00
void Outliner : : ImplBlockInsertionCallbacks ( sal_Bool b )
2002-05-27 13:37:37 +00:00
{
2002-07-09 09:17:20 +00:00
if ( b )
2002-05-27 13:37:37 +00:00
{
2002-07-09 09:17:20 +00:00
bBlockInsCallback + + ;
}
else
{
DBG_ASSERT ( bBlockInsCallback , " ImplBlockInsertionCallbacks ?! " ) ;
bBlockInsCallback - - ;
2002-05-27 13:37:37 +00:00
if ( ! bBlockInsCallback )
{
// Call blocked notify events...
2012-01-14 15:11:10 -05:00
while ( ! pEditEngine - > aNotifyCache . empty ( ) )
2002-05-27 13:37:37 +00:00
{
2012-01-14 15:11:10 -05:00
EENotify aNotify ( pEditEngine - > aNotifyCache . front ( ) ) ;
2002-06-10 15:47:28 +00:00
// Remove from list before calling, maybe we enter LeaveBlockNotifications while calling the handler...
2012-01-14 15:11:10 -05:00
pEditEngine - > aNotifyCache . erase ( pEditEngine - > aNotifyCache . begin ( ) ) ;
pEditEngine - > aOutlinerNotifyHdl . Call ( & aNotify ) ;
2002-05-27 13:37:37 +00:00
}
}
}
}
IMPL_LINK ( Outliner , EditEngineNotifyHdl , EENotify * , pNotify )
{
if ( ! bBlockInsCallback )
pEditEngine - > aOutlinerNotifyHdl . Call ( pNotify ) ;
else
2012-01-14 15:11:10 -05:00
pEditEngine - > aNotifyCache . push_back ( * pNotify ) ;
2002-05-27 13:37:37 +00:00
return 0 ;
}
2006-02-01 11:58:29 +00:00
/** sets a link that is called at the beginning of a drag operation at an edit view */
void Outliner : : SetBeginDropHdl ( const Link & rLink )
{
pEditEngine - > SetBeginDropHdl ( rLink ) ;
}
/** sets a link that is called at the end of a drag operation at an edit view */
void Outliner : : SetEndDropHdl ( const Link & rLink )
{
pEditEngine - > SetEndDropHdl ( rLink ) ;
}
2008-06-06 11:30:58 +00:00
/** sets a link that is called before a drop or paste operation. */
void Outliner : : SetBeginPasteOrDropHdl ( const Link & rLink )
{
maBeginPasteOrDropHdl = rLink ;
}
/** sets a link that is called after a drop or paste operation. */
void Outliner : : SetEndPasteOrDropHdl ( const Link & rLink )
{
maEndPasteOrDropHdl = rLink ;
}
2008-07-30 13:17:16 +00:00
void Outliner : : SetParaFlag ( Paragraph * pPara , sal_uInt16 nFlag )
{
if ( pPara & & ! pPara - > HasFlag ( nFlag ) )
{
if ( IsUndoEnabled ( ) & & ! IsInUndo ( ) )
2013-05-08 18:12:32 +02:00
InsertUndo ( new OutlinerUndoChangeParaFlags ( this , GetAbsPos ( pPara ) , pPara - > nFlags , pPara - > nFlags | nFlag ) ) ;
2008-07-30 13:17:16 +00:00
pPara - > SetFlag ( nFlag ) ;
}
}
bool Outliner : : HasParaFlag ( const Paragraph * pPara , sal_uInt16 nFlag ) const
{
return pPara & & pPara - > HasFlag ( nFlag ) ;
}
2010-10-12 15:53:47 +02:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */