Files
libreoffice/vcl/source/window/window2.cxx

2387 lines
69 KiB
C++
Raw Normal View History

/* -*- 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
2000-09-18 16:07:07 +00:00
#include <limits.h>
#include <tools/debug.hxx>
#include <tools/poly.hxx>
#include <vcl/bitmap.hxx>
2011-11-28 22:16:26 +00:00
#include <vcl/dialog.hxx>
#include <vcl/event.hxx>
#include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
#include <vcl/timer.hxx>
#include <vcl/metric.hxx>
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
#include <vcl/scrbar.hxx>
#include <vcl/dockwin.hxx>
#include <vcl/tabctrl.hxx>
2000-09-18 16:07:07 +00: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>
using namespace com::sun::star;
2000-09-18 16:07:07 +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;
};
// =======================================================================
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 );
// 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 )
return sal_False;
2000-09-18 16:07:07 +00:00
do
{
if ( pTempWindow == pThisWindow )
return sal_True;
if ( pTempWindow->mpWindowImpl->mbFrame )
2000-09-18 16:07:07 +00:00
break;
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( pTempWindow );
pTempWindow = pThisWindow;
do
{
if ( pTempWindow == pTestWindow )
return sal_False;
if ( pTempWindow->mpWindowImpl->mbFrame )
2000-09-18 16:07:07 +00:00
break;
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( pTempWindow );
// move window to same level
if ( pThisWindow->mpWindowImpl->mpOverlapWindow != pTestWindow->mpWindowImpl->mpOverlapWindow )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nThisLevel = 0;
sal_uInt16 nTestLevel = 0;
2000-09-18 16:07:07 +00:00
pTempWindow = pThisWindow;
do
{
nThisLevel++;
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( !pTempWindow->mpWindowImpl->mbFrame );
2000-09-18 16:07:07 +00:00
pTempWindow = pTestWindow;
do
{
nTestLevel++;
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( !pTempWindow->mpWindowImpl->mbFrame );
2000-09-18 16:07:07 +00:00
if ( nThisLevel < nTestLevel )
{
do
{
if ( pTestWindow->mpWindowImpl->mpOverlapWindow == pThisWindow->mpWindowImpl->mpOverlapWindow )
2000-09-18 16:07:07 +00:00
break;
if ( pTestWindow->mpWindowImpl->mbFrame )
2000-09-18 16:07:07 +00:00
break;
pTestWindow = pTestWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( pTestWindow );
}
else
{
do
{
if ( pThisWindow->mpWindowImpl->mpOverlapWindow == pTempWindow->mpWindowImpl->mpOverlapWindow )
2000-09-18 16:07:07 +00:00
break;
if ( pThisWindow->mpWindowImpl->mbFrame )
2000-09-18 16:07:07 +00:00
break;
pThisWindow = pThisWindow->mpWindowImpl->mpOverlapWindow;
2000-09-18 16:07:07 +00:00
}
while ( pThisWindow );
}
}
// if TestWindow is before ThisWindow, it is in front
2000-09-18 16:07:07 +00:00
pTempWindow = pTestWindow;
do
{
if ( pTempWindow == pThisWindow )
return sal_True;
pTempWindow = pTempWindow->mpWindowImpl->mpNext;
2000-09-18 16:07:07 +00:00
}
while ( pTempWindow );
return sal_False;
2000-09-18 16:07:07 +00:00
}
// =======================================================================
void Window::ImplSaveOverlapBackground()
{
DBG_ASSERT( !mpWindowImpl->mpOverlapData->mpSaveBackDev, "Window::ImplSaveOverlapBackground() - Background already saved" );
2000-09-18 16:07:07 +00:00
if ( !mpWindowImpl->mbFrame )
2000-09-18 16:07:07 +00:00
{
sal_uLong nSaveBackSize = mnOutWidth*mnOutHeight;
2000-09-18 16:07:07 +00:00
if ( nSaveBackSize <= IMPL_MAXSAVEBACKSIZE )
{
if ( nSaveBackSize+mpWindowImpl->mpFrameData->mnAllSaveBackSize <= IMPL_MAXALLSAVEBACKSIZE )
2000-09-18 16:07:07 +00:00
{
Size aOutSize( mnOutWidth, mnOutHeight );
mpWindowImpl->mpOverlapData->mpSaveBackDev = new VirtualDevice( *mpWindowImpl->mpFrameWindow );
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev->SetOutputSizePixel( aOutSize ) )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->mpFrameWindow->ImplUpdateAll();
2000-09-18 16:07:07 +00:00
if ( mpWindowImpl->mbInitWinClipRegion )
2000-09-18 16:07:07 +00:00
ImplInitWinClipRegion();
mpWindowImpl->mpOverlapData->mnSaveBackSize = nSaveBackSize;
mpWindowImpl->mpFrameData->mnAllSaveBackSize += nSaveBackSize;
2000-09-18 16:07:07 +00:00
Point aDevPt;
mpWindowImpl->mpFrameWindow->ImplGetFrameDev( Point( mnOutOffX, mnOutOffY ),
2000-09-18 16:07:07 +00:00
aDevPt, aOutSize,
*(mpWindowImpl->mpOverlapData->mpSaveBackDev) );
mpWindowImpl->mpOverlapData->mpNextBackWin = mpWindowImpl->mpFrameData->mpFirstBackWin;
mpWindowImpl->mpFrameData->mpFirstBackWin = this;
2000-09-18 16:07:07 +00:00
}
else
{
delete mpWindowImpl->mpOverlapData->mpSaveBackDev;
mpWindowImpl->mpOverlapData->mpSaveBackDev = NULL;
2000-09-18 16:07:07 +00:00
}
}
}
}
}
// -----------------------------------------------------------------------
sal_Bool Window::ImplRestoreOverlapBackground( Region& rInvRegion )
2000-09-18 16:07:07 +00:00
{
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev )
2000-09-18 16:07:07 +00:00
{
if ( mpWindowImpl->mbInitWinClipRegion )
2000-09-18 16:07:07 +00:00
ImplInitWinClipRegion();
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev )
2000-09-18 16:07:07 +00:00
{
Point aDevPt;
Point aDestPt( mnOutOffX, mnOutOffY );
Size aDevSize = mpWindowImpl->mpOverlapData->mpSaveBackDev->GetOutputSizePixel();
if ( mpWindowImpl->mpOverlapData->mpSaveBackRgn )
2000-09-18 16:07:07 +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
{
mpWindowImpl->mpFrameWindow->ImplDrawFrameDev( aDestPt, aDevPt, aDevSize,
*(mpWindowImpl->mpOverlapData->mpSaveBackDev),
mpWindowImpl->maWinClipRegion );
2000-09-18 16:07:07 +00:00
}
ImplDeleteOverlapBackground();
}
return sal_True;
2000-09-18 16:07:07 +00:00
}
return sal_False;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void Window::ImplDeleteOverlapBackground()
{
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev )
2000-09-18 16:07:07 +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
{
delete mpWindowImpl->mpOverlapData->mpSaveBackRgn;
mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL;
2000-09-18 16:07:07 +00:00
}
// remove window from the list
if ( mpWindowImpl->mpFrameData->mpFirstBackWin == this )
mpWindowImpl->mpFrameData->mpFirstBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin;
2000-09-18 16:07:07 +00:00
else
{
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
}
mpWindowImpl->mpOverlapData->mpNextBackWin = NULL;
2000-09-18 16:07:07 +00:00
}
}
// -----------------------------------------------------------------------
void Window::ImplInvalidateAllOverlapBackgrounds()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
Window* pWindow = mpWindowImpl->mpFrameData->mpFirstBackWin;
2000-09-18 16:07:07 +00:00
while ( pWindow )
{
// remember next window here already, as this window could
// be removed within the next if clause from the list
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() )
{
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 );
if( mpWindowImpl->mbInShowFocus )
return;
mpWindowImpl->mbInShowFocus = sal_True;
2000-09-18 16:07:07 +00:00
ImplWinData* pWinData = ImplGetWinData();
// native themeing suggest not to use focus rects
if( ! ( mpWindowImpl->mbUseNativeFocus &&
IsNativeWidgetEnabled() ) )
2000-09-18 16:07:07 +00:00
{
if ( !mpWindowImpl->mbInPaint )
2000-09-18 16:07:07 +00:00
{
if ( mpWindowImpl->mbFocusVisible )
{
if ( *(pWinData->mpFocusRect) == rRect )
{
mpWindowImpl->mbInShowFocus = sal_False;
return;
}
2000-09-18 16:07:07 +00:00
ImplInvertFocus( *(pWinData->mpFocusRect) );
}
2000-09-18 16:07:07 +00:00
ImplInvertFocus( rRect );
}
if ( !pWinData->mpFocusRect )
pWinData->mpFocusRect = new Rectangle( rRect );
else
*(pWinData->mpFocusRect) = rRect;
mpWindowImpl->mbFocusVisible = sal_True;
2000-09-18 16:07:07 +00:00
}
else
{
if( ! mpWindowImpl->mbNativeFocusVisible )
{
mpWindowImpl->mbNativeFocusVisible = sal_True;
if ( !mpWindowImpl->mbInPaint )
Invalidate();
}
}
mpWindowImpl->mbInShowFocus = sal_False;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void Window::HideFocus()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if( mpWindowImpl->mbInHideFocus )
2000-09-18 16:07:07 +00:00
return;
mpWindowImpl->mbInHideFocus = sal_True;
// native themeing can suggest not to use focus rects
if( ! ( mpWindowImpl->mbUseNativeFocus &&
IsNativeWidgetEnabled() ) )
{
if ( !mpWindowImpl->mbFocusVisible )
{
mpWindowImpl->mbInHideFocus = sal_False;
return;
}
2000-09-18 16:07:07 +00:00
if ( !mpWindowImpl->mbInPaint )
ImplInvertFocus( *(ImplGetWinData()->mpFocusRect) );
mpWindowImpl->mbFocusVisible = sal_False;
}
else
{
if( mpWindowImpl->mbNativeFocusVisible )
{
mpWindowImpl->mbNativeFocusVisible = sal_False;
if ( !mpWindowImpl->mbInPaint )
Invalidate();
}
}
mpWindowImpl->mbInHideFocus = sal_False;
2000-09-18 16:07:07 +00: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
}
// -----------------------------------------------------------------------
void Window::Invert( const Polygon& rPoly, sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( !IsDeviceOutputNecessary() )
return;
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;
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
}
// -----------------------------------------------------------------------
void Window::ShowTracking( const Rectangle& rRect, sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
ImplWinData* pWinData = ImplGetWinData();
if ( !mpWindowImpl->mbInPaint || !(nFlags & SHOWTRACK_WINDOW) )
2000-09-18 16:07:07 +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;
mpWindowImpl->mbTrackVisible = sal_True;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void Window::HideTracking()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mbTrackVisible )
2000-09-18 16:07:07 +00:00
{
ImplWinData* pWinData = ImplGetWinData();
if ( !mpWindowImpl->mbInPaint || !(pWinData->mnTrackFlags & SHOWTRACK_WINDOW) )
2000-09-18 16:07:07 +00:00
InvertTracking( *(pWinData->mpTrackRect), pWinData->mnTrackFlags );
mpWindowImpl->mbTrackVisible = sal_False;
2000-09-18 16:07:07 +00: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 ) ) );
ImplClipBoundaries( aRegion, sal_False, sal_False );
ImplSelectClipRegion( aRegion, pGraphics );
2000-09-18 16:07:07 +00: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 )
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
}
}
// -----------------------------------------------------------------------
void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
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 ) ) );
ImplClipBoundaries( aRegion, sal_False, sal_False );
ImplSelectClipRegion( aRegion, pGraphics );
2000-09-18 16:07:07 +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
Point aMousePos( mpWindowImpl->mpFrameData->mnLastMouseX, mpWindowImpl->mpFrameData->mnLastMouseY );
CWS-TOOLING: integrate CWS rtlcontrols 2008-12-11 21:08:49 +0100 fs r265367 : CONTEXT_WRITING_MODE is transient 2008-12-11 21:08:00 +0100 fs r265365 : REGISTER_PROP_3 2008-12-11 20:53:44 +0100 fs r265362 : ContextWritingMode is not MAYBEVOID 2008-12-11 15:29:08 +0100 fs r265315 : prevent a deadlock during complex.dbaccess.DatabaseDocument test 2008-12-11 15:01:13 +0100 fs r265304 : manual RESYNC to m37 2008-12-10 20:04:38 +0100 pl r265230 : #i30631# fix a snafu in mirroring 2008-12-10 19:14:45 +0100 pl r265229 : #i30631# rework PaintToDevice for RTL controls 2008-12-05 10:19:13 +0100 fs r264893 : #i10000# ImplInitSettings => ImplInitWindow (ImplInitSettings clashed with base classes ImplInitSettings on unxsols4) 2008-12-03 12:55:24 +0100 fs r264768 : #i100000# 2008-12-03 07:11:48 +0100 fs r264741 : #i10000# 2008-12-02 10:37:51 +0100 fs r264670 : CWS-TOOLING: rebase CWS rtlcontrols to trunk@264325 (milestone: DEV300:m36) 2008-12-02 09:27:50 +0100 fs r264660 : merge from trunk 2008-11-25 10:28:36 +0100 ama r264277 : Fix #i94572# 2008-11-24 11:46:48 +0100 fs r264218 : #i30631# proper context writing mode 2008-11-24 09:38:04 +0100 fs r264204 : #i30631# (approved by PL) 2008-11-24 09:35:47 +0100 fs r264203 : #i30631# Context/WritingMode 2008-11-24 09:33:36 +0100 fs r264202 : #i30631# Context/WritingMode 2008-11-24 09:31:53 +0100 fs r264200 : #i30631# RTL 2008-11-19 08:51:48 +0100 fs r263963 : #i10000# 2008-11-18 20:58:11 +0100 fs r263878 : #i10000# 2008-11-18 15:30:44 +0100 fs r263778 : migrate the CWS from CVS to SVN the CVS changes contained in this change set are the ones between the following two CVS tags: CWS_DEV300_RTLCONTROLS_ANCHOR CWS_DEV300_RTLCONTROLS_PRE_MIGRATION 2008-11-18 12:29:04 +0100 ama r263762 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:25:50 +0100 ama r263761 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:02:30 +0100 ama r263759 : Fix #i94572#: Context direction for drawing objects
2008-12-16 13:30:53 +00:00
if( ImplIsAntiparallel() )
{
// - RTL - re-mirror frame pos at pChild
ImplReMirror( aMousePos );
}
2000-09-18 16:07:07 +00:00
MouseEvent aMEvt( ImplFrameToOutput( aMousePos ),
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;
}
// -----------------------------------------------------------------------
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();
}
// -----------------------------------------------------------------------
void Window::EndTracking( sal_uInt16 nFlags )
2000-09-18 16:07:07 +00:00
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maWinData.mpTrackWin == this )
{
// 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();
}
// call EndTracking if required
2000-09-18 16:07:07 +00:00
if ( !(nFlags & ENDTRACK_DONTCALLHDL) )
{
Point aMousePos( mpWindowImpl->mpFrameData->mnLastMouseX, mpWindowImpl->mpFrameData->mnLastMouseY );
CWS-TOOLING: integrate CWS rtlcontrols 2008-12-11 21:08:49 +0100 fs r265367 : CONTEXT_WRITING_MODE is transient 2008-12-11 21:08:00 +0100 fs r265365 : REGISTER_PROP_3 2008-12-11 20:53:44 +0100 fs r265362 : ContextWritingMode is not MAYBEVOID 2008-12-11 15:29:08 +0100 fs r265315 : prevent a deadlock during complex.dbaccess.DatabaseDocument test 2008-12-11 15:01:13 +0100 fs r265304 : manual RESYNC to m37 2008-12-10 20:04:38 +0100 pl r265230 : #i30631# fix a snafu in mirroring 2008-12-10 19:14:45 +0100 pl r265229 : #i30631# rework PaintToDevice for RTL controls 2008-12-05 10:19:13 +0100 fs r264893 : #i10000# ImplInitSettings => ImplInitWindow (ImplInitSettings clashed with base classes ImplInitSettings on unxsols4) 2008-12-03 12:55:24 +0100 fs r264768 : #i100000# 2008-12-03 07:11:48 +0100 fs r264741 : #i10000# 2008-12-02 10:37:51 +0100 fs r264670 : CWS-TOOLING: rebase CWS rtlcontrols to trunk@264325 (milestone: DEV300:m36) 2008-12-02 09:27:50 +0100 fs r264660 : merge from trunk 2008-11-25 10:28:36 +0100 ama r264277 : Fix #i94572# 2008-11-24 11:46:48 +0100 fs r264218 : #i30631# proper context writing mode 2008-11-24 09:38:04 +0100 fs r264204 : #i30631# (approved by PL) 2008-11-24 09:35:47 +0100 fs r264203 : #i30631# Context/WritingMode 2008-11-24 09:33:36 +0100 fs r264202 : #i30631# Context/WritingMode 2008-11-24 09:31:53 +0100 fs r264200 : #i30631# RTL 2008-11-19 08:51:48 +0100 fs r263963 : #i10000# 2008-11-18 20:58:11 +0100 fs r263878 : #i10000# 2008-11-18 15:30:44 +0100 fs r263778 : migrate the CWS from CVS to SVN the CVS changes contained in this change set are the ones between the following two CVS tags: CWS_DEV300_RTLCONTROLS_ANCHOR CWS_DEV300_RTLCONTROLS_PRE_MIGRATION 2008-11-18 12:29:04 +0100 ama r263762 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:25:50 +0100 ama r263761 : Fix #i94572#: Context direction for drawing objects 2008-11-18 12:02:30 +0100 ama r263759 : Fix #i94572#: Context direction for drawing objects
2008-12-16 13:30:53 +00:00
if( ImplIsAntiparallel() )
{
// - RTL - re-mirror frame pos at pChild
ImplReMirror( aMousePos );
}
2000-09-18 16:07:07 +00:00
MouseEvent aMEvt( ImplFrameToOutput( aMousePos ),
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 );
}
}
}
// -----------------------------------------------------------------------
sal_Bool Window::IsTracking() const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
return (ImplGetSVData()->maWinData.mpTrackWin == this);
}
// -----------------------------------------------------------------------
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;
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 );
if ( mpWindowImpl->mpPaintRegion )
2000-09-18 16:07:07 +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 ) );
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
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 );
}
// -----------------------------------------------------------------------
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;
return (sal_uIntPtr)(void*)pDelData;
2000-09-18 16:07:07 +00:00
}
else
return 0;
}
// -----------------------------------------------------------------------
sal_Bool Window::EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore )
2000-09-18 16:07:07 +00:00
{
if ( !nSaveId )
return sal_False;
2000-09-18 16:07:07 +00:00
else
{
sal_Bool bOK = sal_True;
2000-09-18 16:07:07 +00:00
ImplFocusDelData* pDelData = (ImplFocusDelData*)(void*)nSaveId;
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 );
if ( mpWindowImpl->maZoom != rZoom )
2000-09-18 16:07:07 +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 );
// 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();
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) )
{
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;
else
2001-06-21 20:01:12 +00:00
nType = DEFAULTFONT_UI_SANS;
Font aTempFont = GetDefaultFont( nType, GetSettings().GetLanguageTag().getLanguageType(), 0 );
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 );
if ( mpWindowImpl->mpControlFont )
2000-09-18 16:07:07 +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;
}
if ( mpWindowImpl->mpControlFont )
2000-09-18 16:07:07 +00:00
{
if ( *mpWindowImpl->mpControlFont == rFont )
2000-09-18 16:07:07 +00:00
return;
*mpWindowImpl->mpControlFont = rFont;
2000-09-18 16:07:07 +00:00
}
else
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 );
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 );
if ( mpWindowImpl->mbControlForeground )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT );
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() )
{
if ( mpWindowImpl->mbControlForeground )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT );
mpWindowImpl->mbControlForeground = sal_False;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
}
}
else
{
if ( mpWindowImpl->maControlForeground != rColor )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlForeground = rColor;
mpWindowImpl->mbControlForeground = sal_True;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
}
}
}
// -----------------------------------------------------------------------
void Window::SetControlBackground()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mbControlBackground )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT );
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() )
{
if ( mpWindowImpl->mbControlBackground )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT );
mpWindowImpl->mbControlBackground = sal_False;
2000-09-18 16:07:07 +00:00
StateChanged( STATE_CHANGE_CONTROLBACKGROUND );
}
}
else
{
if ( mpWindowImpl->maControlBackground != rColor )
2000-09-18 16:07:07 +00:00
{
mpWindowImpl->maControlBackground = rColor;
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;
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;
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;
}
// -----------------------------------------------------------------------
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 );
}
}
sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd,
2000-09-18 16:07:07 +00:00
ScrollBar* pHScrl, ScrollBar* pVScrl )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
sal_Bool bRet = sal_False;
2000-09-18 16:07:07 +00:00
if ( pHScrl || pVScrl )
{
switch( rCmd.GetCommand() )
{
case COMMAND_STARTAUTOSCROLL:
{
sal_uInt16 nFlags = 0;
2000-09-18 16:07:07 +00:00
if ( pHScrl )
{
if ( (pHScrl->GetVisibleSize() < pHScrl->GetRangeMax()) &&
pHScrl->IsEnabled() && pHScrl->IsInputEnabled() && ! pHScrl->IsInModalMode() )
2000-09-18 16:07:07 +00:00
nFlags |= AUTOSCROLL_HORZ;
}
if ( pVScrl )
{
if ( (pVScrl->GetVisibleSize() < pVScrl->GetRangeMax()) &&
pVScrl->IsEnabled() && pVScrl->IsInputEnabled() && ! pVScrl->IsInModalMode() )
2000-09-18 16:07:07 +00:00
nFlags |= AUTOSCROLL_VERT;
}
if ( nFlags )
{
StartAutoScroll( nFlags );
bRet = sal_True;
2000-09-18 16:07:07 +00:00
}
}
break;
case COMMAND_WHEEL:
{
const CommandWheelData* pData = rCmd.GetWheelData();
if ( pData && (COMMAND_WHEEL_SCROLL == pData->GetMode()) )
2000-09-18 16:07:07 +00:00
{
if (!pData->IsDeltaPixel())
2000-09-18 16:07:07 +00: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
nLines = pData->GetNotchDelta() * (long)nScrollLines;
if ( nLines )
{
ImplHandleScroll( NULL,
0L,
pData->IsHorz() ? pHScrl : pVScrl,
nLines );
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() );
bRet = sal_True;
2000-09-18 16:07:07 +00:00
}
}
break;
default:
break;
}
}
return bRet;
}
// -----------------------------------------------------------------------
// 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
void Window::ImplHandleScroll( ScrollBar* pHScrl, long nX,
ScrollBar* pVScrl, long nY )
{
lcl_HandleScrollHelper( pHScrl, nX, true );
lcl_HandleScrollHelper( pVScrl, nY, true );
2000-09-18 16:07:07 +00:00
}
DockingManager* Window::GetDockingManager()
{
return ImplGetDockingManager();
}
void Window::EnableDocking( sal_Bool bEnable )
{
// update list of dockable windows
if( bEnable )
ImplGetDockingManager()->AddWindow( this );
else
ImplGetDockingManager()->RemoveWindow( this );
}
// retrieves the list of owner draw decorated windows for this window hiearchy
::std::vector<Window *>& Window::ImplGetOwnerDrawList()
{
return ImplGetTopmostFrameWindow()->mpWindowImpl->mpFrameData->maOwnerDrawList;
}
Window* Window::ImplGetTopmostFrameWindow()
{
Window *pTopmostParent = this;
while( pTopmostParent->ImplGetParent() )
pTopmostParent = pTopmostParent->ImplGetParent();
return pTopmostParent->mpWindowImpl->mpFrameWindow;
}
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
{
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
}
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
{
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
}
void Window::SetUniqueId( const OString& rUniqueId )
{
mpWindowImpl->maUniqId = rUniqueId;
}
const OString& Window::GetUniqueId() const
{
return mpWindowImpl->maUniqId;
}
// --------- 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;
}
sal_Bool Window::ImplIsDockingWindow() const
{
return mpWindowImpl->mbDockWin;
}
sal_Bool Window::ImplIsFloatingWindow() const
{
return mpWindowImpl->mbFloatWin;
}
sal_Bool Window::ImplIsSplitter() const
{
return mpWindowImpl->mbSplitter;
}
sal_Bool Window::ImplIsPushButton() const
{
return mpWindowImpl->mbPushButton;
}
sal_Bool Window::ImplIsOverlapWindow() const
{
return mpWindowImpl->mbOverlapWin;
}
void Window::ImplSetMouseTransparent( sal_Bool bTransparent )
{
mpWindowImpl->mbMouseTransparent = bTransparent;
}
Point Window::ImplOutputToFrame( const Point& rPos )
{
return Point( rPos.X()+mnOutOffX, rPos.Y()+mnOutOffY );
}
Point Window::ImplFrameToOutput( const Point& rPos )
{
return Point( rPos.X()-mnOutOffX, rPos.Y()-mnOutOffY );
}
void Window::SetCompoundControl( sal_Bool bCompound )
{
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-11-28 22:16:26 +00:00
Dialog* Window::GetParentDialog() const
{
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));
}
sal_Bool Window::IsSystemWindow() const
{
return mpWindowImpl->mbSysWin;
}
sal_Bool Window::IsDialog() const
{
return mpWindowImpl->mbDialog;
}
sal_Bool Window::IsMenuFloatingWindow() const
{
return mpWindowImpl->mbMenuFloatingWindow;
}
sal_Bool Window::IsToolbarFloatingWindow() const
{
return mpWindowImpl->mbToolbarFloatingWindow;
}
void Window::EnableAllResize( sal_Bool bEnable )
{
mpWindowImpl->mbAllResize = bEnable;
}
void Window::EnableChildTransparentMode( sal_Bool bEnable )
{
mpWindowImpl->mbChildTransparent = bEnable;
}
sal_Bool Window::IsChildTransparentModeEnabled() const
{
return mpWindowImpl->mbChildTransparent;
}
sal_Bool Window::IsMouseTransparent() const
{
return mpWindowImpl->mbMouseTransparent;
}
sal_Bool Window::IsPaintTransparent() const
{
return mpWindowImpl->mbPaintTransparent;
}
void Window::SetDialogControlStart( sal_Bool bStart )
{
mpWindowImpl->mbDlgCtrlStart = bStart;
}
sal_Bool Window::IsDialogControlStart() const
{
return mpWindowImpl->mbDlgCtrlStart;
}
void Window::SetDialogControlFlags( sal_uInt16 nFlags )
{
mpWindowImpl->mnDlgCtrlFlags = nFlags;
}
sal_uInt16 Window::GetDialogControlFlags() const
{
return mpWindowImpl->mnDlgCtrlFlags;
}
const InputContext& Window::GetInputContext() const
{
return mpWindowImpl->maInputContext;
}
sal_Bool Window::IsControlFont() const
{
return (mpWindowImpl->mpControlFont != 0);
}
Color Window::GetControlForeground() const
{
return mpWindowImpl->maControlForeground;
}
sal_Bool Window::IsControlForeground() const
{
return mpWindowImpl->mbControlForeground;
}
Color Window::GetControlBackground() const
{
return mpWindowImpl->maControlBackground;
}
sal_Bool Window::IsControlBackground() const
{
return mpWindowImpl->mbControlBackground;
}
sal_Bool Window::IsInPaint() const
{
return mpWindowImpl->mbInPaint;
}
Window* Window::GetParent() const
{
return mpWindowImpl->mpRealParent;
}
sal_Bool Window::IsVisible() const
{
return mpWindowImpl->mbVisible;
}
sal_Bool Window::IsReallyVisible() const
{
return mpWindowImpl->mbReallyVisible;
}
sal_Bool Window::IsReallyShown() const
{
return mpWindowImpl->mbReallyShown;
}
sal_Bool Window::IsInInitShow() const
{
return mpWindowImpl->mbInInitShow;
}
sal_Bool Window::IsEnabled() const
{
return !mpWindowImpl->mbDisabled;
}
sal_Bool Window::IsInputEnabled() const
{
return !mpWindowImpl->mbInputDisabled;
}
sal_Bool Window::IsAlwaysEnableInput() const
{
return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled;
}
sal_uInt16 Window::GetActivateMode() const
{
return mpWindowImpl->mnActivateMode;
}
sal_Bool Window::IsAlwaysOnTopEnabled() const
{
return mpWindowImpl->mbAlwaysOnTop;
}
sal_Bool Window::IsDefaultPos() const
{
return mpWindowImpl->mbDefPos;
}
sal_Bool Window::IsDefaultSize() const
{
return mpWindowImpl->mbDefSize;
}
void Window::EnablePaint( sal_Bool bEnable )
{
mpWindowImpl->mbPaintDisabled = !bEnable;
}
sal_Bool Window::IsPaintEnabled() const
{
return !mpWindowImpl->mbPaintDisabled;
}
sal_Bool Window::IsUpdateMode() const
{
return !mpWindowImpl->mbNoUpdate;
}
void Window::SetParentUpdateMode( sal_Bool bUpdate )
{
mpWindowImpl->mbNoParentUpdate = !bUpdate;
}
sal_Bool Window::IsActive() const
{
return mpWindowImpl->mbActive;
}
sal_uInt16 Window::GetGetFocusFlags() const
{
return mpWindowImpl->mnGetFocusFlags;
}
sal_Bool Window::IsCompoundControl() const
{
return mpWindowImpl->mbCompoundControl;
}
sal_Bool Window::IsWait() const
{
return (mpWindowImpl->mnWaitCount != 0);
}
Cursor* Window::GetCursor() const
{
return mpWindowImpl->mpCursor;
}
const Fraction& Window::GetZoom() const
{
return mpWindowImpl->maZoom;
}
sal_Bool Window::IsZoom() const
{
return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator();
}
void Window::SetHelpText( const OUString& rHelpText )
{
mpWindowImpl->maHelpText = rHelpText;
mpWindowImpl->mbHelpTextDynamic = sal_True;
}
void Window::SetQuickHelpText( const OUString& rHelpText )
{
mpWindowImpl->maQuickHelpText = rHelpText;
}
const OUString& Window::GetQuickHelpText() const
{
return mpWindowImpl->maQuickHelpText;
}
void Window::SetData( void* pNewData )
{
mpWindowImpl->mpUserData = pNewData;
}
void* Window::GetData() const
{
return mpWindowImpl->mpUserData;
}
sal_Bool Window::IsCreatedWithToolkit() const
{
return mpWindowImpl->mbCreatedWithToolkit;
}
void Window::SetCreatedWithToolkit( sal_Bool b )
{
mpWindowImpl->mbCreatedWithToolkit = b;
}
const Pointer& Window::GetPointer() const
{
return mpWindowImpl->maPointer;
}
VCLXWindow* Window::GetWindowPeer() const
{
return mpWindowImpl->mpVCLXWindow;
}
void Window::SetPosPixel( const Point& rNewPos )
{
setPosSizePixel( rNewPos.X(), rNewPos.Y(), 0, 0, WINDOW_POSSIZE_POS );
}
void Window::SetSizePixel( const Size& rNewSize )
{
setPosSizePixel( 0, 0, rNewSize.Width(), rNewSize.Height(),
WINDOW_POSSIZE_SIZE );
}
void Window::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{
setPosSizePixel( rNewPos.X(), rNewPos.Y(),
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 ) );
}
//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
namespace
{
bool queue_ungrouped_resize(Window *pOrigWindow)
{
bool bSomeoneCares = false;
Window *pWindow = pOrigWindow->GetParent();
if (pWindow)
{
if (isContainerWindow(*pWindow))
{
bSomeoneCares = true;
}
else if (pWindow->GetType() == WINDOW_TABCONTROL)
{
bSomeoneCares = true;
}
pWindow->queue_resize();
}
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)
{
Window *pOther = *aI;
if (pOther == this)
continue;
queue_ungrouped_resize(pOther);
}
}
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();
}
}
namespace
{
VclAlign toAlign(const OString &rValue)
{
VclAlign eRet = VCL_ALIGN_FILL;
if (rValue == "fill")
eRet = VCL_ALIGN_FILL;
else if (rValue == "start")
eRet = VCL_ALIGN_START;
else if (rValue == "end")
eRet = VCL_ALIGN_END;
else if (rValue == "center")
eRet = VCL_ALIGN_CENTER;
return eRet;
}
}
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;
}
bool Window::set_property(const OString &rKey, const OString &rValue)
{
if ((rKey == "label") || (rKey == "title") || (rKey == "text") )
{
SetText(OStringToOUString(VclBuilder::convertMnemonicMarkup(rValue), RTL_TEXTENCODING_UTF8));
}
else if (rKey == "visible")
Show(toBool(rValue));
else if (rKey == "sensitive")
Enable(toBool(rValue));
else if (rKey == "resizable")
{
WinBits nBits = GetStyle();
nBits &= ~(WB_SIZEABLE);
if (toBool(rValue))
nBits |= WB_SIZEABLE;
SetStyle(nBits);
}
else if (rKey == "xalign")
{
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);
}
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);
}
else if (rKey == "yalign")
{
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);
}
else if (rKey == "wrap")
{
WinBits nBits = GetStyle();
nBits &= ~(WB_WORDBREAK);
if (toBool(rValue))
nBits |= WB_WORDBREAK;
SetStyle(nBits);
}
else if (rKey == "height-request")
set_height_request(rValue.toInt32());
else if (rKey == "width-request")
set_width_request(rValue.toInt32());
else if (rKey == "hexpand")
set_hexpand(toBool(rValue));
else if (rKey == "vexpand")
set_vexpand(toBool(rValue));
else if (rKey == "halign")
set_halign(toAlign(rValue));
else if (rKey == "valign")
set_valign(toAlign(rValue));
else if (rKey == "tooltip-markup")
SetQuickHelpText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else if (rKey == "tooltip-text")
SetQuickHelpText(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else if (rKey == "border-width")
set_border_width(rValue.toInt32());
else if (rKey == "margin-left")
set_margin_left(rValue.toInt32());
else if (rKey == "margin-right")
set_margin_right(rValue.toInt32());
else if (rKey == "margin-top")
set_margin_top(rValue.toInt32());
else if (rKey == "margin-bottom")
set_margin_bottom(rValue.toInt32());
else if (rKey == "hscrollbar-policy")
{
WinBits nBits = GetStyle();
nBits &= ~(WB_AUTOHSCROLL|WB_HSCROLL);
if (rValue == "always")
nBits |= WB_HSCROLL;
else if (rValue == "automatic")
nBits |= WB_AUTOHSCROLL;
SetStyle(nBits);
}
else if (rKey == "vscrollbar-policy")
{
WinBits nBits = GetStyle();
nBits &= ~(WB_AUTOVSCROLL|WB_VSCROLL);
if (rValue == "always")
nBits |= WB_VSCROLL;
else if (rValue == "automatic")
nBits |= WB_AUTOVSCROLL;
SetStyle(nBits);
}
else if (rKey == "accessible-name")
{
SetAccessibleName(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
}
else if (rKey == "accessible-description")
{
SetAccessibleDescription(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
}
else if (rKey == "use-markup")
{
//https://live.gnome.org/GnomeGoals/RemoveMarkupInMessages
SAL_WARN_IF(toBool(rValue), "vcl.layout", "Use pango attributes instead of mark-up");
}
else
{
SAL_INFO("vcl.layout", "unhandled property: " << rKey.getStr());
return false;
}
return true;
}
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();
}
}
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)
{
Size aOptimal = rWindow.GetOptimalSize();
if (aRet.Width() == -1)
aRet.Width() = aOptimal.Width();
if (aRet.Height() == -1)
aRet.Height() = aOptimal.Height();
}
return aRet;
}
}
Size Window::get_preferred_size() const
{
Size aRet(get_ungrouped_preferred_size(*this));
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
if (pWindowImpl->m_xSizeGroup)
{
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());
}
}
}
return aRet;
}
VclAlign Window::get_halign() const
{
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
return pWindowImpl->meHalign;
}
void Window::set_halign(VclAlign eAlign)
{
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
pWindowImpl->meHalign = eAlign;
}
VclAlign Window::get_valign() const
{
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
return pWindowImpl->meValign;
}
void Window::set_valign(VclAlign eAlign)
{
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
pWindowImpl->meValign = eAlign;
}
bool Window::get_hexpand() const
{
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
return pWindowImpl->mbHexpand;
}
void Window::set_hexpand(bool bExpand)
{
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
pWindowImpl->mbHexpand = bExpand;
}
bool Window::get_vexpand() const
{
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
return pWindowImpl->mbVexpand;
}
void Window::set_vexpand(bool bExpand)
{
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;
}
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;
}
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;
}
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;
}
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();
}
}
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;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */