[ooo-build-commit] .: patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Oct 5 07:21:38 PDT 2010


 patches/dev300/always-save-option-officecfg.diff |   25 ---
 patches/dev300/always-save-option-sfx2.diff      |   55 --------
 patches/dev300/always-save-option-svtools.diff   |  132 -------------------
 patches/dev300/always-save-option-svx.diff       |  153 -----------------------
 patches/dev300/apply                             |    8 -
 5 files changed, 373 deletions(-)

New commits:
commit 43b0456519cd4a719879cb1e4606ef3547b7dc27
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Oct 5 10:20:57 2010 -0400

    Removed always-save-option-*.diff; moved to git.

diff --git a/patches/dev300/always-save-option-officecfg.diff b/patches/dev300/always-save-option-officecfg.diff
deleted file mode 100644
index 34b7977..0000000
--- a/patches/dev300/always-save-option-officecfg.diff
+++ /dev/null
@@ -1,25 +0,0 @@
----
- .../schema/org/openoffice/Office/Common.xcs        |    7 +++++++
- 1 files changed, 7 insertions(+), 0 deletions(-)
-
-diff --git officecfg/registry/schema/org/openoffice/Office/Common.xcs officecfg/registry/schema/org/openoffice/Office/Common.xcs
-index bf86e38..45f3c28 100644
---- officecfg/registry/schema/org/openoffice/Office/Common.xcs
-+++ officecfg/registry/schema/org/openoffice/Office/Common.xcs
-@@ -5778,6 +5778,13 @@
-                 </info>
-                 <value>false</value>
-             </prop>
-+            <prop oor:name="AlwaysAllowSave" oor:type="xs:boolean">
-+                <info>
-+                    <author>kohei</author>
-+                    <desc>Determines if the user can save the document even when it's not modified.</desc>
-+                </info>
-+                <value>false</value>
-+            </prop>
- 			<prop oor:name="SymbolSet" oor:type="xs:short">
- 				<!-- UIHints: Tools  Options General View -->
- 				<info>
--- 
-1.7.0.1
-
diff --git a/patches/dev300/always-save-option-sfx2.diff b/patches/dev300/always-save-option-sfx2.diff
deleted file mode 100644
index f0abf83..0000000
--- a/patches/dev300/always-save-option-sfx2.diff
+++ /dev/null
@@ -1,55 +0,0 @@
---- sfx2/source/doc/guisaveas.cxx.old	2010-07-26 15:06:38.000000000 +0200
-+++ sfx2/source/doc/guisaveas.cxx	2010-07-30 13:34:56.000000000 +0200
-@@ -67,6 +67,7 @@
- #include <svl/intitem.hxx>
- #include <unotools/useroptions.hxx>
- #include <unotools/saveopt.hxx>
-+#include <svtools/miscopt.hxx>
- #include <tools/debug.hxx>
- #include <tools/urlobj.hxx>
- #include <comphelper/processfactory.hxx>
-@@ -696,9 +697,14 @@ sal_Int8 ModelData_Impl::CheckStateForSa
-     if ( GetMediaDescr().size() != aAcceptedArgs.size() )
-         GetMediaDescr() = aAcceptedArgs;
- 
--    // the document must be modified
--    if ( !GetModifiable()->isModified() && !bVersInfoNeedsStore )
--        return STATUS_NO_ACTION;
-+    // the document must be modified unless the always-save flag is set.
-+    SvtMiscOptions aMiscOptions;
-+    sal_Bool bAlwaysAllowSave = aMiscOptions.IsSaveAlwaysAllowed();
-+    if (!bAlwaysAllowSave)
-+    {
-+        if ( !GetModifiable()->isModified() && !bVersInfoNeedsStore )
-+            return STATUS_NO_ACTION;
-+    }
- 
-     // if the document is readonly or a new one a SaveAs operation must be used
-     if ( !GetStorable()->hasLocation() || GetStorable()->isReadonly() )
---- sfx2/source/doc/objserv.cxx.old	2010-07-29 21:20:54.000000000 +0200
-+++ sfx2/source/doc/objserv.cxx	2010-07-30 13:34:56.000000000 +0200
-@@ -63,8 +63,9 @@
- #include <basic/sbx.hxx>
- #include <unotools/pathoptions.hxx>
- #include <unotools/useroptions.hxx>
--#include <svtools/asynclink.hxx>
- #include <unotools/saveopt.hxx>
-+#include <svtools/asynclink.hxx>
-+#include <svtools/miscopt.hxx>
- #include <comphelper/documentconstants.hxx>
- 
- #include <sfx2/app.hxx>
-@@ -936,8 +937,11 @@ void SfxObjectShell::GetState_Impl(SfxIt
-                 }
-             case SID_SAVEDOC:
-                 {
--                    BOOL bMediumRO = IsReadOnlyMedium();
--                    if ( !bMediumRO && GetMedium() && IsModified() )
-+                    SvtMiscOptions aMiscOptions;
-+                    bool bAlwaysAllowSave = aMiscOptions.IsSaveAlwaysAllowed();
-+                    bool bAllowSave = (bAlwaysAllowSave || IsModified());
-+                    bool bMediumRO = IsReadOnlyMedium();
-+                    if ( !bMediumRO && GetMedium() && bAllowSave )
-                         rSet.Put(SfxStringItem(
-                             nWhich, String(SfxResId(STR_SAVEDOC))));
-                     else
diff --git a/patches/dev300/always-save-option-svtools.diff b/patches/dev300/always-save-option-svtools.diff
deleted file mode 100644
index 90db182..0000000
--- a/patches/dev300/always-save-option-svtools.diff
+++ /dev/null
@@ -1,132 +0,0 @@
----
- svtools/inc/svtools/miscopt.hxx   |    3 ++
- svtools/source/config/miscopt.cxx |   42 +++++++++++++++++++++++++++++++++++-
- 2 files changed, 43 insertions(+), 2 deletions(-)
-
-diff --git svtools/inc/svtools/miscopt.hxx svtools/inc/svtools/miscopt.hxx
-index 3e4ec38..d008850 100644
---- svtools/inc/svtools/miscopt.hxx
-+++ svtools/inc/svtools/miscopt.hxx
-@@ -146,6 +146,9 @@ class SVT_DLLPUBLIC SvtMiscOptions: public utl::detail::Options
-         void        SetShowLinkWarningDialog( sal_Bool bSet );
-         sal_Bool    IsShowLinkWarningDialogReadOnly() const;
- 
-+        void        SetSaveAlwaysAllowed( sal_Bool bSet );
-+        sal_Bool    IsSaveAlwaysAllowed() const;
-+
-     //-------------------------------------------------------------------------------------------------------------
-     //	private methods
-     //-------------------------------------------------------------------------------------------------------------
-diff --git svtools/source/config/miscopt.cxx svtools/source/config/miscopt.cxx
-index b8a358f..3e7a3b7 100644
---- svtools/source/config/miscopt.cxx
-+++ svtools/source/config/miscopt.cxx
-@@ -84,8 +84,10 @@ using namespace ::com::sun::star;
- #define PROPERTYHANDLE_SHOWLINKWARNINGDIALOG 7
- #define PROPERTYNAME_DISABLEUICUSTOMIZATION	ASCII_STR("DisableUICustomization")
- #define PROPERTYHANDLE_DISABLEUICUSTOMIZATION			8
-+#define PROPERTYNAME_ALWAYSALLOWSAVE ASCII_STR("AlwaysAllowSave")
-+#define PROPERTYHANDLE_ALWAYSALLOWSAVE 9
- 
--#define PROPERTYCOUNT						9
-+#define PROPERTYCOUNT                       10
- 
- #define VCL_TOOLBOX_STYLE_FLAT				((USHORT)0x0004) // from <vcl/toolbox.hxx>
- 
-@@ -119,6 +121,7 @@ class SvtMiscOptions_Impl : public ConfigItem
-     sal_Bool    m_bShowLinkWarningDialog;
-     sal_Bool    m_bIsShowLinkWarningDialogRO;
-     sal_Bool    m_bDisableUICustomization;
-+    sal_Bool    m_bAlwaysAllowSave;
- 
-     //-------------------------------------------------------------------------------------------------------------
-     //	public methods
-@@ -199,6 +202,12 @@ class SvtMiscOptions_Impl : public ConfigItem
-         inline sal_Bool DisableUICustomization() const
-         { return m_bDisableUICustomization; }
- 
-+        inline void SetSaveAlwaysAllowed( sal_Bool bSet )
-+        { m_bAlwaysAllowSave = bSet; SetModified(); }
-+
-+        inline sal_Bool IsSaveAlwaysAllowed() const
-+        { return m_bAlwaysAllowSave; }
-+
-         inline sal_Bool IsPluginsEnabled() const
-         { return m_bPluginsEnabled; }
- 
-@@ -307,6 +316,7 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
-     , m_bIsUseSystemPrintDialogRO( sal_False )
-     , m_bShowLinkWarningDialog( sal_True )
-     , m_bIsShowLinkWarningDialogRO( sal_False )
-+    , m_bAlwaysAllowSave( sal_False )
- 
- {
-     // Use our static list of configuration keys to get his values.
-@@ -418,6 +428,12 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
-                     DBG_ERROR("Wrong type of \"Misc\\DisableUICustomization\"!" );
-                     break;
-             }
-+            case PROPERTYHANDLE_ALWAYSALLOWSAVE :
-+            {
-+                if( !(seqValues[nProperty] >>= m_bAlwaysAllowSave) )
-+                    DBG_ERROR("Wrong type of \"Misc\\AlwaysAllowSave\"!" );
-+                    break;
-+            }
-         }
-     }
- 
-@@ -538,6 +554,12 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames )
-                                                                 DBG_ERROR("Wrong type of \"Misc\\DisableUICustomization\"!" );
-                                                         }
-                                                     break;
-+            case PROPERTYHANDLE_ALWAYSALLOWSAVE:
-+            {
-+                if( !(seqValues[nProperty] >>= m_bAlwaysAllowSave) )
-+                    DBG_ERROR("Wrong type of \"Misc\\AlwaysAllowSave\"!" );
-+            }
-+            break;
-         }
-     }
- }
-@@ -707,6 +729,11 @@ void SvtMiscOptions_Impl::Commit()
-                 seqValues[nProperty] <<= m_bDisableUICustomization;
-                 break;
-             }
-+            case PROPERTYHANDLE_ALWAYSALLOWSAVE :
-+            {
-+                seqValues[nProperty] <<= m_bAlwaysAllowSave;
-+                break;
-+            }
-         }
-     }
-     // Set properties in configuration.
-@@ -729,7 +756,8 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames()
-         PROPERTYNAME_USESYSTEMPRINTDIALOG,
-         PROPERTYNAME_TRYODMADIALOG,
-         PROPERTYNAME_SHOWLINKWARNINGDIALOG,
--        PROPERTYNAME_DISABLEUICUSTOMIZATION
-+        PROPERTYNAME_DISABLEUICUSTOMIZATION,
-+        PROPERTYNAME_ALWAYSALLOWSAVE
-     };
- 
-     // Initialize return sequence with these list ...
-@@ -935,6 +963,16 @@ sal_Bool SvtMiscOptions::IsShowLinkWarningDialogReadOnly() const
-     return m_pDataContainer->IsShowLinkWarningDialogReadOnly();
- }
- 
-+void SvtMiscOptions::SetSaveAlwaysAllowed( sal_Bool bSet )
-+{
-+    m_pDataContainer->SetSaveAlwaysAllowed( bSet );
-+}
-+
-+sal_Bool SvtMiscOptions::IsSaveAlwaysAllowed() const
-+{
-+    return m_pDataContainer->IsSaveAlwaysAllowed();
-+}
-+
- //*****************************************************************************************************************
- //	private method
- //*****************************************************************************************************************
--- 
-1.7.0.1
-
diff --git a/patches/dev300/always-save-option-svx.diff b/patches/dev300/always-save-option-svx.diff
deleted file mode 100644
index 1f35c18..0000000
--- a/patches/dev300/always-save-option-svx.diff
+++ /dev/null
@@ -1,153 +0,0 @@
----
- cui/source/options/optgdlg.cxx |   18 ++++++++++++++----
- cui/source/options/optgdlg.hrc |    4 +++-
- cui/source/options/optgdlg.hxx |    1 +
- cui/source/options/optgdlg.src |   14 ++++++++++----
- 4 files changed, 28 insertions(+), 9 deletions(-)
-
-diff --git cui/source/options/optgdlg.cxx cui/source/options/optgdlg.cxx
-index f532b5b..f080d21 100644
---- cui/source/options/optgdlg.cxx
-+++ cui/source/options/optgdlg.cxx
-@@ -210,6 +210,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
-     aPrintDlgCB			( this, CUI_RES( CB_PRINTDLG ) ),
-     aDocStatusFL		( this, CUI_RES( FL_DOCSTATUS ) ),
-     aDocStatusCB		( this, CUI_RES( CB_DOCSTATUS ) ),
-+    aSaveAlwaysCB       ( this, CUI_RES( CB_SAVE_ALWAYS ) ),
-     aTwoFigureFL		( this, CUI_RES( FL_TWOFIGURE ) ),
-     aInterpretFT		( this, CUI_RES( FT_INTERPRET ) ),
-     aYearValueField		( this, CUI_RES( NF_YEARVALUE ) ),
-@@ -240,7 +241,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
- 
-         Window* pWins[] =
-         {
--            &aDocStatusFL, &aDocStatusCB, &aTwoFigureFL,
-+            &aDocStatusFL, &aDocStatusCB, &aSaveAlwaysCB, &aTwoFigureFL,
-             &aInterpretFT, &aYearValueField, &aToYearFT
-         };
-         Window** pCurrent = pWins;
-@@ -262,8 +263,8 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
- 
-         Window* pWins[] =
-         {
--            &aPrintDlgFL, &aPrintDlgCB, &aDocStatusFL, &aDocStatusCB, &aTwoFigureFL,
--            &aInterpretFT, &aYearValueField, &aToYearFT
-+            &aPrintDlgFL, &aPrintDlgCB, &aDocStatusFL, &aDocStatusCB, &aSaveAlwaysCB,
-+            &aTwoFigureFL, &aInterpretFT, &aYearValueField, &aToYearFT
-         };
-         Window** pCurrent = pWins;
-         const sal_Int32 nCount = sizeof( pWins ) / sizeof( pWins[ 0 ] );
-@@ -288,7 +289,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
- 
-         Window* pWins[] =
-         {
--            &aDocStatusFL, &aDocStatusCB, &aTwoFigureFL,
-+            &aDocStatusFL, &aDocStatusCB, &aSaveAlwaysCB, &aTwoFigureFL,
-             &aInterpretFT, &aYearValueField, &aToYearFT
-         };
-         Window** pCurrent = pWins;
-@@ -419,6 +420,13 @@ BOOL OfaMiscTabPage::FillItemSet( SfxItemSet& rSet )
-         bModified = TRUE;
-     }
- 
-+    if ( aSaveAlwaysCB.IsChecked() != aSaveAlwaysCB.GetSavedValue() )
-+    {
-+        SvtMiscOptions aMiscOpt;
-+        aMiscOpt.SetSaveAlwaysAllowed( aSaveAlwaysCB.IsChecked() );
-+        bModified = TRUE;
-+    }
-+
-     const SfxUInt16Item* pUInt16Item =
-         PTR_CAST( SfxUInt16Item, GetOldItem( rSet, SID_ATTR_YEAR2000 ) );
-     USHORT nNum = (USHORT)aYearValueField.GetText().ToInt32();
-@@ -460,6 +468,8 @@ void OfaMiscTabPage::Reset( const SfxItemSet& rSet )
-     aFileDlgCB.SaveValue();
-     aPrintDlgCB.Check( !aMiscOpt.UseSystemPrintDialog() );
-     aPrintDlgCB.SaveValue();
-+    aSaveAlwaysCB.Check( aMiscOpt.IsSaveAlwaysAllowed() );
-+    aSaveAlwaysCB.SaveValue();
- 
-     aODMADlgCB.Check( aMiscOpt.TryODMADialog() );
-     aODMADlgCB.SaveValue();
-diff --git cui/source/options/optgdlg.hrc cui/source/options/optgdlg.hrc
-index db1ded0..4f57a23 100644
---- cui/source/options/optgdlg.hrc
-+++ cui/source/options/optgdlg.hrc
-@@ -56,7 +56,8 @@
- #define ROW9					(ROW8+RSC_CD_CHECKBOX_HEIGHT+ROWSPACE)
- #define ROW10					(ROW9+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE)
- #define ROW11					(ROW10+RSC_CD_CHECKBOX_HEIGHT+ROWSPACE)
--#define ROW12					(ROW11+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE)
-+#define ROW12					(ROW11+RSC_CD_CHECKBOX_HEIGHT+ROWSPACE)
-+#define ROW13					(ROW12+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE)
- 
- #define DIFF(v1,v2)						(v2-v1)
- #define OFFS_TEXTBOX_FIXEDTEXT(base)	(base+(RSC_CD_TEXTBOX_HEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2)
-@@ -201,6 +202,7 @@
- #define FL_DOCSTATUS                60
- #define CB_DOCSTATUS                61
- #define CB_ODMADLG                  62
-+#define CB_SAVE_ALWAYS              74
- #endif // #ifndef _SVX_OPTGDLG_HRC
- 
- // ******************************************************************* EOF
-diff --git cui/source/options/optgdlg.hxx cui/source/options/optgdlg.hxx
-index 5b51490..24b549c 100644
---- cui/source/options/optgdlg.hxx
-+++ cui/source/options/optgdlg.hxx
-@@ -63,6 +63,7 @@ private:
- 
-     FixedLine           aDocStatusFL;
-     CheckBox            aDocStatusCB;
-+    CheckBox            aSaveAlwaysCB;
- 
-     FixedLine           aTwoFigureFL;
-     FixedText			aInterpretFT;
-diff --git cui/source/options/optgdlg.src cui/source/options/optgdlg.src
-index ce0f934..36c71d4 100644
---- cui/source/options/optgdlg.src
-+++ cui/source/options/optgdlg.src
-@@ -131,22 +131,28 @@ TabPage OFA_TP_MISC
-         Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT );
-         Text [ en-US ] = "~Printing sets \"document modified\" status";
-     };
-+    CheckBox CB_SAVE_ALWAYS
-+    {
-+        Pos = MAP_APPFONT( COL1, ROW11 );
-+        Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT );
-+        Text [ en-US ] = "Allow to save document even when the document is not modified";
-+    };
-     FixedLine FL_TWOFIGURE
-     {
--        Pos = MAP_APPFONT( COL0, ROW11 );
-+        Pos = MAP_APPFONT( COL0, ROW12 );
-         Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
-         Text [ en-US ] = "Year (two digits)" ;
-     };
-     FixedText FT_INTERPRET
-     {
--        Pos = MAP_APPFONT( COL1, OFFS_TEXTBOX_FIXEDTEXT(ROW12) );
-+        Pos = MAP_APPFONT( COL1, OFFS_TEXTBOX_FIXEDTEXT(ROW13) );
-         Size = MAP_APPFONT( DIFF( COL1, COL3), RSC_CD_FIXEDTEXT_HEIGHT );
-         Text [ en-US ] = "Interpret as years between";
-     };
-     NumericField NF_YEARVALUE
-     {
-         Border = TRUE ;
--        Pos = MAP_APPFONT( COL4, ROW12 );
-+        Pos = MAP_APPFONT( COL4, ROW13 );
-         Size = MAP_APPFONT( EDIT_WIDTH, RSC_CD_TEXTBOX_HEIGHT );
-         Minimum = 1583 ;
-         Maximum = 9857 ;
-@@ -155,7 +161,7 @@ TabPage OFA_TP_MISC
-     };
-     FixedText FT_TOYEAR
-     {
--        Pos = MAP_APPFONT( COL6, OFFS_TEXTBOX_FIXEDTEXT(ROW12) );
-+        Pos = MAP_APPFONT( COL6, OFFS_TEXTBOX_FIXEDTEXT(ROW13) );
-         Size = MAP_APPFONT( WHOLE_WIDTH - COL6, RSC_CD_FIXEDTEXT_HEIGHT );
-         Text [ en-US ] = "and " ;
-     };
--- 
-1.7.0.1
-
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 6c2382e..9e2f149 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2643,14 +2643,6 @@ crosswin32-writerperfect-cross.diff
 # things to fix later
 #crosswin32-ugly-hacks.diff
 
-[ Misc ]
-
-# make the always save behavior configurable.
-always-save-option-officecfg.diff, n#556125, i#5226, kohei
-always-save-option-sfx2.diff,      n#556125, i#5226, kohei
-always-save-option-svtools.diff,   n#556125, i#5226, kohei
-always-save-option-svx.diff,       n#556125, i#5226, kohei
-
 [ Speed ]
 # don't throw unnecessary exceptions in sfx2
 speed-sfx2-dont-throw-too-much.diff, i#107512, jholesov


More information about the ooo-build-commit mailing list