[ooo-build-commit] 2 commits - patches/dev300 patches/test
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Jul 24 18:07:32 PDT 2009
patches/dev300/apply | 8
patches/dev300/statusbar-fancy-modified-status-sc.diff | 13
patches/dev300/statusbar-fancy-modified-status-sd.diff | 26
patches/dev300/statusbar-fancy-modified-status-sfx2.diff | 26
patches/dev300/statusbar-fancy-modified-status-starmath.diff | 34
patches/dev300/statusbar-fancy-modified-status-svx.diff | 249 ++++++
patches/dev300/statusbar-fancy-modified-status-sw.diff | 98 ++
patches/test/statusbar-fancy-modified-status.diff | 415 -----------
8 files changed, 454 insertions(+), 415 deletions(-)
New commits:
commit 85527aaf6acd0bdbc0dd0642eef85120aea8738a
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Jul 24 21:00:48 2009 -0400
Moved the new modified status window patch into dev300.
These patches are still in an experimental status, though I consider
them pretty much ready for mass use. They are in [ CalcExperimental ]
section.
* patches/dev300/apply: added the following six patches.
* patches/dev300/statusbar-fancy-modified-status-sc.diff:
* patches/dev300/statusbar-fancy-modified-status-sd.diff:
* patches/dev300/statusbar-fancy-modified-status-sfx2.diff:
* patches/dev300/statusbar-fancy-modified-status-starmath.diff:
* patches/dev300/statusbar-fancy-modified-status-svx.diff:
* patches/dev300/statusbar-fancy-modified-status-sw.diff:
* patches/test/statusbar-fancy-modified-status.diff: old monolithic
patch removed.
diff --git a/patches/dev300/apply b/patches/dev300/apply
index c2193a6..dbb81cd 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3361,5 +3361,13 @@ calc-formula-externref-countif-fix.diff, n#521624, i#102750, kohei
calc-copy-range-animated-border-sc.diff, kohei
calc-copy-range-animated-border-svx.diff, kohei
+# fancy up the document modified status window.
+statusbar-fancy-modified-status-sc.diff, kohei
+statusbar-fancy-modified-status-sd.diff, kohei
+statusbar-fancy-modified-status-sfx2.diff, kohei
+statusbar-fancy-modified-status-starmath.diff, kohei
+statusbar-fancy-modified-status-svx.diff, kohei
+statusbar-fancy-modified-status-sw.diff, kohei
+
[ AutoLayout ]
layoutcode071809.diff, cocofan
diff --git a/patches/dev300/statusbar-fancy-modified-status-sc.diff b/patches/dev300/statusbar-fancy-modified-status-sc.diff
new file mode 100644
index 0000000..fb3813b
--- /dev/null
+++ b/patches/dev300/statusbar-fancy-modified-status-sc.diff
@@ -0,0 +1,13 @@
+diff --git sc/uiconfig/scalc/statusbar/statusbar.xml sc/uiconfig/scalc/statusbar/statusbar.xml
+index 1ddff7a..28dfaf4 100644
+--- sc/uiconfig/scalc/statusbar/statusbar.xml
++++ sc/uiconfig/scalc/statusbar/statusbar.xml
+@@ -5,7 +5,7 @@
+ <statusbar:statusbaritem xlink:href=".uno:StatusPageStyle" statusbar:align="left" statusbar:autosize="true" statusbar:width="83" statusbar:helpid="helpid:26115"/>
+ <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="41" statusbar:helpid="helpid:10221"/>
+ <statusbar:statusbaritem xlink:href=".uno:StatusSelectionMode" statusbar:align="center" statusbar:width="34" statusbar:helpid="helpid:26116"/>
+- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="18" statusbar:helpid="helpid:5584"/>
++ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="18" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
+ <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="center" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="212" statusbar:helpid="helpid:10224"/>
+ <statusbar:statusbaritem xlink:href=".uno:ZoomSlider" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="140" statusbar:helpid="helpid:11065"/>
diff --git a/patches/dev300/statusbar-fancy-modified-status-sd.diff b/patches/dev300/statusbar-fancy-modified-status-sd.diff
new file mode 100644
index 0000000..6476425
--- /dev/null
+++ b/patches/dev300/statusbar-fancy-modified-status-sd.diff
@@ -0,0 +1,26 @@
+diff --git sd/uiconfig/sdraw/statusbar/statusbar.xml sd/uiconfig/sdraw/statusbar/statusbar.xml
+index e657e64..0872bd4 100644
+--- sd/uiconfig/sdraw/statusbar/statusbar.xml
++++ sd/uiconfig/sdraw/statusbar/statusbar.xml
+@@ -3,7 +3,7 @@
+ <statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <statusbar:statusbaritem xlink:href=".uno:Context" statusbar:align="left" statusbar:autosize="true" statusbar:width="184" statusbar:helpid="helpid:5310"/>
+ <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="208" statusbar:helpid="helpid:10224"/>
+- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="14" statusbar:helpid="helpid:5584"/>
++ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="14" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
+ <statusbar:statusbaritem xlink:href=".uno:PageStatus" statusbar:align="left" statusbar:width="124" statusbar:helpid="helpid:27086"/>
+ <statusbar:statusbaritem xlink:href=".uno:LayoutStatus" statusbar:align="left" statusbar:autosize="true" statusbar:width="54" statusbar:helpid="helpid:27087"/>
+diff --git sd/uiconfig/simpress/statusbar/statusbar.xml sd/uiconfig/simpress/statusbar/statusbar.xml
+index e657e64..0872bd4 100644
+--- sd/uiconfig/simpress/statusbar/statusbar.xml
++++ sd/uiconfig/simpress/statusbar/statusbar.xml
+@@ -3,7 +3,7 @@
+ <statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <statusbar:statusbaritem xlink:href=".uno:Context" statusbar:align="left" statusbar:autosize="true" statusbar:width="184" statusbar:helpid="helpid:5310"/>
+ <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="208" statusbar:helpid="helpid:10224"/>
+- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="14" statusbar:helpid="helpid:5584"/>
++ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="14" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
+ <statusbar:statusbaritem xlink:href=".uno:PageStatus" statusbar:align="left" statusbar:width="124" statusbar:helpid="helpid:27086"/>
+ <statusbar:statusbaritem xlink:href=".uno:LayoutStatus" statusbar:align="left" statusbar:autosize="true" statusbar:width="54" statusbar:helpid="helpid:27087"/>
diff --git a/patches/dev300/statusbar-fancy-modified-status-sfx2.diff b/patches/dev300/statusbar-fancy-modified-status-sfx2.diff
new file mode 100644
index 0000000..515c36a
--- /dev/null
+++ b/patches/dev300/statusbar-fancy-modified-status-sfx2.diff
@@ -0,0 +1,26 @@
+diff --git sfx2/sdi/sfx.sdi sfx2/sdi/sfx.sdi
+index 41e1df9..dcce53b 100644
+--- sfx2/sdi/sfx.sdi
++++ sfx2/sdi/sfx.sdi
+@@ -4336,7 +4336,7 @@ SfxBoolItem Modified SID_MODIFIED
+ ]
+
+ //--------------------------------------------------------------------------
+-SfxStringItem ModifiedStatus SID_DOC_MODIFIED
++SfxBoolItem ModifiedStatus SID_DOC_MODIFIED
+
+ [
+ /* flags: */
+diff --git sfx2/source/doc/objserv.cxx sfx2/source/doc/objserv.cxx
+index 1ee9eb6..9e0936a 100644
+--- sfx2/source/doc/objserv.cxx
++++ sfx2/source/doc/objserv.cxx
+@@ -1060,7 +1060,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
+
+ case SID_DOC_MODIFIED:
+ {
+- rSet.Put( SfxStringItem( SID_DOC_MODIFIED, IsModified() ? '*' : ' ' ) );
++ rSet.Put( SfxBoolItem( SID_DOC_MODIFIED, IsModified() ) );
+ break;
+ }
+
diff --git a/patches/dev300/statusbar-fancy-modified-status-starmath.diff b/patches/dev300/statusbar-fancy-modified-status-starmath.diff
new file mode 100644
index 0000000..48f23fc
--- /dev/null
+++ b/patches/dev300/statusbar-fancy-modified-status-starmath.diff
@@ -0,0 +1,34 @@
+diff --git starmath/source/smmod.cxx starmath/source/smmod.cxx
+index 6351b7b..bbfefb7 100644
+--- starmath/source/smmod.cxx
++++ starmath/source/smmod.cxx
+@@ -58,6 +58,7 @@
+ #include "edit.hxx"
+ #include "view.hxx"
+ #include "starmath.hrc"
++#include "svx/modctrl.hxx"
+
+ TYPEINIT1( SmModule, SfxModule );
+
+@@ -245,6 +246,8 @@ SmModule::SmModule(SfxObjectFactory* pObjFact) :
+ pVirtualDev( 0 )
+ {
+ SetName( C2S("StarMath" ));
++
++ SvxModifyControl::RegisterControl(SID_DOC_MODIFIED, this);
+ }
+
+
+diff --git starmath/uiconfig/smath/statusbar/statusbar.xml starmath/uiconfig/smath/statusbar/statusbar.xml
+index 7d95fbb..33e4e48 100644
+--- starmath/uiconfig/smath/statusbar/statusbar.xml
++++ starmath/uiconfig/smath/statusbar/statusbar.xml
+@@ -3,6 +3,6 @@
+ <statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <statusbar:statusbaritem xlink:href=".uno:TextStatus" statusbar:align="left" statusbar:width="300" statusbar:helpid="helpid:30367"/>
+ <statusbar:statusbaritem xlink:href=".uno:Zoom" statusbar:align="center" statusbar:width="54" statusbar:helpid="helpid:10000"/>
+- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="14" statusbar:helpid="helpid:5584"/>
++ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="14" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
+ </statusbar:statusbar>
+\ No newline at end of file
diff --git a/patches/dev300/statusbar-fancy-modified-status-svx.diff b/patches/dev300/statusbar-fancy-modified-status-svx.diff
new file mode 100644
index 0000000..306febb
--- /dev/null
+++ b/patches/dev300/statusbar-fancy-modified-status-svx.diff
@@ -0,0 +1,249 @@
+diff --git svx/inc/modctrl.hxx svx/inc/modctrl.hxx
+index e1f41a8..94de89b 100644
+--- svx/inc/modctrl.hxx
++++ svx/inc/modctrl.hxx
+@@ -35,6 +35,8 @@
+ #include <sfx2/stbitem.hxx>
+ #include "svx/svxdllapi.h"
+
++#include <boost/shared_ptr.hpp>
++
+ // class SvxModifyControl ------------------------------------------------
+
+ class SVX_DLLPUBLIC SvxModifyControl : public SfxStatusBarControl
+@@ -42,7 +44,8 @@ class SVX_DLLPUBLIC SvxModifyControl : public SfxStatusBarControl
+ public:
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+- virtual void Paint( const UserDrawEvent& rEvt );
++ virtual void Paint( const UserDrawEvent& rUsrEvt );
++ virtual void DoubleClick();
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+@@ -51,11 +54,8 @@ public:
+ static ULONG GetDefItemWidth(const StatusBar& rStb);
+
+ private:
+- BOOL bState;
+-
+-#ifdef _SVX_MODCTRL_CXX
+- SVX_DLLPRIVATE void DrawItemText_Impl();
+-#endif
++ struct ImplData;
++ ::boost::shared_ptr<ImplData> mpImpl;
+ };
+
+
+diff --git svx/inc/svx/dialogs.hrc svx/inc/svx/dialogs.hrc
+index 57e4e9f..53d5aae 100644
+--- svx/inc/svx/dialogs.hrc
++++ svx/inc/svx/dialogs.hrc
+@@ -1568,3 +1568,7 @@
+ #endif
+
+ #define SID_SC_TP_FORMULA (SVX_OOO_BUILD_START + 1)
++#define RID_SVXBMP_DOC_MODIFIED_YES (SVX_OOO_BUILD_START + 2)
++#define RID_SVXBMP_DOC_MODIFIED_NO (SVX_OOO_BUILD_START + 3)
++#define RID_SVXSTR_DOC_MODIFIED_YES (SVX_OOO_BUILD_START + 4)
++#define RID_SVXSTR_DOC_MODIFIED_NO (SVX_OOO_BUILD_START + 5)
+diff --git svx/source/stbctrls/makefile.mk svx/source/stbctrls/makefile.mk
+index 7a6fad6..e5bff5a 100644
+--- svx/source/stbctrls/makefile.mk
++++ svx/source/stbctrls/makefile.mk
+@@ -59,6 +59,7 @@ SLOFILES= \
+ $(SLO)$/zoomsliderctrl.obj
+
+ EXCEPTIONSFILES= \
++ $(SLO)$/modctrl.obj \
+ $(SLO)$/zoomsliderctrl.obj
+
+ HXX1TARGET=stbctrls
+diff --git svx/source/stbctrls/modctrl.cxx svx/source/stbctrls/modctrl.cxx
+index 843c845..42f1d7c 100644
+--- svx/source/stbctrls/modctrl.cxx
++++ svx/source/stbctrls/modctrl.cxx
+@@ -33,29 +33,48 @@
+
+ // include ---------------------------------------------------------------
+
+-#ifndef _STATUS_HXX //autogen
++#include "modctrl.hxx"
++
+ #include <vcl/status.hxx>
+-#endif
++#include <vcl/image.hxx>
+ #include <svtools/eitem.hxx>
+ #include <sfx2/app.hxx>
+
+-#define _SVX_MODCTRL_CXX
+
+ #include <svx/dialogs.hrc>
+-
+-#include "modctrl.hxx"
+ #include <svx/dialmgr.hxx>
+
++#include <com/sun/star/beans/PropertyValue.hpp>
++
++using ::com::sun::star::uno::Sequence;
++using ::com::sun::star::beans::PropertyValue;
++using ::rtl::OUString;
++
+ SFX_IMPL_STATUSBAR_CONTROL(SvxModifyControl, SfxBoolItem);
+
+ // class SvxModifyControl ------------------------------------------------
+
++struct SvxModifyControl::ImplData
++{
++ Image maModifiedButton;
++ Image maNonModifiedButton;
++
++ bool mbModified;
++
++ ImplData() :
++ maModifiedButton( SVX_RES(RID_SVXBMP_DOC_MODIFIED_YES) ),
++ maNonModifiedButton( SVX_RES(RID_SVXBMP_DOC_MODIFIED_NO) ),
++ mbModified(false)
++ {
++ }
++};
++
+ SvxModifyControl::SvxModifyControl( USHORT _nSlotId,
+ USHORT _nId,
+ StatusBar& rStb ) :
+
+ SfxStatusBarControl( _nSlotId, _nId, rStb ),
+- bState( TRUE )
++ mpImpl(new ImplData)
+ {
+ }
+
+@@ -65,32 +84,71 @@ void SvxModifyControl::StateChanged( USHORT, SfxItemState eState,
+ const SfxPoolItem* pState )
+ {
+ if ( SFX_ITEM_AVAILABLE != eState )
+- GetStatusBar().SetItemText( GetId(), String() );
+- else
+- {
+- DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" );
+- SfxBoolItem* pItem = (SfxBoolItem*)pState;
+- bState = pItem->GetValue();
+- DrawItemText_Impl();
+- }
++ return;
++
++ DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" );
++ SfxBoolItem* pItem = (SfxBoolItem*)pState;
++ mpImpl->mbModified = pItem->GetValue();
++
++ if ( GetStatusBar().AreItemsVisible() )
++ GetStatusBar().SetItemData( GetId(), 0 ); // force repaint
++
++ int nResId = mpImpl->mbModified ? RID_SVXSTR_DOC_MODIFIED_YES : RID_SVXSTR_DOC_MODIFIED_NO;
++ GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(nResId));
+ }
+
+ // -----------------------------------------------------------------------
+
+-void SvxModifyControl::Paint( const UserDrawEvent& )
++namespace {
++
++/**
++ * Given a bounding rectangle and an image, determine the top-left position
++ * of the image so that the image would look centered both horizontally and
++ * vertically.
++ *
++ * @param rBoundingRect bounding rectangle
++ * @param rImg image
++ *
++ * @return Point top-left corner of the centered image position
++ */
++Point centerImage(const Rectangle& rBoundingRect, const Image& rImg)
+ {
+- DrawItemText_Impl();
++ Size aImgSize = rImg.GetSizePixel();
++ Size aRectSize = rBoundingRect.GetSize();
++ long nXOffset = (aRectSize.getWidth() - aImgSize.getWidth())/2;
++ long nYOffset = (aRectSize.getHeight() - aImgSize.getHeight())/2;
++ Point aPt = rBoundingRect.TopLeft();
++ aPt += Point(nXOffset, nYOffset);
++ return aPt;
+ }
+
+-// -----------------------------------------------------------------------
++}
++void SvxModifyControl::Paint( const UserDrawEvent& rUsrEvt )
++{
++ const Rectangle aControlRect = getControlRect();
++ OutputDevice* pDev = rUsrEvt.GetDevice();
++ Rectangle aRect = rUsrEvt.GetRect();
++
++ if (mpImpl->mbModified)
++ {
++ Point aPt = centerImage(aRect, mpImpl->maModifiedButton);
++ pDev->DrawImage(aPt, mpImpl->maModifiedButton);
++ }
++ else
++ {
++ Point aPt = centerImage(aRect, mpImpl->maNonModifiedButton);
++ pDev->DrawImage(aPt, mpImpl->maNonModifiedButton);
++ }
++}
+
+-void SvxModifyControl::DrawItemText_Impl()
++void SvxModifyControl::DoubleClick()
+ {
+- String sMode;
++ if (!mpImpl->mbModified)
++ // document not modified. nothing to do here.
++ return;
+
+- if ( bState )
+- sMode = '*';
+- GetStatusBar().SetItemText( GetId(), sMode );
++ Sequence<PropertyValue> aArgs;
++ execute(OUString::createFromAscii(".uno:Save"), aArgs);
+ }
+
+ ULONG SvxModifyControl::GetDefItemWidth(const StatusBar& rStb)
+diff --git svx/source/stbctrls/stbctrls.src svx/source/stbctrls/stbctrls.src
+index b4dac87..72b7d1a 100644
+--- svx/source/stbctrls/stbctrls.src
++++ svx/source/stbctrls/stbctrls.src
+@@ -87,6 +87,16 @@ String RID_SVXSTR_XMLSEC_NO_SIG
+ Text [ en-US ] = "Digital Signature: The document is not signed.";
+ };
+
++String RID_SVXSTR_DOC_MODIFIED_YES
++{
++ Text [ en-US ] = "The document has been modified. Double-click to save the document.";
++};
++
++String RID_SVXSTR_DOC_MODIFIED_NO
++{
++ Text [ en-US ] = "The document has not been modified since the last save.";
++};
++
+ // PopupMenu -------------------------------------------------------------
+ Menu RID_SVXMNU_ZOOM
+ {
+@@ -323,3 +333,19 @@ Image RID_SVXBMP_SLIDERINCREASE_HC
+ MaskColor = STD_MASKCOLOR;
+ };
+
++Image RID_SVXBMP_DOC_MODIFIED_YES
++{
++ ImageBitmap = Bitmap
++ {
++ File = "doc_modified_yes_14.png" ;
++ };
++ MaskColor = STD_MASKCOLOR;
++};
++Image RID_SVXBMP_DOC_MODIFIED_NO
++{
++ ImageBitmap = Bitmap
++ {
++ File = "doc_modified_no_14.png" ;
++ };
++ MaskColor = STD_MASKCOLOR;
++};
diff --git a/patches/dev300/statusbar-fancy-modified-status-sw.diff b/patches/dev300/statusbar-fancy-modified-status-sw.diff
new file mode 100644
index 0000000..fb1dd5b
--- /dev/null
+++ b/patches/dev300/statusbar-fancy-modified-status-sw.diff
@@ -0,0 +1,98 @@
+diff --git sw/source/ui/app/swmodule.cxx sw/source/ui/app/swmodule.cxx
+index 0e4c70c..4a0fee9 100644
+--- sw/source/ui/app/swmodule.cxx
++++ sw/source/ui/app/swmodule.cxx
+@@ -70,6 +70,7 @@
+ #include <svx/imapdlg.hxx>
+ #include <svx/srchdlg.hxx>
+ #include <svx/hyperdlg.hxx>
++#include <svx/modctrl.hxx>
+ #include <com/sun/star/scanner/XScannerManager.hpp>
+ #include <com/sun/star/container/XSet.hpp>
+ #include <comphelper/processfactory.hxx>
+@@ -439,6 +440,7 @@ void SwDLL::RegisterControls()
+ SwBookmarkControl::RegisterControl(FN_STAT_PAGE, pMod );
+ SwTemplateControl::RegisterControl(FN_STAT_TEMPLATE, pMod );
+ SwViewLayoutControl::RegisterControl( SID_ATTR_VIEWLAYOUT, pMod );
++ SvxModifyControl::RegisterControl( SID_DOC_MODIFIED, pMod );
+ SvxZoomSliderControl::RegisterControl( SID_ATTR_ZOOMSLIDER, pMod );
+
+ SwTableOptimizeCtrl::RegisterControl(FN_OPTIMIZE_TABLE, pMod);
+diff --git sw/uiconfig/sglobal/statusbar/statusbar.xml sw/uiconfig/sglobal/statusbar/statusbar.xml
+index ed69b12..3e46300 100644
+--- sw/uiconfig/sglobal/statusbar/statusbar.xml
++++ sw/uiconfig/sglobal/statusbar/statusbar.xml
+@@ -6,7 +6,7 @@
+ <statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
+ <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
++ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
+ <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
+ <statusbar:statusbaritem xlink:href=".uno:ViewLayout" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="63" statusbar:helpid="helpid:11064"/>
+diff --git sw/uiconfig/sweb/statusbar/statusbar.xml sw/uiconfig/sweb/statusbar/statusbar.xml
+index 24ec903..f688036 100644
+--- sw/uiconfig/sweb/statusbar/statusbar.xml
++++ sw/uiconfig/sweb/statusbar/statusbar.xml
+@@ -6,7 +6,7 @@
+ <statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
+ <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
++ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
+ <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
+ <statusbar:statusbaritem xlink:href=".uno:ZoomSlider" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="130" statusbar:helpid="helpid:11065"/>
+diff --git sw/uiconfig/swform/statusbar/statusbar.xml sw/uiconfig/swform/statusbar/statusbar.xml
+index 58d7b18..5f9150d 100644
+--- sw/uiconfig/swform/statusbar/statusbar.xml
++++ sw/uiconfig/swform/statusbar/statusbar.xml
+@@ -7,7 +7,7 @@
+ <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+ <statusbar:statusbaritem xlink:href=".uno:ExecHyperlinks" statusbar:align="center" statusbar:width="22" statusbar:helpid="helpid:21186"/>
+- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
++ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
+ <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
+ </statusbar:statusbar>
+diff --git sw/uiconfig/swreport/statusbar/statusbar.xml sw/uiconfig/swreport/statusbar/statusbar.xml
+index 58d7b18..5f9150d 100644
+--- sw/uiconfig/swreport/statusbar/statusbar.xml
++++ sw/uiconfig/swreport/statusbar/statusbar.xml
+@@ -7,7 +7,7 @@
+ <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+ <statusbar:statusbaritem xlink:href=".uno:ExecHyperlinks" statusbar:align="center" statusbar:width="22" statusbar:helpid="helpid:21186"/>
+- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
++ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
+ <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
+ </statusbar:statusbar>
+diff --git sw/uiconfig/swriter/statusbar/statusbar.xml sw/uiconfig/swriter/statusbar/statusbar.xml
+index ed69b12..3e46300 100644
+--- sw/uiconfig/swriter/statusbar/statusbar.xml
++++ sw/uiconfig/swriter/statusbar/statusbar.xml
+@@ -6,7 +6,7 @@
+ <statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
+ <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
++ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
+ <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
+ <statusbar:statusbaritem xlink:href=".uno:ViewLayout" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="63" statusbar:helpid="helpid:11064"/>
+diff --git sw/uiconfig/swxform/statusbar/statusbar.xml sw/uiconfig/swxform/statusbar/statusbar.xml
+index ed69b12..3e46300 100644
+--- sw/uiconfig/swxform/statusbar/statusbar.xml
++++ sw/uiconfig/swxform/statusbar/statusbar.xml
+@@ -6,7 +6,7 @@
+ <statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
+ <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
++ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
+ <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
+ <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
+ <statusbar:statusbaritem xlink:href=".uno:ViewLayout" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="63" statusbar:helpid="helpid:11064"/>
diff --git a/patches/test/statusbar-fancy-modified-status.diff b/patches/test/statusbar-fancy-modified-status.diff
deleted file mode 100644
index bcefb8f..0000000
--- a/patches/test/statusbar-fancy-modified-status.diff
+++ /dev/null
@@ -1,446 +0,0 @@
-diff --git sc/uiconfig/scalc/statusbar/statusbar.xml sc/uiconfig/scalc/statusbar/statusbar.xml
-index 1ddff7a..28dfaf4 100644
---- sc/uiconfig/scalc/statusbar/statusbar.xml
-+++ sc/uiconfig/scalc/statusbar/statusbar.xml
-@@ -5,7 +5,7 @@
- <statusbar:statusbaritem xlink:href=".uno:StatusPageStyle" statusbar:align="left" statusbar:autosize="true" statusbar:width="83" statusbar:helpid="helpid:26115"/>
- <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="41" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:StatusSelectionMode" statusbar:align="center" statusbar:width="34" statusbar:helpid="helpid:26116"/>
-- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="18" statusbar:helpid="helpid:5584"/>
-+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="18" statusbar:helpid="helpid:5584"/>
- <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
- <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="center" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="212" statusbar:helpid="helpid:10224"/>
- <statusbar:statusbaritem xlink:href=".uno:ZoomSlider" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="140" statusbar:helpid="helpid:11065"/>
-diff --git sd/uiconfig/sdraw/statusbar/statusbar.xml sd/uiconfig/sdraw/statusbar/statusbar.xml
-index e657e64..0872bd4 100644
---- sd/uiconfig/sdraw/statusbar/statusbar.xml
-+++ sd/uiconfig/sdraw/statusbar/statusbar.xml
-@@ -3,7 +3,7 @@
- <statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink">
- <statusbar:statusbaritem xlink:href=".uno:Context" statusbar:align="left" statusbar:autosize="true" statusbar:width="184" statusbar:helpid="helpid:5310"/>
- <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="208" statusbar:helpid="helpid:10224"/>
-- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="14" statusbar:helpid="helpid:5584"/>
-+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="14" statusbar:helpid="helpid:5584"/>
- <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
- <statusbar:statusbaritem xlink:href=".uno:PageStatus" statusbar:align="left" statusbar:width="124" statusbar:helpid="helpid:27086"/>
- <statusbar:statusbaritem xlink:href=".uno:LayoutStatus" statusbar:align="left" statusbar:autosize="true" statusbar:width="54" statusbar:helpid="helpid:27087"/>
-diff --git sd/uiconfig/simpress/statusbar/statusbar.xml sd/uiconfig/simpress/statusbar/statusbar.xml
-index e657e64..0872bd4 100644
---- sd/uiconfig/simpress/statusbar/statusbar.xml
-+++ sd/uiconfig/simpress/statusbar/statusbar.xml
-@@ -3,7 +3,7 @@
- <statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink">
- <statusbar:statusbaritem xlink:href=".uno:Context" statusbar:align="left" statusbar:autosize="true" statusbar:width="184" statusbar:helpid="helpid:5310"/>
- <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="208" statusbar:helpid="helpid:10224"/>
-- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="14" statusbar:helpid="helpid:5584"/>
-+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="14" statusbar:helpid="helpid:5584"/>
- <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
- <statusbar:statusbaritem xlink:href=".uno:PageStatus" statusbar:align="left" statusbar:width="124" statusbar:helpid="helpid:27086"/>
- <statusbar:statusbaritem xlink:href=".uno:LayoutStatus" statusbar:align="left" statusbar:autosize="true" statusbar:width="54" statusbar:helpid="helpid:27087"/>
-diff --git sfx2/sdi/sfx.sdi sfx2/sdi/sfx.sdi
-index 41e1df9..dcce53b 100644
---- sfx2/sdi/sfx.sdi
-+++ sfx2/sdi/sfx.sdi
-@@ -4336,7 +4336,7 @@ SfxBoolItem Modified SID_MODIFIED
- ]
-
- //--------------------------------------------------------------------------
--SfxStringItem ModifiedStatus SID_DOC_MODIFIED
-+SfxBoolItem ModifiedStatus SID_DOC_MODIFIED
-
- [
- /* flags: */
-diff --git sfx2/source/doc/objserv.cxx sfx2/source/doc/objserv.cxx
-index 1ee9eb6..9e0936a 100644
---- sfx2/source/doc/objserv.cxx
-+++ sfx2/source/doc/objserv.cxx
-@@ -1060,7 +1060,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
-
- case SID_DOC_MODIFIED:
- {
-- rSet.Put( SfxStringItem( SID_DOC_MODIFIED, IsModified() ? '*' : ' ' ) );
-+ rSet.Put( SfxBoolItem( SID_DOC_MODIFIED, IsModified() ) );
- break;
- }
-
-diff --git starmath/source/smmod.cxx starmath/source/smmod.cxx
-index 6351b7b..bbfefb7 100644
---- starmath/source/smmod.cxx
-+++ starmath/source/smmod.cxx
-@@ -58,6 +58,7 @@
- #include "edit.hxx"
- #include "view.hxx"
- #include "starmath.hrc"
-+#include "svx/modctrl.hxx"
-
- TYPEINIT1( SmModule, SfxModule );
-
-@@ -245,6 +246,8 @@ SmModule::SmModule(SfxObjectFactory* pObjFact) :
- pVirtualDev( 0 )
- {
- SetName( C2S("StarMath" ));
-+
-+ SvxModifyControl::RegisterControl(SID_DOC_MODIFIED, this);
- }
-
-
-diff --git starmath/uiconfig/smath/statusbar/statusbar.xml starmath/uiconfig/smath/statusbar/statusbar.xml
-index 7d95fbb..33e4e48 100644
---- starmath/uiconfig/smath/statusbar/statusbar.xml
-+++ starmath/uiconfig/smath/statusbar/statusbar.xml
-@@ -3,6 +3,6 @@
- <statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink">
- <statusbar:statusbaritem xlink:href=".uno:TextStatus" statusbar:align="left" statusbar:width="300" statusbar:helpid="helpid:30367"/>
- <statusbar:statusbaritem xlink:href=".uno:Zoom" statusbar:align="center" statusbar:width="54" statusbar:helpid="helpid:10000"/>
-- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="14" statusbar:helpid="helpid:5584"/>
-+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="14" statusbar:helpid="helpid:5584"/>
- <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
- </statusbar:statusbar>
-\ No newline at end of file
-diff --git svx/inc/modctrl.hxx svx/inc/modctrl.hxx
-index e1f41a8..94de89b 100644
---- svx/inc/modctrl.hxx
-+++ svx/inc/modctrl.hxx
-@@ -35,6 +35,8 @@
- #include <sfx2/stbitem.hxx>
- #include "svx/svxdllapi.h"
-
-+#include <boost/shared_ptr.hpp>
-+
- // class SvxModifyControl ------------------------------------------------
-
- class SVX_DLLPUBLIC SvxModifyControl : public SfxStatusBarControl
-@@ -42,7 +44,8 @@ class SVX_DLLPUBLIC SvxModifyControl : public SfxStatusBarControl
- public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
- const SfxPoolItem* pState );
-- virtual void Paint( const UserDrawEvent& rEvt );
-+ virtual void Paint( const UserDrawEvent& rUsrEvt );
-+ virtual void DoubleClick();
-
- SFX_DECL_STATUSBAR_CONTROL();
-
-@@ -51,11 +54,8 @@ public:
- static ULONG GetDefItemWidth(const StatusBar& rStb);
-
- private:
-- BOOL bState;
--
--#ifdef _SVX_MODCTRL_CXX
-- SVX_DLLPRIVATE void DrawItemText_Impl();
--#endif
-+ struct ImplData;
-+ ::boost::shared_ptr<ImplData> mpImpl;
- };
-
-
-diff --git svx/inc/svx/dialogs.hrc svx/inc/svx/dialogs.hrc
-index 57e4e9f..53d5aae 100644
---- svx/inc/svx/dialogs.hrc
-+++ svx/inc/svx/dialogs.hrc
-@@ -1568,3 +1568,7 @@
- #endif
-
- #define SID_SC_TP_FORMULA (SVX_OOO_BUILD_START + 1)
-+#define RID_SVXBMP_DOC_MODIFIED_YES (SVX_OOO_BUILD_START + 2)
-+#define RID_SVXBMP_DOC_MODIFIED_NO (SVX_OOO_BUILD_START + 3)
-+#define RID_SVXSTR_DOC_MODIFIED_YES (SVX_OOO_BUILD_START + 4)
-+#define RID_SVXSTR_DOC_MODIFIED_NO (SVX_OOO_BUILD_START + 5)
-diff --git svx/source/stbctrls/makefile.mk svx/source/stbctrls/makefile.mk
-index 7a6fad6..e5bff5a 100644
---- svx/source/stbctrls/makefile.mk
-+++ svx/source/stbctrls/makefile.mk
-@@ -59,6 +59,7 @@ SLOFILES= \
- $(SLO)$/zoomsliderctrl.obj
-
- EXCEPTIONSFILES= \
-+ $(SLO)$/modctrl.obj \
- $(SLO)$/zoomsliderctrl.obj
-
- HXX1TARGET=stbctrls
-diff --git svx/source/stbctrls/modctrl.cxx svx/source/stbctrls/modctrl.cxx
-index 843c845..42f1d7c 100644
---- svx/source/stbctrls/modctrl.cxx
-+++ svx/source/stbctrls/modctrl.cxx
-@@ -33,29 +33,48 @@
-
- // include ---------------------------------------------------------------
-
--#ifndef _STATUS_HXX //autogen
-+#include "modctrl.hxx"
-+
- #include <vcl/status.hxx>
--#endif
-+#include <vcl/image.hxx>
- #include <svtools/eitem.hxx>
- #include <sfx2/app.hxx>
-
--#define _SVX_MODCTRL_CXX
-
- #include <svx/dialogs.hrc>
--
--#include "modctrl.hxx"
- #include <svx/dialmgr.hxx>
-
-+#include <com/sun/star/beans/PropertyValue.hpp>
-+
-+using ::com::sun::star::uno::Sequence;
-+using ::com::sun::star::beans::PropertyValue;
-+using ::rtl::OUString;
-+
- SFX_IMPL_STATUSBAR_CONTROL(SvxModifyControl, SfxBoolItem);
-
- // class SvxModifyControl ------------------------------------------------
-
-+struct SvxModifyControl::ImplData
-+{
-+ Image maModifiedButton;
-+ Image maNonModifiedButton;
-+
-+ bool mbModified;
-+
-+ ImplData() :
-+ maModifiedButton( SVX_RES(RID_SVXBMP_DOC_MODIFIED_YES) ),
-+ maNonModifiedButton( SVX_RES(RID_SVXBMP_DOC_MODIFIED_NO) ),
-+ mbModified(false)
-+ {
-+ }
-+};
-+
- SvxModifyControl::SvxModifyControl( USHORT _nSlotId,
- USHORT _nId,
- StatusBar& rStb ) :
-
- SfxStatusBarControl( _nSlotId, _nId, rStb ),
-- bState( TRUE )
-+ mpImpl(new ImplData)
- {
- }
-
-@@ -65,32 +84,71 @@ void SvxModifyControl::StateChanged( USHORT, SfxItemState eState,
- const SfxPoolItem* pState )
- {
- if ( SFX_ITEM_AVAILABLE != eState )
-- GetStatusBar().SetItemText( GetId(), String() );
-- else
-- {
-- DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" );
-- SfxBoolItem* pItem = (SfxBoolItem*)pState;
-- bState = pItem->GetValue();
-- DrawItemText_Impl();
-- }
-+ return;
-+
-+ DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" );
-+ SfxBoolItem* pItem = (SfxBoolItem*)pState;
-+ mpImpl->mbModified = pItem->GetValue();
-+
-+ if ( GetStatusBar().AreItemsVisible() )
-+ GetStatusBar().SetItemData( GetId(), 0 ); // force repaint
-+
-+ int nResId = mpImpl->mbModified ? RID_SVXSTR_DOC_MODIFIED_YES : RID_SVXSTR_DOC_MODIFIED_NO;
-+ GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(nResId));
- }
-
- // -----------------------------------------------------------------------
-
--void SvxModifyControl::Paint( const UserDrawEvent& )
-+namespace {
-+
-+/**
-+ * Given a bounding rectangle and an image, determine the top-left position
-+ * of the image so that the image would look centered both horizontally and
-+ * vertically.
-+ *
-+ * @param rBoundingRect bounding rectangle
-+ * @param rImg image
-+ *
-+ * @return Point top-left corner of the centered image position
-+ */
-+Point centerImage(const Rectangle& rBoundingRect, const Image& rImg)
- {
-- DrawItemText_Impl();
-+ Size aImgSize = rImg.GetSizePixel();
-+ Size aRectSize = rBoundingRect.GetSize();
-+ long nXOffset = (aRectSize.getWidth() - aImgSize.getWidth())/2;
-+ long nYOffset = (aRectSize.getHeight() - aImgSize.getHeight())/2;
-+ Point aPt = rBoundingRect.TopLeft();
-+ aPt += Point(nXOffset, nYOffset);
-+ return aPt;
- }
-
--// -----------------------------------------------------------------------
-+}
-+void SvxModifyControl::Paint( const UserDrawEvent& rUsrEvt )
-+{
-+ const Rectangle aControlRect = getControlRect();
-+ OutputDevice* pDev = rUsrEvt.GetDevice();
-+ Rectangle aRect = rUsrEvt.GetRect();
-+
-+ if (mpImpl->mbModified)
-+ {
-+ Point aPt = centerImage(aRect, mpImpl->maModifiedButton);
-+ pDev->DrawImage(aPt, mpImpl->maModifiedButton);
-+ }
-+ else
-+ {
-+ Point aPt = centerImage(aRect, mpImpl->maNonModifiedButton);
-+ pDev->DrawImage(aPt, mpImpl->maNonModifiedButton);
-+ }
-+}
-
--void SvxModifyControl::DrawItemText_Impl()
-+void SvxModifyControl::DoubleClick()
- {
-- String sMode;
-+ if (!mpImpl->mbModified)
-+ // document not modified. nothing to do here.
-+ return;
-
-- if ( bState )
-- sMode = '*';
-- GetStatusBar().SetItemText( GetId(), sMode );
-+ Sequence<PropertyValue> aArgs;
-+ execute(OUString::createFromAscii(".uno:Save"), aArgs);
- }
-
- ULONG SvxModifyControl::GetDefItemWidth(const StatusBar& rStb)
-diff --git svx/source/stbctrls/stbctrls.src svx/source/stbctrls/stbctrls.src
-index b4dac87..72b7d1a 100644
---- svx/source/stbctrls/stbctrls.src
-+++ svx/source/stbctrls/stbctrls.src
-@@ -87,6 +87,16 @@ String RID_SVXSTR_XMLSEC_NO_SIG
- Text [ en-US ] = "Digital Signature: The document is not signed.";
- };
-
-+String RID_SVXSTR_DOC_MODIFIED_YES
-+{
-+ Text [ en-US ] = "The document has been modified. Double-click to save the document.";
-+};
-+
-+String RID_SVXSTR_DOC_MODIFIED_NO
-+{
-+ Text [ en-US ] = "The document has not been modified since the last save.";
-+};
-+
- // PopupMenu -------------------------------------------------------------
- Menu RID_SVXMNU_ZOOM
- {
-@@ -323,3 +333,19 @@ Image RID_SVXBMP_SLIDERINCREASE_HC
- MaskColor = STD_MASKCOLOR;
- };
-
-+Image RID_SVXBMP_DOC_MODIFIED_YES
-+{
-+ ImageBitmap = Bitmap
-+ {
-+ File = "doc_modified_yes_14.png" ;
-+ };
-+ MaskColor = STD_MASKCOLOR;
-+};
-+Image RID_SVXBMP_DOC_MODIFIED_NO
-+{
-+ ImageBitmap = Bitmap
-+ {
-+ File = "doc_modified_no_14.png" ;
-+ };
-+ MaskColor = STD_MASKCOLOR;
-+};
-diff --git sw/source/ui/app/swmodule.cxx sw/source/ui/app/swmodule.cxx
-index 0e4c70c..4a0fee9 100644
---- sw/source/ui/app/swmodule.cxx
-+++ sw/source/ui/app/swmodule.cxx
-@@ -70,6 +70,7 @@
- #include <svx/imapdlg.hxx>
- #include <svx/srchdlg.hxx>
- #include <svx/hyperdlg.hxx>
-+#include <svx/modctrl.hxx>
- #include <com/sun/star/scanner/XScannerManager.hpp>
- #include <com/sun/star/container/XSet.hpp>
- #include <comphelper/processfactory.hxx>
-@@ -439,6 +440,7 @@ void SwDLL::RegisterControls()
- SwBookmarkControl::RegisterControl(FN_STAT_PAGE, pMod );
- SwTemplateControl::RegisterControl(FN_STAT_TEMPLATE, pMod );
- SwViewLayoutControl::RegisterControl( SID_ATTR_VIEWLAYOUT, pMod );
-+ SvxModifyControl::RegisterControl( SID_DOC_MODIFIED, pMod );
- SvxZoomSliderControl::RegisterControl( SID_ATTR_ZOOMSLIDER, pMod );
-
- SwTableOptimizeCtrl::RegisterControl(FN_OPTIMIZE_TABLE, pMod);
-diff --git sw/uiconfig/sglobal/statusbar/statusbar.xml sw/uiconfig/sglobal/statusbar/statusbar.xml
-index ed69b12..3e46300 100644
---- sw/uiconfig/sglobal/statusbar/statusbar.xml
-+++ sw/uiconfig/sglobal/statusbar/statusbar.xml
-@@ -6,7 +6,7 @@
- <statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
- <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
-- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
-+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
- <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
- <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
- <statusbar:statusbaritem xlink:href=".uno:ViewLayout" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="63" statusbar:helpid="helpid:11064"/>
-diff --git sw/uiconfig/sweb/statusbar/statusbar.xml sw/uiconfig/sweb/statusbar/statusbar.xml
-index 24ec903..f688036 100644
---- sw/uiconfig/sweb/statusbar/statusbar.xml
-+++ sw/uiconfig/sweb/statusbar/statusbar.xml
-@@ -6,7 +6,7 @@
- <statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
- <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
-- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
-+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
- <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
- <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
- <statusbar:statusbaritem xlink:href=".uno:ZoomSlider" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="130" statusbar:helpid="helpid:11065"/>
-diff --git sw/uiconfig/swform/statusbar/statusbar.xml sw/uiconfig/swform/statusbar/statusbar.xml
-index 58d7b18..5f9150d 100644
---- sw/uiconfig/swform/statusbar/statusbar.xml
-+++ sw/uiconfig/swform/statusbar/statusbar.xml
-@@ -7,7 +7,7 @@
- <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
- <statusbar:statusbaritem xlink:href=".uno:ExecHyperlinks" statusbar:align="center" statusbar:width="22" statusbar:helpid="helpid:21186"/>
-- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
-+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
- <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
- <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
- </statusbar:statusbar>
-diff --git sw/uiconfig/swreport/statusbar/statusbar.xml sw/uiconfig/swreport/statusbar/statusbar.xml
-index 58d7b18..5f9150d 100644
---- sw/uiconfig/swreport/statusbar/statusbar.xml
-+++ sw/uiconfig/swreport/statusbar/statusbar.xml
-@@ -7,7 +7,7 @@
- <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
- <statusbar:statusbaritem xlink:href=".uno:ExecHyperlinks" statusbar:align="center" statusbar:width="22" statusbar:helpid="helpid:21186"/>
-- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
-+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
- <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
- <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
- </statusbar:statusbar>
-diff --git sw/uiconfig/swriter/statusbar/statusbar.xml sw/uiconfig/swriter/statusbar/statusbar.xml
-index ed69b12..3e46300 100644
---- sw/uiconfig/swriter/statusbar/statusbar.xml
-+++ sw/uiconfig/swriter/statusbar/statusbar.xml
-@@ -6,7 +6,7 @@
- <statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
- <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
-- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
-+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
- <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
- <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
- <statusbar:statusbaritem xlink:href=".uno:ViewLayout" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="63" statusbar:helpid="helpid:11064"/>
-diff --git sw/uiconfig/swxform/statusbar/statusbar.xml sw/uiconfig/swxform/statusbar/statusbar.xml
-index ed69b12..3e46300 100644
---- sw/uiconfig/swxform/statusbar/statusbar.xml
-+++ sw/uiconfig/swxform/statusbar/statusbar.xml
-@@ -6,7 +6,7 @@
- <statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
- <statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="37" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
-- <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:width="9" statusbar:helpid="helpid:5584"/>
-+ <statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
- <statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
- <statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="129" statusbar:helpid="helpid:10224"/>
- <statusbar:statusbaritem xlink:href=".uno:ViewLayout" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="63" statusbar:helpid="helpid:11064"/>
commit 3fcdf8aa44b2162978f1ac8173347451714e57d6
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Jul 24 20:20:11 2009 -0400
WIP: More work on new document modified status control.
* patches/test/statusbar-fancy-modified-status.diff: added tooltip
on the new status control to let the users know what that box in
the status bar is for. Also added capability to save the document
by double-clicking it. This concludes my work on the new document
modified status control, besides having a real artist draw the
disk icons, that is...
diff --git a/patches/test/statusbar-fancy-modified-status.diff b/patches/test/statusbar-fancy-modified-status.diff
index eea2eb4..bcefb8f 100644
--- a/patches/test/statusbar-fancy-modified-status.diff
+++ b/patches/test/statusbar-fancy-modified-status.diff
@@ -98,7 +98,7 @@ index 7d95fbb..33e4e48 100644
</statusbar:statusbar>
\ No newline at end of file
diff --git svx/inc/modctrl.hxx svx/inc/modctrl.hxx
-index e1f41a8..5941e89 100644
+index e1f41a8..94de89b 100644
--- svx/inc/modctrl.hxx
+++ svx/inc/modctrl.hxx
@@ -35,6 +35,8 @@
@@ -110,16 +110,17 @@ index e1f41a8..5941e89 100644
// class SvxModifyControl ------------------------------------------------
class SVX_DLLPUBLIC SvxModifyControl : public SfxStatusBarControl
-@@ -42,7 +44,7 @@ class SVX_DLLPUBLIC SvxModifyControl : public SfxStatusBarControl
+@@ -42,7 +44,8 @@ class SVX_DLLPUBLIC SvxModifyControl : public SfxStatusBarControl
public:
virtual void StateChanged( USHORT nSID, SfxItemState eState,
const SfxPoolItem* pState );
- virtual void Paint( const UserDrawEvent& rEvt );
+ virtual void Paint( const UserDrawEvent& rUsrEvt );
++ virtual void DoubleClick();
SFX_DECL_STATUSBAR_CONTROL();
-@@ -51,11 +53,8 @@ public:
+@@ -51,11 +54,8 @@ public:
static ULONG GetDefItemWidth(const StatusBar& rStb);
private:
@@ -134,18 +135,17 @@ index e1f41a8..5941e89 100644
diff --git svx/inc/svx/dialogs.hrc svx/inc/svx/dialogs.hrc
-index 57e4e9f..0a1f152 100644
+index 57e4e9f..53d5aae 100644
--- svx/inc/svx/dialogs.hrc
+++ svx/inc/svx/dialogs.hrc
-@@ -191,6 +191,8 @@
- #define RID_SVXBMP_SLIDERBUTTON_HC (RID_SVX_START + 70)
- #define RID_SVXBMP_SLIDERDECREASE_HC (RID_SVX_START + 71)
- #define RID_SVXBMP_SLIDERINCREASE_HC (RID_SVX_START + 72)
-+#define RID_SVXBMP_DOC_MODIFIED_YES (RID_SVX_START + 73)
-+#define RID_SVXBMP_DOC_MODIFIED_NO (RID_SVX_START + 74)
-
- // Alignment-TabPage
- #define RID_SVXPAGE_ALIGNMENT (RID_SVX_START + 90)
+@@ -1568,3 +1568,7 @@
+ #endif
+
+ #define SID_SC_TP_FORMULA (SVX_OOO_BUILD_START + 1)
++#define RID_SVXBMP_DOC_MODIFIED_YES (SVX_OOO_BUILD_START + 2)
++#define RID_SVXBMP_DOC_MODIFIED_NO (SVX_OOO_BUILD_START + 3)
++#define RID_SVXSTR_DOC_MODIFIED_YES (SVX_OOO_BUILD_START + 4)
++#define RID_SVXSTR_DOC_MODIFIED_NO (SVX_OOO_BUILD_START + 5)
diff --git svx/source/stbctrls/makefile.mk svx/source/stbctrls/makefile.mk
index 7a6fad6..e5bff5a 100644
--- svx/source/stbctrls/makefile.mk
@@ -159,10 +159,10 @@ index 7a6fad6..e5bff5a 100644
HXX1TARGET=stbctrls
diff --git svx/source/stbctrls/modctrl.cxx svx/source/stbctrls/modctrl.cxx
-index 843c845..3bb38df 100644
+index 843c845..42f1d7c 100644
--- svx/source/stbctrls/modctrl.cxx
+++ svx/source/stbctrls/modctrl.cxx
-@@ -33,29 +33,44 @@
+@@ -33,29 +33,48 @@
// include ---------------------------------------------------------------
@@ -182,6 +182,10 @@ index 843c845..3bb38df 100644
-#include "modctrl.hxx"
#include <svx/dialmgr.hxx>
++#include <com/sun/star/beans/PropertyValue.hpp>
++
++using ::com::sun::star::uno::Sequence;
++using ::com::sun::star::beans::PropertyValue;
+using ::rtl::OUString;
+
SFX_IMPL_STATUSBAR_CONTROL(SvxModifyControl, SfxBoolItem);
@@ -193,12 +197,12 @@ index 843c845..3bb38df 100644
+ Image maModifiedButton;
+ Image maNonModifiedButton;
+
-+ bool mbState;
++ bool mbModified;
+
+ ImplData() :
+ maModifiedButton( SVX_RES(RID_SVXBMP_DOC_MODIFIED_YES) ),
+ maNonModifiedButton( SVX_RES(RID_SVXBMP_DOC_MODIFIED_NO) ),
-+ mbState(false)
++ mbModified(false)
+ {
+ }
+};
@@ -213,7 +217,7 @@ index 843c845..3bb38df 100644
{
}
-@@ -65,32 +80,59 @@ void SvxModifyControl::StateChanged( USHORT, SfxItemState eState,
+@@ -65,32 +84,71 @@ void SvxModifyControl::StateChanged( USHORT, SfxItemState eState,
const SfxPoolItem* pState )
{
if ( SFX_ITEM_AVAILABLE != eState )
@@ -225,25 +229,22 @@ index 843c845..3bb38df 100644
- bState = pItem->GetValue();
- DrawItemText_Impl();
- }
--}
+ return;
-
--// -----------------------------------------------------------------------
++
+ DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" );
+ SfxBoolItem* pItem = (SfxBoolItem*)pState;
-+ mpImpl->mbState = pItem->GetValue();
-+ fprintf(stdout, "SvxModifyControl::StateChanged: state = %d\n", mpImpl->mbState);
-
--void SvxModifyControl::Paint( const UserDrawEvent& )
--{
-- DrawItemText_Impl();
++ mpImpl->mbModified = pItem->GetValue();
++
+ if ( GetStatusBar().AreItemsVisible() )
+ GetStatusBar().SetItemData( GetId(), 0 ); // force repaint
++
++ int nResId = mpImpl->mbModified ? RID_SVXSTR_DOC_MODIFIED_YES : RID_SVXSTR_DOC_MODIFIED_NO;
++ GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(nResId));
}
// -----------------------------------------------------------------------
--void SvxModifyControl::DrawItemText_Impl()
+-void SvxModifyControl::Paint( const UserDrawEvent& )
+namespace {
+
+/**
@@ -258,7 +259,7 @@ index 843c845..3bb38df 100644
+ */
+Point centerImage(const Rectangle& rBoundingRect, const Image& rImg)
{
-- String sMode;
+- DrawItemText_Impl();
+ Size aImgSize = rImg.GetSizePixel();
+ Size aRectSize = rBoundingRect.GetSize();
+ long nXOffset = (aRectSize.getWidth() - aImgSize.getWidth())/2;
@@ -266,11 +267,9 @@ index 843c845..3bb38df 100644
+ Point aPt = rBoundingRect.TopLeft();
+ aPt += Point(nXOffset, nYOffset);
+ return aPt;
-+}
+ }
-- if ( bState )
-- sMode = '*';
-- GetStatusBar().SetItemText( GetId(), sMode );
+-// -----------------------------------------------------------------------
+}
+void SvxModifyControl::Paint( const UserDrawEvent& rUsrEvt )
+{
@@ -278,7 +277,7 @@ index 843c845..3bb38df 100644
+ OutputDevice* pDev = rUsrEvt.GetDevice();
+ Rectangle aRect = rUsrEvt.GetRect();
+
-+ if (mpImpl->mbState)
++ if (mpImpl->mbModified)
+ {
+ Point aPt = centerImage(aRect, mpImpl->maModifiedButton);
+ pDev->DrawImage(aPt, mpImpl->maModifiedButton);
@@ -288,14 +287,46 @@ index 843c845..3bb38df 100644
+ Point aPt = centerImage(aRect, mpImpl->maNonModifiedButton);
+ pDev->DrawImage(aPt, mpImpl->maNonModifiedButton);
+ }
++}
+
+-void SvxModifyControl::DrawItemText_Impl()
++void SvxModifyControl::DoubleClick()
+ {
+- String sMode;
++ if (!mpImpl->mbModified)
++ // document not modified. nothing to do here.
++ return;
+
+- if ( bState )
+- sMode = '*';
+- GetStatusBar().SetItemText( GetId(), sMode );
++ Sequence<PropertyValue> aArgs;
++ execute(OUString::createFromAscii(".uno:Save"), aArgs);
}
ULONG SvxModifyControl::GetDefItemWidth(const StatusBar& rStb)
diff --git svx/source/stbctrls/stbctrls.src svx/source/stbctrls/stbctrls.src
-index b4dac87..018af03 100644
+index b4dac87..72b7d1a 100644
--- svx/source/stbctrls/stbctrls.src
+++ svx/source/stbctrls/stbctrls.src
-@@ -323,3 +323,19 @@ Image RID_SVXBMP_SLIDERINCREASE_HC
+@@ -87,6 +87,16 @@ String RID_SVXSTR_XMLSEC_NO_SIG
+ Text [ en-US ] = "Digital Signature: The document is not signed.";
+ };
+
++String RID_SVXSTR_DOC_MODIFIED_YES
++{
++ Text [ en-US ] = "The document has been modified. Double-click to save the document.";
++};
++
++String RID_SVXSTR_DOC_MODIFIED_NO
++{
++ Text [ en-US ] = "The document has not been modified since the last save.";
++};
++
+ // PopupMenu -------------------------------------------------------------
+ Menu RID_SVXMNU_ZOOM
+ {
+@@ -323,3 +333,19 @@ Image RID_SVXBMP_SLIDERINCREASE_HC
MaskColor = STD_MASKCOLOR;
};
More information about the ooo-build-commit
mailing list