summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-07-17 04:31:21 +0000
committerOliver Bolte <obo@openoffice.org>2009-07-17 04:31:21 +0000
commitd346cdf3fdffb422571dcf11248c10b788adacfe (patch)
tree9b9d3fd005a2deb2be7c20188839415d8cf88b9a
parent48c373cbc74460b51336e6da53e3c47f4fa69cf7 (diff)
CWS-TOOLING: integrate CWS mav53
2009-06-29 13:42:56 +0200 hbrinkm r273471 : #i101593# switched off optimization in table layout, that caused frames to be layouted incorrectly 2009-06-25 12:29:11 +0200 cd r273376 : #i101774# Don't rely on initialize call for VistaFilePicker 2009-06-25 11:48:33 +0200 tl r273373 : #i101420# Gnome accessibility fix 2009-06-24 18:16:49 +0200 od r273361 : #i97309 method <XMLTextParagraphExport::exportListChange(..)> - export text:start-value at correct list item. 2009-06-23 14:11:44 +0200 b_michaelsen r273281 : #i103032#: cutting of URL-parameters for usage tracking 2009-06-22 11:49:12 +0200 b_michaelsen r273207 : #i102805#: Added usage tracking to SfxToolboxControl 2009-06-22 11:46:00 +0200 b_michaelsen r273205 : whitespace fixes 2009-06-05 14:21:12 +0200 mav r272683 : #i101741# check the file date only in document file locking context
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.cxx20
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.hxx2
-rw-r--r--fpicker/source/win32/filepicker/asyncrequests.cxx2
-rw-r--r--sfx2/inc/sfx2/docfile.hxx3
-rw-r--r--sfx2/source/doc/docfile.cxx25
-rw-r--r--sfx2/source/doc/objstor.cxx9
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx19
-rw-r--r--xmloff/source/text/txtparae.cxx36
8 files changed, 88 insertions, 28 deletions
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index b5f9d4b3be..fe6ebbfde0 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -165,6 +165,7 @@ VistaFilePicker::VistaFilePicker(const css::uno::Reference< css::lang::XMultiSer
, m_rDialog (new VistaFilePickerImpl())
, m_aAsyncExecute (m_rDialog )
, m_nFilePickerThreadId (0 )
+ , m_bInitialized (false )
{
}
@@ -345,6 +346,20 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL VistaFilePicker::getSelectedFiles
::sal_Int16 SAL_CALL VistaFilePicker::execute()
throw(css::uno::RuntimeException)
{
+ bool bInitialized(false);
+ {
+ osl::MutexGuard aGuard(m_aMutex);
+ bInitialized = m_bInitialized;
+ }
+
+ if ( !bInitialized )
+ {
+ sal_Int16 nTemplateDescription = css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
+ css::uno::Sequence < css::uno::Any > aInitArguments(1);
+ aInitArguments[0] <<= nTemplateDescription;
+ initialize(aInitArguments);
+ }
+
RequestRef rRequest(new Request());
rRequest->setRequest (VistaFilePickerImpl::E_SHOW_DIALOG_MODAL);
@@ -640,6 +655,11 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
if ( ! m_aAsyncExecute.isRunning())
m_aAsyncExecute.create();
m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED);
+
+ {
+ osl::MutexGuard aGuard(m_aMutex);
+ m_bInitialized = true;
+ }
}
//------------------------------------------------------------------------------------
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.hxx b/fpicker/source/win32/filepicker/VistaFilePicker.hxx
index b398fd17ef..11ef555404 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.hxx
@@ -305,6 +305,8 @@ public:
//---------------------------------------------------------------------
oslThreadIdentifier m_nFilePickerThreadId;
+
+ bool m_bInitialized;
};
} // namespace vista
diff --git a/fpicker/source/win32/filepicker/asyncrequests.cxx b/fpicker/source/win32/filepicker/asyncrequests.cxx
index 486d86a554..704ffd99ea 100644
--- a/fpicker/source/win32/filepicker/asyncrequests.cxx
+++ b/fpicker/source/win32/filepicker/asyncrequests.cxx
@@ -53,7 +53,7 @@ void lcl_sleep(::osl::Condition& aCondition ,
{
TimeValue aTime;
aTime.Seconds = (nMilliSeconds / 1000);
- aTime.Nanosec = (nMilliSeconds % 1000);
+ aTime.Nanosec = (nMilliSeconds % 1000) * 1000000;
aCondition.wait(&aTime);
}
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index ab6cc60468..71a188f6a8 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -183,7 +183,8 @@ public:
#endif
void CheckFileDate( const ::com::sun::star::util::DateTime& aInitDate );
- ::com::sun::star::util::DateTime GetInitFileDate();
+ sal_Bool DocNeedsFileDateCheck();
+ ::com::sun::star::util::DateTime GetInitFileDate( sal_Bool bIgnoreOldValue );
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > GetContent() const;
const String& GetPhysicalName() const;
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 2ca8a68257..e41cb91c59 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -471,7 +471,7 @@ long SfxMedium::GetFileVersion() const
//------------------------------------------------------------------
void SfxMedium::CheckFileDate( const util::DateTime& aInitDate )
{
- GetInitFileDate();
+ GetInitFileDate( sal_True );
if ( pImp->m_aDateTime.Seconds != aInitDate.Seconds
|| pImp->m_aDateTime.Minutes != aInitDate.Minutes
|| pImp->m_aDateTime.Hours != aInitDate.Hours
@@ -531,9 +531,15 @@ void SfxMedium::CheckFileDate( const util::DateTime& aInitDate )
}
//------------------------------------------------------------------
-util::DateTime SfxMedium::GetInitFileDate()
+sal_Bool SfxMedium::DocNeedsFileDateCheck()
{
- if ( !pImp->m_bGotDateTime && GetContent().is() )
+ return ( !IsReadOnly() && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) );
+}
+
+//------------------------------------------------------------------
+util::DateTime SfxMedium::GetInitFileDate( sal_Bool bIgnoreOldValue )
+{
+ if ( ( bIgnoreOldValue || !pImp->m_bGotDateTime ) && GetContent().is() )
{
try
{
@@ -790,11 +796,8 @@ sal_Bool SfxMedium::Commit()
sal_Bool bResult = ( GetError() == SVSTREAM_OK );
- if ( bResult )
- {
- pImp->m_bGotDateTime = sal_False;
- GetInitFileDate();
- }
+ if ( bResult && DocNeedsFileDateCheck() )
+ GetInitFileDate( sal_True );
// remove truncation mode from the flags
nStorOpenMode &= (~STREAM_TRUNC);
@@ -1321,6 +1324,10 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) );
}
+ // when the file is locked, get the current file date
+ if ( bResult && DocNeedsFileDateCheck() )
+ GetInitFileDate( sal_True );
+
return bResult;
}
@@ -2583,8 +2590,6 @@ void SfxMedium::GetMedium_Impl()
pInStream = utl::UcbStreamHelper::CreateStream( pImp->xInputStream );
}
- GetInitFileDate();
-
pImp->bDownloadDone = sal_True;
pImp->aDoneLink.ClearPendingCall();
pImp->aDoneLink.Call( (void*) GetError() );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 37259eb6d8..45fbd18213 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1222,7 +1222,8 @@ sal_Bool SfxObjectShell::SaveTo_Impl
{
bStoreToSameLocation = sal_True;
- rMedium.CheckFileDate( pMedium->GetInitFileDate() );
+ if ( pMedium->DocNeedsFileDateCheck() )
+ rMedium.CheckFileDate( pMedium->GetInitFileDate( sal_False ) );
if ( bCopyTo && GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
{
@@ -2041,6 +2042,12 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
InvalidateName();
SetModified(sal_False); // nur bei gesetztem Medium zur"ucksetzen
Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) );
+
+ // this is the end of the saving process, it is possible that the file was changed
+ // between medium commit and this step ( attributes change and so on )
+ // so get the file date again
+ if ( pNewMed->DocNeedsFileDateCheck() )
+ pNewMed->GetInitFileDate( sal_True );
}
}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 7058e86e27..7d3e79c610 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -1029,6 +1029,25 @@ void SfxToolBoxControl::Select( USHORT nModifier )
void SfxToolBoxControl::Select( BOOL /*bMod1*/ )
{
+ if(::comphelper::UiEventsLogger::isEnabled()) //#i88653# #i102805#
+ {
+ ::rtl::OUString sAppName;
+ try
+ {
+ static ::rtl::OUString our_aModuleManagerName = ::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager");
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager =
+ ::comphelper::getProcessServiceFactory();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > xModuleManager(
+ xServiceManager->createInstance(our_aModuleManagerName)
+ , ::com::sun::star::uno::UNO_QUERY_THROW);
+ sAppName = xModuleManager->identify(m_xFrame);
+ } catch(::com::sun::star::uno::Exception&) {}
+ Sequence<PropertyValue> vSource;
+ ::comphelper::UiEventsLogger::appendDispatchOrigin(vSource, sAppName, ::rtl::OUString::createFromAscii("SfxToolBoxControl"));
+ URL aURL;
+ aURL.Complete = m_aCommandURL;
+ ::comphelper::UiEventsLogger::logDispatch(aURL, vSource);
+ }
svt::ToolboxController::execute( pImpl->nSelectModifier );
}
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index ed001cb4da..c90b495ebd 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -798,23 +798,29 @@ void XMLTextParagraphExport::exportListChange(
// <text:list-header> or <text:list-item>
GetExport().CheckAttrList();
- if ( nListLevelsToBeOpened == 1 &&
- rNextInfo.HasStartValue() )
+ // --> OD 2009-06-24 #i97309#
+ // export start value in case of <bRestartNumberingAtContinuedRootList>
+ // at correct list item
+ if ( nListLevelsToBeOpened == 1 )
{
- OUStringBuffer aBuffer;
- aBuffer.append( (sal_Int32)rNextInfo.GetStartValue() );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE,
- aBuffer.makeStringAndClear() );
- }
- else if ( bRestartNumberingAtContinuedRootList )
- {
- OUStringBuffer aBuffer;
- aBuffer.append( (sal_Int32)nRestartValueForContinuedRootList );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT,
- XML_START_VALUE,
- aBuffer.makeStringAndClear() );
- bRestartNumberingAtContinuedRootList = false;
+ if ( rNextInfo.HasStartValue() )
+ {
+ OUStringBuffer aBuffer;
+ aBuffer.append( (sal_Int32)rNextInfo.GetStartValue() );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE,
+ aBuffer.makeStringAndClear() );
+ }
+ else if ( bRestartNumberingAtContinuedRootList )
+ {
+ OUStringBuffer aBuffer;
+ aBuffer.append( (sal_Int32)nRestartValueForContinuedRootList );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT,
+ XML_START_VALUE,
+ aBuffer.makeStringAndClear() );
+ bRestartNumberingAtContinuedRootList = false;
+ }
}
+ // <--
eLName = ( rNextInfo.IsNumbered() || nListLevelsToBeOpened > 1 )
? XML_LIST_ITEM