2010-10-12 15:59:03 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-10-01 16:08:38 +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 .
|
|
|
|
*/
|
2008-08-19 09:17:57 +00:00
|
|
|
#include "SectionWindow.hxx"
|
|
|
|
#include "ReportWindow.hxx"
|
|
|
|
#include "rptui_slotid.hrc"
|
|
|
|
#include "ReportController.hxx"
|
|
|
|
#include "SectionView.hxx"
|
|
|
|
#include "RptDef.hxx"
|
|
|
|
#include "ReportSection.hxx"
|
|
|
|
#include "DesignView.hxx"
|
|
|
|
#include "uistrings.hrc"
|
|
|
|
#include "helpids.hrc"
|
|
|
|
#include "RptResId.hrc"
|
2010-01-28 10:39:25 +01:00
|
|
|
#include "StartMarker.hxx"
|
|
|
|
#include "EndMarker.hxx"
|
|
|
|
#include "ViewsWindow.hxx"
|
|
|
|
|
|
|
|
#include <svtools/colorcfg.hxx>
|
2008-08-19 09:17:57 +00:00
|
|
|
#include <functional>
|
|
|
|
#include <algorithm>
|
|
|
|
#include <vcl/svapp.hxx>
|
2014-01-02 23:52:37 +01:00
|
|
|
#include <vcl/settings.hxx>
|
|
|
|
|
2010-01-28 10:39:25 +01:00
|
|
|
#include <connectivity/dbtools.hxx>
|
2008-08-19 09:17:57 +00:00
|
|
|
|
|
|
|
namespace rptui
|
|
|
|
{
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
using namespace ::comphelper;
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const uno::Reference< report::XSection >& _xSection,const OUString& _sColorEntry)
|
2008-08-19 09:17:57 +00:00
|
|
|
: Window( _pParent,WB_DIALOGCONTROL)
|
|
|
|
,OPropertyChangeListener(m_aMutex)
|
|
|
|
,m_pParent(_pParent)
|
|
|
|
,m_aStartMarker( this,_sColorEntry)
|
|
|
|
,m_aReportSection( this,_xSection)
|
|
|
|
,m_aSplitter(this)
|
|
|
|
,m_aEndMarker( this,_sColorEntry)
|
|
|
|
{
|
|
|
|
SetUniqueId(UID_RPT_SECTIONSWINDOW);
|
2008-12-01 12:31:27 +00:00
|
|
|
const MapMode& rMapMode = _pParent->GetMapMode();
|
|
|
|
SetMapMode( rMapMode );
|
2008-08-19 09:17:57 +00:00
|
|
|
ImplInitSettings();
|
|
|
|
// TRY
|
|
|
|
m_aSplitter.SetMapMode( MapMode( MAP_100TH_MM ) );
|
|
|
|
m_aSplitter.SetStartSplitHdl(LINK(this, OSectionWindow,StartSplitHdl));
|
|
|
|
m_aSplitter.SetSplitHdl(LINK(this, OSectionWindow,SplitHdl));
|
|
|
|
m_aSplitter.SetEndSplitHdl(LINK(this, OSectionWindow,EndSplitHdl));
|
|
|
|
m_aSplitter.SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ));
|
|
|
|
m_aSplitter.SetSplitPosPixel(m_aSplitter.LogicToPixel(Size(0,_xSection->getHeight())).Height());
|
2008-12-01 12:31:27 +00:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
|
|
|
|
m_aStartMarker.setCollapsedHdl(LINK(this,OSectionWindow,Collapsed));
|
|
|
|
|
2008-12-01 12:31:27 +00:00
|
|
|
m_aStartMarker.zoom(rMapMode.GetScaleX());
|
|
|
|
setZoomFactor(rMapMode.GetScaleX(),m_aReportSection);
|
|
|
|
setZoomFactor(rMapMode.GetScaleX(),m_aSplitter);
|
|
|
|
setZoomFactor(rMapMode.GetScaleX(),m_aEndMarker);
|
|
|
|
|
|
|
|
m_aSplitter.Show();
|
2008-08-19 09:17:57 +00:00
|
|
|
m_aStartMarker.Show();
|
|
|
|
m_aReportSection.Show();
|
|
|
|
m_aEndMarker.Show();
|
|
|
|
Show();
|
|
|
|
|
|
|
|
m_pSectionMulti = new OPropertyChangeMultiplexer(this,_xSection.get());
|
|
|
|
m_pSectionMulti->addProperty(PROPERTY_NAME);
|
|
|
|
m_pSectionMulti->addProperty(PROPERTY_HEIGHT);
|
|
|
|
|
|
|
|
beans::PropertyChangeEvent aEvent;
|
|
|
|
aEvent.Source = _xSection;
|
|
|
|
aEvent.PropertyName = PROPERTY_NAME;
|
|
|
|
uno::Reference< report::XGroup > xGroup(_xSection->getGroup());
|
|
|
|
if ( xGroup.is() )
|
|
|
|
{
|
|
|
|
m_pGroupMulti = new OPropertyChangeMultiplexer(this,xGroup.get());
|
|
|
|
m_pGroupMulti->addProperty(PROPERTY_EXPRESSION);
|
|
|
|
aEvent.Source = xGroup;
|
|
|
|
aEvent.PropertyName = PROPERTY_EXPRESSION;
|
|
|
|
}
|
|
|
|
|
|
|
|
_propertyChanged(aEvent);
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
OSectionWindow::~OSectionWindow()
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
if ( m_pSectionMulti.is() )
|
|
|
|
m_pSectionMulti->dispose();
|
|
|
|
if ( m_pGroupMulti.is() )
|
|
|
|
m_pGroupMulti->dispose();
|
|
|
|
}
|
|
|
|
catch (uno::Exception&)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-05-22 21:03:48 +01:00
|
|
|
void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
|
|
|
|
throw (uno::RuntimeException, std::exception)
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
Lock Solar Mutex in rptui::OSectionWindow::_propertyChanged
<https://bugs.freedesktop.org/show_bug.cgi?id=65478#c4> "REPORTBUILDER: Crash by
following case 2 from fdo#61725 + click cancel" comment 4 discusses a scenario
that leads to a fired DbgTestSolarMutex assertion in --enable-dbgutil builds at:
0 0x0000003c80635ba5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:63
1 0x0000003c80637358 in __GI_abort () at abort.c:90
2 0x0000003c8062e972 in __assert_fail_base (fmt=0x3c807793e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fcbe332a8b8 "ImplGetSVData()->mpDefInst->CheckYieldMutex()", file=file@entry=0x7fcbe332a880 "lo/core/vcl/source/app/dbggui.cxx", line=line@entry=1747, function=function@entry=0x7fcbe332b250 <ImplDbgTestSolarMutex()::__PRETTY_FUNCTION__> "void ImplDbgTestSolarMutex()") at assert.c:92
3 0x0000003c8062ea22 in __GI___assert_fail (assertion=0x7fcbe332a8b8 "ImplGetSVData()->mpDefInst->CheckYieldMutex()", file=0x7fcbe332a880 "lo/core/vcl/source/app/dbggui.cxx", line=1747, function=0x7fcbe332b250 <ImplDbgTestSolarMutex()::__PRETTY_FUNCTION__> "void ImplDbgTestSolarMutex()") at assert.c:101
4 0x00007fcbe2bb5ea8 in ImplDbgTestSolarMutex () at lo/core/vcl/source/app/dbggui.cxx:1747
5 0x00007fcbe4053783 in DbgFunc (nAction=15, pParam=0x0) at lo/core/tools/source/debug/debug.cxx:1119
6 0x00007fcbe2e75465 in DbgTestSolarMutex () at lo/core/include/tools/debug.hxx:295
7 0x00007fcbe2e9b213 in OutputDevice::ImplGetGraphics (this=0x1ca8e98) at lo/core/vcl/source/gdi/outdev.cxx:554
8 0x00007fcbe2e9af4c in OutputDevice::ImplHasMirroredGraphics (this=0x1ca8e98) at lo/core/vcl/source/gdi/outdev.cxx:511
9 0x00007fcbe3163f1f in Window::ImplPosSizeWindow (this=0x1ca8e98, nX=127, nY=1199, nWidth=2318, nHeight=13, nFlags=15) at lo/core/vcl/source/window/window.cxx:3286
10 0x00007fcbe31737c1 in Window::setPosSizePixel (this=0x1ca8e98, nX=127, nY=1199, nWidth=2318, nHeight=13, nFlags=15) at lo/core/vcl/source/window/window.cxx:7181
11 0x00007fcbe314fa59 in Window::SetPosSizePixel (this=0x1ca8e98, rNewPos=Point = {...}, rNewSize=Size = {...}) at lo/core/vcl/source/window/window2.cxx:1717
12 0x00007fcb8e0cfd2c in rptui::lcl_setScrollBar (_nNewValue=2318, _aPos=Point = {...}, _aSize=Size = {...}, _rScrollBar=...) at lo/core/reportdesign/source/ui/report/ScrollHelper.cxx:38
13 0x00007fcb8e0d0b41 in rptui::OScrollWindowHelper::ResizeScrollBars (this=0x1ca8cb0) at lo/core/reportdesign/source/ui/report/ScrollHelper.cxx:169
14 0x00007fcb8e0d0c72 in rptui::OScrollWindowHelper::Resize (this=0x1ca8cb0) at lo/core/reportdesign/source/ui/report/ScrollHelper.cxx:182
15 0x00007fcb8e0d0665 in rptui::OScrollWindowHelper::setTotalSize (this=0x1ca8cb0, _nWidth=1186, _nHeight=464) at lo/core/reportdesign/source/ui/report/ScrollHelper.cxx:110
16 0x00007fcb8e0cefba in rptui::OReportWindow::notifySizeChanged (this=0x1ca96c0) at lo/core/reportdesign/source/ui/report/ReportWindow.cxx:255
17 0x00007fcb8e0d3920 in rptui::OSectionWindow::_propertyChanged (this=0x21688a0, _rEvent=...) at lo/core/reportdesign/source/ui/report/SectionWindow.cxx:127
18 0x00007fcbe7271dfb in comphelper::OPropertyChangeMultiplexer::propertyChange (this=0x7fcb8c1f2668, _rEvent=...) at lo/core/comphelper/source/property/propmultiplex.cxx:154
19 0x00007fcbe6b0be20 in cppu::PropertySetMixinImpl::BoundListeners::notify (this=0x7fff42dd9780) at lo/core/cppuhelper/source/propertysetmixin.cxx:399
20 0x00007fcb8ed52b50 in reportdesign::OSection::set<unsigned int> (this=0x7fcbd0199020, _sProperty="Height", _Value=@0x7fff42dd9804: 0, _member=@0x7fcbd0199170: 0) at lo/core/reportdesign/source/core/inc/Section.hxx:96
21 0x00007fcb8ed4e2e2 in reportdesign::OSection::setHeight (this=0x7fcbd0199020, _height=0) at lo/core/reportdesign/source/core/api/Section.cxx:255
22 0x00007fcbd42877de in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, unsigned int, double*, unsigned int) () from lo/core/solver/unxlngx6/installation/opt/ure/lib/libgcc3_uno.so
23 0x00007fcbd428681a in cpp_call (pThis=0x202ea90, aVtableSlot=..., pReturnTypeRef=0x711840, nParams=1, pParams=0x7fff42dd9bc0, pUnoReturn=0x0, pUnoArgs=0x7fff42dd9c80, ppUnoExc=0x7fff42dd9d48) at lo/core/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:237
24 0x00007fcbd4286fa8 in bridges::cpp_uno::shared::unoInterfaceProxyDispatch (pUnoI=0x202ea90, pMemberDescr=0x1e28590, pReturn=0x0, pArgs=0x7fff42dd9c80, ppException=0x7fff42dd9d48) at lo/core/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:368
25 0x00007fcb9d498480 in jni_uno::Bridge::call_uno (this=0x1609c90, jni=..., pUnoI=0x202ea90, member_td=0x1e28590, return_type=0x711840, nParams=1, pParams=0x7fff42dd9e80, jo_args=0x7fff42dda1d0) at lo/core/bridges/source/jni_uno/jni_java2uno.cxx:262
26 0x00007fcb9d4993ec in Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call (jni_env=0x1aec1d8, jo_proxy=0x7fff42dda1f0, bridge_handle=23108752, jo_method=0x7fff42dda1d8, jo_args=0x7fff42dda1d0) at lo/core/bridges/source/jni_uno/jni_java2uno.cxx:589
27 0x00007fcba5011f90 in ?? ()
28 0x00000005ff211500 in ?? ()
29 0x0000000000000000 in ?? ()
Change-Id: Id8f043b87227b589a9d79beaa94006aab3d9ad9d
2013-06-11 15:36:32 +02:00
|
|
|
SolarMutexGuard g;
|
2008-08-19 09:17:57 +00:00
|
|
|
const uno::Reference< report::XSection > xSection(_rEvent.Source,uno::UNO_QUERY);
|
|
|
|
if ( xSection.is() )
|
|
|
|
{
|
|
|
|
const uno::Reference< report::XSection> xCurrentSection = m_aReportSection.getSection();
|
|
|
|
if ( _rEvent.PropertyName.equals(PROPERTY_HEIGHT) )
|
|
|
|
{
|
2014-02-21 12:53:51 +01:00
|
|
|
m_pParent->getView()->SetUpdateMode(false);
|
2011-02-01 13:42:47 +01:00
|
|
|
//Resize();
|
2008-12-01 12:31:27 +00:00
|
|
|
m_pParent->getView()->notifySizeChanged();
|
2008-08-19 09:17:57 +00:00
|
|
|
m_pParent->resize(*this);
|
2014-02-21 12:53:51 +01:00
|
|
|
m_pParent->getView()->SetUpdateMode(true);
|
2011-02-01 13:42:47 +01:00
|
|
|
// getViewsWindow()->getView()->getReportView()->getController().resetZoomType();
|
2008-08-19 09:17:57 +00:00
|
|
|
}
|
|
|
|
else if ( _rEvent.PropertyName.equals(PROPERTY_NAME) && !xSection->getGroup().is() )
|
|
|
|
{
|
2008-12-10 13:41:25 +00:00
|
|
|
uno::Reference< report::XReportDefinition > xReport = xSection->getReportDefinition();
|
|
|
|
if ( setReportSectionTitle(xReport,RID_STR_REPORT_HEADER,::std::mem_fun(&OReportHelper::getReportHeader),::std::mem_fun(&OReportHelper::getReportHeaderOn))
|
|
|
|
|| setReportSectionTitle(xReport,RID_STR_REPORT_FOOTER,::std::mem_fun(&OReportHelper::getReportFooter),::std::mem_fun(&OReportHelper::getReportFooterOn))
|
|
|
|
|| setReportSectionTitle(xReport,RID_STR_PAGE_HEADER,::std::mem_fun(&OReportHelper::getPageHeader),::std::mem_fun(&OReportHelper::getPageHeaderOn))
|
|
|
|
|| setReportSectionTitle(xReport,RID_STR_PAGE_FOOTER,::std::mem_fun(&OReportHelper::getPageFooter),::std::mem_fun(&OReportHelper::getPageFooterOn)) )
|
2011-02-01 13:42:47 +01:00
|
|
|
{
|
2008-12-10 13:41:25 +00:00
|
|
|
m_aStartMarker.Invalidate(INVALIDATE_NOERASE);
|
2011-02-01 13:42:47 +01:00
|
|
|
}
|
2008-12-10 13:41:25 +00:00
|
|
|
else
|
|
|
|
{
|
2013-10-16 15:30:04 +02:00
|
|
|
OUString sTitle = ModuleRes(RID_STR_DETAIL);
|
2008-12-10 13:41:25 +00:00
|
|
|
m_aStartMarker.setTitle(sTitle);
|
|
|
|
m_aStartMarker.Invalidate(INVALIDATE_CHILDREN);
|
|
|
|
}
|
2008-08-19 09:17:57 +00:00
|
|
|
}
|
2010-11-27 01:51:28 +09:00
|
|
|
}
|
2008-08-19 09:17:57 +00:00
|
|
|
else if ( _rEvent.PropertyName.equals(PROPERTY_EXPRESSION) )
|
|
|
|
{
|
|
|
|
uno::Reference< report::XGroup > xGroup(_rEvent.Source,uno::UNO_QUERY);
|
2011-02-01 13:42:47 +01:00
|
|
|
if ( xGroup.is() && !setGroupSectionTitle(xGroup,RID_STR_HEADER,::std::mem_fun(&OGroupHelper::getHeader),::std::mem_fun(&OGroupHelper::getHeaderOn)))
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
2011-02-01 13:42:47 +01:00
|
|
|
setGroupSectionTitle(xGroup,RID_STR_FOOTER,::std::mem_fun(&OGroupHelper::getFooter),::std::mem_fun(&OGroupHelper::getFooterOn));
|
2008-08-19 09:17:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-05-02 08:38:50 +02:00
|
|
|
bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,sal_uInt16 _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OReportHelper> _pGetSection,::std::mem_fun_t<bool,OReportHelper> _pIsSectionOn)
|
2008-12-10 13:41:25 +00:00
|
|
|
{
|
|
|
|
OReportHelper aReportHelper(_xReport);
|
|
|
|
const bool bRet = _pIsSectionOn(&aReportHelper) && _pGetSection(&aReportHelper) == m_aReportSection.getSection();
|
|
|
|
if ( bRet )
|
|
|
|
{
|
2013-10-16 15:30:04 +02:00
|
|
|
OUString sTitle = ModuleRes(_nResId);
|
2008-12-10 13:41:25 +00:00
|
|
|
m_aStartMarker.setTitle(sTitle);
|
|
|
|
m_aStartMarker.Invalidate(INVALIDATE_CHILDREN);
|
2010-11-27 01:51:28 +09:00
|
|
|
}
|
2008-12-10 13:41:25 +00:00
|
|
|
return bRet;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-05-02 08:38:50 +02:00
|
|
|
bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,sal_uInt16 _nResId,::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> _pGetSection,::std::mem_fun_t<bool,OGroupHelper> _pIsSectionOn)
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
|
|
|
OGroupHelper aGroupHelper(_xGroup);
|
2008-12-10 13:41:25 +00:00
|
|
|
const bool bRet = _pIsSectionOn(&aGroupHelper) && _pGetSection(&aGroupHelper) == m_aReportSection.getSection() ;
|
|
|
|
if ( bRet )
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString sExpression = _xGroup->getExpression();
|
|
|
|
OUString sLabel = getViewsWindow()->getView()->getReportView()->getController().getColumnLabel_throw(sExpression);
|
2012-01-03 21:17:13 -02:00
|
|
|
if ( !sLabel.isEmpty() )
|
2010-01-28 10:39:25 +01:00
|
|
|
{
|
|
|
|
sExpression = sLabel;
|
|
|
|
}
|
|
|
|
|
2013-10-17 11:43:40 +02:00
|
|
|
OUString sTitle( ModuleRes(_nResId).toString() );
|
|
|
|
sTitle = sTitle.replaceFirst("#", sExpression);
|
|
|
|
m_aStartMarker.setTitle( sTitle );
|
2008-08-19 09:17:57 +00:00
|
|
|
m_aStartMarker.Invalidate(INVALIDATE_CHILDREN);
|
2010-11-27 01:51:28 +09:00
|
|
|
}
|
2008-12-10 13:41:25 +00:00
|
|
|
return bRet;
|
2008-08-19 09:17:57 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
void OSectionWindow::ImplInitSettings()
|
|
|
|
{
|
2011-02-01 13:42:47 +01:00
|
|
|
static bool t = false;
|
|
|
|
if ( t )
|
|
|
|
{
|
2014-02-21 12:53:51 +01:00
|
|
|
EnableChildTransparentMode( true );
|
2011-02-01 13:42:47 +01:00
|
|
|
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
|
2014-02-21 12:53:51 +01:00
|
|
|
SetPaintTransparent( true );
|
2011-02-01 13:42:47 +01:00
|
|
|
}
|
2008-08-19 09:17:57 +00:00
|
|
|
SetBackground( );
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
void OSectionWindow::DataChanged( const DataChangedEvent& rDCEvt )
|
|
|
|
{
|
|
|
|
Window::DataChanged( rDCEvt );
|
|
|
|
|
|
|
|
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
|
|
|
|
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
|
|
|
|
{
|
|
|
|
ImplInitSettings();
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
void OSectionWindow::Resize()
|
|
|
|
{
|
|
|
|
Window::Resize();
|
|
|
|
|
|
|
|
Size aOutputSize = GetOutputSizePixel();
|
2014-10-23 17:41:47 +02:00
|
|
|
Fraction aEndWidth(long(REPORT_ENDMARKER_WIDTH));
|
2008-08-19 09:17:57 +00:00
|
|
|
aEndWidth *= GetMapMode().GetScaleX();
|
|
|
|
|
2008-12-01 12:31:27 +00:00
|
|
|
const Point aThumbPos = m_pParent->getView()->getThumbPos();
|
|
|
|
aOutputSize.Width() -= aThumbPos.X();
|
2008-08-19 09:17:57 +00:00
|
|
|
aOutputSize.Height() -= m_aSplitter.GetSizePixel().Height();
|
|
|
|
|
|
|
|
if ( m_aStartMarker.isCollapsed() )
|
|
|
|
{
|
|
|
|
Point aPos(0,0);
|
|
|
|
m_aStartMarker.SetPosSizePixel(aPos,aOutputSize);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-12-01 12:31:27 +00:00
|
|
|
const bool bShowEndMarker = m_pParent->getView()->GetTotalWidth() <= (aThumbPos.X() + aOutputSize.Width() );
|
2008-08-19 09:17:57 +00:00
|
|
|
|
2014-10-23 17:41:47 +02:00
|
|
|
Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH));
|
2008-08-19 09:17:57 +00:00
|
|
|
aStartWidth *= GetMapMode().GetScaleX();
|
|
|
|
|
|
|
|
// set start marker
|
2014-10-23 17:41:47 +02:00
|
|
|
m_aStartMarker.SetPosSizePixel(Point(0,0),Size(aStartWidth,aOutputSize.Height()));
|
2008-08-19 09:17:57 +00:00
|
|
|
|
|
|
|
// set report section
|
|
|
|
const uno::Reference< report::XSection> xSection = m_aReportSection.getSection();
|
|
|
|
Size aSectionSize = LogicToPixel( Size( 0,xSection->getHeight() ) );
|
2014-10-23 17:41:47 +02:00
|
|
|
Point aReportPos(aStartWidth,0);
|
|
|
|
aSectionSize.Width() = aOutputSize.Width() - (long)aStartWidth;
|
2008-08-19 09:17:57 +00:00
|
|
|
if ( bShowEndMarker )
|
2014-10-23 17:41:47 +02:00
|
|
|
aSectionSize.Width() -= (long)aEndWidth;
|
2008-12-01 12:31:27 +00:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
m_aReportSection.SetPosSizePixel(aReportPos,aSectionSize);
|
|
|
|
|
|
|
|
// set splitter
|
|
|
|
aReportPos.Y() += aSectionSize.Height();
|
|
|
|
m_aSplitter.SetPosSizePixel(aReportPos,Size(aSectionSize.Width(),m_aSplitter.GetSizePixel().Height()));
|
2014-10-23 17:41:47 +02:00
|
|
|
aSectionSize.Height() = (long)(1000 * (double)GetMapMode().GetScaleY());
|
|
|
|
m_aSplitter.SetDragRectPixel( Rectangle(Point(aStartWidth,0),aSectionSize));
|
2008-08-19 09:17:57 +00:00
|
|
|
|
|
|
|
// set end marker
|
|
|
|
aReportPos.X() += aSectionSize.Width();
|
|
|
|
aReportPos.Y() = 0;
|
|
|
|
m_aEndMarker.Show(bShowEndMarker);
|
2014-10-23 17:41:47 +02:00
|
|
|
m_aEndMarker.SetPosSizePixel(aReportPos,Size(aEndWidth,aOutputSize.Height()));
|
2008-08-19 09:17:57 +00:00
|
|
|
}
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-05-02 08:38:50 +02:00
|
|
|
void OSectionWindow::setCollapsed(bool _bCollapsed)
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
CWS-TOOLING: integrate CWS dba32e
2009-08-10 13:16:25 +0200 fs r274805 : #i84390# typo corrected
2009-08-10 13:04:28 +0200 fs r274804 : #i103741# properly terminate the last token in a string with a 0 byte
2009-07-24 08:54:05 +0200 msc r274286 : #103219# changed long name
2009-07-24 08:42:28 +0200 msc r274285 : #i79649# changed behaviour of the wizard
2009-07-22 14:17:49 +0200 oj r274238 : GrabFocus
2009-07-22 13:38:01 +0200 oj r274232 : #i102934# mixed up
2009-07-22 13:37:16 +0200 oj r274231 : #i102934# mixed up
2009-07-21 12:30:36 +0200 oj r274176 : crash when using distinct
2009-07-21 10:03:44 +0200 oj r274163 : set last char to 0
2009-07-21 09:31:22 +0200 oj r274161 : mediatype corrected
2009-07-20 11:45:33 +0200 fs r274118 : typo in formatting string
2009-07-20 11:40:39 +0200 fs r274117 : removed unused include
2009-07-20 11:40:01 +0200 fs r274116 : class name corrected
2009-07-16 13:41:45 +0200 oj r274046 : i101587 wrong check for embeddeddatabase url in confguration, have to check path
2009-07-16 13:12:05 +0200 tbo r274044 : #i103219# adjust declarion to new hid.lst
2009-07-16 12:43:48 +0200 oj r274041 : #i102497# check also fot longvarchar
2009-07-16 12:15:41 +0200 oj r274039 : #i103030# handle type description and exceptions as well
2009-07-16 11:14:26 +0200 fs r274035 : let SVN ignore output paths
2009-07-16 09:23:43 +0200 fs r274030 : TransforFormComponentProperties: no need to check for attribute equality
2009-07-10 14:16:23 +0200 oj r273892 : CWS-TOOLING: rebase CWS dba32e to trunk@273858 (milestone: DEV300:m52)
2009-07-01 21:41:50 +0200 fs r273614 : #i10000#
2009-07-01 15:01:10 +0200 fs r273589 : Input required doesn't make sense at all in XML form documents
2009-07-01 12:10:31 +0200 fs r273562 : updated
2009-07-01 11:46:12 +0200 fs r273560 : #i103219# add about 100 missing long names
2009-07-01 10:11:41 +0200 fs r273551 : moved from socket/port usage to pipe/name usage, which is more common nowadays
2009-07-01 09:50:03 +0200 fs r273549 : removed obsolete (empty) folder
2009-07-01 09:47:35 +0200 fs r273548 : copied the code for the Accessibility Workbench herein, formerly located in the old CVS repository, at gsl/awb
2009-06-30 10:07:47 +0200 fs r273493 : merging latest changes from CWS dba32d
2009-06-29 20:46:31 +0200 fs r273482 : #i103138# Rectangle conversions
2009-06-29 10:01:13 +0200 fs r273453 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-29 09:52:13 +0200 fs r273452 : during #i103138#: belongsToDevice is unused nowadays
2009-06-24 12:40:06 +0200 fs r273329 : #i102888# #i102899#
2009-06-24 12:10:29 +0200 oj r273327 : #i103030# some code changes
2009-06-24 09:44:14 +0200 oj r273311 : #i103030# some code changes
2009-06-24 09:24:42 +0200 oj r273309 : #i103030# add log
2009-06-24 09:03:29 +0200 fs r273308 : if a col's table name is schema.table, properly quote all parts
2009-06-24 08:56:06 +0200 oj r273307 : #i102691# changed string
2009-06-23 13:31:43 +0200 oj r273280 : #i102479# fix date, time and datetime
2009-06-23 12:51:28 +0200 oj r273277 : #i103020# clear old expression when updating to avoid dead pointers in treelist userdata
2009-06-23 12:17:16 +0200 oj r273275 : #i103030# add LogBridge
2009-06-23 11:53:10 +0200 oj r273272 : shawdowed var resolved
2009-06-23 11:48:49 +0200 oj r273270 : #i103030# add :log to uno env if var UNO_ENV_LOG is set
2009-06-23 11:47:47 +0200 oj r273269 : #i103030# add LogBridge
2009-06-23 11:47:11 +0200 oj r273268 : #i103030# add LogBridge
2009-06-23 08:05:08 +0200 oj r273253 : #i102934# add key for collapsing
2009-06-22 13:21:33 +0200 fs r273225 : merging latest changes from CWS dba32d
2009-06-22 13:15:22 +0200 fs r273221 : why restrict to 12 entries?
2009-06-22 08:12:21 +0200 oj r273196 : #i102655# choosen > chosen typo fixed
2009-06-22 08:08:04 +0200 oj r273195 : #i102657# typo fix
2009-06-22 08:06:28 +0200 oj r273194 : #i102934# expanding and collasping of section
2009-06-22 08:05:52 +0200 oj r273193 : #i102930# set focus in treelistbox
2009-06-22 08:04:56 +0200 oj r273192 : #i102929# enable tabstop
2009-06-19 13:18:26 +0200 oj r273157 : remove unused param
2009-06-19 10:07:05 +0200 oj r273149 : CWS-TOOLING: rebase CWS dba32e to trunk@272827 (milestone: DEV300:m50)
2009-06-19 07:32:40 +0200 oj r273146 : merge from dba32d to dba32e
2009-06-19 07:22:56 +0200 oj r273145 : merge from dba32d to dba32e
2009-06-19 07:22:33 +0200 oj r273144 : merge from dba32d to dba32e
2009-06-18 14:09:34 +0200 fs r273116 : merging the latest changes from CWS dba32d (up to revision 273108) herein, which effectively is a rebase to DEV300.m50
2009-06-18 08:50:35 +0200 oj r273098 : #i102894# fix for new line in text
2009-06-18 08:28:48 +0200 oj r273097 : #i102892# check any
2009-06-18 08:21:34 +0200 oj r273096 : check if error is valid
2009-06-16 13:49:28 +0200 fs r273019 : why make a drop down control by default? The form control factory in SVX does this better those days ...
2009-06-10 09:53:20 +0200 oj r272797 : add lic text
2009-06-10 09:48:55 +0200 oj r272796 : test added for i101618
2009-06-09 14:57:39 +0200 oj r272771 : #i101618# access database document only when script container is needed
2009-06-09 12:42:25 +0200 oj r272765 : #i102497# check type property
2009-06-09 12:32:49 +0200 oj r272764 : adjust test cases
2009-06-09 12:31:58 +0200 oj r272763 : adjust test cases
2009-06-09 12:31:22 +0200 oj r272762 : adjust test cases
2009-06-09 11:35:42 +0200 oj r272761 : check if error is valid
2009-06-09 11:29:42 +0200 oj r272760 : #i102497# longvarchar was missing
2009-06-08 14:52:49 +0200 fs r272733 : #i102564# when setting a new field, also set m_nFieldType
2009-06-08 13:51:20 +0200 oj r272730 : add tests
2009-06-05 14:38:01 +0200 oj r272686 : add dep
2009-06-05 14:35:00 +0200 oj r272684 : add new tests
2009-06-05 13:41:18 +0200 oj r272681 : code clean ups
2009-06-05 12:40:51 +0200 oj r272678 : code cleanup
2009-06-05 12:02:57 +0200 oj r272677 : code cleanup
2009-06-05 10:42:38 +0200 oj r272670 : #i49320# impl export of single rows and as RTF and HTML
2009-06-03 14:30:37 +0200 oj r272576 : #i79649# check if file matches filter wildcard
2009-06-03 13:41:57 +0200 oj r272560 : #i102470# impl not b like 'c'
2009-08-26 10:09:17 +00:00
|
|
|
if ( m_aStartMarker.isCollapsed() != _bCollapsed )
|
|
|
|
{
|
|
|
|
m_aStartMarker.setCollapsed(_bCollapsed);
|
|
|
|
}
|
2008-08-19 09:17:57 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
void OSectionWindow::showProperties()
|
|
|
|
{
|
|
|
|
m_pParent->getView()->showProperties( m_aReportSection.getSection().get() );
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-05-02 08:38:50 +02:00
|
|
|
void OSectionWindow::setMarked(bool _bMark)
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
|
|
|
m_aStartMarker.setMarked(_bMark);
|
|
|
|
m_aEndMarker.setMarked(_bMark);
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
CWS-TOOLING: integrate CWS dba32e
2009-08-10 13:16:25 +0200 fs r274805 : #i84390# typo corrected
2009-08-10 13:04:28 +0200 fs r274804 : #i103741# properly terminate the last token in a string with a 0 byte
2009-07-24 08:54:05 +0200 msc r274286 : #103219# changed long name
2009-07-24 08:42:28 +0200 msc r274285 : #i79649# changed behaviour of the wizard
2009-07-22 14:17:49 +0200 oj r274238 : GrabFocus
2009-07-22 13:38:01 +0200 oj r274232 : #i102934# mixed up
2009-07-22 13:37:16 +0200 oj r274231 : #i102934# mixed up
2009-07-21 12:30:36 +0200 oj r274176 : crash when using distinct
2009-07-21 10:03:44 +0200 oj r274163 : set last char to 0
2009-07-21 09:31:22 +0200 oj r274161 : mediatype corrected
2009-07-20 11:45:33 +0200 fs r274118 : typo in formatting string
2009-07-20 11:40:39 +0200 fs r274117 : removed unused include
2009-07-20 11:40:01 +0200 fs r274116 : class name corrected
2009-07-16 13:41:45 +0200 oj r274046 : i101587 wrong check for embeddeddatabase url in confguration, have to check path
2009-07-16 13:12:05 +0200 tbo r274044 : #i103219# adjust declarion to new hid.lst
2009-07-16 12:43:48 +0200 oj r274041 : #i102497# check also fot longvarchar
2009-07-16 12:15:41 +0200 oj r274039 : #i103030# handle type description and exceptions as well
2009-07-16 11:14:26 +0200 fs r274035 : let SVN ignore output paths
2009-07-16 09:23:43 +0200 fs r274030 : TransforFormComponentProperties: no need to check for attribute equality
2009-07-10 14:16:23 +0200 oj r273892 : CWS-TOOLING: rebase CWS dba32e to trunk@273858 (milestone: DEV300:m52)
2009-07-01 21:41:50 +0200 fs r273614 : #i10000#
2009-07-01 15:01:10 +0200 fs r273589 : Input required doesn't make sense at all in XML form documents
2009-07-01 12:10:31 +0200 fs r273562 : updated
2009-07-01 11:46:12 +0200 fs r273560 : #i103219# add about 100 missing long names
2009-07-01 10:11:41 +0200 fs r273551 : moved from socket/port usage to pipe/name usage, which is more common nowadays
2009-07-01 09:50:03 +0200 fs r273549 : removed obsolete (empty) folder
2009-07-01 09:47:35 +0200 fs r273548 : copied the code for the Accessibility Workbench herein, formerly located in the old CVS repository, at gsl/awb
2009-06-30 10:07:47 +0200 fs r273493 : merging latest changes from CWS dba32d
2009-06-29 20:46:31 +0200 fs r273482 : #i103138# Rectangle conversions
2009-06-29 10:01:13 +0200 fs r273453 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-29 09:52:13 +0200 fs r273452 : during #i103138#: belongsToDevice is unused nowadays
2009-06-24 12:40:06 +0200 fs r273329 : #i102888# #i102899#
2009-06-24 12:10:29 +0200 oj r273327 : #i103030# some code changes
2009-06-24 09:44:14 +0200 oj r273311 : #i103030# some code changes
2009-06-24 09:24:42 +0200 oj r273309 : #i103030# add log
2009-06-24 09:03:29 +0200 fs r273308 : if a col's table name is schema.table, properly quote all parts
2009-06-24 08:56:06 +0200 oj r273307 : #i102691# changed string
2009-06-23 13:31:43 +0200 oj r273280 : #i102479# fix date, time and datetime
2009-06-23 12:51:28 +0200 oj r273277 : #i103020# clear old expression when updating to avoid dead pointers in treelist userdata
2009-06-23 12:17:16 +0200 oj r273275 : #i103030# add LogBridge
2009-06-23 11:53:10 +0200 oj r273272 : shawdowed var resolved
2009-06-23 11:48:49 +0200 oj r273270 : #i103030# add :log to uno env if var UNO_ENV_LOG is set
2009-06-23 11:47:47 +0200 oj r273269 : #i103030# add LogBridge
2009-06-23 11:47:11 +0200 oj r273268 : #i103030# add LogBridge
2009-06-23 08:05:08 +0200 oj r273253 : #i102934# add key for collapsing
2009-06-22 13:21:33 +0200 fs r273225 : merging latest changes from CWS dba32d
2009-06-22 13:15:22 +0200 fs r273221 : why restrict to 12 entries?
2009-06-22 08:12:21 +0200 oj r273196 : #i102655# choosen > chosen typo fixed
2009-06-22 08:08:04 +0200 oj r273195 : #i102657# typo fix
2009-06-22 08:06:28 +0200 oj r273194 : #i102934# expanding and collasping of section
2009-06-22 08:05:52 +0200 oj r273193 : #i102930# set focus in treelistbox
2009-06-22 08:04:56 +0200 oj r273192 : #i102929# enable tabstop
2009-06-19 13:18:26 +0200 oj r273157 : remove unused param
2009-06-19 10:07:05 +0200 oj r273149 : CWS-TOOLING: rebase CWS dba32e to trunk@272827 (milestone: DEV300:m50)
2009-06-19 07:32:40 +0200 oj r273146 : merge from dba32d to dba32e
2009-06-19 07:22:56 +0200 oj r273145 : merge from dba32d to dba32e
2009-06-19 07:22:33 +0200 oj r273144 : merge from dba32d to dba32e
2009-06-18 14:09:34 +0200 fs r273116 : merging the latest changes from CWS dba32d (up to revision 273108) herein, which effectively is a rebase to DEV300.m50
2009-06-18 08:50:35 +0200 oj r273098 : #i102894# fix for new line in text
2009-06-18 08:28:48 +0200 oj r273097 : #i102892# check any
2009-06-18 08:21:34 +0200 oj r273096 : check if error is valid
2009-06-16 13:49:28 +0200 fs r273019 : why make a drop down control by default? The form control factory in SVX does this better those days ...
2009-06-10 09:53:20 +0200 oj r272797 : add lic text
2009-06-10 09:48:55 +0200 oj r272796 : test added for i101618
2009-06-09 14:57:39 +0200 oj r272771 : #i101618# access database document only when script container is needed
2009-06-09 12:42:25 +0200 oj r272765 : #i102497# check type property
2009-06-09 12:32:49 +0200 oj r272764 : adjust test cases
2009-06-09 12:31:58 +0200 oj r272763 : adjust test cases
2009-06-09 12:31:22 +0200 oj r272762 : adjust test cases
2009-06-09 11:35:42 +0200 oj r272761 : check if error is valid
2009-06-09 11:29:42 +0200 oj r272760 : #i102497# longvarchar was missing
2009-06-08 14:52:49 +0200 fs r272733 : #i102564# when setting a new field, also set m_nFieldType
2009-06-08 13:51:20 +0200 oj r272730 : add tests
2009-06-05 14:38:01 +0200 oj r272686 : add dep
2009-06-05 14:35:00 +0200 oj r272684 : add new tests
2009-06-05 13:41:18 +0200 oj r272681 : code clean ups
2009-06-05 12:40:51 +0200 oj r272678 : code cleanup
2009-06-05 12:02:57 +0200 oj r272677 : code cleanup
2009-06-05 10:42:38 +0200 oj r272670 : #i49320# impl export of single rows and as RTF and HTML
2009-06-03 14:30:37 +0200 oj r272576 : #i79649# check if file matches filter wildcard
2009-06-03 13:41:57 +0200 oj r272560 : #i102470# impl not b like 'c'
2009-08-26 10:09:17 +00:00
|
|
|
IMPL_LINK( OSectionWindow, Collapsed, OColorListener *, _pMarker )
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
|
|
|
if ( _pMarker )
|
|
|
|
{
|
2014-05-08 11:42:32 +02:00
|
|
|
bool bShow = !_pMarker->isCollapsed();
|
CWS-TOOLING: integrate CWS dba32e
2009-08-10 13:16:25 +0200 fs r274805 : #i84390# typo corrected
2009-08-10 13:04:28 +0200 fs r274804 : #i103741# properly terminate the last token in a string with a 0 byte
2009-07-24 08:54:05 +0200 msc r274286 : #103219# changed long name
2009-07-24 08:42:28 +0200 msc r274285 : #i79649# changed behaviour of the wizard
2009-07-22 14:17:49 +0200 oj r274238 : GrabFocus
2009-07-22 13:38:01 +0200 oj r274232 : #i102934# mixed up
2009-07-22 13:37:16 +0200 oj r274231 : #i102934# mixed up
2009-07-21 12:30:36 +0200 oj r274176 : crash when using distinct
2009-07-21 10:03:44 +0200 oj r274163 : set last char to 0
2009-07-21 09:31:22 +0200 oj r274161 : mediatype corrected
2009-07-20 11:45:33 +0200 fs r274118 : typo in formatting string
2009-07-20 11:40:39 +0200 fs r274117 : removed unused include
2009-07-20 11:40:01 +0200 fs r274116 : class name corrected
2009-07-16 13:41:45 +0200 oj r274046 : i101587 wrong check for embeddeddatabase url in confguration, have to check path
2009-07-16 13:12:05 +0200 tbo r274044 : #i103219# adjust declarion to new hid.lst
2009-07-16 12:43:48 +0200 oj r274041 : #i102497# check also fot longvarchar
2009-07-16 12:15:41 +0200 oj r274039 : #i103030# handle type description and exceptions as well
2009-07-16 11:14:26 +0200 fs r274035 : let SVN ignore output paths
2009-07-16 09:23:43 +0200 fs r274030 : TransforFormComponentProperties: no need to check for attribute equality
2009-07-10 14:16:23 +0200 oj r273892 : CWS-TOOLING: rebase CWS dba32e to trunk@273858 (milestone: DEV300:m52)
2009-07-01 21:41:50 +0200 fs r273614 : #i10000#
2009-07-01 15:01:10 +0200 fs r273589 : Input required doesn't make sense at all in XML form documents
2009-07-01 12:10:31 +0200 fs r273562 : updated
2009-07-01 11:46:12 +0200 fs r273560 : #i103219# add about 100 missing long names
2009-07-01 10:11:41 +0200 fs r273551 : moved from socket/port usage to pipe/name usage, which is more common nowadays
2009-07-01 09:50:03 +0200 fs r273549 : removed obsolete (empty) folder
2009-07-01 09:47:35 +0200 fs r273548 : copied the code for the Accessibility Workbench herein, formerly located in the old CVS repository, at gsl/awb
2009-06-30 10:07:47 +0200 fs r273493 : merging latest changes from CWS dba32d
2009-06-29 20:46:31 +0200 fs r273482 : #i103138# Rectangle conversions
2009-06-29 10:01:13 +0200 fs r273453 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-29 09:52:13 +0200 fs r273452 : during #i103138#: belongsToDevice is unused nowadays
2009-06-24 12:40:06 +0200 fs r273329 : #i102888# #i102899#
2009-06-24 12:10:29 +0200 oj r273327 : #i103030# some code changes
2009-06-24 09:44:14 +0200 oj r273311 : #i103030# some code changes
2009-06-24 09:24:42 +0200 oj r273309 : #i103030# add log
2009-06-24 09:03:29 +0200 fs r273308 : if a col's table name is schema.table, properly quote all parts
2009-06-24 08:56:06 +0200 oj r273307 : #i102691# changed string
2009-06-23 13:31:43 +0200 oj r273280 : #i102479# fix date, time and datetime
2009-06-23 12:51:28 +0200 oj r273277 : #i103020# clear old expression when updating to avoid dead pointers in treelist userdata
2009-06-23 12:17:16 +0200 oj r273275 : #i103030# add LogBridge
2009-06-23 11:53:10 +0200 oj r273272 : shawdowed var resolved
2009-06-23 11:48:49 +0200 oj r273270 : #i103030# add :log to uno env if var UNO_ENV_LOG is set
2009-06-23 11:47:47 +0200 oj r273269 : #i103030# add LogBridge
2009-06-23 11:47:11 +0200 oj r273268 : #i103030# add LogBridge
2009-06-23 08:05:08 +0200 oj r273253 : #i102934# add key for collapsing
2009-06-22 13:21:33 +0200 fs r273225 : merging latest changes from CWS dba32d
2009-06-22 13:15:22 +0200 fs r273221 : why restrict to 12 entries?
2009-06-22 08:12:21 +0200 oj r273196 : #i102655# choosen > chosen typo fixed
2009-06-22 08:08:04 +0200 oj r273195 : #i102657# typo fix
2009-06-22 08:06:28 +0200 oj r273194 : #i102934# expanding and collasping of section
2009-06-22 08:05:52 +0200 oj r273193 : #i102930# set focus in treelistbox
2009-06-22 08:04:56 +0200 oj r273192 : #i102929# enable tabstop
2009-06-19 13:18:26 +0200 oj r273157 : remove unused param
2009-06-19 10:07:05 +0200 oj r273149 : CWS-TOOLING: rebase CWS dba32e to trunk@272827 (milestone: DEV300:m50)
2009-06-19 07:32:40 +0200 oj r273146 : merge from dba32d to dba32e
2009-06-19 07:22:56 +0200 oj r273145 : merge from dba32d to dba32e
2009-06-19 07:22:33 +0200 oj r273144 : merge from dba32d to dba32e
2009-06-18 14:09:34 +0200 fs r273116 : merging the latest changes from CWS dba32d (up to revision 273108) herein, which effectively is a rebase to DEV300.m50
2009-06-18 08:50:35 +0200 oj r273098 : #i102894# fix for new line in text
2009-06-18 08:28:48 +0200 oj r273097 : #i102892# check any
2009-06-18 08:21:34 +0200 oj r273096 : check if error is valid
2009-06-16 13:49:28 +0200 fs r273019 : why make a drop down control by default? The form control factory in SVX does this better those days ...
2009-06-10 09:53:20 +0200 oj r272797 : add lic text
2009-06-10 09:48:55 +0200 oj r272796 : test added for i101618
2009-06-09 14:57:39 +0200 oj r272771 : #i101618# access database document only when script container is needed
2009-06-09 12:42:25 +0200 oj r272765 : #i102497# check type property
2009-06-09 12:32:49 +0200 oj r272764 : adjust test cases
2009-06-09 12:31:58 +0200 oj r272763 : adjust test cases
2009-06-09 12:31:22 +0200 oj r272762 : adjust test cases
2009-06-09 11:35:42 +0200 oj r272761 : check if error is valid
2009-06-09 11:29:42 +0200 oj r272760 : #i102497# longvarchar was missing
2009-06-08 14:52:49 +0200 fs r272733 : #i102564# when setting a new field, also set m_nFieldType
2009-06-08 13:51:20 +0200 oj r272730 : add tests
2009-06-05 14:38:01 +0200 oj r272686 : add dep
2009-06-05 14:35:00 +0200 oj r272684 : add new tests
2009-06-05 13:41:18 +0200 oj r272681 : code clean ups
2009-06-05 12:40:51 +0200 oj r272678 : code cleanup
2009-06-05 12:02:57 +0200 oj r272677 : code cleanup
2009-06-05 10:42:38 +0200 oj r272670 : #i49320# impl export of single rows and as RTF and HTML
2009-06-03 14:30:37 +0200 oj r272576 : #i79649# check if file matches filter wildcard
2009-06-03 13:41:57 +0200 oj r272560 : #i102470# impl not b like 'c'
2009-08-26 10:09:17 +00:00
|
|
|
m_aReportSection.Show(bShow);
|
|
|
|
m_aEndMarker.Show(bShow);
|
|
|
|
m_aSplitter.Show(bShow);
|
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
m_pParent->resize(*this);
|
|
|
|
}
|
|
|
|
return 0L;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-10-23 17:41:47 +02:00
|
|
|
void OSectionWindow::zoom(const Fraction& _aZoom)
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
2008-12-01 12:31:27 +00:00
|
|
|
setZoomFactor(_aZoom,*this);
|
|
|
|
m_aStartMarker.zoom(_aZoom);
|
|
|
|
|
|
|
|
setZoomFactor(_aZoom,m_aReportSection);
|
|
|
|
setZoomFactor(_aZoom,m_aSplitter);
|
|
|
|
setZoomFactor(_aZoom,m_aEndMarker);
|
2010-11-27 01:51:28 +09:00
|
|
|
Invalidate();
|
2008-08-19 09:17:57 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
IMPL_LINK( OSectionWindow, StartSplitHdl, Splitter*, )
|
|
|
|
{
|
2013-10-16 15:30:04 +02:00
|
|
|
const OUString sUndoAction( ModuleRes( RID_STR_UNDO_CHANGE_SIZE ) );
|
|
|
|
getViewsWindow()->getView()->getReportView()->getController().getUndoManager().EnterListAction( sUndoAction, OUString() );
|
2008-08-19 09:17:57 +00:00
|
|
|
return 0L;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
IMPL_LINK( OSectionWindow, EndSplitHdl, Splitter*, )
|
|
|
|
{
|
2010-11-25 14:29:43 +01:00
|
|
|
getViewsWindow()->getView()->getReportView()->getController().getUndoManager().LeaveListAction();
|
2008-08-19 09:17:57 +00:00
|
|
|
return 0L;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
IMPL_LINK( OSectionWindow, SplitHdl, Splitter*, _pSplitter )
|
|
|
|
{
|
|
|
|
if ( !getViewsWindow()->getView()->getReportView()->getController().isEditable() )
|
|
|
|
{
|
|
|
|
return 0L;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 nSplitPos = _pSplitter->GetSplitPosPixel();
|
|
|
|
|
|
|
|
const uno::Reference< report::XSection> xSection = m_aReportSection.getSection();
|
|
|
|
nSplitPos = m_aSplitter.PixelToLogic(Size(0,nSplitPos)).Height();
|
|
|
|
|
|
|
|
const sal_Int32 nCount = xSection->getCount();
|
|
|
|
for (sal_Int32 i = 0; i < nCount; ++i)
|
|
|
|
{
|
|
|
|
uno::Reference<report::XReportComponent> xReportComponent(xSection->getByIndex(i),uno::UNO_QUERY);
|
2010-11-27 01:51:28 +09:00
|
|
|
if ( xReportComponent.is() )
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
2008-12-10 13:41:25 +00:00
|
|
|
nSplitPos = ::std::max(nSplitPos,xReportComponent->getPositionY() + xReportComponent->getHeight());
|
2008-08-19 09:17:57 +00:00
|
|
|
}
|
2010-11-27 01:51:28 +09:00
|
|
|
}
|
2008-08-19 09:17:57 +00:00
|
|
|
|
|
|
|
if ( nSplitPos < 0 )
|
|
|
|
nSplitPos = 0;
|
|
|
|
|
|
|
|
xSection->setHeight(nSplitPos);
|
2008-12-10 13:41:25 +00:00
|
|
|
m_aSplitter.SetSplitPosPixel(m_aSplitter.LogicToPixel(Size(0,nSplitPos)).Height());
|
2008-08-19 09:17:57 +00:00
|
|
|
|
|
|
|
return 0L;
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-09-23 11:20:40 +02:00
|
|
|
void lcl_scroll(vcl::Window& _rWindow,const Point& _aDelta)
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
2010-11-27 01:51:28 +09:00
|
|
|
_rWindow.Scroll(-_aDelta.X(),-_aDelta.Y());
|
2008-08-19 09:17:57 +00:00
|
|
|
_rWindow.Invalidate(INVALIDATE_TRANSPARENT);
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-09-23 11:20:40 +02:00
|
|
|
void lcl_setOrigin(vcl::Window& _rWindow,long _nX, long _nY)
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
|
|
|
MapMode aMap = _rWindow.GetMapMode();
|
2008-12-01 12:31:27 +00:00
|
|
|
aMap.SetOrigin( Point(- _nX, - _nY));
|
2008-08-19 09:17:57 +00:00
|
|
|
_rWindow.SetMapMode( aMap );
|
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2008-12-01 12:31:27 +00:00
|
|
|
void OSectionWindow::scrollChildren(long _nX)
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
2008-12-01 12:31:27 +00:00
|
|
|
const Point aDelta( _nX,0 );
|
|
|
|
|
|
|
|
MapMode aMapMode( m_aReportSection.GetMapMode() );
|
|
|
|
const Point aOld = aMapMode.GetOrigin();
|
|
|
|
lcl_setOrigin(m_aReportSection,aDelta.X(), 0);
|
|
|
|
|
|
|
|
aMapMode = m_aReportSection.GetMapMode();
|
|
|
|
const Point aNew = aMapMode.GetOrigin();
|
|
|
|
const Point aDiff = aOld - aNew;
|
2008-08-19 09:17:57 +00:00
|
|
|
{
|
2008-12-01 12:31:27 +00:00
|
|
|
lcl_scroll(m_aReportSection,aDiff);
|
2008-08-19 09:17:57 +00:00
|
|
|
}
|
|
|
|
|
2008-12-01 12:31:27 +00:00
|
|
|
lcl_scroll(m_aEndMarker,m_aEndMarker.PixelToLogic(Point(_nX,0)));
|
2008-08-19 09:17:57 +00:00
|
|
|
|
2008-12-01 12:31:27 +00:00
|
|
|
lcl_setOrigin(m_aSplitter,_nX, 0);
|
|
|
|
lcl_scroll(m_aSplitter,aDiff);
|
2008-08-19 09:17:57 +00:00
|
|
|
}
|
2014-02-25 19:49:46 +01:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
} // rptui
|
2014-02-25 19:49:46 +01:00
|
|
|
|
2008-08-19 09:17:57 +00:00
|
|
|
|
2010-10-12 15:59:03 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|