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.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-09-17 11:23:57 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <limits.h>
|
|
|
|
#include <tools/debug.hxx>
|
2011-01-24 16:34:14 +01:00
|
|
|
#include <tools/poly.hxx>
|
|
|
|
|
2007-06-27 19:36:03 +00:00
|
|
|
#include <vcl/bitmap.hxx>
|
2011-11-28 22:16:26 +00:00
|
|
|
#include <vcl/dialog.hxx>
|
2007-06-27 19:36:03 +00:00
|
|
|
#include <vcl/event.hxx>
|
2013-01-22 10:20:15 +00:00
|
|
|
#include <vcl/fixed.hxx>
|
2012-08-10 11:31:09 +01:00
|
|
|
#include <vcl/layout.hxx>
|
2007-06-27 19:36:03 +00:00
|
|
|
#include <vcl/timer.hxx>
|
|
|
|
#include <vcl/metric.hxx>
|
|
|
|
#include <vcl/virdev.hxx>
|
|
|
|
#include <vcl/window.hxx>
|
|
|
|
#include <vcl/scrbar.hxx>
|
|
|
|
#include <vcl/dockwin.hxx>
|
2012-08-23 15:18:14 +01:00
|
|
|
#include <vcl/tabctrl.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-24 16:34:14 +01:00
|
|
|
#include <window.h>
|
|
|
|
#include <outfont.hxx>
|
|
|
|
#include <outdev.h>
|
|
|
|
#include <svdata.hxx>
|
|
|
|
#include <impbmp.hxx>
|
|
|
|
#include <salbmp.hxx>
|
|
|
|
#include <salgdi.hxx>
|
|
|
|
#include <salframe.hxx>
|
|
|
|
#include <scrwnd.hxx>
|
2003-12-01 12:41:43 +00:00
|
|
|
|
2012-08-10 11:31:09 +01:00
|
|
|
using namespace com::sun::star;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
2006-06-19 18:43:01 +00:00
|
|
|
DBG_NAMEEX( Window )
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
|
|
|
#define IMPL_MAXSAVEBACKSIZE (640*480)
|
|
|
|
#define IMPL_MAXALLSAVEBACKSIZE (800*600*2)
|
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
|
|
|
struct ImplFocusDelData : public ImplDelData
|
|
|
|
{
|
|
|
|
Window* mpFocusWin;
|
|
|
|
};
|
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
DBG_CHKOBJ( pTestWindow, Window, ImplDbgCheckWindow );
|
|
|
|
|
2011-12-18 12:21:45 +01:00
|
|
|
// check for overlapping window
|
2000-09-18 16:07:07 +00:00
|
|
|
pTestWindow = pTestWindow->ImplGetFirstOverlapWindow();
|
|
|
|
const Window* pTempWindow = pTestWindow;
|
|
|
|
const Window* pThisWindow = ImplGetFirstOverlapWindow();
|
|
|
|
if ( pTempWindow == pThisWindow )
|
2010-09-29 15:46:40 +08:00
|
|
|
return sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
do
|
|
|
|
{
|
|
|
|
if ( pTempWindow == pThisWindow )
|
2010-09-29 15:46:40 +08:00
|
|
|
return sal_True;
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( pTempWindow->mpWindowImpl->mbFrame )
|
2000-09-18 16:07:07 +00:00
|
|
|
break;
|
2005-01-13 17:06:36 +00:00
|
|
|
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
while ( pTempWindow );
|
|
|
|
pTempWindow = pThisWindow;
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if ( pTempWindow == pTestWindow )
|
2010-09-29 15:46:40 +08:00
|
|
|
return sal_False;
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( pTempWindow->mpWindowImpl->mbFrame )
|
2000-09-18 16:07:07 +00:00
|
|
|
break;
|
2005-01-13 17:06:36 +00:00
|
|
|
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
while ( pTempWindow );
|
|
|
|
|
2011-12-18 12:21:45 +01:00
|
|
|
// move window to same level
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( pThisWindow->mpWindowImpl->mpOverlapWindow != pTestWindow->mpWindowImpl->mpOverlapWindow )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nThisLevel = 0;
|
|
|
|
sal_uInt16 nTestLevel = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
pTempWindow = pThisWindow;
|
|
|
|
do
|
|
|
|
{
|
|
|
|
nThisLevel++;
|
2005-01-13 17:06:36 +00:00
|
|
|
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2005-01-13 17:06:36 +00:00
|
|
|
while ( !pTempWindow->mpWindowImpl->mbFrame );
|
2000-09-18 16:07:07 +00:00
|
|
|
pTempWindow = pTestWindow;
|
|
|
|
do
|
|
|
|
{
|
|
|
|
nTestLevel++;
|
2005-01-13 17:06:36 +00:00
|
|
|
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2005-01-13 17:06:36 +00:00
|
|
|
while ( !pTempWindow->mpWindowImpl->mbFrame );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( nThisLevel < nTestLevel )
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( pTestWindow->mpWindowImpl->mpOverlapWindow == pThisWindow->mpWindowImpl->mpOverlapWindow )
|
2000-09-18 16:07:07 +00:00
|
|
|
break;
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( pTestWindow->mpWindowImpl->mbFrame )
|
2000-09-18 16:07:07 +00:00
|
|
|
break;
|
2005-01-13 17:06:36 +00:00
|
|
|
pTestWindow = pTestWindow->mpWindowImpl->mpOverlapWindow;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
while ( pTestWindow );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( pThisWindow->mpWindowImpl->mpOverlapWindow == pTempWindow->mpWindowImpl->mpOverlapWindow )
|
2000-09-18 16:07:07 +00:00
|
|
|
break;
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( pThisWindow->mpWindowImpl->mbFrame )
|
2000-09-18 16:07:07 +00:00
|
|
|
break;
|
2005-01-13 17:06:36 +00:00
|
|
|
pThisWindow = pThisWindow->mpWindowImpl->mpOverlapWindow;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
while ( pThisWindow );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-12-18 12:21:45 +01:00
|
|
|
// if TestWindow is before ThisWindow, it is in front
|
2000-09-18 16:07:07 +00:00
|
|
|
pTempWindow = pTestWindow;
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if ( pTempWindow == pThisWindow )
|
2010-09-29 15:46:40 +08:00
|
|
|
return sal_True;
|
2005-01-13 17:06:36 +00:00
|
|
|
pTempWindow = pTempWindow->mpWindowImpl->mpNext;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
while ( pTempWindow );
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
return sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// =======================================================================
|
|
|
|
|
|
|
|
void Window::ImplSaveOverlapBackground()
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
DBG_ASSERT( !mpWindowImpl->mpOverlapData->mpSaveBackDev, "Window::ImplSaveOverlapBackground() - Background already saved" );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( !mpWindowImpl->mbFrame )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-12 15:07:10 +01:00
|
|
|
sal_uLong nSaveBackSize = mnOutWidth*mnOutHeight;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( nSaveBackSize <= IMPL_MAXSAVEBACKSIZE )
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( nSaveBackSize+mpWindowImpl->mpFrameData->mnAllSaveBackSize <= IMPL_MAXALLSAVEBACKSIZE )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
Size aOutSize( mnOutWidth, mnOutHeight );
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpOverlapData->mpSaveBackDev = new VirtualDevice( *mpWindowImpl->mpFrameWindow );
|
|
|
|
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev->SetOutputSizePixel( aOutSize ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpFrameWindow->ImplUpdateAll();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mbInitWinClipRegion )
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInitWinClipRegion();
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpOverlapData->mnSaveBackSize = nSaveBackSize;
|
|
|
|
mpWindowImpl->mpFrameData->mnAllSaveBackSize += nSaveBackSize;
|
2000-09-18 16:07:07 +00:00
|
|
|
Point aDevPt;
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpFrameWindow->ImplGetFrameDev( Point( mnOutOffX, mnOutOffY ),
|
2000-09-18 16:07:07 +00:00
|
|
|
aDevPt, aOutSize,
|
2005-01-13 17:06:36 +00:00
|
|
|
*(mpWindowImpl->mpOverlapData->mpSaveBackDev) );
|
|
|
|
mpWindowImpl->mpOverlapData->mpNextBackWin = mpWindowImpl->mpFrameData->mpFirstBackWin;
|
|
|
|
mpWindowImpl->mpFrameData->mpFirstBackWin = this;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
delete mpWindowImpl->mpOverlapData->mpSaveBackDev;
|
|
|
|
mpWindowImpl->mpOverlapData->mpSaveBackDev = NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::ImplRestoreOverlapBackground( Region& rInvRegion )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mbInitWinClipRegion )
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplInitWinClipRegion();
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
Point aDevPt;
|
|
|
|
Point aDestPt( mnOutOffX, mnOutOffY );
|
2005-01-13 17:06:36 +00:00
|
|
|
Size aDevSize = mpWindowImpl->mpOverlapData->mpSaveBackDev->GetOutputSizePixel();
|
|
|
|
if ( mpWindowImpl->mpOverlapData->mpSaveBackRgn )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpOverlapData->mpSaveBackRgn->Intersect( mpWindowImpl->maWinClipRegion );
|
|
|
|
rInvRegion = mpWindowImpl->maWinClipRegion;
|
|
|
|
rInvRegion.Exclude( *mpWindowImpl->mpOverlapData->mpSaveBackRgn );
|
|
|
|
mpWindowImpl->mpFrameWindow->ImplDrawFrameDev( aDestPt, aDevPt, aDevSize,
|
|
|
|
*(mpWindowImpl->mpOverlapData->mpSaveBackDev),
|
|
|
|
*mpWindowImpl->mpOverlapData->mpSaveBackRgn );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpFrameWindow->ImplDrawFrameDev( aDestPt, aDevPt, aDevSize,
|
|
|
|
*(mpWindowImpl->mpOverlapData->mpSaveBackDev),
|
|
|
|
mpWindowImpl->maWinClipRegion );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
ImplDeleteOverlapBackground();
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
return sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
return sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::ImplDeleteOverlapBackground()
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpFrameData->mnAllSaveBackSize -= mpWindowImpl->mpOverlapData->mnSaveBackSize;
|
|
|
|
delete mpWindowImpl->mpOverlapData->mpSaveBackDev;
|
|
|
|
mpWindowImpl->mpOverlapData->mpSaveBackDev = NULL;
|
|
|
|
if ( mpWindowImpl->mpOverlapData->mpSaveBackRgn )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
delete mpWindowImpl->mpOverlapData->mpSaveBackRgn;
|
|
|
|
mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2011-12-18 12:21:45 +01:00
|
|
|
// remove window from the list
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mpFrameData->mpFirstBackWin == this )
|
|
|
|
mpWindowImpl->mpFrameData->mpFirstBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin;
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
Window* pTemp = mpWindowImpl->mpFrameData->mpFirstBackWin;
|
|
|
|
while ( pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin != this )
|
|
|
|
pTemp = pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin;
|
|
|
|
pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpOverlapData->mpNextBackWin = NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::ImplInvalidateAllOverlapBackgrounds()
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
Window* pWindow = mpWindowImpl->mpFrameData->mpFirstBackWin;
|
2000-09-18 16:07:07 +00:00
|
|
|
while ( pWindow )
|
|
|
|
{
|
2011-12-18 12:21:45 +01:00
|
|
|
// remember next window here already, as this window could
|
|
|
|
// be removed within the next if clause from the list
|
2005-01-13 17:06:36 +00:00
|
|
|
Window* pNext = pWindow->mpWindowImpl->mpOverlapData->mpNextBackWin;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( ImplIsWindowInFront( pWindow ) )
|
|
|
|
{
|
|
|
|
Rectangle aRect1( Point( mnOutOffX, mnOutOffY ),
|
|
|
|
Size( mnOutWidth, mnOutHeight ) );
|
|
|
|
Rectangle aRect2( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
|
|
|
|
Size( pWindow->mnOutWidth, pWindow->mnOutHeight ) );
|
|
|
|
aRect1.Intersection( aRect2 );
|
|
|
|
if ( !aRect1.IsEmpty() )
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( !pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn )
|
|
|
|
pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn = new Region( aRect2 );
|
|
|
|
pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn->Exclude( aRect1 );
|
|
|
|
if ( pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn->IsEmpty() )
|
2000-09-18 16:07:07 +00:00
|
|
|
pWindow->ImplDeleteOverlapBackground();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
pWindow = pNext;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::ShowFocus( const Rectangle& rRect )
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2007-07-05 07:43:42 +00:00
|
|
|
if( mpWindowImpl->mbInShowFocus )
|
|
|
|
return;
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbInShowFocus = sal_True;
|
2007-07-05 07:43:42 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplWinData* pWinData = ImplGetWinData();
|
|
|
|
|
2007-07-05 07:43:42 +00:00
|
|
|
// native themeing suggest not to use focus rects
|
|
|
|
if( ! ( mpWindowImpl->mbUseNativeFocus &&
|
|
|
|
IsNativeWidgetEnabled() ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2007-07-05 07:43:42 +00:00
|
|
|
if ( !mpWindowImpl->mbInPaint )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2007-07-05 07:43:42 +00:00
|
|
|
if ( mpWindowImpl->mbFocusVisible )
|
|
|
|
{
|
|
|
|
if ( *(pWinData->mpFocusRect) == rRect )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbInShowFocus = sal_False;
|
2007-07-05 07:43:42 +00:00
|
|
|
return;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2007-07-05 07:43:42 +00:00
|
|
|
ImplInvertFocus( *(pWinData->mpFocusRect) );
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2007-07-05 07:43:42 +00:00
|
|
|
ImplInvertFocus( rRect );
|
|
|
|
}
|
|
|
|
if ( !pWinData->mpFocusRect )
|
|
|
|
pWinData->mpFocusRect = new Rectangle( rRect );
|
|
|
|
else
|
|
|
|
*(pWinData->mpFocusRect) = rRect;
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbFocusVisible = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
2007-07-05 07:43:42 +00:00
|
|
|
{
|
|
|
|
if( ! mpWindowImpl->mbNativeFocusVisible )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbNativeFocusVisible = sal_True;
|
2007-07-05 07:43:42 +00:00
|
|
|
if ( !mpWindowImpl->mbInPaint )
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbInShowFocus = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::HideFocus()
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2007-07-05 07:43:42 +00:00
|
|
|
if( mpWindowImpl->mbInHideFocus )
|
2000-09-18 16:07:07 +00:00
|
|
|
return;
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbInHideFocus = sal_True;
|
2007-07-05 07:43:42 +00:00
|
|
|
|
|
|
|
// native themeing can suggest not to use focus rects
|
|
|
|
if( ! ( mpWindowImpl->mbUseNativeFocus &&
|
|
|
|
IsNativeWidgetEnabled() ) )
|
|
|
|
{
|
|
|
|
if ( !mpWindowImpl->mbFocusVisible )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbInHideFocus = sal_False;
|
2007-07-05 07:43:42 +00:00
|
|
|
return;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2007-07-05 07:43:42 +00:00
|
|
|
if ( !mpWindowImpl->mbInPaint )
|
|
|
|
ImplInvertFocus( *(ImplGetWinData()->mpFocusRect) );
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbFocusVisible = sal_False;
|
2007-07-05 07:43:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( mpWindowImpl->mbNativeFocusVisible )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbNativeFocusVisible = sal_False;
|
2007-07-05 07:43:42 +00:00
|
|
|
if ( !mpWindowImpl->mbInPaint )
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbInHideFocus = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::Invert( const Rectangle& rRect, sal_uInt16 nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
if ( !IsDeviceOutputNecessary() )
|
|
|
|
return;
|
|
|
|
|
|
|
|
Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
|
|
|
|
|
|
|
|
if ( aRect.IsEmpty() )
|
|
|
|
return;
|
|
|
|
aRect.Justify();
|
|
|
|
|
|
|
|
// we need a graphics
|
|
|
|
if ( !mpGraphics )
|
|
|
|
{
|
|
|
|
if ( !ImplGetGraphics() )
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( mbInitClipRegion )
|
|
|
|
ImplInitClipRegion();
|
|
|
|
|
|
|
|
if ( mbOutputClipped )
|
|
|
|
return;
|
|
|
|
|
|
|
|
SalInvert nSalFlags = 0;
|
|
|
|
if ( nFlags & INVERT_HIGHLIGHT )
|
|
|
|
nSalFlags |= SAL_INVERT_HIGHLIGHT;
|
|
|
|
if ( nFlags & INVERT_50 )
|
|
|
|
nSalFlags |= SAL_INVERT_50;
|
2002-08-29 14:42:38 +00:00
|
|
|
mpGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), nSalFlags, this );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::Invert( const Polygon& rPoly, sal_uInt16 nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
if ( !IsDeviceOutputNecessary() )
|
|
|
|
return;
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nPoints = rPoly.GetSize();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( nPoints < 2 )
|
|
|
|
return;
|
|
|
|
|
|
|
|
Polygon aPoly( ImplLogicToDevicePixel( rPoly ) );
|
|
|
|
|
|
|
|
// we need a graphics
|
|
|
|
if ( !mpGraphics )
|
|
|
|
{
|
|
|
|
if ( !ImplGetGraphics() )
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( mbInitClipRegion )
|
|
|
|
ImplInitClipRegion();
|
|
|
|
|
|
|
|
if ( mbOutputClipped )
|
|
|
|
return;
|
|
|
|
|
|
|
|
SalInvert nSalFlags = 0;
|
|
|
|
if ( nFlags & INVERT_HIGHLIGHT )
|
|
|
|
nSalFlags |= SAL_INVERT_HIGHLIGHT;
|
|
|
|
if ( nFlags & INVERT_50 )
|
|
|
|
nSalFlags |= SAL_INVERT_50;
|
2003-03-27 16:59:30 +00:00
|
|
|
const SalPoint* pPtAry = (const SalPoint*)aPoly.GetConstPointAry();
|
2002-08-29 14:42:38 +00:00
|
|
|
mpGraphics->Invert( nPoints, pPtAry, nSalFlags, this );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::ShowTracking( const Rectangle& rRect, sal_uInt16 nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
ImplWinData* pWinData = ImplGetWinData();
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( !mpWindowImpl->mbInPaint || !(nFlags & SHOWTRACK_WINDOW) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mbTrackVisible )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( (*(pWinData->mpTrackRect) == rRect) &&
|
|
|
|
(pWinData->mnTrackFlags == nFlags) )
|
|
|
|
return;
|
|
|
|
|
|
|
|
InvertTracking( *(pWinData->mpTrackRect), pWinData->mnTrackFlags );
|
|
|
|
}
|
|
|
|
|
|
|
|
InvertTracking( rRect, nFlags );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !pWinData->mpTrackRect )
|
|
|
|
pWinData->mpTrackRect = new Rectangle( rRect );
|
|
|
|
else
|
|
|
|
*(pWinData->mpTrackRect) = rRect;
|
|
|
|
pWinData->mnTrackFlags = nFlags;
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbTrackVisible = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::HideTracking()
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mbTrackVisible )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
ImplWinData* pWinData = ImplGetWinData();
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( !mpWindowImpl->mbInPaint || !(pWinData->mnTrackFlags & SHOWTRACK_WINDOW) )
|
2000-09-18 16:07:07 +00:00
|
|
|
InvertTracking( *(pWinData->mpTrackRect), pWinData->mnTrackFlags );
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbTrackVisible = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
|
|
|
|
|
|
|
|
if ( aRect.IsEmpty() )
|
|
|
|
return;
|
|
|
|
aRect.Justify();
|
|
|
|
|
|
|
|
SalGraphics* pGraphics;
|
|
|
|
|
|
|
|
if ( nFlags & SHOWTRACK_WINDOW )
|
|
|
|
{
|
|
|
|
if ( !IsDeviceOutputNecessary() )
|
|
|
|
return;
|
|
|
|
|
|
|
|
// we need a graphics
|
|
|
|
if ( !mpGraphics )
|
|
|
|
{
|
|
|
|
if ( !ImplGetGraphics() )
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( mbInitClipRegion )
|
|
|
|
ImplInitClipRegion();
|
|
|
|
|
|
|
|
if ( mbOutputClipped )
|
|
|
|
return;
|
|
|
|
|
|
|
|
pGraphics = mpGraphics;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pGraphics = ImplGetFrameGraphics();
|
|
|
|
|
|
|
|
if ( nFlags & SHOWTRACK_CLIP )
|
|
|
|
{
|
|
|
|
Point aPoint( mnOutOffX, mnOutOffY );
|
|
|
|
Region aRegion( Rectangle( aPoint,
|
|
|
|
Size( mnOutWidth, mnOutHeight ) ) );
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplClipBoundaries( aRegion, sal_False, sal_False );
|
2008-06-13 07:54:20 +00:00
|
|
|
ImplSelectClipRegion( aRegion, pGraphics );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nStyle = nFlags & SHOWTRACK_STYLE;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( nStyle == SHOWTRACK_OBJECT )
|
2002-08-29 14:42:38 +00:00
|
|
|
pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SAL_INVERT_TRACKFRAME, this );
|
2000-09-18 16:07:07 +00:00
|
|
|
else if ( nStyle == SHOWTRACK_SPLIT )
|
2002-08-29 14:42:38 +00:00
|
|
|
pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SAL_INVERT_50, this );
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
long nBorder = 1;
|
|
|
|
if ( nStyle == SHOWTRACK_BIG )
|
2004-07-06 12:50:18 +00:00
|
|
|
nBorder = 5;
|
2002-08-29 14:42:38 +00:00
|
|
|
pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), nBorder, SAL_INVERT_50, this );
|
|
|
|
pGraphics->Invert( aRect.Left(), aRect.Bottom()-nBorder+1, aRect.GetWidth(), nBorder, SAL_INVERT_50, this );
|
|
|
|
pGraphics->Invert( aRect.Left(), aRect.Top()+nBorder, nBorder, aRect.GetHeight()-(nBorder*2), SAL_INVERT_50, this );
|
|
|
|
pGraphics->Invert( aRect.Right()-nBorder+1, aRect.Top()+nBorder, nBorder, aRect.GetHeight()-(nBorder*2), SAL_INVERT_50, this );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nPoints = rPoly.GetSize();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( nPoints < 2 )
|
|
|
|
return;
|
|
|
|
|
|
|
|
Polygon aPoly( ImplLogicToDevicePixel( rPoly ) );
|
|
|
|
|
|
|
|
SalGraphics* pGraphics;
|
|
|
|
|
|
|
|
if ( nFlags & SHOWTRACK_WINDOW )
|
|
|
|
{
|
|
|
|
if ( !IsDeviceOutputNecessary() )
|
|
|
|
return;
|
|
|
|
|
|
|
|
// we need a graphics
|
|
|
|
if ( !mpGraphics )
|
|
|
|
{
|
|
|
|
if ( !ImplGetGraphics() )
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( mbInitClipRegion )
|
|
|
|
ImplInitClipRegion();
|
|
|
|
|
|
|
|
if ( mbOutputClipped )
|
|
|
|
return;
|
|
|
|
|
|
|
|
pGraphics = mpGraphics;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pGraphics = ImplGetFrameGraphics();
|
|
|
|
|
|
|
|
if ( nFlags & SHOWTRACK_CLIP )
|
|
|
|
{
|
|
|
|
Point aPoint( mnOutOffX, mnOutOffY );
|
|
|
|
Region aRegion( Rectangle( aPoint,
|
|
|
|
Size( mnOutWidth, mnOutHeight ) ) );
|
2010-09-29 15:46:40 +08:00
|
|
|
ImplClipBoundaries( aRegion, sal_False, sal_False );
|
2008-06-13 07:54:20 +00:00
|
|
|
ImplSelectClipRegion( aRegion, pGraphics );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-03-27 16:59:30 +00:00
|
|
|
const SalPoint* pPtAry = (const SalPoint*)aPoly.GetConstPointAry();
|
2002-08-29 14:42:38 +00:00
|
|
|
pGraphics->Invert( nPoints, pPtAry, SAL_INVERT_TRACKFRAME, this );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
IMPL_LINK( Window, ImplTrackTimerHdl, Timer*, pTimer )
|
|
|
|
{
|
|
|
|
ImplSVData* pSVData = ImplGetSVData();
|
|
|
|
|
|
|
|
// Bei Button-Repeat muessen wir den Timeout umsetzen
|
|
|
|
if ( pSVData->maWinData.mnTrackFlags & STARTTRACK_BUTTONREPEAT )
|
|
|
|
pTimer->SetTimeout( GetSettings().GetMouseSettings().GetButtonRepeat() );
|
|
|
|
|
|
|
|
// Tracking-Event erzeugen
|
2005-01-13 17:06:36 +00:00
|
|
|
Point aMousePos( mpWindowImpl->mpFrameData->mnLastMouseX, mpWindowImpl->mpFrameData->mnLastMouseY );
|
2008-12-16 13:30:53 +00:00
|
|
|
if( ImplIsAntiparallel() )
|
2002-10-16 15:50:04 +00:00
|
|
|
{
|
|
|
|
// - RTL - re-mirror frame pos at pChild
|
|
|
|
ImplReMirror( aMousePos );
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
MouseEvent aMEvt( ImplFrameToOutput( aMousePos ),
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpFrameData->mnClickCount, 0,
|
|
|
|
mpWindowImpl->mpFrameData->mnMouseCode, mpWindowImpl->mpFrameData->mnMouseCode );
|
2000-09-18 16:07:07 +00:00
|
|
|
TrackingEvent aTEvt( aMEvt, TRACKING_REPEAT );
|
|
|
|
Tracking( aTEvt );
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::StartTracking( sal_uInt16 nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
ImplSVData* pSVData = ImplGetSVData();
|
|
|
|
|
|
|
|
if ( pSVData->maWinData.mpTrackWin != this )
|
|
|
|
{
|
|
|
|
if ( pSVData->maWinData.mpTrackWin )
|
|
|
|
pSVData->maWinData.mpTrackWin->EndTracking( ENDTRACK_CANCEL );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( nFlags & (STARTTRACK_SCROLLREPEAT | STARTTRACK_BUTTONREPEAT) )
|
|
|
|
{
|
|
|
|
pSVData->maWinData.mpTrackTimer = new AutoTimer;
|
|
|
|
|
|
|
|
if ( nFlags & STARTTRACK_SCROLLREPEAT )
|
|
|
|
pSVData->maWinData.mpTrackTimer->SetTimeout( GetSettings().GetMouseSettings().GetScrollRepeat() );
|
|
|
|
else
|
|
|
|
pSVData->maWinData.mpTrackTimer->SetTimeout( GetSettings().GetMouseSettings().GetButtonStartRepeat() );
|
|
|
|
pSVData->maWinData.mpTrackTimer->SetTimeoutHdl( LINK( this, Window, ImplTrackTimerHdl ) );
|
|
|
|
pSVData->maWinData.mpTrackTimer->Start();
|
|
|
|
}
|
|
|
|
|
|
|
|
pSVData->maWinData.mpTrackWin = this;
|
|
|
|
pSVData->maWinData.mnTrackFlags = nFlags;
|
|
|
|
CaptureMouse();
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::EndTracking( sal_uInt16 nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
ImplSVData* pSVData = ImplGetSVData();
|
|
|
|
|
|
|
|
if ( pSVData->maWinData.mpTrackWin == this )
|
|
|
|
{
|
2011-12-18 12:21:45 +01:00
|
|
|
// due to DbgChkThis in brackets, as the window could be destroyed
|
|
|
|
// in the handler
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
if ( pSVData->maWinData.mpTrackTimer )
|
|
|
|
{
|
|
|
|
delete pSVData->maWinData.mpTrackTimer;
|
|
|
|
pSVData->maWinData.mpTrackTimer = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
pSVData->maWinData.mpTrackWin = NULL;
|
|
|
|
pSVData->maWinData.mnTrackFlags = 0;
|
|
|
|
ReleaseMouse();
|
|
|
|
}
|
|
|
|
|
2011-12-18 12:21:45 +01:00
|
|
|
// call EndTracking if required
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( !(nFlags & ENDTRACK_DONTCALLHDL) )
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
Point aMousePos( mpWindowImpl->mpFrameData->mnLastMouseX, mpWindowImpl->mpFrameData->mnLastMouseY );
|
2008-12-16 13:30:53 +00:00
|
|
|
if( ImplIsAntiparallel() )
|
2004-02-03 10:55:39 +00:00
|
|
|
{
|
2002-12-03 13:36:25 +00:00
|
|
|
// - RTL - re-mirror frame pos at pChild
|
|
|
|
ImplReMirror( aMousePos );
|
2004-02-03 10:55:39 +00:00
|
|
|
}
|
2002-12-03 13:36:25 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
MouseEvent aMEvt( ImplFrameToOutput( aMousePos ),
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpFrameData->mnClickCount, 0,
|
|
|
|
mpWindowImpl->mpFrameData->mnMouseCode, mpWindowImpl->mpFrameData->mnMouseCode );
|
2000-09-18 16:07:07 +00:00
|
|
|
TrackingEvent aTEvt( aMEvt, nFlags | ENDTRACK_END );
|
|
|
|
Tracking( aTEvt );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsTracking() const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
return (ImplGetSVData()->maWinData.mpTrackWin == this);
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::StartAutoScroll( sal_uInt16 nFlags )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
ImplSVData* pSVData = ImplGetSVData();
|
|
|
|
|
|
|
|
if ( pSVData->maWinData.mpAutoScrollWin != this )
|
|
|
|
{
|
|
|
|
if ( pSVData->maWinData.mpAutoScrollWin )
|
|
|
|
pSVData->maWinData.mpAutoScrollWin->EndAutoScroll();
|
|
|
|
}
|
|
|
|
|
|
|
|
pSVData->maWinData.mpAutoScrollWin = this;
|
|
|
|
pSVData->maWinData.mnAutoScrollFlags = nFlags;
|
|
|
|
pSVData->maAppData.mpWheelWindow = new ImplWheelWindow( this );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::EndAutoScroll()
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
ImplSVData* pSVData = ImplGetSVData();
|
|
|
|
|
|
|
|
if ( pSVData->maWinData.mpAutoScrollWin == this )
|
|
|
|
{
|
|
|
|
pSVData->maWinData.mpAutoScrollWin = NULL;
|
|
|
|
pSVData->maWinData.mnAutoScrollFlags = 0;
|
2007-04-16 13:22:47 +00:00
|
|
|
pSVData->maAppData.mpWheelWindow->ImplStop();
|
|
|
|
pSVData->maAppData.mpWheelWindow->doLazyDelete();
|
2000-09-18 16:07:07 +00:00
|
|
|
pSVData->maAppData.mpWheelWindow = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::SaveBackground( const Point& rPos, const Size& rSize,
|
|
|
|
const Point& rDestOff, VirtualDevice& rSaveDevice )
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mpPaintRegion )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
Region aClip( *mpWindowImpl->mpPaintRegion );
|
2000-09-18 16:07:07 +00:00
|
|
|
const Point aPixPos( LogicToPixel( rPos ) );
|
|
|
|
|
|
|
|
aClip.Move( -mnOutOffX, -mnOutOffY );
|
|
|
|
aClip.Intersect( Rectangle( aPixPos, LogicToPixel( rSize ) ) );
|
|
|
|
|
|
|
|
if ( !aClip.IsEmpty() )
|
|
|
|
{
|
|
|
|
const Region aOldClip( rSaveDevice.GetClipRegion() );
|
|
|
|
const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) );
|
2010-09-29 15:46:40 +08:00
|
|
|
const sal_Bool bMap = rSaveDevice.IsMapModeEnabled();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// move clip region to have the same distance to DestOffset
|
|
|
|
aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - aPixPos.Y() );
|
|
|
|
|
|
|
|
// set pixel clip region
|
2010-09-29 15:46:40 +08:00
|
|
|
rSaveDevice.EnableMapMode( sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
rSaveDevice.SetClipRegion( aClip );
|
|
|
|
rSaveDevice.EnableMapMode( bMap );
|
|
|
|
rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
|
|
|
|
rSaveDevice.SetClipRegion( aOldClip );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2005-10-06 09:58:08 +00:00
|
|
|
sal_uIntPtr Window::SaveFocus()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
ImplSVData* pSVData = ImplGetSVData();
|
|
|
|
if ( pSVData->maWinData.mpFocusWin )
|
|
|
|
{
|
|
|
|
ImplFocusDelData* pDelData = new ImplFocusDelData;
|
|
|
|
pSVData->maWinData.mpFocusWin->ImplAddDel( pDelData );
|
|
|
|
pDelData->mpFocusWin = pSVData->maWinData.mpFocusWin;
|
2005-10-06 09:58:08 +00:00
|
|
|
return (sal_uIntPtr)(void*)pDelData;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( !nSaveId )
|
2010-09-29 15:46:40 +08:00
|
|
|
return sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bOK = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
ImplFocusDelData* pDelData = (ImplFocusDelData*)(void*)nSaveId;
|
2012-07-16 12:18:02 +03:00
|
|
|
if ( !pDelData->IsDead() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
pDelData->mpFocusWin->ImplRemoveDel( pDelData );
|
|
|
|
if ( bRestore )
|
|
|
|
pDelData->mpFocusWin->GrabFocus();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
bOK = !bRestore;
|
|
|
|
delete pDelData;
|
|
|
|
return bOK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::SetZoom( const Fraction& rZoom )
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->maZoom != rZoom )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->maZoom = rZoom;
|
2000-09-18 16:07:07 +00:00
|
|
|
StateChanged( STATE_CHANGE_ZOOM );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
inline long WinFloatRound( double fVal )
|
|
|
|
{
|
|
|
|
return( fVal > 0.0 ? (long) ( fVal + 0.5 ) : -(long) ( -fVal + 0.5 ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::SetZoomedPointFont( const Font& rFont )
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
const Fraction& rZoom = GetZoom();
|
|
|
|
if ( rZoom.GetNumerator() != rZoom.GetDenominator() )
|
|
|
|
{
|
|
|
|
Font aFont( rFont );
|
|
|
|
Size aSize = aFont.GetSize();
|
|
|
|
double n = (double)aSize.Width();
|
|
|
|
n *= (double)rZoom.GetNumerator();
|
|
|
|
n /= (double)rZoom.GetDenominator();
|
|
|
|
aSize.Width() = WinFloatRound( n );
|
|
|
|
n = (double)aSize.Height();
|
|
|
|
n *= (double)rZoom.GetNumerator();
|
|
|
|
n /= (double)rZoom.GetDenominator();
|
|
|
|
aSize.Height() = WinFloatRound( n );
|
|
|
|
aFont.SetSize( aSize );
|
|
|
|
SetPointFont( aFont );
|
|
|
|
|
2011-12-18 12:21:45 +01:00
|
|
|
// Use another font if the representation is to be scaled,
|
|
|
|
// and the actual font is not scalable
|
2000-09-18 16:07:07 +00:00
|
|
|
FontMetric aMetric = GetFontMetric();
|
2013-04-11 00:21:40 -03:00
|
|
|
long nFontDiff = std::abs( GetFont().GetSize().Height()-aMetric.GetSize().Height() );
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( (aMetric.GetType() == TYPE_RASTER) && (nFontDiff >= 2) )
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nType;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( aMetric.GetPitch() == PITCH_FIXED )
|
2001-06-21 20:01:12 +00:00
|
|
|
nType = DEFAULTFONT_FIXED;
|
2001-04-06 11:48:42 +00:00
|
|
|
else
|
2001-06-21 20:01:12 +00:00
|
|
|
nType = DEFAULTFONT_UI_SANS;
|
2012-11-22 12:26:52 +01:00
|
|
|
Font aTempFont = GetDefaultFont( nType, GetSettings().GetLanguageTag().getLanguageType(), 0 );
|
2001-04-06 11:48:42 +00:00
|
|
|
aFont.SetName( aTempFont.GetName() );
|
|
|
|
SetPointFont( aFont );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
SetPointFont( rFont );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
long Window::CalcZoom( long nCalc ) const
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
const Fraction& rZoom = GetZoom();
|
|
|
|
if ( rZoom.GetNumerator() != rZoom.GetDenominator() )
|
|
|
|
{
|
|
|
|
double n = (double)nCalc;
|
|
|
|
n *= (double)rZoom.GetNumerator();
|
|
|
|
n /= (double)rZoom.GetDenominator();
|
|
|
|
nCalc = WinFloatRound( n );
|
|
|
|
}
|
|
|
|
return nCalc;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::SetControlFont()
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mpControlFont )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
delete mpWindowImpl->mpControlFont;
|
|
|
|
mpWindowImpl->mpControlFont = NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
StateChanged( STATE_CHANGE_CONTROLFONT );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::SetControlFont( const Font& rFont )
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
if ( rFont == Font() )
|
|
|
|
{
|
|
|
|
SetControlFont();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mpControlFont )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( *mpWindowImpl->mpControlFont == rFont )
|
2000-09-18 16:07:07 +00:00
|
|
|
return;
|
2005-01-13 17:06:36 +00:00
|
|
|
*mpWindowImpl->mpControlFont = rFont;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->mpControlFont = new Font( rFont );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
StateChanged( STATE_CHANGE_CONTROLFONT );
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
Font Window::GetControlFont() const
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mpControlFont )
|
|
|
|
return *mpWindowImpl->mpControlFont;
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
Font aFont;
|
|
|
|
return aFont;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::SetControlForeground()
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mbControlForeground )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT );
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbControlForeground = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::SetControlForeground( const Color& rColor )
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
if ( rColor.GetTransparency() )
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mbControlForeground )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT );
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbControlForeground = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->maControlForeground != rColor )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->maControlForeground = rColor;
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbControlForeground = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::SetControlBackground()
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mbControlBackground )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT );
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbControlBackground = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
StateChanged( STATE_CHANGE_CONTROLBACKGROUND );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
void Window::SetControlBackground( const Color& rColor )
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
if ( rColor.GetTransparency() )
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->mbControlBackground )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT );
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbControlBackground = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
StateChanged( STATE_CHANGE_CONTROLBACKGROUND );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
if ( mpWindowImpl->maControlBackground != rColor )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
mpWindowImpl->maControlBackground = rColor;
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbControlBackground = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
StateChanged( STATE_CHANGE_CONTROLBACKGROUND );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
Size Window::CalcWindowSize( const Size& rOutSz ) const
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
Size aSz = rOutSz;
|
2005-01-13 17:06:36 +00:00
|
|
|
aSz.Width() += mpWindowImpl->mnLeftBorder+mpWindowImpl->mnRightBorder;
|
|
|
|
aSz.Height() += mpWindowImpl->mnTopBorder+mpWindowImpl->mnBottomBorder;
|
2000-09-18 16:07:07 +00:00
|
|
|
return aSz;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
Size Window::CalcOutputSize( const Size& rWinSz ) const
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
Size aSz = rWinSz;
|
2005-01-13 17:06:36 +00:00
|
|
|
aSz.Width() -= mpWindowImpl->mnLeftBorder+mpWindowImpl->mnRightBorder;
|
|
|
|
aSz.Height() -= mpWindowImpl->mnTopBorder+mpWindowImpl->mnBottomBorder;
|
2000-09-18 16:07:07 +00:00
|
|
|
return aSz;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
Font Window::GetDrawPixelFont( OutputDevice* pDev ) const
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
Font aFont = GetPointFont();
|
|
|
|
Size aFontSize = aFont.GetSize();
|
|
|
|
MapMode aPtMapMode( MAP_POINT );
|
|
|
|
aFontSize = pDev->LogicToPixel( aFontSize, aPtMapMode );
|
|
|
|
aFont.SetSize( aFontSize );
|
|
|
|
return aFont;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
long Window::GetDrawPixel( OutputDevice* pDev, long nPixels ) const
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
long nP = nPixels;
|
|
|
|
if ( pDev->GetOutDevType() != OUTDEV_WINDOW )
|
|
|
|
{
|
|
|
|
MapMode aMap( MAP_100TH_MM );
|
|
|
|
Size aSz( nP, 0 );
|
|
|
|
aSz = PixelToLogic( aSz, aMap );
|
|
|
|
aSz = pDev->LogicToPixel( aSz, aMap );
|
|
|
|
nP = aSz.Width();
|
|
|
|
}
|
|
|
|
return nP;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
2013-09-01 19:22:23 +03:00
|
|
|
static void lcl_HandleScrollHelper( ScrollBar* pScrl, long nN, bool isMultiplyByLineSize )
|
|
|
|
{
|
|
|
|
if ( pScrl && nN && pScrl->IsEnabled() && pScrl->IsInputEnabled() && ! pScrl->IsInModalMode() )
|
|
|
|
{
|
|
|
|
long nNewPos = pScrl->GetThumbPos();
|
|
|
|
|
|
|
|
if ( nN == -LONG_MAX )
|
|
|
|
nNewPos += pScrl->GetPageSize();
|
|
|
|
else if ( nN == LONG_MAX )
|
|
|
|
nNewPos -= pScrl->GetPageSize();
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// allowing both chunked and continuous scrolling
|
|
|
|
if(isMultiplyByLineSize){
|
|
|
|
nN*=pScrl->GetLineSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
const double fVal = (double)(nNewPos - nN);
|
|
|
|
|
|
|
|
if ( fVal < LONG_MIN )
|
|
|
|
nNewPos = LONG_MIN;
|
|
|
|
else if ( fVal > LONG_MAX )
|
|
|
|
nNewPos = LONG_MAX;
|
|
|
|
else
|
|
|
|
nNewPos = (long)fVal;
|
|
|
|
}
|
|
|
|
|
|
|
|
pScrl->DoScroll( nNewPos );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd,
|
2000-09-18 16:07:07 +00:00
|
|
|
ScrollBar* pHScrl, ScrollBar* pVScrl )
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool bRet = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( pHScrl || pVScrl )
|
|
|
|
{
|
|
|
|
switch( rCmd.GetCommand() )
|
|
|
|
{
|
|
|
|
case COMMAND_STARTAUTOSCROLL:
|
|
|
|
{
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 nFlags = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( pHScrl )
|
|
|
|
{
|
|
|
|
if ( (pHScrl->GetVisibleSize() < pHScrl->GetRangeMax()) &&
|
2007-11-26 14:15:39 +00:00
|
|
|
pHScrl->IsEnabled() && pHScrl->IsInputEnabled() && ! pHScrl->IsInModalMode() )
|
2000-09-18 16:07:07 +00:00
|
|
|
nFlags |= AUTOSCROLL_HORZ;
|
|
|
|
}
|
|
|
|
if ( pVScrl )
|
|
|
|
{
|
|
|
|
if ( (pVScrl->GetVisibleSize() < pVScrl->GetRangeMax()) &&
|
2007-11-26 14:15:39 +00:00
|
|
|
pVScrl->IsEnabled() && pVScrl->IsInputEnabled() && ! pVScrl->IsInModalMode() )
|
2000-09-18 16:07:07 +00:00
|
|
|
nFlags |= AUTOSCROLL_VERT;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( nFlags )
|
|
|
|
{
|
|
|
|
StartAutoScroll( nFlags );
|
2010-09-29 15:46:40 +08:00
|
|
|
bRet = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case COMMAND_WHEEL:
|
|
|
|
{
|
|
|
|
const CommandWheelData* pData = rCmd.GetWheelData();
|
|
|
|
|
2006-03-22 09:21:39 +00:00
|
|
|
if ( pData && (COMMAND_WHEEL_SCROLL == pData->GetMode()) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-09-01 19:22:23 +03:00
|
|
|
if (!pData->IsDeltaPixel())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2013-09-01 19:22:23 +03:00
|
|
|
sal_uLong nScrollLines = pData->GetScrollLines();
|
|
|
|
long nLines;
|
|
|
|
if ( nScrollLines == COMMAND_WHEEL_PAGESCROLL )
|
|
|
|
{
|
|
|
|
if ( pData->GetDelta() < 0 )
|
|
|
|
nLines = -LONG_MAX;
|
|
|
|
else
|
|
|
|
nLines = LONG_MAX;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
2013-09-01 19:22:23 +03:00
|
|
|
nLines = pData->GetNotchDelta() * (long)nScrollLines;
|
|
|
|
if ( nLines )
|
|
|
|
{
|
|
|
|
ImplHandleScroll( NULL,
|
2006-03-22 09:21:39 +00:00
|
|
|
0L,
|
|
|
|
pData->IsHorz() ? pHScrl : pVScrl,
|
|
|
|
nLines );
|
2013-09-01 19:22:23 +03:00
|
|
|
bRet = sal_True;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Mobile / touch scrolling section
|
|
|
|
const Point & deltaPoint = rCmd.GetMousePosPixel();
|
|
|
|
|
|
|
|
double deltaXInPixels = double(deltaPoint.X());
|
|
|
|
double deltaYInPixels = double(deltaPoint.Y());
|
|
|
|
|
|
|
|
double visSizeX = double(pHScrl->GetVisibleSize());
|
|
|
|
double visSizeY = double(pVScrl->GetVisibleSize());
|
|
|
|
|
|
|
|
Size winSize = this->GetOutputSizePixel();
|
|
|
|
|
|
|
|
double ratioX = deltaXInPixels / double(winSize.getWidth());
|
|
|
|
double ratioY = deltaYInPixels / double(winSize.getHeight());
|
|
|
|
|
|
|
|
long deltaXInLogic = long(visSizeX * ratioX);
|
|
|
|
long deltaYInLogic = long(visSizeY * ratioY);
|
|
|
|
|
|
|
|
// Touch need to work by pixels. Did not apply this to
|
|
|
|
// Android, as android code may require adaptations
|
|
|
|
// to work with this scrolling code
|
|
|
|
#ifndef IOS
|
|
|
|
long lineSizeX = pHScrl->GetLineSize();
|
|
|
|
long lineSizeY = pVScrl->GetLineSize();
|
|
|
|
|
|
|
|
deltaXInLogic /= lineSizeX;
|
|
|
|
deltaYInLogic /= lineSizeY;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if ( deltaXInLogic || deltaYInLogic )
|
|
|
|
{
|
|
|
|
#ifndef IOS
|
|
|
|
bool isMultiplyByLineSize = true;
|
|
|
|
#else
|
|
|
|
bool isMultiplyByLineSize = false;
|
|
|
|
#endif
|
|
|
|
lcl_HandleScrollHelper( pHScrl, deltaXInLogic, isMultiplyByLineSize );
|
|
|
|
lcl_HandleScrollHelper( pVScrl, deltaYInLogic, isMultiplyByLineSize );
|
|
|
|
|
|
|
|
bRet = sal_True;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case COMMAND_AUTOSCROLL:
|
|
|
|
{
|
|
|
|
const CommandScrollData* pData = rCmd.GetAutoScrollData();
|
|
|
|
if ( pData && (pData->GetDeltaX() || pData->GetDeltaY()) )
|
|
|
|
{
|
|
|
|
ImplHandleScroll( pHScrl, pData->GetDeltaX(),
|
|
|
|
pVScrl, pData->GetDeltaY() );
|
2010-09-29 15:46:40 +08:00
|
|
|
bRet = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-21 18:16:12 +03:00
|
|
|
// Note that when called for COMMAND_WHEEL above, despite its name,
|
|
|
|
// pVScrl isn't necessarily the vertical scroll bar. Depending on
|
|
|
|
// whether the scroll is horizontal or vertical, it is either the
|
|
|
|
// horizontal or vertical scroll bar. nY is correspondingly either
|
|
|
|
// the horizontal or vertical scroll amount.
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-04-21 18:16:12 +03:00
|
|
|
void Window::ImplHandleScroll( ScrollBar* pHScrl, long nX,
|
|
|
|
ScrollBar* pVScrl, long nY )
|
|
|
|
{
|
2013-09-01 19:22:23 +03:00
|
|
|
lcl_HandleScrollHelper( pHScrl, nX, true );
|
|
|
|
lcl_HandleScrollHelper( pVScrl, nY, true );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2004-07-06 12:50:18 +00:00
|
|
|
|
|
|
|
DockingManager* Window::GetDockingManager()
|
|
|
|
{
|
|
|
|
return ImplGetDockingManager();
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::EnableDocking( sal_Bool bEnable )
|
2004-07-06 12:50:18 +00:00
|
|
|
{
|
|
|
|
// update list of dockable windows
|
|
|
|
if( bEnable )
|
|
|
|
ImplGetDockingManager()->AddWindow( this );
|
|
|
|
else
|
|
|
|
ImplGetDockingManager()->RemoveWindow( this );
|
|
|
|
}
|
2004-09-09 15:23:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
// retrieves the list of owner draw decorated windows for this window hiearchy
|
|
|
|
::std::vector<Window *>& Window::ImplGetOwnerDrawList()
|
|
|
|
{
|
2005-01-13 17:06:36 +00:00
|
|
|
return ImplGetTopmostFrameWindow()->mpWindowImpl->mpFrameData->maOwnerDrawList;
|
2004-09-09 15:23:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Window* Window::ImplGetTopmostFrameWindow()
|
|
|
|
{
|
|
|
|
Window *pTopmostParent = this;
|
|
|
|
while( pTopmostParent->ImplGetParent() )
|
|
|
|
pTopmostParent = pTopmostParent->ImplGetParent();
|
2005-01-13 17:06:36 +00:00
|
|
|
return pTopmostParent->mpWindowImpl->mpFrameWindow;
|
2004-09-09 15:23:23 +00:00
|
|
|
}
|
|
|
|
|
2012-10-25 12:04:13 +01:00
|
|
|
void Window::SetHelpId( const OString& rHelpId )
|
CWS-TOOLING: integrate CWS frmdlg
2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05
2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF:
Add GAMMA, CHISQDIST, CHISQINV.
Make the 'cumulative' parameter of GAMMADIST optional.
Adapt the domain of CHIDIST to allow negative x.
Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV.
Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and
ODFF if omitted, for backwards compatibility.
2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37)
2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula
2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula
2008-12-12 13:22:00 +0100 msc r265413 : #i97089#
2008-12-12 13:20:25 +0100 msc r265412 : #i97089#
2008-12-12 12:35:12 +0100 msc r265406 : #i97089#
2008-12-12 12:34:16 +0100 msc r265405 : #i97089#
2008-12-12 12:33:05 +0100 msc r265404 : #i97089#
2008-12-12 12:31:11 +0100 msc r265403 : #i97089#
2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG
2008-12-08 11:50:17 +0100 oj r264980 : some small changes
2008-12-05 12:57:57 +0100 oj r264902 : eof changed
2008-12-05 12:56:46 +0100 oj r264901 : eof changed
2008-12-05 12:28:47 +0100 oj r264899 : wrong var used
2008-12-05 10:08:57 +0100 oj r264890 : token order reversed
2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage
2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id
2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button
2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button
2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends
2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends
2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends
2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set
2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category
2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids
2008-12-01 14:36:43 +0100 oj r264604 : use temp var
2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula
2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula
2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc
2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select
2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void
2008-11-28 11:16:48 +0100 oj r264532 : add help ids
2008-11-28 10:16:56 +0100 oj r264529 : set help id
2008-11-28 10:16:43 +0100 oj r264528 : set help id
2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes
2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug
2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them
2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code
2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code
2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline
2008-11-21 12:35:27 +0100 oj r264124 : hold symbols
2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost
2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove
2008-11-19 20:37:41 +0100 oj r264021 : removed unused var
2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token
2008-11-19 10:59:47 +0100 oj r263967 : deleted
2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files
2008-11-18 15:27:36 +0100 oj r263777 : unused para removed
2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg
2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting
2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef
2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling
2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file
2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula
2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction
2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35
2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35
2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35
2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35
2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35
2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35
2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35
2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35
2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35
2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35
2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved
2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target
2008-10-07 10:08:39 +0200 oj r262077 : copy
2008-10-07 09:45:31 +0200 oj r262076 : #i94535#
2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class
2008-10-07 09:43:21 +0200 oj r262074 : moved to formula
2008-10-07 09:41:51 +0200 oj r262073 : new images
2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula
2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula
2008-10-02 08:08:54 +0200 oj r262023 : #i94535#
2008-10-02 08:06:28 +0200 oj r262022 : #i94535#
2008-10-02 08:05:52 +0200 oj r262021 : #i94535#
2008-10-01 17:15:29 +0200 oj r262014 : #i94535#
2008-10-01 17:12:40 +0200 oj r262013 : new module formula
2008-10-01 17:04:55 +0200 oj r262012 : #i94535#
2008-10-01 16:49:03 +0200 oj r262010 : #i94535#
2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
|
|
|
{
|
2010-06-04 13:46:22 +02:00
|
|
|
mpWindowImpl->maHelpId = rHelpId;
|
CWS-TOOLING: integrate CWS frmdlg
2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05
2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF:
Add GAMMA, CHISQDIST, CHISQINV.
Make the 'cumulative' parameter of GAMMADIST optional.
Adapt the domain of CHIDIST to allow negative x.
Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV.
Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and
ODFF if omitted, for backwards compatibility.
2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37)
2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula
2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula
2008-12-12 13:22:00 +0100 msc r265413 : #i97089#
2008-12-12 13:20:25 +0100 msc r265412 : #i97089#
2008-12-12 12:35:12 +0100 msc r265406 : #i97089#
2008-12-12 12:34:16 +0100 msc r265405 : #i97089#
2008-12-12 12:33:05 +0100 msc r265404 : #i97089#
2008-12-12 12:31:11 +0100 msc r265403 : #i97089#
2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG
2008-12-08 11:50:17 +0100 oj r264980 : some small changes
2008-12-05 12:57:57 +0100 oj r264902 : eof changed
2008-12-05 12:56:46 +0100 oj r264901 : eof changed
2008-12-05 12:28:47 +0100 oj r264899 : wrong var used
2008-12-05 10:08:57 +0100 oj r264890 : token order reversed
2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage
2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id
2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button
2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button
2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends
2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends
2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends
2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set
2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category
2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids
2008-12-01 14:36:43 +0100 oj r264604 : use temp var
2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula
2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula
2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc
2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select
2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void
2008-11-28 11:16:48 +0100 oj r264532 : add help ids
2008-11-28 10:16:56 +0100 oj r264529 : set help id
2008-11-28 10:16:43 +0100 oj r264528 : set help id
2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes
2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug
2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them
2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code
2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code
2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline
2008-11-21 12:35:27 +0100 oj r264124 : hold symbols
2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost
2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove
2008-11-19 20:37:41 +0100 oj r264021 : removed unused var
2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token
2008-11-19 10:59:47 +0100 oj r263967 : deleted
2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files
2008-11-18 15:27:36 +0100 oj r263777 : unused para removed
2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg
2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting
2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef
2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling
2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file
2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula
2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction
2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35
2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35
2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35
2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35
2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35
2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35
2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35
2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35
2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35
2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35
2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved
2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target
2008-10-07 10:08:39 +0200 oj r262077 : copy
2008-10-07 09:45:31 +0200 oj r262076 : #i94535#
2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class
2008-10-07 09:43:21 +0200 oj r262074 : moved to formula
2008-10-07 09:41:51 +0200 oj r262073 : new images
2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula
2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula
2008-10-02 08:08:54 +0200 oj r262023 : #i94535#
2008-10-02 08:06:28 +0200 oj r262022 : #i94535#
2008-10-02 08:05:52 +0200 oj r262021 : #i94535#
2008-10-01 17:15:29 +0200 oj r262014 : #i94535#
2008-10-01 17:12:40 +0200 oj r262013 : new module formula
2008-10-01 17:04:55 +0200 oj r262012 : #i94535#
2008-10-01 16:49:03 +0200 oj r262010 : #i94535#
2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
|
|
|
}
|
|
|
|
|
2012-10-25 12:04:13 +01:00
|
|
|
const OString& Window::GetHelpId() const
|
CWS-TOOLING: integrate CWS frmdlg
2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05
2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF:
Add GAMMA, CHISQDIST, CHISQINV.
Make the 'cumulative' parameter of GAMMADIST optional.
Adapt the domain of CHIDIST to allow negative x.
Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV.
Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and
ODFF if omitted, for backwards compatibility.
2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37)
2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula
2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula
2008-12-12 13:22:00 +0100 msc r265413 : #i97089#
2008-12-12 13:20:25 +0100 msc r265412 : #i97089#
2008-12-12 12:35:12 +0100 msc r265406 : #i97089#
2008-12-12 12:34:16 +0100 msc r265405 : #i97089#
2008-12-12 12:33:05 +0100 msc r265404 : #i97089#
2008-12-12 12:31:11 +0100 msc r265403 : #i97089#
2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG
2008-12-08 11:50:17 +0100 oj r264980 : some small changes
2008-12-05 12:57:57 +0100 oj r264902 : eof changed
2008-12-05 12:56:46 +0100 oj r264901 : eof changed
2008-12-05 12:28:47 +0100 oj r264899 : wrong var used
2008-12-05 10:08:57 +0100 oj r264890 : token order reversed
2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage
2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id
2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button
2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button
2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends
2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends
2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends
2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set
2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category
2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids
2008-12-01 14:36:43 +0100 oj r264604 : use temp var
2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula
2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula
2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc
2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select
2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void
2008-11-28 11:16:48 +0100 oj r264532 : add help ids
2008-11-28 10:16:56 +0100 oj r264529 : set help id
2008-11-28 10:16:43 +0100 oj r264528 : set help id
2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes
2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug
2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them
2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code
2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code
2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline
2008-11-21 12:35:27 +0100 oj r264124 : hold symbols
2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost
2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove
2008-11-19 20:37:41 +0100 oj r264021 : removed unused var
2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token
2008-11-19 10:59:47 +0100 oj r263967 : deleted
2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files
2008-11-18 15:27:36 +0100 oj r263777 : unused para removed
2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg
2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting
2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef
2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling
2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file
2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula
2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction
2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35
2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35
2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35
2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35
2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35
2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35
2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35
2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35
2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35
2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35
2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved
2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target
2008-10-07 10:08:39 +0200 oj r262077 : copy
2008-10-07 09:45:31 +0200 oj r262076 : #i94535#
2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class
2008-10-07 09:43:21 +0200 oj r262074 : moved to formula
2008-10-07 09:41:51 +0200 oj r262073 : new images
2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula
2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula
2008-10-02 08:08:54 +0200 oj r262023 : #i94535#
2008-10-02 08:06:28 +0200 oj r262022 : #i94535#
2008-10-02 08:05:52 +0200 oj r262021 : #i94535#
2008-10-01 17:15:29 +0200 oj r262014 : #i94535#
2008-10-01 17:12:40 +0200 oj r262013 : new module formula
2008-10-01 17:04:55 +0200 oj r262012 : #i94535#
2008-10-01 16:49:03 +0200 oj r262010 : #i94535#
2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
|
|
|
{
|
2010-06-04 13:46:22 +02:00
|
|
|
return mpWindowImpl->maHelpId;
|
CWS-TOOLING: integrate CWS frmdlg
2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05
2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF:
Add GAMMA, CHISQDIST, CHISQINV.
Make the 'cumulative' parameter of GAMMADIST optional.
Adapt the domain of CHIDIST to allow negative x.
Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV.
Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and
ODFF if omitted, for backwards compatibility.
2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37)
2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula
2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula
2008-12-12 13:22:00 +0100 msc r265413 : #i97089#
2008-12-12 13:20:25 +0100 msc r265412 : #i97089#
2008-12-12 12:35:12 +0100 msc r265406 : #i97089#
2008-12-12 12:34:16 +0100 msc r265405 : #i97089#
2008-12-12 12:33:05 +0100 msc r265404 : #i97089#
2008-12-12 12:31:11 +0100 msc r265403 : #i97089#
2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG
2008-12-08 11:50:17 +0100 oj r264980 : some small changes
2008-12-05 12:57:57 +0100 oj r264902 : eof changed
2008-12-05 12:56:46 +0100 oj r264901 : eof changed
2008-12-05 12:28:47 +0100 oj r264899 : wrong var used
2008-12-05 10:08:57 +0100 oj r264890 : token order reversed
2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage
2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id
2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button
2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button
2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends
2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends
2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends
2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set
2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category
2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids
2008-12-01 14:36:43 +0100 oj r264604 : use temp var
2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula
2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula
2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc
2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select
2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void
2008-11-28 11:16:48 +0100 oj r264532 : add help ids
2008-11-28 10:16:56 +0100 oj r264529 : set help id
2008-11-28 10:16:43 +0100 oj r264528 : set help id
2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes
2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug
2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them
2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code
2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code
2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline
2008-11-21 12:35:27 +0100 oj r264124 : hold symbols
2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost
2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove
2008-11-19 20:37:41 +0100 oj r264021 : removed unused var
2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token
2008-11-19 10:59:47 +0100 oj r263967 : deleted
2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files
2008-11-18 15:27:36 +0100 oj r263777 : unused para removed
2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg
2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting
2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef
2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling
2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file
2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula
2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction
2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35
2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35
2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35
2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35
2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35
2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35
2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35
2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35
2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35
2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35
2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved
2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target
2008-10-07 10:08:39 +0200 oj r262077 : copy
2008-10-07 09:45:31 +0200 oj r262076 : #i94535#
2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class
2008-10-07 09:43:21 +0200 oj r262074 : moved to formula
2008-10-07 09:41:51 +0200 oj r262073 : new images
2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula
2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula
2008-10-02 08:08:54 +0200 oj r262023 : #i94535#
2008-10-02 08:06:28 +0200 oj r262022 : #i94535#
2008-10-02 08:05:52 +0200 oj r262021 : #i94535#
2008-10-01 17:15:29 +0200 oj r262014 : #i94535#
2008-10-01 17:12:40 +0200 oj r262013 : new module formula
2008-10-01 17:04:55 +0200 oj r262012 : #i94535#
2008-10-01 16:49:03 +0200 oj r262010 : #i94535#
2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
|
|
|
}
|
2004-09-09 15:23:23 +00:00
|
|
|
|
2012-10-25 12:04:13 +01:00
|
|
|
void Window::SetUniqueId( const OString& rUniqueId )
|
2004-09-09 15:23:23 +00:00
|
|
|
{
|
2010-06-04 13:46:22 +02:00
|
|
|
mpWindowImpl->maUniqId = rUniqueId;
|
2004-09-09 15:23:23 +00:00
|
|
|
}
|
|
|
|
|
2012-10-25 12:04:13 +01:00
|
|
|
const OString& Window::GetUniqueId() const
|
2004-09-09 15:23:23 +00:00
|
|
|
{
|
2010-06-04 13:46:22 +02:00
|
|
|
return mpWindowImpl->maUniqId;
|
2004-09-09 15:23:23 +00:00
|
|
|
}
|
|
|
|
|
2005-01-13 17:06:36 +00:00
|
|
|
// --------- old inline methods ---------------
|
|
|
|
|
|
|
|
Window* Window::ImplGetWindow()
|
|
|
|
{
|
|
|
|
if ( mpWindowImpl->mpClientWindow )
|
|
|
|
return mpWindowImpl->mpClientWindow;
|
|
|
|
else
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
ImplFrameData* Window::ImplGetFrameData()
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mpFrameData;
|
|
|
|
}
|
|
|
|
|
|
|
|
SalFrame* Window::ImplGetFrame() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mpFrame;
|
|
|
|
}
|
|
|
|
|
|
|
|
Window* Window::ImplGetParent() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mpParent;
|
|
|
|
}
|
|
|
|
|
|
|
|
Window* Window::ImplGetClientWindow() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mpClientWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
Window* Window::ImplGetBorderWindow() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mpBorderWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
Window* Window::ImplGetFirstOverlapWindow()
|
|
|
|
{
|
|
|
|
if ( mpWindowImpl->mbOverlapWin )
|
|
|
|
return this;
|
|
|
|
else
|
|
|
|
return mpWindowImpl->mpOverlapWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
const Window* Window::ImplGetFirstOverlapWindow() const
|
|
|
|
{
|
|
|
|
if ( mpWindowImpl->mbOverlapWin )
|
|
|
|
return this;
|
|
|
|
else
|
|
|
|
return mpWindowImpl->mpOverlapWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
Window* Window::ImplGetFrameWindow() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mpFrameWindow;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::ImplIsDockingWindow() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbDockWin;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::ImplIsFloatingWindow() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbFloatWin;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::ImplIsSplitter() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbSplitter;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::ImplIsPushButton() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbPushButton;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::ImplIsOverlapWindow() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbOverlapWin;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::ImplSetMouseTransparent( sal_Bool bTransparent )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->mbMouseTransparent = bTransparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
Point Window::ImplOutputToFrame( const Point& rPos )
|
|
|
|
{
|
|
|
|
return Point( rPos.X()+mnOutOffX, rPos.Y()+mnOutOffY );
|
|
|
|
}
|
|
|
|
|
2011-07-26 16:21:55 +02:00
|
|
|
Point Window::ImplFrameToOutput( const Point& rPos )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
2011-07-26 16:21:55 +02:00
|
|
|
return Point( rPos.X()-mnOutOffX, rPos.Y()-mnOutOffY );
|
2005-01-13 17:06:36 +00:00
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::SetCompoundControl( sal_Bool bCompound )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->mbCompoundControl = bCompound;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::IncrementLockCount()
|
|
|
|
{
|
|
|
|
mpWindowImpl->mnLockCount++;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::DecrementLockCount()
|
|
|
|
{
|
|
|
|
mpWindowImpl->mnLockCount--;
|
|
|
|
}
|
|
|
|
|
|
|
|
WinBits Window::GetStyle() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mnStyle;
|
|
|
|
}
|
|
|
|
|
|
|
|
WinBits Window::GetPrevStyle() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mnPrevStyle;
|
|
|
|
}
|
|
|
|
|
|
|
|
WinBits Window::GetExtendedStyle() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mnExtendedStyle;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::SetType( WindowType nType )
|
|
|
|
{
|
|
|
|
mpWindowImpl->mnType = nType;
|
|
|
|
}
|
|
|
|
|
|
|
|
WindowType Window::GetType() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mnType;
|
|
|
|
}
|
2011-09-27 12:37:00 +01:00
|
|
|
|
2011-11-28 22:16:26 +00:00
|
|
|
Dialog* Window::GetParentDialog() const
|
2011-09-27 12:37:00 +01:00
|
|
|
{
|
|
|
|
const Window *pWindow = this;
|
|
|
|
|
|
|
|
while( pWindow )
|
|
|
|
{
|
|
|
|
if( pWindow->IsDialog() )
|
|
|
|
break;
|
|
|
|
|
|
|
|
pWindow = pWindow->GetParent();
|
|
|
|
}
|
|
|
|
|
2011-11-28 22:16:26 +00:00
|
|
|
return const_cast<Dialog *>(dynamic_cast<const Dialog*>(pWindow));
|
2011-09-27 12:37:00 +01:00
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsSystemWindow() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbSysWin;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsDialog() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbDialog;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsMenuFloatingWindow() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbMenuFloatingWindow;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsToolbarFloatingWindow() const
|
2006-02-06 12:18:07 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbToolbarFloatingWindow;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::EnableAllResize( sal_Bool bEnable )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->mbAllResize = bEnable;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::EnableChildTransparentMode( sal_Bool bEnable )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->mbChildTransparent = bEnable;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsChildTransparentModeEnabled() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbChildTransparent;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsMouseTransparent() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbMouseTransparent;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsPaintTransparent() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbPaintTransparent;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::SetDialogControlStart( sal_Bool bStart )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->mbDlgCtrlStart = bStart;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsDialogControlStart() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbDlgCtrlStart;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::SetDialogControlFlags( sal_uInt16 nFlags )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->mnDlgCtrlFlags = nFlags;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 Window::GetDialogControlFlags() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mnDlgCtrlFlags;
|
|
|
|
}
|
|
|
|
|
|
|
|
const InputContext& Window::GetInputContext() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->maInputContext;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsControlFont() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return (mpWindowImpl->mpControlFont != 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
Color Window::GetControlForeground() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->maControlForeground;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsControlForeground() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbControlForeground;
|
|
|
|
}
|
|
|
|
|
|
|
|
Color Window::GetControlBackground() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->maControlBackground;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsControlBackground() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbControlBackground;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsInPaint() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbInPaint;
|
|
|
|
}
|
|
|
|
|
|
|
|
Window* Window::GetParent() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mpRealParent;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsVisible() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbVisible;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsReallyVisible() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbReallyVisible;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsReallyShown() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbReallyShown;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsInInitShow() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbInInitShow;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsEnabled() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return !mpWindowImpl->mbDisabled;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsInputEnabled() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return !mpWindowImpl->mbInputDisabled;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsAlwaysEnableInput() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
2008-02-19 13:11:51 +00:00
|
|
|
return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 Window::GetActivateMode() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mnActivateMode;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsAlwaysOnTopEnabled() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbAlwaysOnTop;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsDefaultPos() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbDefPos;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsDefaultSize() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbDefSize;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::EnablePaint( sal_Bool bEnable )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->mbPaintDisabled = !bEnable;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsPaintEnabled() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return !mpWindowImpl->mbPaintDisabled;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsUpdateMode() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return !mpWindowImpl->mbNoUpdate;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::SetParentUpdateMode( sal_Bool bUpdate )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->mbNoParentUpdate = !bUpdate;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsActive() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbActive;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_uInt16 Window::GetGetFocusFlags() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mnGetFocusFlags;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsCompoundControl() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbCompoundControl;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsWait() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return (mpWindowImpl->mnWaitCount != 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
Cursor* Window::GetCursor() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mpCursor;
|
|
|
|
}
|
|
|
|
|
|
|
|
const Fraction& Window::GetZoom() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->maZoom;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsZoom() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator();
|
|
|
|
}
|
|
|
|
|
2013-07-29 08:41:59 +02:00
|
|
|
void Window::SetHelpText( const OUString& rHelpText )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->maHelpText = rHelpText;
|
2010-09-29 15:46:40 +08:00
|
|
|
mpWindowImpl->mbHelpTextDynamic = sal_True;
|
2005-01-13 17:06:36 +00:00
|
|
|
}
|
|
|
|
|
2013-07-29 08:41:59 +02:00
|
|
|
void Window::SetQuickHelpText( const OUString& rHelpText )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->maQuickHelpText = rHelpText;
|
|
|
|
}
|
|
|
|
|
2013-07-29 08:41:59 +02:00
|
|
|
const OUString& Window::GetQuickHelpText() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->maQuickHelpText;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::SetData( void* pNewData )
|
|
|
|
{
|
|
|
|
mpWindowImpl->mpUserData = pNewData;
|
|
|
|
}
|
|
|
|
|
|
|
|
void* Window::GetData() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mpUserData;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
sal_Bool Window::IsCreatedWithToolkit() const
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
return mpWindowImpl->mbCreatedWithToolkit;
|
|
|
|
}
|
|
|
|
|
2010-09-29 15:46:40 +08:00
|
|
|
void Window::SetCreatedWithToolkit( sal_Bool b )
|
2005-01-13 17:06:36 +00:00
|
|
|
{
|
|
|
|
mpWindowImpl->mbCreatedWithToolkit = b;
|
|
|
|
|
|
|
|
}
|
|
|
|
const Pointer& Window::GetPointer() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->maPointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
VCLXWindow* Window::GetWindowPeer() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->mpVCLXWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::SetPosPixel( const Point& rNewPos )
|
|
|
|
{
|
2012-08-24 12:34:22 +01:00
|
|
|
setPosSizePixel( rNewPos.X(), rNewPos.Y(), 0, 0, WINDOW_POSSIZE_POS );
|
2005-01-13 17:06:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Window::SetSizePixel( const Size& rNewSize )
|
|
|
|
{
|
2012-08-24 12:34:22 +01:00
|
|
|
setPosSizePixel( 0, 0, rNewSize.Width(), rNewSize.Height(),
|
2005-01-13 17:06:36 +00:00
|
|
|
WINDOW_POSSIZE_SIZE );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
|
|
|
|
{
|
2012-08-24 12:34:22 +01:00
|
|
|
setPosSizePixel( rNewPos.X(), rNewPos.Y(),
|
2005-01-13 17:06:36 +00:00
|
|
|
rNewSize.Width(), rNewSize.Height(),
|
|
|
|
WINDOW_POSSIZE_POSSIZE );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::SetOutputSizePixel( const Size& rNewSize )
|
|
|
|
{
|
|
|
|
SetSizePixel( Size( rNewSize.Width()+mpWindowImpl->mnLeftBorder+mpWindowImpl->mnRightBorder,
|
|
|
|
rNewSize.Height()+mpWindowImpl->mnTopBorder+mpWindowImpl->mnBottomBorder ) );
|
|
|
|
}
|
|
|
|
|
2012-08-23 15:18:14 +01:00
|
|
|
//When a widget wants to renegotiate layout, get toplevel parent dialog and call
|
|
|
|
//resize on it. Mark all intermediate containers (or container-alike) widgets
|
|
|
|
//as dirty for the size remains unchanged, but layout changed circumstances
|
2013-01-11 10:08:20 +00:00
|
|
|
namespace
|
2012-08-10 11:31:09 +01:00
|
|
|
{
|
2013-01-11 10:08:20 +00:00
|
|
|
bool queue_ungrouped_resize(Window *pOrigWindow)
|
|
|
|
{
|
|
|
|
bool bSomeoneCares = false;
|
2012-11-14 12:20:57 +00:00
|
|
|
|
2013-09-30 14:44:37 +01:00
|
|
|
Window *pWindow = pOrigWindow->GetParent();
|
|
|
|
if (pWindow)
|
2012-08-23 15:18:14 +01:00
|
|
|
{
|
2013-01-11 10:08:20 +00:00
|
|
|
if (isContainerWindow(*pWindow))
|
|
|
|
{
|
|
|
|
bSomeoneCares = true;
|
|
|
|
}
|
|
|
|
else if (pWindow->GetType() == WINDOW_TABCONTROL)
|
|
|
|
{
|
|
|
|
bSomeoneCares = true;
|
|
|
|
}
|
2013-09-30 14:44:37 +01:00
|
|
|
pWindow->queue_resize();
|
2012-08-23 15:18:14 +01:00
|
|
|
}
|
2013-01-11 10:08:20 +00:00
|
|
|
|
|
|
|
return bSomeoneCares;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::queue_resize()
|
|
|
|
{
|
|
|
|
bool bSomeoneCares = queue_ungrouped_resize(this);
|
|
|
|
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
if (pWindowImpl->m_xSizeGroup && pWindowImpl->m_xSizeGroup->get_mode() != VCL_SIZE_GROUP_NONE)
|
|
|
|
{
|
|
|
|
std::set<Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets();
|
|
|
|
for (std::set<Window*>::iterator aI = rWindows.begin(),
|
|
|
|
aEnd = rWindows.end(); aI != aEnd; ++aI)
|
2012-08-23 15:18:14 +01:00
|
|
|
{
|
2013-01-11 10:08:20 +00:00
|
|
|
Window *pOther = *aI;
|
|
|
|
if (pOther == this)
|
|
|
|
continue;
|
|
|
|
queue_ungrouped_resize(pOther);
|
2012-08-23 15:18:14 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-11-14 12:20:57 +00:00
|
|
|
if (bSomeoneCares)
|
|
|
|
{
|
|
|
|
//fdo#57090 force a resync of the borders of the borderwindow onto this
|
|
|
|
//window in case they have changed
|
|
|
|
Window* pBorderWindow = ImplGetBorderWindow();
|
|
|
|
if (pBorderWindow)
|
|
|
|
pBorderWindow->Resize();
|
|
|
|
}
|
2012-08-10 11:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace
|
|
|
|
{
|
2012-10-25 12:04:13 +01:00
|
|
|
VclAlign toAlign(const OString &rValue)
|
2012-08-10 11:31:09 +01:00
|
|
|
{
|
|
|
|
VclAlign eRet = VCL_ALIGN_FILL;
|
|
|
|
|
2013-01-12 09:54:32 +01:00
|
|
|
if (rValue == "fill")
|
2012-08-10 11:31:09 +01:00
|
|
|
eRet = VCL_ALIGN_FILL;
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rValue == "start")
|
2012-08-10 11:31:09 +01:00
|
|
|
eRet = VCL_ALIGN_START;
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rValue == "end")
|
2012-08-10 11:31:09 +01:00
|
|
|
eRet = VCL_ALIGN_END;
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rValue == "center")
|
2012-08-10 11:31:09 +01:00
|
|
|
eRet = VCL_ALIGN_CENTER;
|
|
|
|
return eRet;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-10-25 14:46:59 +01:00
|
|
|
bool Window::set_font_attribute(const OString &rKey, const OString &rValue)
|
|
|
|
{
|
|
|
|
if (rKey == "weight")
|
|
|
|
{
|
|
|
|
Font aFont(GetControlFont());
|
|
|
|
if (rValue == "thin")
|
|
|
|
aFont.SetWeight(WEIGHT_THIN);
|
|
|
|
else if (rValue == "ultralight")
|
|
|
|
aFont.SetWeight(WEIGHT_ULTRALIGHT);
|
|
|
|
else if (rValue == "light")
|
|
|
|
aFont.SetWeight(WEIGHT_LIGHT);
|
|
|
|
else if (rValue == "book")
|
|
|
|
aFont.SetWeight(WEIGHT_SEMILIGHT);
|
|
|
|
else if (rValue == "normal")
|
|
|
|
aFont.SetWeight(WEIGHT_NORMAL);
|
|
|
|
else if (rValue == "medium")
|
|
|
|
aFont.SetWeight(WEIGHT_MEDIUM);
|
|
|
|
else if (rValue == "semibold")
|
|
|
|
aFont.SetWeight(WEIGHT_SEMIBOLD);
|
|
|
|
else if (rValue == "bold")
|
|
|
|
aFont.SetWeight(WEIGHT_BOLD);
|
|
|
|
else if (rValue == "ultrabold")
|
|
|
|
aFont.SetWeight(WEIGHT_ULTRABOLD);
|
|
|
|
else
|
|
|
|
aFont.SetWeight(WEIGHT_BLACK);
|
|
|
|
SetControlFont(aFont);
|
|
|
|
}
|
|
|
|
else if (rKey == "style")
|
|
|
|
{
|
|
|
|
Font aFont(GetControlFont());
|
|
|
|
if (rValue == "normal")
|
|
|
|
aFont.SetItalic(ITALIC_NONE);
|
|
|
|
else if (rValue == "oblique")
|
|
|
|
aFont.SetItalic(ITALIC_OBLIQUE);
|
|
|
|
else if (rValue == "italic")
|
|
|
|
aFont.SetItalic(ITALIC_NORMAL);
|
|
|
|
SetControlFont(aFont);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SAL_INFO("vcl.layout", "unhandled font attribute: " << rKey.getStr());
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-10-25 12:04:13 +01:00
|
|
|
bool Window::set_property(const OString &rKey, const OString &rValue)
|
|
|
|
{
|
2013-01-12 09:54:32 +01:00
|
|
|
if ((rKey == "label") || (rKey == "title") || (rKey == "text") )
|
2012-10-25 12:04:13 +01:00
|
|
|
{
|
2012-12-11 09:33:45 +00:00
|
|
|
SetText(OStringToOUString(VclBuilder::convertMnemonicMarkup(rValue), RTL_TEXTENCODING_UTF8));
|
2012-10-25 12:04:13 +01:00
|
|
|
}
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "visible")
|
2012-08-10 11:31:09 +01:00
|
|
|
Show(toBool(rValue));
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "sensitive")
|
2012-08-10 11:31:09 +01:00
|
|
|
Enable(toBool(rValue));
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "resizable")
|
2012-08-10 11:31:09 +01:00
|
|
|
{
|
|
|
|
WinBits nBits = GetStyle();
|
2012-09-26 16:14:28 +01:00
|
|
|
nBits &= ~(WB_SIZEABLE);
|
2012-08-10 11:31:09 +01:00
|
|
|
if (toBool(rValue))
|
2012-09-26 16:14:28 +01:00
|
|
|
nBits |= WB_SIZEABLE;
|
2012-08-10 11:31:09 +01:00
|
|
|
SetStyle(nBits);
|
|
|
|
}
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "xalign")
|
2012-08-10 11:31:09 +01:00
|
|
|
{
|
|
|
|
WinBits nBits = GetStyle();
|
|
|
|
nBits &= ~(WB_LEFT | WB_CENTER | WB_RIGHT);
|
|
|
|
|
|
|
|
float f = rValue.toFloat();
|
|
|
|
if (f == 0.0)
|
|
|
|
nBits |= WB_LEFT;
|
|
|
|
else if (f == 1.0)
|
|
|
|
nBits |= WB_RIGHT;
|
|
|
|
else if (f == 0.5)
|
|
|
|
nBits |= WB_CENTER;
|
|
|
|
|
|
|
|
SetStyle(nBits);
|
|
|
|
}
|
2013-04-04 20:57:40 +01:00
|
|
|
else if (rKey == "justification")
|
|
|
|
{
|
|
|
|
WinBits nBits = GetStyle();
|
|
|
|
nBits &= ~(WB_LEFT | WB_CENTER | WB_RIGHT);
|
|
|
|
|
|
|
|
if (rValue == "left")
|
|
|
|
nBits |= WB_LEFT;
|
|
|
|
else if (rValue == "right")
|
|
|
|
nBits |= WB_RIGHT;
|
|
|
|
else if (rValue == "center")
|
|
|
|
nBits |= WB_CENTER;
|
|
|
|
|
|
|
|
SetStyle(nBits);
|
|
|
|
}
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "yalign")
|
2012-08-10 11:31:09 +01:00
|
|
|
{
|
|
|
|
WinBits nBits = GetStyle();
|
|
|
|
nBits &= ~(WB_TOP | WB_VCENTER | WB_BOTTOM);
|
|
|
|
|
|
|
|
float f = rValue.toFloat();
|
|
|
|
if (f == 0.0)
|
|
|
|
nBits |= WB_TOP;
|
|
|
|
else if (f == 1.0)
|
|
|
|
nBits |= WB_BOTTOM;
|
|
|
|
else if (f == 0.5)
|
|
|
|
nBits |= WB_CENTER;
|
|
|
|
|
|
|
|
SetStyle(nBits);
|
|
|
|
}
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "wrap")
|
2012-10-08 16:55:25 +01:00
|
|
|
{
|
|
|
|
WinBits nBits = GetStyle();
|
|
|
|
nBits &= ~(WB_WORDBREAK);
|
|
|
|
if (toBool(rValue))
|
|
|
|
nBits |= WB_WORDBREAK;
|
|
|
|
SetStyle(nBits);
|
|
|
|
}
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "height-request")
|
2012-08-10 11:31:09 +01:00
|
|
|
set_height_request(rValue.toInt32());
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "width-request")
|
2012-08-10 11:31:09 +01:00
|
|
|
set_width_request(rValue.toInt32());
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "hexpand")
|
2012-08-10 11:31:09 +01:00
|
|
|
set_hexpand(toBool(rValue));
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "vexpand")
|
2012-08-10 11:31:09 +01:00
|
|
|
set_vexpand(toBool(rValue));
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "halign")
|
2012-08-10 11:31:09 +01:00
|
|
|
set_halign(toAlign(rValue));
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "valign")
|
2012-08-10 11:31:09 +01:00
|
|
|
set_valign(toAlign(rValue));
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "tooltip-markup")
|
2012-10-25 12:04:13 +01:00
|
|
|
SetQuickHelpText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "tooltip-text")
|
2012-10-25 12:04:13 +01:00
|
|
|
SetQuickHelpText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "border-width")
|
2012-08-23 16:43:09 +01:00
|
|
|
set_border_width(rValue.toInt32());
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "margin-left")
|
2012-08-23 16:43:09 +01:00
|
|
|
set_margin_left(rValue.toInt32());
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "margin-right")
|
2012-08-23 16:43:09 +01:00
|
|
|
set_margin_right(rValue.toInt32());
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "margin-top")
|
2012-08-23 16:43:09 +01:00
|
|
|
set_margin_top(rValue.toInt32());
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "margin-bottom")
|
2012-08-23 16:43:09 +01:00
|
|
|
set_margin_bottom(rValue.toInt32());
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "hscrollbar-policy")
|
2012-10-10 21:30:15 +01:00
|
|
|
{
|
|
|
|
WinBits nBits = GetStyle();
|
|
|
|
nBits &= ~(WB_AUTOHSCROLL|WB_HSCROLL);
|
|
|
|
if (rValue == "always")
|
|
|
|
nBits |= WB_HSCROLL;
|
|
|
|
else if (rValue == "automatic")
|
|
|
|
nBits |= WB_AUTOHSCROLL;
|
|
|
|
SetStyle(nBits);
|
|
|
|
}
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "vscrollbar-policy")
|
2012-10-10 21:30:15 +01:00
|
|
|
{
|
|
|
|
WinBits nBits = GetStyle();
|
|
|
|
nBits &= ~(WB_AUTOVSCROLL|WB_VSCROLL);
|
|
|
|
if (rValue == "always")
|
|
|
|
nBits |= WB_VSCROLL;
|
|
|
|
else if (rValue == "automatic")
|
|
|
|
nBits |= WB_AUTOVSCROLL;
|
|
|
|
SetStyle(nBits);
|
|
|
|
}
|
2013-01-21 11:12:49 +00:00
|
|
|
else if (rKey == "accessible-name")
|
|
|
|
{
|
|
|
|
SetAccessibleName(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
|
|
|
|
}
|
|
|
|
else if (rKey == "accessible-description")
|
|
|
|
{
|
|
|
|
SetAccessibleDescription(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
|
|
|
|
}
|
2013-01-12 09:54:32 +01:00
|
|
|
else if (rKey == "use-markup")
|
2012-10-26 12:57:37 +01:00
|
|
|
{
|
|
|
|
//https://live.gnome.org/GnomeGoals/RemoveMarkupInMessages
|
|
|
|
SAL_WARN_IF(toBool(rValue), "vcl.layout", "Use pango attributes instead of mark-up");
|
|
|
|
}
|
2012-08-10 11:31:09 +01:00
|
|
|
else
|
|
|
|
{
|
2012-09-25 13:34:21 +01:00
|
|
|
SAL_INFO("vcl.layout", "unhandled property: " << rKey.getStr());
|
2012-08-10 11:31:09 +01:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-08-15 11:19:06 +01:00
|
|
|
void Window::set_height_request(sal_Int32 nHeightRequest)
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
|
|
|
|
if ( pWindowImpl->mnHeightRequest != nHeightRequest )
|
|
|
|
{
|
|
|
|
pWindowImpl->mnHeightRequest = nHeightRequest;
|
|
|
|
queue_resize();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_width_request(sal_Int32 nWidthRequest)
|
|
|
|
{
|
|
|
|
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
|
|
|
|
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
|
|
|
|
if ( pWindowImpl->mnWidthRequest != nWidthRequest )
|
|
|
|
{
|
|
|
|
pWindowImpl->mnWidthRequest = nWidthRequest;
|
|
|
|
queue_resize();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-11 10:08:20 +00:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
Size get_ungrouped_preferred_size(const Window &rWindow)
|
|
|
|
{
|
|
|
|
Size aRet(rWindow.get_width_request(), rWindow.get_height_request());
|
|
|
|
if (aRet.Width() == -1 || aRet.Height() == -1)
|
|
|
|
{
|
2013-01-14 10:40:11 +00:00
|
|
|
Size aOptimal = rWindow.GetOptimalSize();
|
2013-01-11 10:08:20 +00:00
|
|
|
if (aRet.Width() == -1)
|
|
|
|
aRet.Width() = aOptimal.Width();
|
|
|
|
if (aRet.Height() == -1)
|
|
|
|
aRet.Height() = aOptimal.Height();
|
|
|
|
}
|
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-15 11:19:06 +01:00
|
|
|
Size Window::get_preferred_size() const
|
|
|
|
{
|
2013-01-11 10:08:20 +00:00
|
|
|
Size aRet(get_ungrouped_preferred_size(*this));
|
|
|
|
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
if (pWindowImpl->m_xSizeGroup)
|
2012-08-15 11:19:06 +01:00
|
|
|
{
|
2013-01-11 10:08:20 +00:00
|
|
|
const VclSizeGroupMode eMode = pWindowImpl->m_xSizeGroup->get_mode();
|
|
|
|
if (eMode != VCL_SIZE_GROUP_NONE)
|
|
|
|
{
|
|
|
|
const bool bIgnoreInHidden = pWindowImpl->m_xSizeGroup->get_ignore_hidden();
|
|
|
|
const std::set<Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets();
|
|
|
|
for (std::set<Window*>::const_iterator aI = rWindows.begin(),
|
|
|
|
aEnd = rWindows.end(); aI != aEnd; ++aI)
|
|
|
|
{
|
|
|
|
const Window *pOther = *aI;
|
|
|
|
if (pOther == this)
|
|
|
|
continue;
|
|
|
|
if (bIgnoreInHidden && !pOther->IsVisible())
|
|
|
|
continue;
|
|
|
|
Size aOtherSize = get_ungrouped_preferred_size(*pOther);
|
|
|
|
if (eMode == VCL_SIZE_GROUP_BOTH || eMode == VCL_SIZE_GROUP_HORIZONTAL)
|
|
|
|
aRet.Width() = std::max(aRet.Width(), aOtherSize.Width());
|
|
|
|
if (eMode == VCL_SIZE_GROUP_BOTH || eMode == VCL_SIZE_GROUP_VERTICAL)
|
|
|
|
aRet.Height() = std::max(aRet.Height(), aOtherSize.Height());
|
|
|
|
}
|
|
|
|
}
|
2012-08-15 11:19:06 +01:00
|
|
|
}
|
2013-01-11 10:08:20 +00:00
|
|
|
|
2012-08-15 11:19:06 +01:00
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
2012-08-10 11:31:09 +01:00
|
|
|
VclAlign Window::get_halign() const
|
|
|
|
{
|
2012-08-15 11:19:06 +01:00
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->meHalign;
|
2012-08-10 11:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_halign(VclAlign eAlign)
|
|
|
|
{
|
2012-08-15 11:19:06 +01:00
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->meHalign = eAlign;
|
2012-08-10 11:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
VclAlign Window::get_valign() const
|
|
|
|
{
|
2012-08-15 11:19:06 +01:00
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->meValign;
|
2012-08-10 11:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_valign(VclAlign eAlign)
|
|
|
|
{
|
2012-08-15 11:19:06 +01:00
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->meValign = eAlign;
|
2012-08-10 11:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool Window::get_hexpand() const
|
|
|
|
{
|
2012-08-15 11:19:06 +01:00
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mbHexpand;
|
2012-08-10 11:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_hexpand(bool bExpand)
|
|
|
|
{
|
2012-08-15 11:19:06 +01:00
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mbHexpand = bExpand;
|
2012-08-10 11:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool Window::get_vexpand() const
|
|
|
|
{
|
2012-08-15 11:19:06 +01:00
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mbVexpand;
|
2012-08-10 11:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_vexpand(bool bExpand)
|
|
|
|
{
|
2012-08-15 11:19:06 +01:00
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mbVexpand = bExpand;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Window::get_expand() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mbExpand;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_expand(bool bExpand)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mbExpand = bExpand;
|
|
|
|
}
|
|
|
|
|
|
|
|
VclPackType Window::get_pack_type() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mePackType;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_pack_type(VclPackType ePackType)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mePackType = ePackType;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_padding() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnPadding;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_padding(sal_Int32 nPadding)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mnPadding = nPadding;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Window::get_fill() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mbFill;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_fill(bool bFill)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mbFill = bFill;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_grid_width() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnGridWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_grid_width(sal_Int32 nCols)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mnGridWidth = nCols;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_grid_left_attach() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnGridLeftAttach;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_grid_left_attach(sal_Int32 nAttach)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mnGridLeftAttach = nAttach;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_grid_height() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnGridHeight;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_grid_height(sal_Int32 nRows)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mnGridHeight = nRows;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_grid_top_attach() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnGridTopAttach;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_grid_top_attach(sal_Int32 nAttach)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mnGridTopAttach = nAttach;
|
2012-08-10 11:31:09 +01:00
|
|
|
}
|
|
|
|
|
2012-08-23 16:43:09 +01:00
|
|
|
void Window::set_border_width(sal_Int32 nBorderWidth)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mnBorderWidth = nBorderWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_border_width() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnBorderWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_margin_left(sal_Int32 nWidth)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mnMarginLeft = nWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_margin_left() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnMarginLeft;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_margin_right(sal_Int32 nWidth)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mnMarginRight = nWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_margin_right() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnMarginRight;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_margin_top(sal_Int32 nWidth)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mnMarginTop = nWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_margin_top() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnMarginTop;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_margin_bottom(sal_Int32 nWidth)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mnMarginBottom = nWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_margin_bottom() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnMarginBottom;
|
|
|
|
}
|
|
|
|
|
2012-10-10 21:30:15 +01:00
|
|
|
sal_Int32 Window::get_height_request() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnHeightRequest;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 Window::get_width_request() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mnWidthRequest;
|
|
|
|
}
|
|
|
|
|
2012-10-20 12:57:22 +01:00
|
|
|
bool Window::get_secondary() const
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
return pWindowImpl->mbSecondary;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::set_secondary(bool bSecondary)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
pWindowImpl->mbSecondary = bSecondary;
|
|
|
|
}
|
|
|
|
|
2013-01-11 10:08:20 +00:00
|
|
|
void Window::add_to_size_group(boost::shared_ptr< VclSizeGroup > xGroup)
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
//To-Do, multiple groups
|
|
|
|
pWindowImpl->m_xSizeGroup = xGroup;
|
|
|
|
pWindowImpl->m_xSizeGroup->insert(this);
|
|
|
|
if (VCL_SIZE_GROUP_NONE != pWindowImpl->m_xSizeGroup->get_mode())
|
|
|
|
queue_resize();
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::remove_from_all_size_groups()
|
|
|
|
{
|
|
|
|
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
|
|
|
//To-Do, multiple groups
|
|
|
|
if (pWindowImpl->m_xSizeGroup)
|
|
|
|
{
|
|
|
|
if (VCL_SIZE_GROUP_NONE != pWindowImpl->m_xSizeGroup->get_mode())
|
|
|
|
queue_resize();
|
|
|
|
pWindowImpl->m_xSizeGroup->erase(this);
|
|
|
|
pWindowImpl->m_xSizeGroup.reset();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-22 10:20:15 +00:00
|
|
|
void Window::add_mnemonic_label(FixedText *pLabel)
|
|
|
|
{
|
|
|
|
std::vector<FixedText*>& v = mpWindowImpl->m_aMnemonicLabels;
|
|
|
|
if (std::find(v.begin(), v.end(), pLabel) != v.end())
|
|
|
|
return;
|
|
|
|
v.push_back(pLabel);
|
|
|
|
pLabel->set_mnemonic_widget(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Window::remove_mnemonic_label(FixedText *pLabel)
|
|
|
|
{
|
|
|
|
std::vector<FixedText*>& v = mpWindowImpl->m_aMnemonicLabels;
|
|
|
|
std::vector<FixedText*>::iterator aFind = std::find(v.begin(), v.end(), pLabel);
|
|
|
|
if (aFind == v.end())
|
|
|
|
return;
|
|
|
|
v.erase(aFind);
|
|
|
|
pLabel->set_mnemonic_widget(NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<FixedText*> Window::list_mnemonic_labels() const
|
|
|
|
{
|
|
|
|
return mpWindowImpl->m_aMnemonicLabels;
|
|
|
|
}
|
|
|
|
|
2010-10-14 08:27:31 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|