summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-12-02 13:43:47 +0100
committerKurt Zenker <kz@openoffice.org>2009-12-02 13:43:47 +0100
commitad1bc80b6d8391195ec6ccaf25ee12c1d02a5850 (patch)
treedaa19f76ff9e8bbb9b1651e76806a469b2815372 /svx/source
parent041210d90f162084e98b1fc0acbe744926ac8f60 (diff)
parentfc02f9b3673187ccada1a09f79ad042065578af0 (diff)
CWS-TOOLING: integrate CWS dba32i_DEV300
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/fmcomp/gridcell.cxx4
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx107
-rw-r--r--svx/source/sdr/overlay/overlaymanagerbuffered.cxx37
3 files changed, 118 insertions, 30 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index ff7cfd422eb8..b70ba93a00e1 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2080,7 +2080,7 @@ SpinField* DbCurrencyField::createField( Window* _pParent, WinBits _nFieldStyle,
//------------------------------------------------------------------------------
double DbCurrencyField::GetCurrency(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter) const
{
- volatile double fValue = GetValue(_rxField, xFormatter);
+ double fValue = GetValue(_rxField, xFormatter);
if (m_nScale)
{
// OSL_TRACE("double = %.64f ",fValue);
@@ -2158,7 +2158,7 @@ sal_Bool DbCurrencyField::commitControl()
Any aVal;
if (aText.Len() != 0) // nicht null
{
- volatile double fValue = ((LongCurrencyField*)m_pWindow)->GetValue();
+ double fValue = ((LongCurrencyField*)m_pWindow)->GetValue();
if (m_nScale)
{
fValue /= ::rtl::math::pow10Exp(1.0, m_nScale);
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index bbfe3eaf65ab..ec876ec036ac 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -75,6 +75,52 @@
#include <boost/shared_ptr.hpp>
#include <boost/bind.hpp>
+/*
+
+Form controls (more precise: UNO Controls) in the drawing layer are ... prone to breakage, since they have some
+specialities which the drawing layer currently doesn't capture too well. In particular, having a living VCL
+window as child of the document window, and coupling this Window to a drawing layer object, makes things
+difficult sometimes.
+
+Below is a list of issues which existed in the past. Whenever you change code here, you're encouraged to
+verify those issues are still fixed. (Whenever you have some additional time, you're encouraged to write
+an automatic test for one or more of those issues for which this is possible :)
+
+http://www.openoffice.org/issues/show_bug.cgi?id=105992
+zooming documents containg (alive) form controls improperly positions the controls
+
+http://www.openoffice.org/issues/show_bug.cgi?id=104362
+crash when copy a control
+
+http://www.openoffice.org/issues/show_bug.cgi?id=104544
+Gridcontrol duplicated after design view on/off
+
+http://www.openoffice.org/issues/show_bug.cgi?id=102089
+print preview shows control elements with property printable=false
+
+http://www.openoffice.org/issues/show_bug.cgi?id=102090
+problem with setVisible on TextControl
+
+http://www.openoffice.org/issues/show_bug.cgi?id=103138
+loop when insert a control in draw
+
+http://www.openoffice.org/issues/show_bug.cgi?id=101398
+initially-displaying a document with many controls is very slow
+
+http://www.openoffice.org/issues/show_bug.cgi?id=72429
+repaint error in form wizard in bugdoc database
+
+http://www.openoffice.org/issues/show_bug.cgi?id=72694
+form control artifacts when scrolling a text fast
+
+
+issues in the old (Sun-internal) bug tracking system:
+
+#110592#
+form controls being in redlining or in hidden section are visible in alive-mode
+
+*/
+
//........................................................................
namespace sdr { namespace contact {
//........................................................................
@@ -841,11 +887,6 @@ namespace sdr { namespace contact {
protected:
virtual ::drawinglayer::primitive2d::Primitive2DSequence
- get2DDecomposition(
- const ::drawinglayer::geometry::ViewInformation2D& rViewInformation
- ) const;
-
- virtual ::drawinglayer::primitive2d::Primitive2DSequence
createLocalDecomposition(
const ::drawinglayer::geometry::ViewInformation2D& rViewInformation
) const;
@@ -1056,10 +1097,10 @@ namespace sdr { namespace contact {
namespace
{
- static void lcl_resetFlag( bool& rbFlag )
- {
- rbFlag = false;
- }
+ static void lcl_resetFlag( bool& rbFlag )
+ {
+ rbFlag = false;
+ }
}
//--------------------------------------------------------------------
@@ -1082,8 +1123,8 @@ namespace sdr { namespace contact {
}
m_bCreatingControl = true;
- ::comphelper::ScopeGuard aGuard( ::boost::bind( lcl_resetFlag, ::boost::ref( m_bCreatingControl ) ) );
-
+ ::comphelper::ScopeGuard aGuard( ::boost::bind( lcl_resetFlag, ::boost::ref( m_bCreatingControl ) ) );
+
if ( m_aControl.is() )
{
if ( m_pOutputDeviceForWindow == &_rDevice )
@@ -1588,19 +1629,6 @@ namespace sdr { namespace contact {
}
//--------------------------------------------------------------------
- ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::get2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
- {
- #if OSL_DEBUG_LEVEL > 1
- ::basegfx::B2DVector aScale, aTranslate;
- double fRotate, fShearX;
- _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );
- #endif
- if ( m_pVOCImpl->hasControl() )
- impl_positionAndZoomControl( _rViewInformation );
- return BasePrimitive2D::get2DDecomposition( _rViewInformation );
- }
-
- //--------------------------------------------------------------------
::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::createLocalDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
{
#if OSL_DEBUG_LEVEL > 1
@@ -1737,13 +1765,40 @@ namespace sdr { namespace contact {
// our control already died.
// TODO: Is it worth re-creating the control? Finally, this is a pathological situation, it means some instance
// disposed the control though it doesn't own it. So, /me thinks we should not bother here.
- return drawinglayer::primitive2d::Primitive2DSequence();
-
+ return drawinglayer::primitive2d::Primitive2DSequence();
+
+ // ignore existing controls which are in alive mode and manually switched to "invisible"
+ // #102090# / 2009-06-05 / frank.schoenheit@sun.com
+ const ControlHolder& rControl( m_pImpl->getExistentControl() );
+ if ( rControl.is() && !rControl.isDesignMode() && !rControl.isVisible() )
+ return drawinglayer::primitive2d::Primitive2DSequence();
+
::drawinglayer::primitive2d::Primitive2DReference xPrimitive( new LazyControlCreationPrimitive2D( m_pImpl ) );
return ::drawinglayer::primitive2d::Primitive2DSequence( &xPrimitive, 1 );
}
//--------------------------------------------------------------------
+ bool ViewObjectContactOfUnoControl::isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const
+ {
+ VOCGuard aGuard( *m_pImpl );
+
+ if ( m_pImpl->hasControl() )
+ {
+ const ::drawinglayer::geometry::ViewInformation2D& rViewInformation( GetObjectContact().getViewInformation2D() );
+ #if OSL_DEBUG_LEVEL > 1
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );
+ #endif
+
+ if ( !rViewInformation.getViewport().isEmpty() )
+ m_pImpl->positionAndZoomControl( rViewInformation.getObjectToViewTransformation() );
+ }
+
+ return ViewObjectContactOfSdrObj::isPrimitiveVisible( _rDisplayInfo );
+ }
+
+ //--------------------------------------------------------------------
void ViewObjectContactOfUnoControl::propertyChange()
{
// graphical invalidate at all views
diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 13a83f0fc235..89ba0eb35b5c 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -370,8 +370,41 @@ namespace sdr
OverlayManager::ImpDrawMembers(aBufferRememberedRangeLogic, getOutputDevice());
}
- // #i80730# removed: VCL hack for transparent child windows
- // No longer needed, checked in DEV300 m54
+ // VCL hack for transparent child windows
+ // Problem is e.g. a radiobuttion form control in life mode. The used window
+ // is a transparence vcl childwindow. This flag only allows the parent window to
+ // paint into the child windows area, but there is no mechanism which takes
+ // care for a repaint of the child window. A transparent child window is NOT
+ // a window which always keeps it's content consistent over the parent, but it's
+ // more like just a paint flag for the parent.
+ // To get the update, the windows in question are updated manulally here.
+ if(bTargetIsWindow)
+ {
+ Window& rWindow = static_cast< Window& >(rmOutputDevice);
+
+ if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount())
+ {
+ const Rectangle aRegionRectanglePixel(
+ maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(),
+ maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY());
+
+ for(sal_uInt16 a(0); a < rWindow.GetChildCount(); a++)
+ {
+ Window* pCandidate = rWindow.GetChild(a);
+
+ if(pCandidate && pCandidate->IsPaintTransparent())
+ {
+ const Rectangle aCandidatePosSizePixel(pCandidate->GetPosPixel(), pCandidate->GetSizePixel());
+
+ if(aCandidatePosSizePixel.IsOver(aRegionRectanglePixel))
+ {
+ pCandidate->Invalidate(INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN);
+ pCandidate->Update();
+ }
+ }
+ }
+ }
+ }
// #i80730# restore visibility of VCL cursor
if(bCursorWasEnabled)