summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-04-24 17:47:23 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-04-24 17:47:23 +0000
commit191a03067dfdae24ac93e32e4b2f4b88b6d0814d (patch)
tree7376e2ff34511500e9018b38af9683b1be554b5a
parentab9aa0da0752cdcf98bf4312b6c36dd48ed9a336 (diff)
CWS-TOOLING: integrate CWS fwk110_DEV300
2009-04-03 11:16:33 +0200 pl r270467 : fix the vanishing form contro problem 2009-04-03 09:26:00 +0200 cd r270455 : #159523# Use build id to check for showing the registration dialog again 2009-04-03 09:22:55 +0200 od r270454 : #i100732# method <SwTxtFormatter::NewTabPortion(..)> - correction of condition for applying automatic tab stop at left margin
-rw-r--r--svtools/source/config/regoptions.cxx57
-rw-r--r--vcl/source/window/window.cxx10
2 files changed, 53 insertions, 14 deletions
diff --git a/svtools/source/config/regoptions.cxx b/svtools/source/config/regoptions.cxx
index 98c4bb7ae2d5..7c94807f2c25 100644
--- a/svtools/source/config/regoptions.cxx
+++ b/svtools/source/config/regoptions.cxx
@@ -35,6 +35,8 @@
#include <tools/date.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/mutex.hxx>
+#include <unotools/bootstrap.hxx>
+#include <rtl/ustring.hxx>
//........................................................................
namespace svt
@@ -172,6 +174,7 @@ namespace svt
static ::osl::Mutex& getStaticMutex(); // get the mutex used to protect the static members of this class
void commit( );
+ sal_Int32 getBuildId() const;
private:
RegOptions::DialogPermission implGetDialogPermission( ) const;
@@ -282,13 +285,8 @@ namespace svt
m_aRegistrationNode.getNodeValue( lcl_getReminderDateName() ) >>= sStringValue;
bool bIsPatchDate = ( sStringValue.equals( lcl_getPatchName() ) != sal_False );
if ( !bIsPatchDate && sStringValue.getLength() )
- {
nIntDate = lcl_convertString2Date( sStringValue );
- OSL_ENSURE( nIntDate, "RegOptionsImpl::RegOptionsImpl: incorrect value found for the reminder date!" );
- }
m_aReminderDate.SetDate( nIntDate );
- OSL_ENSURE( bIsPatchDate || !sStringValue.getLength() || m_aReminderDate.IsValid(),
- "RegOptionsImpl::RegOptionsImpl: inavlid reminder date value!" );
}
//--------------------------------------------------------------------
@@ -364,13 +362,34 @@ namespace svt
//--------------------------------------------------------------------
void RegOptionsImpl::removeReminder()
{
+ ::rtl::OUString aDefault;
+ ::rtl::OUString aReminderValue( lcl_getPatchName() );
+ aReminderValue += ::rtl::OUString::valueOf(getBuildId());
+
m_aRegistrationNode.setNodeValue(
lcl_getReminderDateName(),
- makeAny( ::rtl::OUString() )
+ Any( aReminderValue )
);
}
//--------------------------------------------------------------------
+ sal_Int32 RegOptionsImpl::getBuildId() const
+ {
+ sal_Int32 nBuildId( 0 );
+ ::rtl::OUString aDefault;
+ ::rtl::OUString aBuildIdData = utl::Bootstrap::getBuildIdData( aDefault );
+ sal_Int32 nIndex1 = aBuildIdData.indexOf(':');
+ sal_Int32 nIndex2 = aBuildIdData.indexOf(')');
+ if (( nIndex1 > 0 ) && ( nIndex2 > 0 ) && ( nIndex2-1 > nIndex1+1 ))
+ {
+ ::rtl::OUString aBuildId = aBuildIdData.copy( nIndex1+1, nIndex2-nIndex1-1 );
+ nBuildId = aBuildId.toInt32();
+ }
+
+ return nBuildId;
+ }
+
+ //--------------------------------------------------------------------
bool RegOptionsImpl::hasReminderDateCome() const
{
bool bRet = false;
@@ -379,8 +398,22 @@ namespace svt
m_aRegistrationNode.getNodeValue( lcl_getReminderDateName() ) >>= sDate;
if ( sDate.getLength() )
{
- if ( sDate.equals( lcl_getPatchName() ) )
- bRet = true;
+ if ( sDate.indexOf( lcl_getPatchName() ) == 0)
+ {
+ if (sDate.equals( lcl_getPatchName() ))
+ bRet = true;
+ else if (sDate.getLength() > lcl_getPatchName().getLength() )
+ {
+ // Check the build ID to determine if the registration
+ // dialog needs to be shown.
+ sal_Int32 nBuildId = getBuildId();
+ ::rtl::OUString aStoredBuildId( sDate.copy(lcl_getPatchName().getLength()));
+
+ // remind if the current build ID is not the same as the stored one
+ if ( nBuildId != aStoredBuildId.toInt32() )
+ bRet = true;
+ }
+ }
else
{
nDate = lcl_convertString2Date( sDate );
@@ -392,6 +425,9 @@ namespace svt
}
}
}
+ else
+ bRet = true;
+
return bRet;
}
@@ -423,10 +459,7 @@ namespace svt
);
// and clear the reminder date
- m_aRegistrationNode.setNodeValue(
- lcl_getReminderDateName(),
- Any()
- );
+ removeReminder();
}
}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 48a029df8f69..676375db10bf 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2523,12 +2523,15 @@ void Window::ImplInvalidateFrameRegion( const Region* pRegion, USHORT nFlags )
if ( !ImplIsOverlapWindow() )
{
Window* pTempWindow = this;
+ USHORT nTranspPaint = IsPaintTransparent() ? IMPL_PAINT_PAINT : 0;
do
{
pTempWindow = pTempWindow->ImplGetParent();
if ( pTempWindow->mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTCHILDS )
break;
- pTempWindow->mpWindowImpl->mnPaintFlags |= IMPL_PAINT_PAINTCHILDS;
+ pTempWindow->mpWindowImpl->mnPaintFlags |= IMPL_PAINT_PAINTCHILDS | nTranspPaint;
+ if( ! pTempWindow->IsPaintTransparent() )
+ nTranspPaint = 0;
}
while ( !pTempWindow->ImplIsOverlapWindow() );
}
@@ -6508,7 +6511,10 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
if ( !mpWindowImpl->mbFrame )
{
- ImplInvalidate( NULL, INVALIDATE_NOTRANSPARENT | INVALIDATE_CHILDREN );
+ USHORT nInvalidateFlags = INVALIDATE_CHILDREN;
+ if( ! IsPaintTransparent() )
+ nInvalidateFlags |= INVALIDATE_NOTRANSPARENT;
+ ImplInvalidate( NULL, nInvalidateFlags );
ImplGenerateMouseMove();
}
}