[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sfx2/source
sfx2/source/doc/sfxbasemodel.cxx |3 --- 1 file changed, 3 deletions(-) New commits: commit b2c076455cb911863a954e3d7d6d2aabe3723978 Author: Michael Stahl mst...@redhat.com Date: Tue Jan 15 21:25:14 2013 +0100 fdo#58893: Revert Resolves: rhbz#818557 crash with NULL shell... This reverts commit a1d265be484f1c70f57ab3de9b2d8c27d2fd3aa4. This commit causes the crash, because apparently it causes some event to be delayed via SfxHintPoster which refers to some SfxRequest that is then deleted too early. Change-Id: I301f3b52001c1d8b1b60f5b1cfb3b093c9f81607 (cherry picked from commit 5090267eada3d68a618769c5dbae8b2ee8d6dab5) Reviewed-on: https://gerrit.libreoffice.org/1723 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 5bddcfe..d7d5250 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1198,10 +1198,7 @@ void SAL_CALL SfxBaseModel::connectController( const uno::Reference frame::XCon { SfxViewFrame* pViewFrame = SfxViewFrame::Get( xController, GetObjectShell() ); ENSURE_OR_THROW( pViewFrame, SFX document without SFX view!? ); -bool bOldLock = pViewFrame-GetDispatcher()-IsLocked(); -pViewFrame-GetDispatcher()-Lock(sal_True); pViewFrame-UpdateDocument_Impl(); -pViewFrame-GetDispatcher()-Lock(bOldLock); const String sDocumentURL = GetObjectShell()-GetMedium()-GetName(); if ( sDocumentURL.Len() ) SFX_APP()-Broadcast( SfxStringHint( SID_OPENURL, sDocumentURL ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sfx2/source
sfx2/source/view/viewprn.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 0dbb66fb59205507824534b7130fab1cf2db3eae Author: Noel Power noel.po...@suse.com Date: Thu Jan 3 14:54:19 2013 + post OnPrint event ( application document ) when printing starts fdo#58269 this event used to get posted, somehow it seems it got dropped somewhere along the line ( looks like the printer and printer monitor code got reworked ) Conflicts: sfx2/inc/sfx2/sfx.hrc Change-Id: Ib75ee9e7ecd41614275033d2be2a351785326e24 Reviewed-on: https://gerrit.libreoffice.org/1536 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index a8c19a2..d3a0818 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -326,6 +326,7 @@ void SfxPrinterController::jobStarted() now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(), now.GetDay(), now.GetMonth(), now.GetYear() ) ); +SFX_APP()-NotifyEvent( SfxEventHint(SFX_EVENT_PRINTDOC, GlobalEventConfig::GetEventName( STR_EVENT_PRINTDOC ), mpObjectShell ) ); // FIXME: how to get all print options incl. AdditionalOptions easily? uno::Sequence beans::PropertyValue aOpts; mpObjectShell-Broadcast( SfxPrintingHint( view::PrintableState_JOB_STARTED, aOpts ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sfx2/source
sfx2/source/view/viewsh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 83be8c5b81feaf7e843898f4f6a1387c7ade183a Author: Caolán McNamara caol...@redhat.com Date: Sun Oct 14 14:33:21 2012 +0100 Related: fdo#47250 fdo#56430 catch harder so duden extension doesn't blow us up Change-Id: Ie6b26670a6809fc07b344660111be44cb3e6a011 Reviewed-on: https://gerrit.libreoffice.org/939 Reviewed-by: Tor Lillqvist t...@iki.fi Tested-by: Tor Lillqvist t...@iki.fi diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 31f421f..d04e4db 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -2044,7 +2044,7 @@ sal_Bool SfxViewShell::TryContextMenuInterception( Menu rIn, const ::rtl::OUStr continue; } } -catch (const uno::RuntimeException) +catch (...) { aIt.remove(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sfx2/source unotools/inc unotools/source
sfx2/source/appl/childwin.cxx |2 - unotools/inc/unotools/viewoptions.hxx |7 + unotools/source/config/viewoptions.cxx | 40 +++-- 3 files changed, 41 insertions(+), 8 deletions(-) New commits: commit a4cdd39b154cfc0c7cb9912f8d31b59dec3e5e60 Author: Stephan Bergmann sberg...@redhat.com Date: Fri Oct 5 15:00:39 2012 +0200 fdo#46071: Do not hide windows based on nil Visible property This appears to be messy: The /org.openoffice.Office.Views/WindowType configuration group template has both a nilable bool Visible property and a UserData/Data string property that encodes various things like geometry---but also visibility---in a string. Now, likely due to the problem that has meanwhile been fixed through f3f79cc9e6c265baf48955d53f7e888205e0b3e0 Resolves fdo#46074: Fix Partial::contains for paths that go past a leaf node, some registrymodification.xcu files in the wild contain such WindowType entries in default state, without a UserData/Data string and with a nil Visible property. The way SfxChildWindow::InitializeChildWinFactory_Impl and SvtViewOptions::IsVisible are implemented, they will always lead to an invisible window for such broken registrymodification.xcu data (as IsVisible unhelpfully returns false for a nil value, and InitializeChildWinFactory_Impl uses that value when there is no UserData/Data string). For the Math formula editor window (ID 30378) this means that it can disappear from the UI completely, as there appears to be no UI trigger for the user to show it in case it is hidden. The fix is to introdue SvtViewOptions::HasVisible (which only returns true if the property is not nil) and change InitializeChidlWinFactory_Impl to only use the value of IsVisible() if HasVisible() returns true. This makes the code even more baroque, but this is a rather central, generic piece of code for all sorts of windows, so I do not want to break any other uses by e.g. changing IsVisible to return true for a nil property. Change-Id: Iae40075a7116a8aabd2d25aa9334709522e23d8f (cherry picked from commit 9db74c6133ede2a28af077fd563398176ff0d858) Reviewed-on: https://gerrit.libreoffice.org/773 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index a698002..13afd10 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -365,7 +365,7 @@ void SfxChildWindow::InitializeChildWinFactory_Impl( sal_uInt16 nId, SfxChildWin // load configuration SvtViewOptions aWinOpt( E_WINDOW, String::CreateFromInt32( nId ) ); -if ( aWinOpt.Exists() ) +if ( aWinOpt.Exists() aWinOpt.HasVisible() ) rInfo.bVisible = aWinOpt.IsVisible(); // set state from configuration. Can be overwritten by UserData, see below ::com::sun::star::uno::Sequence ::com::sun::star::beans::NamedValue aSeq = aWinOpt.GetUserData(); diff --git a/unotools/inc/unotools/viewoptions.hxx b/unotools/inc/unotools/viewoptions.hxx index 34c0059..faad441 100644 --- a/unotools/inc/unotools/viewoptions.hxx +++ b/unotools/inc/unotools/viewoptions.hxx @@ -264,6 +264,13 @@ class UNOTOOLS_DLLPUBLIC SvtViewOptions: public utl::detail::Options sal_Bool IsVisible ( ) const; void SetVisible( sal_Bool bState ); +/** Return true if the Visible property actually has a non-nil value + +(IsVisible will somewhat arbitrarily return false if the property is +nil.) +*/ +bool HasVisible() const; + /*-//** @short use it to set/get the extended user data (consisting of a set of named scalar values) @descr It's supported for ALL types! diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx index 112ffbb..a327c77 100644 --- a/unotools/source/config/viewoptions.cxx +++ b/unotools/source/config/viewoptions.cxx @@ -283,6 +283,8 @@ class SvtViewOptionsBase_Impl { //- public: +enum State { STATE_NONE, STATE_FALSE, STATE_TRUE }; + SvtViewOptionsBase_Impl ( const ::rtl::OUString sList); virtual ~SvtViewOptionsBase_Impl ( ); sal_BoolExists ( const ::rtl::OUStringsName); @@ -296,7
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sfx2/source
sfx2/source/doc/objserv.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 9c2588950be1d4b3051586359175b5a643fee880 Author: Stephan Bergmann sberg...@redhat.com Date: Thu Aug 16 17:53:45 2012 +0200 fdo#53280: Reset read-only UI after successful Save As Change-Id: Ica9214d3655df27bbb259c463a7589a842f01c47 Signed-off-by: Michael Meeks michael.me...@suse.com diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 7b4475a..b305a82 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -705,6 +705,11 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest rReq) nErrorCode = ( lErr != ERRCODE_IO_ABORT ) ( nErrorCode == ERRCODE_NONE ) ? nErrorCode : lErr; } +if (nId == SID_SAVEASDOC nErrorCode == ERRCODE_NONE) +{ +SetReadOnlyUI(false); +} + rReq.SetReturnValue( SfxBoolItem(0, nErrorCode == ERRCODE_NONE ) ); ResetError(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sfx2/source
sfx2/source/appl/shutdowniconw32.cxx |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) New commits: commit dd57301eef0d99943672da7fc3d453ee3db4ad6e Author: Andras Timar ati...@suse.com Date: Mon Jul 16 15:03:46 2012 +0200 fdo#52143 use Unicode functions for QuickStarter tooltip Change-Id: Ic9c7ed84925ea5b4ce324a98a1089102dcda24b8 Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index 0d3b86c..28f783b 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -284,13 +284,12 @@ static void addTaskbarIcon( HWND hWnd ) strTip = ShutdownIcon::getInstance()-GetResString( STR_QUICKSTART_TIP ); // add taskbar icon -NOTIFYICONDATAA nid; +NOTIFYICONDATAW nid; nid.hIcon = (HICON)LoadImageA( GetModuleHandle( NULL ), MAKEINTRESOURCE( ICON_LO_DEFAULT ), IMAGE_ICON, GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), LR_DEFAULTCOLOR | LR_SHARED ); -// better use unicode wrapper here ? -strncpy( nid.szTip, ( OUStringToOString(strTip, osl_getThreadTextEncoding()).getStr() ), 64 ); +wcsncpy( nid.szTip, strTip.getStr(), 64 ); nid.cbSize = sizeof(nid); nid.hWnd= hWnd; @@ -298,7 +297,7 @@ static void addTaskbarIcon( HWND hWnd ) nid.uCallbackMessage= SFX_TASKBAR_NOTIFICATION; nid.uFlags = NIF_MESSAGE|NIF_TIP|NIF_ICON; -Shell_NotifyIconA(NIM_ADD, nid); +Shell_NotifyIconW(NIM_ADD, nid); } // --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sfx2/source
sfx2/source/dialog/versdlg.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 1352d6ff9e8f321a970d91654c2242b34ef1505f Author: Andras Timar ati...@suse.com Date: Fri Jul 6 17:38:29 2012 +0200 hide aDateTimeText when editing new version comment Change-Id: I644adb0292272130587f8a19777c47bf8fd2887c diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index b43c6fa..9a4fa8e 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -477,7 +477,10 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersi aEdit.SetReadOnly( sal_True ); } else +{ +aDateTimeText.Hide(); aCloseButton.Hide(); +} } IMPL_LINK( SfxViewVersionDialog_Impl, ButtonHdl, Button*, pButton ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sfx2/source
sfx2/source/bastyp/fltfnc.cxx | 37 +++-- 1 file changed, 27 insertions(+), 10 deletions(-) New commits: commit 70e4fd2a10f9d7255285d26fe8fec22b18858116 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Tue Jun 5 15:45:52 2012 -0400 fdo#50694: Honor the preferred filter returned by type detection. Because that filter is more reliable. Change-Id: Ifbab294bf4f344301410cd671a9245bffa03fa11 diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index fbb253e..72b3590 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -433,6 +433,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium rMedium, c ::rtl::OUString sURL( rMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ); ::com::sun::star::uno::Reference ::com::sun::star::io::XInputStream xInStream = rMedium.GetInputStream(); +rtl::OUString aFilterName; // stream exists = deep detection (with preselection ... if possible) if (xInStream.is()) @@ -454,6 +455,13 @@ sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium rMedium, c ::com::sun::star::uno::Sequence ::com::sun::star::beans::PropertyValue lDescriptor = aDescriptor.getAsConstPropertyValueList(); sTypeName = xDetection-queryTypeByDescriptor(lDescriptor, sal_True); // lDescriptor is used as In/Out param ... dont use aDescriptor.getAsConstPropertyValueList() directly! + +for (sal_Int32 i = 0; i lDescriptor.getLength(); ++i) +{ +if (lDescriptor[i].Name == FilterName) +// Type detection picked a preferred filter for this format. +aFilterName = lDescriptor[i].Value.getrtl::OUString(); +} } // no stream exists = try flat detection without preselection as fallback else @@ -461,16 +469,25 @@ sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium rMedium, c if (!sTypeName.isEmpty()) { -// detect filter by given type -// In case of this matcher is bound to a particular document type: -// If there is no acceptable type for this document at all, the type detection has possibly returned something else. -// The DocumentService property is only a preselection, and all preselections are considered as optional! -// This wrong type will be sorted out now because we match only allowed filters to the detected type -::com::sun::star::uno::Sequence ::com::sun::star::beans::NamedValue lQuery(1); -lQuery[0].Name = ::rtl::OUString(Name); -lQuery[0].Value = sTypeName; - -const SfxFilter* pFilter = GetFilterForProps(lQuery, nMust, nDont); +const SfxFilter* pFilter = NULL; +if (!aFilterName.isEmpty()) +// Type detection returned a suitable filter for this. Use it. +pFilter = SfxFilter::GetFilterByName(aFilterName); + +if (!pFilter) +{ +// detect filter by given type +// In case of this matcher is bound to a particular document type: +// If there is no acceptable type for this document at all, the type detection has possibly returned something else. +// The DocumentService property is only a preselection, and all preselections are considered as optional! +// This wrong type will be sorted out now because we match only allowed filters to the detected type +::com::sun::star::uno::Sequence ::com::sun::star::beans::NamedValue lQuery(1); +lQuery[0].Name = ::rtl::OUString(Name); +lQuery[0].Value = sTypeName; + +pFilter = GetFilterForProps(lQuery, nMust, nDont); +} + if (pFilter) { *ppFilter = pFilter; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits