2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
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
|
|
|
|
2014-03-03 18:27:00 +01:00
|
|
|
#include <sal/config.h>
|
|
|
|
|
|
|
|
#include <cstdlib>
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <tools/debug.hxx>
|
|
|
|
|
2007-06-27 19:34:24 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
|
|
|
#include <vcl/menu.hxx>
|
|
|
|
#include <vcl/event.hxx>
|
|
|
|
#include <vcl/syswin.hxx>
|
|
|
|
#include <vcl/taskpanelist.hxx>
|
|
|
|
#include <vcl/unowrap.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-06-22 00:49:30 +01:00
|
|
|
#include <rtl/strbuf.hxx>
|
|
|
|
|
2011-01-24 16:34:14 +01:00
|
|
|
#include <salframe.hxx>
|
|
|
|
#include <svdata.hxx>
|
|
|
|
#include <brdwin.hxx>
|
|
|
|
#include <window.h>
|
2001-02-05 08:45:05 +00:00
|
|
|
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::lang;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-25 22:51:59 +01:00
|
|
|
|
2004-09-09 15:22:26 +00:00
|
|
|
class SystemWindow::ImplData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ImplData();
|
|
|
|
~ImplData();
|
|
|
|
|
|
|
|
TaskPaneList* mpTaskPaneList;
|
|
|
|
Size maMaxOutSize;
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString maRepresentedURL;
|
2012-06-05 00:22:16 -04:00
|
|
|
Link maCloseHdl;
|
2004-09-09 15:22:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
SystemWindow::ImplData::ImplData()
|
|
|
|
{
|
|
|
|
mpTaskPaneList = NULL;
|
|
|
|
maMaxOutSize = Size( SHRT_MAX, SHRT_MAX );
|
|
|
|
}
|
|
|
|
|
|
|
|
SystemWindow::ImplData::~ImplData()
|
|
|
|
{
|
|
|
|
if( mpTaskPaneList )
|
|
|
|
delete mpTaskPaneList;
|
|
|
|
}
|
|
|
|
|
2014-02-25 22:51:59 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
SystemWindow::SystemWindow( WindowType nType ) :
|
|
|
|
Window( nType )
|
|
|
|
{
|
2004-09-09 15:22:26 +00:00
|
|
|
mpImplData = new ImplData;
|
2014-01-28 19:59:13 +01:00
|
|
|
mpWindowImpl->mbSysWin = true;
|
2005-01-13 17:05:34 +00:00
|
|
|
mpWindowImpl->mnActivateMode = ACTIVATE_MODE_GRABFOCUS;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
mpMenuBar = NULL;
|
2014-03-12 16:34:21 +02:00
|
|
|
mbPinned = false;
|
2014-02-21 12:53:51 +01:00
|
|
|
mbRollUp = false;
|
|
|
|
mbRollFunc = false;
|
|
|
|
mbDockBtn = false;
|
|
|
|
mbHideBtn = false;
|
|
|
|
mbSysChild = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
mnMenuBarMode = MENUBAR_MODE_NORMAL;
|
2001-08-23 12:40:56 +00:00
|
|
|
mnIcon = 0;
|
2004-09-09 15:22:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SystemWindow::~SystemWindow()
|
|
|
|
{
|
|
|
|
delete mpImplData;
|
2005-03-18 16:52:30 +00:00
|
|
|
mpImplData = NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-01-17 16:40:50 +01:00
|
|
|
bool SystemWindow::Notify( NotifyEvent& rNEvt )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2002-02-28 17:31:33 +00:00
|
|
|
// capture KeyEvents for menu handling
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( rNEvt.GetType() == EVENT_KEYINPUT )
|
|
|
|
{
|
|
|
|
MenuBar* pMBar = mpMenuBar;
|
|
|
|
if ( !pMBar && ( GetType() == WINDOW_FLOATINGWINDOW ) )
|
|
|
|
{
|
2002-03-21 17:35:44 +00:00
|
|
|
Window* pWin = ImplGetFrameWindow()->ImplGetWindow();
|
|
|
|
if( pWin && pWin->IsSystemWindow() )
|
|
|
|
pMBar = ((SystemWindow*)pWin)->GetMenuBar();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2014-02-21 12:53:51 +01:00
|
|
|
if ( pMBar && pMBar->ImplHandleKeyEvent( *rNEvt.GetKeyEvent(), false ) )
|
2014-01-17 16:40:50 +01:00
|
|
|
return true;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return Window::Notify( rNEvt );
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-01-18 00:18:52 +01:00
|
|
|
bool SystemWindow::PreNotify( NotifyEvent& rNEvt )
|
2002-02-15 07:38:55 +00:00
|
|
|
{
|
2002-02-28 17:31:33 +00:00
|
|
|
// capture KeyEvents for taskpane cycling
|
2002-02-22 08:09:23 +00:00
|
|
|
if ( rNEvt.GetType() == EVENT_KEYINPUT )
|
|
|
|
{
|
2002-03-14 07:51:18 +00:00
|
|
|
if( rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_F6 &&
|
2002-05-23 08:43:15 +00:00
|
|
|
rNEvt.GetKeyEvent()->GetKeyCode().IsMod1() &&
|
|
|
|
!rNEvt.GetKeyEvent()->GetKeyCode().IsShift() )
|
2002-02-28 17:31:33 +00:00
|
|
|
{
|
2002-03-14 07:51:18 +00:00
|
|
|
// Ctrl-F6 goes directly to the document
|
2002-05-06 12:15:07 +00:00
|
|
|
GrabFocusToDocument();
|
2014-01-18 00:18:52 +01:00
|
|
|
return true;
|
2002-03-14 07:51:18 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-09-09 15:22:26 +00:00
|
|
|
TaskPaneList *pTList = mpImplData->mpTaskPaneList;
|
2002-03-14 07:51:18 +00:00
|
|
|
if( !pTList && ( GetType() == WINDOW_FLOATINGWINDOW ) )
|
|
|
|
{
|
2002-03-21 17:35:44 +00:00
|
|
|
Window* pWin = ImplGetFrameWindow()->ImplGetWindow();
|
|
|
|
if( pWin && pWin->IsSystemWindow() )
|
2004-09-09 15:22:26 +00:00
|
|
|
pTList = ((SystemWindow*)pWin)->mpImplData->mpTaskPaneList;
|
2002-03-14 07:51:18 +00:00
|
|
|
}
|
2002-03-15 12:53:18 +00:00
|
|
|
if( !pTList )
|
|
|
|
{
|
|
|
|
// search topmost system window which is the one to handle dialog/toolbar cycling
|
|
|
|
SystemWindow *pSysWin = this;
|
|
|
|
Window *pWin = this;
|
|
|
|
while( pWin )
|
|
|
|
{
|
|
|
|
pWin = pWin->GetParent();
|
|
|
|
if( pWin && pWin->IsSystemWindow() )
|
|
|
|
pSysWin = (SystemWindow*) pWin;
|
|
|
|
}
|
2004-09-09 15:22:26 +00:00
|
|
|
pTList = pSysWin->mpImplData->mpTaskPaneList;
|
2002-03-15 12:53:18 +00:00
|
|
|
}
|
2002-03-14 07:51:18 +00:00
|
|
|
if( pTList && pTList->HandleKeyEvent( *rNEvt.GetKeyEvent() ) )
|
2014-01-18 00:18:52 +01:00
|
|
|
return true;
|
2002-02-28 17:31:33 +00:00
|
|
|
}
|
2002-02-22 08:09:23 +00:00
|
|
|
}
|
2002-02-15 07:38:55 +00:00
|
|
|
return Window::PreNotify( rNEvt );
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2002-02-15 07:38:55 +00:00
|
|
|
|
2002-02-22 08:09:23 +00:00
|
|
|
TaskPaneList* SystemWindow::GetTaskPaneList()
|
|
|
|
{
|
2004-09-09 15:22:26 +00:00
|
|
|
if( mpImplData->mpTaskPaneList )
|
|
|
|
return mpImplData->mpTaskPaneList ;
|
2002-02-22 08:09:23 +00:00
|
|
|
else
|
|
|
|
{
|
2004-09-09 15:22:26 +00:00
|
|
|
mpImplData->mpTaskPaneList = new TaskPaneList();
|
2002-02-22 08:09:23 +00:00
|
|
|
MenuBar* pMBar = mpMenuBar;
|
|
|
|
if ( !pMBar && ( GetType() == WINDOW_FLOATINGWINDOW ) )
|
|
|
|
{
|
2002-03-21 17:35:44 +00:00
|
|
|
Window* pWin = ImplGetFrameWindow()->ImplGetWindow();
|
|
|
|
if ( pWin && pWin->IsSystemWindow() )
|
|
|
|
pMBar = ((SystemWindow*)pWin)->GetMenuBar();
|
2002-02-22 08:09:23 +00:00
|
|
|
}
|
|
|
|
if( pMBar )
|
2004-09-09 15:22:26 +00:00
|
|
|
mpImplData->mpTaskPaneList->AddWindow( pMBar->ImplGetWindow() );
|
|
|
|
return mpImplData->mpTaskPaneList;
|
2002-02-22 08:09:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2002-02-22 08:09:23 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SystemWindow::Close()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2001-11-27 08:52:58 +00:00
|
|
|
ImplDelData aDelData;
|
|
|
|
ImplAddDel( &aDelData );
|
|
|
|
ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE );
|
2012-07-16 12:18:02 +03:00
|
|
|
if ( aDelData.IsDead() )
|
2014-02-21 12:53:51 +01:00
|
|
|
return false;
|
2001-11-27 08:52:58 +00:00
|
|
|
ImplRemoveDel( &aDelData );
|
|
|
|
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() )
|
2014-02-21 12:53:51 +01:00
|
|
|
return false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-08-07 10:55:59 +00:00
|
|
|
// Is Window not closeable, ignore close
|
|
|
|
Window* pBorderWin = ImplGetBorderWindow();
|
|
|
|
WinBits nStyle;
|
|
|
|
if ( pBorderWin )
|
|
|
|
nStyle = pBorderWin->GetStyle();
|
|
|
|
else
|
|
|
|
nStyle = GetStyle();
|
|
|
|
if ( !(nStyle & WB_CLOSEABLE) )
|
2014-02-21 12:53:51 +01:00
|
|
|
return false;
|
2001-08-07 10:55:59 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
Hide();
|
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
return true;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void SystemWindow::TitleButtonClick( sal_uInt16 )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
void SystemWindow::Pin()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
void SystemWindow::Roll()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
void SystemWindow::Resizing( Size& )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
void SystemWindow::SetRepresentedURL( const OUString& i_rURL )
|
2009-11-09 18:22:51 +01:00
|
|
|
{
|
|
|
|
bool bChanged = (i_rURL != mpImplData->maRepresentedURL);
|
|
|
|
mpImplData->maRepresentedURL = i_rURL;
|
|
|
|
if ( !mbSysChild && bChanged )
|
|
|
|
{
|
|
|
|
const Window* pWindow = this;
|
|
|
|
while ( pWindow->mpWindowImpl->mpBorderWindow )
|
|
|
|
pWindow = pWindow->mpWindowImpl->mpBorderWindow;
|
|
|
|
|
|
|
|
if ( pWindow->mpWindowImpl->mbFrame )
|
|
|
|
pWindow->mpWindowImpl->mpFrame->SetRepresentedURL( i_rURL );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2009-11-09 18:22:51 +01:00
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void SystemWindow::SetIcon( sal_uInt16 nIcon )
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
|
|
|
if ( mnIcon == nIcon )
|
|
|
|
return;
|
|
|
|
|
|
|
|
mnIcon = nIcon;
|
|
|
|
|
|
|
|
if ( !mbSysChild )
|
|
|
|
{
|
|
|
|
const Window* pWindow = this;
|
2005-01-13 17:05:34 +00:00
|
|
|
while ( pWindow->mpWindowImpl->mpBorderWindow )
|
|
|
|
pWindow = pWindow->mpWindowImpl->mpBorderWindow;
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( pWindow->mpWindowImpl->mbFrame )
|
|
|
|
pWindow->mpWindowImpl->mpFrame->SetIcon( nIcon );
|
2001-08-23 12:40:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
void SystemWindow::EnableSaveBackground( bool bSave )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2008-05-30 07:07:30 +00:00
|
|
|
if( ImplGetSVData()->maWinData.mbNoSaveBackground )
|
|
|
|
bSave = false;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
Window* pWindow = this;
|
2005-01-13 17:05:34 +00:00
|
|
|
while ( pWindow->mpWindowImpl->mpBorderWindow )
|
|
|
|
pWindow = pWindow->mpWindowImpl->mpBorderWindow;
|
|
|
|
if ( pWindow->mpWindowImpl->mbOverlapWin && !pWindow->mpWindowImpl->mbFrame )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:05:34 +00:00
|
|
|
pWindow->mpWindowImpl->mpOverlapData->mbSaveBack = bSave;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !bSave )
|
|
|
|
pWindow->ImplDeleteOverlapBackground();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SystemWindow::IsSaveBackgroundEnabled() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
const Window* pWindow = this;
|
2005-01-13 17:05:34 +00:00
|
|
|
while ( pWindow->mpWindowImpl->mpBorderWindow )
|
|
|
|
pWindow = pWindow->mpWindowImpl->mpBorderWindow;
|
|
|
|
if ( pWindow->mpWindowImpl->mpOverlapData )
|
|
|
|
return pWindow->mpWindowImpl->mpOverlapData->mbSaveBack;
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2014-02-21 12:53:51 +01:00
|
|
|
return false;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
void SystemWindow::ShowTitleButton( sal_uInt16 nButton, bool bVisible )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( nButton == TITLE_BUTTON_DOCKING )
|
|
|
|
{
|
|
|
|
if ( mbDockBtn != bVisible )
|
|
|
|
{
|
|
|
|
mbDockBtn = bVisible;
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpBorderWindow )
|
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetDockButton( bVisible );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2004-09-09 15:22:26 +00:00
|
|
|
else if ( nButton == TITLE_BUTTON_HIDE )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( mbHideBtn != bVisible )
|
|
|
|
{
|
|
|
|
mbHideBtn = bVisible;
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpBorderWindow )
|
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetHideButton( bVisible );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2004-09-09 15:22:26 +00:00
|
|
|
else if ( nButton == TITLE_BUTTON_MENU )
|
|
|
|
{
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpBorderWindow )
|
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuButton( bVisible );
|
2004-09-09 15:22:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
return;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SystemWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( nButton == TITLE_BUTTON_DOCKING )
|
|
|
|
return mbDockBtn;
|
|
|
|
else /* if ( nButton == TITLE_BUTTON_HIDE ) */
|
|
|
|
return mbHideBtn;
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
void SystemWindow::SetPin( bool bPin )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-03-12 16:34:21 +02:00
|
|
|
if ( bPin != mbPinned )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-03-12 16:34:21 +02:00
|
|
|
mbPinned = bPin;
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpBorderWindow )
|
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetPin( bPin );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
void SystemWindow::RollUp()
|
|
|
|
{
|
|
|
|
if ( !mbRollUp )
|
|
|
|
{
|
|
|
|
maOrgSize = GetOutputSizePixel();
|
2014-02-21 12:53:51 +01:00
|
|
|
mbRollFunc = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
Size aSize = maRollUpOutSize;
|
|
|
|
if ( !aSize.Width() )
|
|
|
|
aSize.Width() = GetOutputSizePixel().Width();
|
2014-02-21 12:53:51 +01:00
|
|
|
mbRollUp = true;
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpBorderWindow )
|
2014-02-21 12:53:51 +01:00
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( true, aSize );
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
SetOutputSizePixel( aSize );
|
2014-02-21 12:53:51 +01:00
|
|
|
mbRollFunc = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
void SystemWindow::RollDown()
|
|
|
|
{
|
|
|
|
if ( mbRollUp )
|
|
|
|
{
|
2014-02-21 12:53:51 +01:00
|
|
|
mbRollUp = false;
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpBorderWindow )
|
2014-02-21 12:53:51 +01:00
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( false, maOrgSize );
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
SetOutputSizePixel( maOrgSize );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
void SystemWindow::SetMinOutputSizePixel( const Size& rSize )
|
|
|
|
{
|
|
|
|
maMinOutSize = rSize;
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpBorderWindow )
|
2000-11-24 17:50:30 +00:00
|
|
|
{
|
2005-01-13 17:05:34 +00:00
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMinOutputSize( rSize.Width(), rSize.Height() );
|
|
|
|
if ( mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame )
|
|
|
|
mpWindowImpl->mpBorderWindow->mpWindowImpl->mpFrame->SetMinClientSize( rSize.Width(), rSize.Height() );
|
2000-11-24 17:50:30 +00:00
|
|
|
}
|
2005-01-13 17:05:34 +00:00
|
|
|
else if ( mpWindowImpl->mbFrame )
|
|
|
|
mpWindowImpl->mpFrame->SetMinClientSize( rSize.Width(), rSize.Height() );
|
2000-11-24 17:50:30 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-11-24 17:50:30 +00:00
|
|
|
|
2004-09-09 15:22:26 +00:00
|
|
|
void SystemWindow::SetMaxOutputSizePixel( const Size& rSize )
|
|
|
|
{
|
|
|
|
Size aSize( rSize );
|
|
|
|
if( aSize.Width() > SHRT_MAX || aSize.Width() <= 0 )
|
|
|
|
aSize.Width() = SHRT_MAX;
|
|
|
|
if( aSize.Height() > SHRT_MAX || aSize.Height() <= 0 )
|
|
|
|
aSize.Height() = SHRT_MAX;
|
|
|
|
|
|
|
|
mpImplData->maMaxOutSize = aSize;
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpBorderWindow )
|
2004-09-09 15:22:26 +00:00
|
|
|
{
|
2005-01-13 17:05:34 +00:00
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMaxOutputSize( aSize.Width(), aSize.Height() );
|
|
|
|
if ( mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame )
|
|
|
|
mpWindowImpl->mpBorderWindow->mpWindowImpl->mpFrame->SetMaxClientSize( aSize.Width(), aSize.Height() );
|
2004-09-09 15:22:26 +00:00
|
|
|
}
|
2005-01-13 17:05:34 +00:00
|
|
|
else if ( mpWindowImpl->mbFrame )
|
|
|
|
mpWindowImpl->mpFrame->SetMaxClientSize( aSize.Width(), aSize.Height() );
|
2004-09-09 15:22:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const Size& SystemWindow::GetMaxOutputSizePixel() const
|
|
|
|
{
|
|
|
|
return mpImplData->maMaxOutSize;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2004-09-09 15:22:26 +00:00
|
|
|
|
2000-11-24 17:50:30 +00:00
|
|
|
Size SystemWindow::GetResizeOutputSizePixel() const
|
|
|
|
{
|
|
|
|
Size aSize = GetOutputSizePixel();
|
|
|
|
if ( aSize.Width() < maMinOutSize.Width() )
|
|
|
|
aSize.Width() = maMinOutSize.Width();
|
|
|
|
if ( aSize.Height() < maMinOutSize.Height() )
|
|
|
|
aSize.Height() = maMinOutSize.Height();
|
|
|
|
return aSize;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-06-22 00:49:30 +01:00
|
|
|
static void ImplWindowStateFromStr(WindowStateData& rData,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OString& rStr)
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nValidMask = 0;
|
2011-06-22 00:49:30 +01:00
|
|
|
sal_Int32 nIndex = 0;
|
2013-04-07 12:06:47 +02:00
|
|
|
OString aTokenStr;
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2011-06-22 00:49:30 +01:00
|
|
|
aTokenStr = rStr.getToken(0, ',', nIndex);
|
|
|
|
if (!aTokenStr.isEmpty())
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
2011-06-22 00:49:30 +01:00
|
|
|
rData.SetX(aTokenStr.toInt32());
|
2007-12-12 12:20:13 +00:00
|
|
|
if( rData.GetX() > -16384 && rData.GetX() < 16384 )
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_X;
|
|
|
|
else
|
|
|
|
rData.SetX( 0 );
|
2001-08-23 12:40:56 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
rData.SetX( 0 );
|
2011-06-22 00:49:30 +01:00
|
|
|
aTokenStr = rStr.getToken(0, ',', nIndex);
|
|
|
|
if (!aTokenStr.isEmpty())
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
2011-06-22 00:49:30 +01:00
|
|
|
rData.SetY(aTokenStr.toInt32());
|
2007-12-12 12:20:13 +00:00
|
|
|
if( rData.GetY() > -16384 && rData.GetY() < 16384 )
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_Y;
|
|
|
|
else
|
|
|
|
rData.SetY( 0 );
|
2001-08-23 12:40:56 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
rData.SetY( 0 );
|
2011-06-22 00:49:30 +01:00
|
|
|
aTokenStr = rStr.getToken(0, ',', nIndex);
|
|
|
|
if (!aTokenStr.isEmpty())
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
2011-06-22 00:49:30 +01:00
|
|
|
rData.SetWidth(aTokenStr.toInt32());
|
2007-12-12 12:20:13 +00:00
|
|
|
if( rData.GetWidth() > 0 && rData.GetWidth() < 16384 )
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_WIDTH;
|
|
|
|
else
|
|
|
|
rData.SetWidth( 0 );
|
2001-08-23 12:40:56 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
rData.SetWidth( 0 );
|
2011-06-22 00:49:30 +01:00
|
|
|
aTokenStr = rStr.getToken(0, ';', nIndex);
|
|
|
|
if (!aTokenStr.isEmpty())
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
2011-06-22 00:49:30 +01:00
|
|
|
rData.SetHeight(aTokenStr.toInt32());
|
2007-12-12 12:20:13 +00:00
|
|
|
if( rData.GetHeight() > 0 && rData.GetHeight() < 16384 )
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_HEIGHT;
|
|
|
|
else
|
|
|
|
rData.SetHeight( 0 );
|
2001-08-23 12:40:56 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
rData.SetHeight( 0 );
|
2011-06-22 00:49:30 +01:00
|
|
|
aTokenStr = rStr.getToken(0, ';', nIndex);
|
|
|
|
if (!aTokenStr.isEmpty())
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
2002-10-11 07:39:54 +00:00
|
|
|
// #94144# allow Minimize again, should be masked out when read from configuration
|
2001-08-28 10:06:58 +00:00
|
|
|
// 91625 - ignore Minimize
|
2011-06-22 00:49:30 +01:00
|
|
|
sal_uInt32 nState = (sal_uInt32)aTokenStr.toInt32();
|
2002-10-11 07:39:54 +00:00
|
|
|
//nState &= ~(WINDOWSTATE_STATE_MINIMIZED);
|
2001-08-28 10:06:58 +00:00
|
|
|
rData.SetState( nState );
|
2001-08-23 12:40:56 +00:00
|
|
|
nValidMask |= WINDOWSTATE_MASK_STATE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
rData.SetState( 0 );
|
2005-03-30 08:08:17 +00:00
|
|
|
|
|
|
|
// read maximized pos/size
|
2011-06-22 00:49:30 +01:00
|
|
|
aTokenStr = rStr.getToken(0, ',', nIndex);
|
|
|
|
if (!aTokenStr.isEmpty())
|
2005-03-30 08:08:17 +00:00
|
|
|
{
|
2011-06-22 00:49:30 +01:00
|
|
|
rData.SetMaximizedX(aTokenStr.toInt32());
|
2007-12-12 12:20:13 +00:00
|
|
|
if( rData.GetMaximizedX() > -16384 && rData.GetMaximizedX() < 16384 )
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_MAXIMIZED_X;
|
|
|
|
else
|
|
|
|
rData.SetMaximizedX( 0 );
|
2005-03-30 08:08:17 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
rData.SetMaximizedX( 0 );
|
2011-06-22 00:49:30 +01:00
|
|
|
aTokenStr = rStr.getToken(0, ',', nIndex);
|
|
|
|
if (!aTokenStr.isEmpty())
|
2005-03-30 08:08:17 +00:00
|
|
|
{
|
2011-06-22 00:49:30 +01:00
|
|
|
rData.SetMaximizedY(aTokenStr.toInt32());
|
2007-12-12 12:20:13 +00:00
|
|
|
if( rData.GetMaximizedY() > -16384 && rData.GetMaximizedY() < 16384 )
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_MAXIMIZED_Y;
|
|
|
|
else
|
|
|
|
rData.SetMaximizedY( 0 );
|
2005-03-30 08:08:17 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
rData.SetMaximizedY( 0 );
|
2011-06-22 00:49:30 +01:00
|
|
|
aTokenStr = rStr.getToken(0, ',', nIndex);
|
|
|
|
if (!aTokenStr.isEmpty())
|
2005-03-30 08:08:17 +00:00
|
|
|
{
|
2011-06-22 00:49:30 +01:00
|
|
|
rData.SetMaximizedWidth(aTokenStr.toInt32());
|
2007-12-12 12:20:13 +00:00
|
|
|
if( rData.GetMaximizedWidth() > 0 && rData.GetMaximizedWidth() < 16384 )
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_MAXIMIZED_WIDTH;
|
|
|
|
else
|
|
|
|
rData.SetMaximizedWidth( 0 );
|
2005-03-30 08:08:17 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
rData.SetMaximizedWidth( 0 );
|
2011-06-22 00:49:30 +01:00
|
|
|
aTokenStr = rStr.getToken(0, ';', nIndex);
|
|
|
|
if (!aTokenStr.isEmpty())
|
2005-03-30 08:08:17 +00:00
|
|
|
{
|
2011-06-22 00:49:30 +01:00
|
|
|
rData.SetMaximizedHeight(aTokenStr.toInt32());
|
2007-12-12 12:20:13 +00:00
|
|
|
if( rData.GetMaximizedHeight() > 0 && rData.GetMaximizedHeight() < 16384 )
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_MAXIMIZED_HEIGHT;
|
|
|
|
else
|
|
|
|
rData.SetMaximizedHeight( 0 );
|
2005-03-30 08:08:17 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
rData.SetMaximizedHeight( 0 );
|
|
|
|
|
|
|
|
// mark valid fields
|
2001-08-23 12:40:56 +00:00
|
|
|
rData.SetMask( nValidMask );
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
static OString ImplWindowStateToStr(const WindowStateData& rData)
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nValidMask = rData.GetMask();
|
2001-08-23 12:40:56 +00:00
|
|
|
if ( !nValidMask )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OString();
|
2011-06-22 00:49:30 +01:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OStringBuffer rStrBuf;
|
2001-08-23 12:40:56 +00:00
|
|
|
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_X )
|
2011-06-22 10:38:44 +01:00
|
|
|
rStrBuf.append(static_cast<sal_Int32>(rData.GetX()));
|
2011-06-22 00:49:30 +01:00
|
|
|
rStrBuf.append(',');
|
2001-08-23 12:40:56 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_Y )
|
2011-06-22 10:38:44 +01:00
|
|
|
rStrBuf.append(static_cast<sal_Int32>(rData.GetY()));
|
2011-06-22 00:49:30 +01:00
|
|
|
rStrBuf.append(',');
|
2001-08-23 12:40:56 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_WIDTH )
|
2011-06-22 00:49:30 +01:00
|
|
|
rStrBuf.append(static_cast<sal_Int32>(rData.GetWidth()));
|
|
|
|
rStrBuf.append(',');
|
2001-08-23 12:40:56 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_HEIGHT )
|
2011-06-22 00:49:30 +01:00
|
|
|
rStrBuf.append(static_cast<sal_Int32>(rData.GetHeight()));
|
|
|
|
rStrBuf.append( ';' );
|
2001-08-23 12:40:56 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_STATE )
|
2001-08-28 10:06:58 +00:00
|
|
|
{
|
2002-10-11 07:39:54 +00:00
|
|
|
// #94144# allow Minimize again, should be masked out when read from configuration
|
2001-08-28 10:06:58 +00:00
|
|
|
// 91625 - ignore Minimize
|
2011-06-22 00:49:30 +01:00
|
|
|
sal_uInt32 nState = rData.GetState();
|
|
|
|
rStrBuf.append(static_cast<sal_Int32>(nState));
|
2001-08-28 10:06:58 +00:00
|
|
|
}
|
2011-06-22 00:49:30 +01:00
|
|
|
rStrBuf.append(';');
|
2005-03-30 08:08:17 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_MAXIMIZED_X )
|
2011-06-22 10:38:44 +01:00
|
|
|
rStrBuf.append(static_cast<sal_Int32>(rData.GetMaximizedX()));
|
2011-06-22 00:49:30 +01:00
|
|
|
rStrBuf.append(',');
|
2005-03-30 08:08:17 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_MAXIMIZED_Y )
|
2011-06-22 10:38:44 +01:00
|
|
|
rStrBuf.append(static_cast<sal_Int32>(rData.GetMaximizedY()));
|
2011-06-22 00:49:30 +01:00
|
|
|
rStrBuf.append( ',' );
|
2005-03-30 08:08:17 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_MAXIMIZED_WIDTH )
|
2011-06-22 00:49:30 +01:00
|
|
|
rStrBuf.append(static_cast<sal_Int32>(rData.GetMaximizedWidth()));
|
|
|
|
rStrBuf.append(',');
|
2005-03-30 08:08:17 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_MAXIMIZED_HEIGHT )
|
2011-06-22 00:49:30 +01:00
|
|
|
rStrBuf.append(static_cast<sal_Int32>(rData.GetMaximizedHeight()));
|
|
|
|
rStrBuf.append(';');
|
|
|
|
|
|
|
|
return rStrBuf.makeStringAndClear();
|
2001-08-23 12:40:56 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2010-05-04 18:15:36 +02:00
|
|
|
void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, Window* i_pConfigureWin )
|
|
|
|
{
|
|
|
|
Rectangle aScreenRect;
|
2012-01-14 10:31:40 +00:00
|
|
|
if( !Application::IsUnifiedDisplay() )
|
2010-05-04 18:15:36 +02:00
|
|
|
aScreenRect = Application::GetScreenPosSizePixel( GetScreenNumber() );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aScreenRect = Application::GetScreenPosSizePixel( 0 );
|
|
|
|
for( unsigned int i = 1; i < Application::GetScreenCount(); i++ )
|
|
|
|
aScreenRect.Union( Application::GetScreenPosSizePixel( i ) );
|
|
|
|
}
|
|
|
|
// unfortunately most of the time width and height are not really known
|
|
|
|
if( i_nWidth < 1 )
|
|
|
|
i_nWidth = 50;
|
|
|
|
if( i_nHeight < 1 )
|
|
|
|
i_nHeight = 50;
|
|
|
|
|
|
|
|
// check left border
|
|
|
|
bool bMove = false;
|
|
|
|
if( io_rX + i_nWidth < aScreenRect.Left() )
|
|
|
|
{
|
|
|
|
bMove = true;
|
|
|
|
io_rX = aScreenRect.Left();
|
|
|
|
}
|
|
|
|
// check right border
|
|
|
|
if( io_rX > aScreenRect.Right() - i_nWidth )
|
|
|
|
{
|
|
|
|
bMove = true;
|
|
|
|
io_rX = aScreenRect.Right() - i_nWidth;
|
|
|
|
}
|
|
|
|
// check top border
|
|
|
|
if( io_rY + i_nHeight < aScreenRect.Top() )
|
|
|
|
{
|
|
|
|
bMove = true;
|
|
|
|
io_rY = aScreenRect.Top();
|
|
|
|
}
|
|
|
|
// check bottom border
|
|
|
|
if( io_rY > aScreenRect.Bottom() - i_nHeight )
|
|
|
|
{
|
|
|
|
bMove = true;
|
|
|
|
io_rY = aScreenRect.Bottom() - i_nHeight;
|
|
|
|
}
|
|
|
|
Window* pParent = i_pConfigureWin->GetParent();
|
|
|
|
if( bMove && pParent )
|
|
|
|
{
|
|
|
|
// calculate absolute screen pos here, since that is what is contained in WindowState
|
|
|
|
Point aParentAbsPos( pParent->OutputToAbsoluteScreenPixel( Point(0,0) ) );
|
|
|
|
Size aParentSizePixel( pParent->GetOutputSizePixel() );
|
|
|
|
Point aPos( (aParentSizePixel.Width() - i_nWidth) / 2,
|
|
|
|
(aParentSizePixel.Height() - i_nHeight) / 2 );
|
|
|
|
io_rX = aParentAbsPos.X() + aPos.X();
|
|
|
|
io_rY = aParentAbsPos.Y() + aPos.Y();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-23 12:40:56 +00:00
|
|
|
void SystemWindow::SetWindowStateData( const WindowStateData& rData )
|
|
|
|
{
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nValidMask = rData.GetMask();
|
2001-08-23 12:40:56 +00:00
|
|
|
if ( !nValidMask )
|
|
|
|
return;
|
|
|
|
|
|
|
|
if ( mbSysChild )
|
|
|
|
return;
|
|
|
|
|
|
|
|
Window* pWindow = this;
|
2005-01-13 17:05:34 +00:00
|
|
|
while ( pWindow->mpWindowImpl->mpBorderWindow )
|
|
|
|
pWindow = pWindow->mpWindowImpl->mpBorderWindow;
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( pWindow->mpWindowImpl->mbFrame )
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nState = rData.GetState();
|
2001-08-23 12:40:56 +00:00
|
|
|
SalFrameState aState;
|
2005-03-30 08:08:17 +00:00
|
|
|
aState.mnMask = rData.GetMask();
|
|
|
|
aState.mnX = rData.GetX();
|
|
|
|
aState.mnY = rData.GetY();
|
|
|
|
aState.mnWidth = rData.GetWidth();
|
|
|
|
aState.mnHeight = rData.GetHeight();
|
2005-04-18 08:55:55 +00:00
|
|
|
|
|
|
|
if( rData.GetMask() & (WINDOWSTATE_MASK_WIDTH|WINDOWSTATE_MASK_HEIGHT) )
|
|
|
|
{
|
|
|
|
// #i43799# adjust window state sizes if a minimial output size was set
|
|
|
|
// otherwise the frame and the client might get different sizes
|
|
|
|
if( maMinOutSize.Width() > aState.mnWidth )
|
|
|
|
aState.mnWidth = maMinOutSize.Width();
|
|
|
|
if( maMinOutSize.Height() > aState.mnHeight )
|
|
|
|
aState.mnHeight = maMinOutSize.Height();
|
|
|
|
}
|
|
|
|
|
2005-03-30 08:08:17 +00:00
|
|
|
aState.mnMaximizedX = rData.GetMaximizedX();
|
|
|
|
aState.mnMaximizedY = rData.GetMaximizedY();
|
|
|
|
aState.mnMaximizedWidth = rData.GetMaximizedWidth();
|
|
|
|
aState.mnMaximizedHeight = rData.GetMaximizedHeight();
|
2002-10-11 07:39:54 +00:00
|
|
|
// #94144# allow Minimize again, should be masked out when read from configuration
|
2001-08-28 10:06:58 +00:00
|
|
|
// 91625 - ignore Minimize
|
2002-10-11 07:39:54 +00:00
|
|
|
//nState &= ~(WINDOWSTATE_STATE_MINIMIZED);
|
2013-03-27 01:20:01 +02:00
|
|
|
aState.mnState = nState & WINDOWSTATE_STATE_SYSTEMMASK;
|
2002-11-12 09:52:50 +00:00
|
|
|
|
2010-05-04 18:15:36 +02:00
|
|
|
// normalize window positions onto screen
|
|
|
|
ImplMoveToScreen( aState.mnX, aState.mnY, aState.mnWidth, aState.mnHeight, pWindow );
|
|
|
|
ImplMoveToScreen( aState.mnMaximizedX, aState.mnMaximizedY, aState.mnMaximizedWidth, aState.mnMaximizedHeight, pWindow );
|
|
|
|
|
2002-11-12 09:52:50 +00:00
|
|
|
// #96568# avoid having multiple frames at the same screen location
|
2005-03-29 11:58:08 +00:00
|
|
|
// do the check only if not maximized
|
|
|
|
if( !((rData.GetMask() & WINDOWSTATE_MASK_STATE) && (nState & WINDOWSTATE_STATE_MAXIMIZED)) )
|
|
|
|
if( rData.GetMask() & (WINDOWSTATE_MASK_POS|WINDOWSTATE_MASK_WIDTH|WINDOWSTATE_MASK_HEIGHT) )
|
2002-11-12 09:52:50 +00:00
|
|
|
{
|
2005-03-29 11:58:08 +00:00
|
|
|
Rectangle aDesktop = GetDesktopRectPixel();
|
|
|
|
ImplSVData *pSVData = ImplGetSVData();
|
|
|
|
Window *pWin = pSVData->maWinData.mpFirstFrame;
|
2014-02-21 12:53:51 +01:00
|
|
|
bool bWrapped = false;
|
2005-03-29 11:58:08 +00:00
|
|
|
while( pWin )
|
2002-11-12 09:52:50 +00:00
|
|
|
{
|
2010-08-30 14:08:45 +02:00
|
|
|
if( !pWin->ImplIsRealParentPath( this ) && ( pWin != this ) &&
|
2005-03-29 11:58:08 +00:00
|
|
|
pWin->ImplGetWindow()->IsTopWindow() && pWin->mpWindowImpl->mbReallyVisible )
|
2002-11-12 09:52:50 +00:00
|
|
|
{
|
2005-03-29 11:58:08 +00:00
|
|
|
SalFrameGeometry g = pWin->mpWindowImpl->mpFrame->GetGeometry();
|
2014-03-03 18:27:00 +01:00
|
|
|
if( std::abs(g.nX-aState.mnX) < 2 && std::abs(g.nY-aState.mnY) < 5 )
|
2002-11-12 09:52:50 +00:00
|
|
|
{
|
2005-03-29 11:58:08 +00:00
|
|
|
long displacement = g.nTopDecoration ? g.nTopDecoration : 20;
|
2012-10-28 23:23:53 +01:00
|
|
|
if( (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.Right() ||
|
|
|
|
(unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.Bottom() )
|
2005-03-29 11:58:08 +00:00
|
|
|
{
|
|
|
|
// displacing would leave screen
|
|
|
|
aState.mnX = g.nLeftDecoration ? g.nLeftDecoration : 10; // should result in (0,0)
|
|
|
|
aState.mnY = displacement;
|
|
|
|
if( bWrapped ||
|
2012-10-28 23:23:53 +01:00
|
|
|
(unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.Right() ||
|
|
|
|
(unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.Bottom() )
|
2005-03-29 11:58:08 +00:00
|
|
|
break; // further displacement not possible -> break
|
|
|
|
// avoid endless testing
|
2014-02-21 12:53:51 +01:00
|
|
|
bWrapped = true;
|
2005-03-29 11:58:08 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// displace
|
|
|
|
aState.mnX += displacement;
|
|
|
|
aState.mnY += displacement;
|
|
|
|
}
|
|
|
|
pWin = pSVData->maWinData.mpFirstFrame; // check new pos again
|
2002-11-12 09:52:50 +00:00
|
|
|
}
|
|
|
|
}
|
2005-03-29 11:58:08 +00:00
|
|
|
pWin = pWin->mpWindowImpl->mpFrameData->mpNextFrame;
|
2002-11-12 09:52:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-01-13 17:05:34 +00:00
|
|
|
mpWindowImpl->mpFrame->SetWindowState( &aState );
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2004-10-27 12:14:24 +00:00
|
|
|
// do a synchronous resize for layout reasons
|
2004-12-03 13:16:36 +00:00
|
|
|
// but use rData only when the window is not to be maximized (#i38089#)
|
|
|
|
// otherwise we have no useful size information
|
2005-03-29 11:58:08 +00:00
|
|
|
if( (rData.GetMask() & WINDOWSTATE_MASK_STATE) && (nState & WINDOWSTATE_STATE_MAXIMIZED) )
|
|
|
|
{
|
|
|
|
// query maximized size from frame
|
|
|
|
SalFrameGeometry aGeometry = mpWindowImpl->mpFrame->GetGeometry();
|
|
|
|
|
|
|
|
// but use it only if it is different from the restore size (rData)
|
|
|
|
// as currently only on windows the exact size of a maximized window
|
|
|
|
// can be computed without actually showing the window
|
|
|
|
if( aGeometry.nWidth != rData.GetWidth() || aGeometry.nHeight != rData.GetHeight() )
|
|
|
|
ImplHandleResize( pWindow, aGeometry.nWidth, aGeometry.nHeight );
|
|
|
|
}
|
|
|
|
else
|
2004-12-03 13:16:36 +00:00
|
|
|
if( rData.GetMask() & (WINDOWSTATE_MASK_WIDTH|WINDOWSTATE_MASK_HEIGHT) )
|
2005-04-18 08:55:55 +00:00
|
|
|
ImplHandleResize( pWindow, aState.mnWidth, aState.mnHeight ); // #i43799# use aState and not rData, see above
|
2001-08-23 12:40:56 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nPosSize = 0;
|
2001-08-23 12:40:56 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_X )
|
|
|
|
nPosSize |= WINDOW_POSSIZE_X;
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_Y )
|
|
|
|
nPosSize |= WINDOW_POSSIZE_Y;
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_WIDTH )
|
|
|
|
nPosSize |= WINDOW_POSSIZE_WIDTH;
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_HEIGHT )
|
|
|
|
nPosSize |= WINDOW_POSSIZE_HEIGHT;
|
2001-11-23 11:39:27 +00:00
|
|
|
|
2001-12-18 09:22:34 +00:00
|
|
|
if( IsRollUp() )
|
|
|
|
RollDown();
|
|
|
|
|
2001-11-15 17:44:30 +00:00
|
|
|
long nX = rData.GetX();
|
|
|
|
long nY = rData.GetY();
|
|
|
|
long nWidth = rData.GetWidth();
|
|
|
|
long nHeight = rData.GetHeight();
|
2005-01-13 17:05:34 +00:00
|
|
|
const SalFrameGeometry& rGeom = pWindow->mpWindowImpl->mpFrame->GetGeometry();
|
2001-11-15 17:44:30 +00:00
|
|
|
if( nX < 0 )
|
|
|
|
nX = 0;
|
2005-01-13 17:05:34 +00:00
|
|
|
if( nX + nWidth > (long) rGeom.nWidth )
|
2001-11-15 17:44:30 +00:00
|
|
|
nX = rGeom.nWidth - nWidth;
|
|
|
|
if( nY < 0 )
|
|
|
|
nY = 0;
|
2005-01-13 17:05:34 +00:00
|
|
|
if( nY + nHeight > (long) rGeom.nHeight )
|
2001-11-15 17:44:30 +00:00
|
|
|
nY = rGeom.nHeight - nHeight;
|
2012-08-24 12:34:22 +01:00
|
|
|
setPosSizePixel( nX, nY, nWidth, nHeight, nPosSize );
|
2001-11-15 17:44:30 +00:00
|
|
|
maOrgSize = Size( nWidth, nHeight );
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2001-08-28 10:06:58 +00:00
|
|
|
// 91625 - ignore Minimize
|
2001-11-15 17:44:30 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_STATE )
|
|
|
|
{
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nState = rData.GetState();
|
2001-11-15 17:44:30 +00:00
|
|
|
if ( nState & WINDOWSTATE_STATE_ROLLUP )
|
|
|
|
RollUp();
|
|
|
|
else
|
|
|
|
RollDown();
|
|
|
|
}
|
2001-08-23 12:40:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-23 12:40:56 +00:00
|
|
|
|
|
|
|
void SystemWindow::GetWindowStateData( WindowStateData& rData ) const
|
|
|
|
{
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nValidMask = rData.GetMask();
|
2001-08-23 12:40:56 +00:00
|
|
|
if ( !nValidMask )
|
|
|
|
return;
|
|
|
|
|
|
|
|
if ( mbSysChild )
|
|
|
|
return;
|
|
|
|
|
|
|
|
const Window* pWindow = this;
|
2005-01-13 17:05:34 +00:00
|
|
|
while ( pWindow->mpWindowImpl->mpBorderWindow )
|
|
|
|
pWindow = pWindow->mpWindowImpl->mpBorderWindow;
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( pWindow->mpWindowImpl->mbFrame )
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
|
|
|
SalFrameState aState;
|
|
|
|
aState.mnMask = 0xFFFFFFFF;
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpFrame->GetWindowState( &aState ) )
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_X )
|
|
|
|
rData.SetX( aState.mnX );
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_Y )
|
|
|
|
rData.SetY( aState.mnY );
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_WIDTH )
|
|
|
|
rData.SetWidth( aState.mnWidth );
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_HEIGHT )
|
|
|
|
rData.SetHeight( aState.mnHeight );
|
2013-03-27 01:20:01 +02:00
|
|
|
if ( aState.mnMask & WINDOWSTATE_MASK_MAXIMIZED_X )
|
2005-03-30 08:08:17 +00:00
|
|
|
{
|
|
|
|
rData.SetMaximizedX( aState.mnMaximizedX );
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_MAXIMIZED_X;
|
|
|
|
}
|
2013-03-27 01:20:01 +02:00
|
|
|
if ( aState.mnMask & WINDOWSTATE_MASK_MAXIMIZED_Y )
|
2005-03-30 08:08:17 +00:00
|
|
|
{
|
|
|
|
rData.SetMaximizedY( aState.mnMaximizedY );
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_MAXIMIZED_Y;
|
|
|
|
}
|
2013-03-27 01:20:01 +02:00
|
|
|
if ( aState.mnMask & WINDOWSTATE_MASK_MAXIMIZED_WIDTH )
|
2005-03-30 08:08:17 +00:00
|
|
|
{
|
|
|
|
rData.SetMaximizedWidth( aState.mnMaximizedWidth );
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_MAXIMIZED_WIDTH;
|
|
|
|
}
|
2013-03-27 01:20:01 +02:00
|
|
|
if ( aState.mnMask & WINDOWSTATE_MASK_MAXIMIZED_HEIGHT )
|
2005-03-30 08:08:17 +00:00
|
|
|
{
|
|
|
|
rData.SetMaximizedHeight( aState.mnMaximizedHeight );
|
|
|
|
nValidMask |= WINDOWSTATE_MASK_MAXIMIZED_HEIGHT;
|
|
|
|
}
|
2001-08-23 12:40:56 +00:00
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_STATE )
|
2001-08-28 10:06:58 +00:00
|
|
|
{
|
2002-10-11 07:39:54 +00:00
|
|
|
// #94144# allow Minimize again, should be masked out when read from configuration
|
2001-08-28 10:06:58 +00:00
|
|
|
// 91625 - ignore Minimize
|
2002-10-15 06:40:27 +00:00
|
|
|
if ( !(nValidMask&WINDOWSTATE_MASK_MINIMIZED) )
|
2002-10-11 17:08:29 +00:00
|
|
|
aState.mnState &= ~(WINDOWSTATE_STATE_MINIMIZED);
|
2001-08-23 12:40:56 +00:00
|
|
|
rData.SetState( aState.mnState );
|
2001-08-28 10:06:58 +00:00
|
|
|
}
|
2005-03-30 08:08:17 +00:00
|
|
|
rData.SetMask( nValidMask );
|
2001-08-23 12:40:56 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
rData.SetMask( 0 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Point aPos = GetPosPixel();
|
|
|
|
Size aSize = GetSizePixel();
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nState = 0;
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2001-11-15 17:44:30 +00:00
|
|
|
if ( IsRollUp() )
|
|
|
|
{
|
2001-12-19 15:28:20 +00:00
|
|
|
aSize.Height() += maOrgSize.Height();
|
2001-11-15 17:44:30 +00:00
|
|
|
nState |= WINDOWSTATE_STATE_ROLLUP;
|
|
|
|
}
|
2001-08-23 12:40:56 +00:00
|
|
|
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_X )
|
|
|
|
rData.SetX( aPos.X() );
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_Y )
|
|
|
|
rData.SetY( aPos.Y() );
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_WIDTH )
|
|
|
|
rData.SetWidth( aSize.Width() );
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_HEIGHT )
|
|
|
|
rData.SetHeight( aSize.Height() );
|
|
|
|
if ( nValidMask & WINDOWSTATE_MASK_STATE )
|
|
|
|
rData.SetState( nState );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
void SystemWindow::SetWindowState(const OString& rStr)
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
2011-06-22 00:49:30 +01:00
|
|
|
if (rStr.isEmpty())
|
2001-08-23 12:40:56 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
WindowStateData aData;
|
|
|
|
ImplWindowStateFromStr( aData, rStr );
|
|
|
|
SetWindowStateData( aData );
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OString SystemWindow::GetWindowState( sal_uLong nMask ) const
|
2001-08-23 12:40:56 +00:00
|
|
|
{
|
|
|
|
WindowStateData aData;
|
|
|
|
aData.SetMask( nMask );
|
|
|
|
GetWindowStateData( aData );
|
|
|
|
|
2011-06-22 00:49:30 +01:00
|
|
|
return ImplWindowStateToStr(aData);
|
2001-08-23 12:40:56 +00:00
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2001-08-23 12:40:56 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
void SystemWindow::SetMenuBar( MenuBar* pMenuBar )
|
|
|
|
{
|
|
|
|
if ( mpMenuBar != pMenuBar )
|
|
|
|
{
|
|
|
|
MenuBar* pOldMenuBar = mpMenuBar;
|
2004-09-08 14:09:27 +00:00
|
|
|
Window* pOldWindow = NULL;
|
2002-02-22 08:09:23 +00:00
|
|
|
Window* pNewWindow=NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
mpMenuBar = pMenuBar;
|
|
|
|
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( pOldMenuBar )
|
|
|
|
pOldWindow = pOldMenuBar->ImplGetWindow();
|
|
|
|
else
|
|
|
|
pOldWindow = NULL;
|
2002-12-12 17:01:54 +00:00
|
|
|
if ( pOldWindow )
|
|
|
|
{
|
|
|
|
ImplCallEventListeners( VCLEVENT_WINDOW_MENUBARREMOVED, (void*) pOldMenuBar );
|
2003-04-24 15:32:28 +00:00
|
|
|
pOldWindow->SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >() );
|
2002-12-12 17:01:54 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( pMenuBar )
|
|
|
|
{
|
|
|
|
DBG_ASSERT( !pMenuBar->pWindow, "SystemWindow::SetMenuBar() - MenuBars can only set in one SystemWindow at time" );
|
2005-01-13 17:05:34 +00:00
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarWindow( pNewWindow = MenuBar::ImplCreate( mpWindowImpl->mpBorderWindow, pOldWindow, pMenuBar ) );
|
2002-12-12 17:01:54 +00:00
|
|
|
ImplCallEventListeners( VCLEVENT_WINDOW_MENUBARADDED, (void*) pMenuBar );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
2005-01-13 17:05:34 +00:00
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarWindow( NULL );
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplToBottomChild();
|
|
|
|
if ( pOldMenuBar )
|
2005-11-10 14:49:06 +00:00
|
|
|
{
|
2014-02-24 01:53:13 +11:00
|
|
|
bool bDelete = (pMenuBar == 0) ? true : false;
|
2005-11-10 14:49:06 +00:00
|
|
|
if( bDelete && pOldWindow )
|
|
|
|
{
|
|
|
|
if( mpImplData->mpTaskPaneList )
|
|
|
|
mpImplData->mpTaskPaneList->RemoveWindow( pOldWindow );
|
|
|
|
}
|
|
|
|
MenuBar::ImplDestroy( pOldMenuBar, bDelete );
|
|
|
|
if( bDelete )
|
|
|
|
pOldWindow = NULL; // will be deleted in MenuBar::ImplDestroy,
|
|
|
|
}
|
2002-02-22 08:09:23 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( pMenuBar )
|
|
|
|
pNewWindow = pMenuBar->ImplGetWindow();
|
|
|
|
if( pOldMenuBar )
|
|
|
|
pOldWindow = pOldMenuBar->ImplGetWindow();
|
|
|
|
}
|
|
|
|
|
|
|
|
// update taskpane list to make menubar accessible
|
2004-09-09 15:22:26 +00:00
|
|
|
if( mpImplData->mpTaskPaneList )
|
2002-02-22 08:09:23 +00:00
|
|
|
{
|
|
|
|
if( pOldWindow )
|
2004-09-09 15:22:26 +00:00
|
|
|
mpImplData->mpTaskPaneList->RemoveWindow( pOldWindow );
|
2002-02-22 08:09:23 +00:00
|
|
|
if( pNewWindow )
|
2004-09-09 15:22:26 +00:00
|
|
|
mpImplData->mpTaskPaneList->AddWindow( pNewWindow );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void SystemWindow::SetMenuBarMode( sal_uInt16 nMode )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( mnMenuBarMode != nMode )
|
|
|
|
{
|
|
|
|
mnMenuBarMode = nMode;
|
2005-01-13 17:05:34 +00:00
|
|
|
if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( nMode == MENUBAR_MODE_HIDE )
|
2014-02-21 12:53:51 +01:00
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( true );
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2014-02-21 12:53:51 +01:00
|
|
|
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( false );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2005-03-18 16:52:30 +00:00
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-04-03 14:48:43 +00:00
|
|
|
|
2014-02-21 12:53:51 +01:00
|
|
|
bool SystemWindow::ImplIsInTaskPaneList( Window* pWin )
|
2005-03-18 16:52:30 +00:00
|
|
|
{
|
|
|
|
if( mpImplData && mpImplData->mpTaskPaneList )
|
|
|
|
return mpImplData->mpTaskPaneList->IsInList( pWin );
|
2014-02-21 12:53:51 +01:00
|
|
|
return false;
|
2005-03-18 16:52:30 +00:00
|
|
|
}
|
2008-04-03 14:48:43 +00:00
|
|
|
|
|
|
|
unsigned int SystemWindow::GetScreenNumber() const
|
|
|
|
{
|
2012-01-14 23:25:55 +00:00
|
|
|
return mpWindowImpl->mpFrame->maGeometry.nDisplayScreenNumber;
|
2008-04-03 14:48:43 +00:00
|
|
|
}
|
|
|
|
|
2012-01-14 23:25:55 +00:00
|
|
|
void SystemWindow::SetScreenNumber(unsigned int nDisplayScreen)
|
2008-04-03 14:48:43 +00:00
|
|
|
{
|
2012-01-14 23:25:55 +00:00
|
|
|
mpWindowImpl->mpFrame->SetScreenNumber( nDisplayScreen );
|
2008-04-03 14:48:43 +00:00
|
|
|
}
|
2010-10-14 08:27:31 +02:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
void SystemWindow::SetApplicationID(const OUString &rApplicationID)
|
2010-10-27 23:05:06 +01:00
|
|
|
{
|
2012-01-14 23:25:55 +00:00
|
|
|
mpWindowImpl->mpFrame->SetApplicationID( rApplicationID );
|
2010-10-27 23:05:06 +01:00
|
|
|
}
|
|
|
|
|
2012-06-05 00:22:16 -04:00
|
|
|
void SystemWindow::SetCloseHdl(const Link& rLink)
|
|
|
|
{
|
|
|
|
mpImplData->maCloseHdl = rLink;
|
|
|
|
}
|
|
|
|
|
|
|
|
const Link& SystemWindow::GetCloseHdl() const
|
|
|
|
{
|
|
|
|
return mpImplData->maCloseHdl;
|
|
|
|
}
|
|
|
|
|
2010-10-14 08:27:31 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|