offapi/com/sun/star/text/PrintSettings.idl                 |    4 
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |    8 -
 qadevOOo/tests/java/ifc/text/_PrintSettings.java           |   13 ++
 sw/inc/printdata.hxx                                       |    6 -
 sw/source/core/view/printdata.cxx                          |    1 
 sw/source/filter/xml/xmlimp.cxx                            |    1 
 sw/source/ui/config/optpage.cxx                            |    1 
 sw/source/uibase/config/prtopt.cxx                         |   59 ++++++-------
 sw/source/uibase/uno/unomod.cxx                            |    4 
 sw/source/uibase/uno/unotxdoc.cxx                          |    1 
 test/source/text/textprintersettings.cxx                   |    1 
 11 files changed, 48 insertions(+), 51 deletions(-)

New commits:
commit 6dbc5e2bf4bd24c53ae3b906a5f74fb7ceed6ab9
Author:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
AuthorDate: Thu Dec 14 14:13:07 2023 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
CommitDate: Mon Dec 18 13:21:55 2023 +0100

    [API CHANGE] tdf#158041 Remove unused reverse printing option from sw
    
    Change-Id: I8b4597dbafc78e881fe556de8ce8221e50a673bf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160777
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>

diff --git a/offapi/com/sun/star/text/PrintSettings.idl 
b/offapi/com/sun/star/text/PrintSettings.idl
index f43fc899f299..e1596fe16290 100644
--- a/offapi/com/sun/star/text/PrintSettings.idl
+++ b/offapi/com/sun/star/text/PrintSettings.idl
@@ -56,6 +56,10 @@ published service PrintSettings
     [property] boolean PrintControls;
 
     /** determines if the pages are printed in the reverse order, starting 
with the last page.
+     *
+     * @deprecated since 24.8.
+     *
+     * The functionality behind this property is removed. Use 
com::sun::star::view::PrintSettings::PrintReversed instead.
      */
     [property] boolean PrintReversed;
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index b6a26e4bf11f..4e7e4e92ebd4 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1823,14 +1823,6 @@
           </info>
           <value>true</value>
         </prop>
-        <prop oor:name="Reversed" oor:type="xs:boolean" oor:nillable="false">
-          <!-- UIHints: Tools - Options - Text document - Print - [Section] 
Pages -->
-          <info>
-            <desc>Reverses the printing order.</desc>
-            <label>Reversed</label>
-          </info>
-          <value>false</value>
-        </prop>
         <prop oor:name="Brochure" oor:type="xs:boolean" oor:nillable="false">
           <!-- UIHints: Tools - Options - Text document - Print - [Section] 
Pages -->
           <info>
diff --git a/qadevOOo/tests/java/ifc/text/_PrintSettings.java 
b/qadevOOo/tests/java/ifc/text/_PrintSettings.java
index 9cbf1fdb53d2..55da07d2ab8d 100644
--- a/qadevOOo/tests/java/ifc/text/_PrintSettings.java
+++ b/qadevOOo/tests/java/ifc/text/_PrintSettings.java
@@ -55,5 +55,18 @@ public class _PrintSettings extends MultiPropertyTest {
         }) ;
     }
 
+    /**
+    * This property returns always false.
+    */
+    public void _PrintReversed() {
+        testProperty("PrintReversed", new PropertyTester() {
+            @Override
+            protected Object getNewValue(String p, Object old) {
+                return Boolean.FALSE;
+            }
+        }) ;
+    }
+
+
 }
 
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index 7dcdbdbb964a..cd330d802796 100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -59,7 +59,7 @@ public:
              m_bPrintBlackFont,
              //#i81434# - printing of hidden text
              m_bPrintHiddenText, m_bPrintTextPlaceholder,
-             m_bPrintLeftPages, m_bPrintRightPages, m_bPrintReverse, 
m_bPrintProspect,
+             m_bPrintLeftPages, m_bPrintRightPages, m_bPrintProspect,
              m_bPrintProspectRTL,
              m_bPaperFromSetup,
              /// Print empty pages
@@ -80,7 +80,6 @@ public:
         m_bPrintEmptyPages        = true;
 
         m_bPaperFromSetup         =
-        m_bPrintReverse           =
         m_bPrintProspect          =
         m_bPrintProspectRTL       =
         m_bPrintBlackFont         =
@@ -106,7 +105,6 @@ public:
         m_bPrintBlackFont     ==   rData.m_bPrintBlackFont      &&
         m_bPrintLeftPages     ==   rData.m_bPrintLeftPages      &&
         m_bPrintRightPages    ==   rData.m_bPrintRightPages     &&
-        m_bPrintReverse       ==   rData.m_bPrintReverse        &&
         m_bPrintProspect      ==   rData.m_bPrintProspect       &&
         m_bPrintProspectRTL   ==   rData.m_bPrintProspectRTL    &&
         m_bPaperFromSetup     ==   rData.m_bPaperFromSetup      &&
@@ -126,7 +124,6 @@ public:
     bool IsPrintControl() const             { return m_bPrintControl; }
     bool IsPrintLeftPage() const            { return m_bPrintLeftPages; }
     bool IsPrintRightPage() const           { return m_bPrintRightPages; }
-    bool IsPrintReverse() const             { return m_bPrintReverse; }
     bool IsPaperFromSetup() const           { return m_bPaperFromSetup; }
     bool IsPrintEmptyPages() const          { return m_bPrintEmptyPages; }
     bool IsPrintProspect() const            { return m_bPrintProspect; }
@@ -142,7 +139,6 @@ public:
     void SetPrintControl( bool b )              { doSetModified(); 
m_bPrintControl = b; }
     void SetPrintLeftPage( bool b )             { doSetModified(); 
m_bPrintLeftPages = b; }
     void SetPrintRightPage( bool b )            { doSetModified(); 
m_bPrintRightPages = b; }
-    void SetPrintReverse( bool b )              { doSetModified(); 
m_bPrintReverse = b; }
     void SetPaperFromSetup( bool b )            { doSetModified(); 
m_bPaperFromSetup = b; }
     void SetPrintEmptyPages( bool b )           { doSetModified(); 
m_bPrintEmptyPages = b; }
     void SetPrintPostIts( SwPostItMode n )      { doSetModified(); 
m_nPrintPostIts = n; }
diff --git a/sw/source/core/view/printdata.cxx 
b/sw/source/core/view/printdata.cxx
index 039a591163ce..fffc90243adf 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -136,7 +136,6 @@ void SwRenderData::MakeSwPrtOptions(
     rOptions.m_bPrintEmptyPages       = pOpt->IsPrintEmptyPages( bIsPDFExport 
);
     // bUpdateFieldsInPrinting  <-- not set here; mail merge only
     rOptions.m_bPaperFromSetup        = pOpt->IsPaperFromSetup();
-    rOptions.m_bPrintReverse          = false; /*handled by print dialog now*/
     rOptions.m_bPrintProspect         = pOpt->IsPrintProspect();
     rOptions.m_bPrintProspectRTL      = pOpt->IsPrintProspectRTL();
     // bModified                <-- not set here; mail merge only
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 05b22f6e28ec..ba7afc80ee8c 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1253,7 +1253,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence 
< PropertyValue > & aC
         "PrintLeftPages",
         "PrintPageBackground",
         "PrintProspect",
-        "PrintReversed",
         "PrintRightPages",
         "PrintFaxName",
         "PrintPaperFromSetup",
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index ea2b147da219..6051a53b75f2 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -549,7 +549,6 @@ bool    SwAddPrinterTabPage::FillItemSet( SfxItemSet* 
rCoreSet )
 
         aAddPrinterAttr.m_bPrintLeftPages     = m_xLeftPageCB->get_active();
         aAddPrinterAttr.m_bPrintRightPages    = m_xRightPageCB->get_active();
-        aAddPrinterAttr.m_bPrintReverse       = false; // handled by vcl 
itself since CWS printerpullpages /*m_xReverseCB->get_active()*/;
         aAddPrinterAttr.m_bPrintProspect      = m_xProspectCB->get_active();
         aAddPrinterAttr.m_bPrintProspectRTL   = 
m_xProspectCB_RTL->get_active();
         aAddPrinterAttr.m_bPaperFromSetup     = 
m_xPaperFromSetupCB->get_active();
diff --git a/sw/source/uibase/config/prtopt.cxx 
b/sw/source/uibase/config/prtopt.cxx
index da0667ffcb57..52b490ac85c4 100644
--- a/sw/source/uibase/config/prtopt.cxx
+++ b/sw/source/uibase/config/prtopt.cxx
@@ -36,18 +36,17 @@ Sequence<OUString> SwPrintOptions::GetPropertyNames() const
         "Content/Background",           //  2
         "Content/PrintBlack",           //  3
         "Content/Note",                 //  4
-        "Page/Reversed",                //  5
-        "Page/Brochure",                //  6
-        "Page/BrochureRightToLeft",     //  7
-        "Output/Fax",                   //  8
-        "Papertray/FromPrinterSetup",   //  9
-        "Page/LeftPage",                // 10 not in SW/Web
-        "Page/RightPage",               // 11 not in SW/Web
-        "EmptyPages",                   // 12 not in SW/Web
-        "Content/PrintPlaceholders",    // 13 not in Sw/Web
-        "Content/PrintHiddenText"       // 14 not in Sw/Web
+        "Page/Brochure",                //  5
+        "Page/BrochureRightToLeft",     //  6
+        "Output/Fax",                   //  7
+        "Papertray/FromPrinterSetup",   //  8
+        "Page/LeftPage",                //  9 not in SW/Web
+        "Page/RightPage",               // 10 not in SW/Web
+        "EmptyPages",                   // 11 not in SW/Web
+        "Content/PrintPlaceholders",    // 12 not in Sw/Web
+        "Content/PrintHiddenText"       // 13 not in Sw/Web
     };
-    const int nCount = m_bIsWeb ? 10 : 15;
+    const int nCount = m_bIsWeb ? 9 : 14;
     Sequence<OUString> aNames(nCount);
     OUString* pNames = aNames.getArray();
     for(int i = 0; i < nCount; i++)
@@ -91,16 +90,15 @@ SwPrintOptions::SwPrintOptions(bool bWeb) :
                         m_nPrintPostIts = static_cast<SwPostItMode>(nTmp);
                     }
                     break;
-                    case  5: m_bPrintReverse      = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
-                    case  6: m_bPrintProspect      = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
-                    case  7: m_bPrintProspectRTL  = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
-                    case  8: pValues[nProp] >>= m_sFaxName;  break;
-                    case  9: m_bPaperFromSetup    = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
-                    case 10: m_bPrintLeftPages    = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
-                    case 11: m_bPrintRightPages       = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
-                    case 12: m_bPrintEmptyPages       = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
-                    case 13: m_bPrintTextPlaceholder = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
-                    case 14: m_bPrintHiddenText = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
+                    case  5: m_bPrintProspect      = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
+                    case  6: m_bPrintProspectRTL  = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
+                    case  7: pValues[nProp] >>= m_sFaxName;  break;
+                    case  8: m_bPaperFromSetup    = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
+                    case  9: m_bPrintLeftPages    = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
+                    case 10: m_bPrintRightPages       = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
+                    case 11: m_bPrintEmptyPages       = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
+                    case 12: m_bPrintTextPlaceholder = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
+                    case 13: m_bPrintHiddenText = 
*o3tl::doAccess<bool>(pValues[nProp]);  break;
                 }
             }
         }
@@ -129,16 +127,15 @@ void SwPrintOptions::ImplCommit()
             case  2: pValues[nProp] <<= m_bPrintPageBackground; break;
             case  3: pValues[nProp] <<= m_bPrintBlackFont; break;
             case  4: pValues[nProp] <<=  
static_cast<sal_Int32>(m_nPrintPostIts)       ; break;
-            case  5: pValues[nProp] <<= m_bPrintReverse; break;
-            case  6: pValues[nProp] <<= m_bPrintProspect; break;
-            case  7: pValues[nProp] <<= m_bPrintProspectRTL; break;
-            case  8: pValues[nProp] <<= m_sFaxName;  break;
-            case  9: pValues[nProp] <<= m_bPaperFromSetup; break;
-            case 10: pValues[nProp] <<= m_bPrintLeftPages; break;
-            case 11: pValues[nProp] <<= m_bPrintRightPages; break;
-            case 12: pValues[nProp] <<= m_bPrintEmptyPages; break;
-            case 13: pValues[nProp] <<= m_bPrintTextPlaceholder; break;
-            case 14: pValues[nProp] <<= m_bPrintHiddenText; break;
+            case  5: pValues[nProp] <<= m_bPrintProspect; break;
+            case  6: pValues[nProp] <<= m_bPrintProspectRTL; break;
+            case  7: pValues[nProp] <<= m_sFaxName;  break;
+            case  8: pValues[nProp] <<= m_bPaperFromSetup; break;
+            case  9: pValues[nProp] <<= m_bPrintLeftPages; break;
+            case 10: pValues[nProp] <<= m_bPrintRightPages; break;
+            case 11: pValues[nProp] <<= m_bPrintEmptyPages; break;
+            case 12: pValues[nProp] <<= m_bPrintTextPlaceholder; break;
+            case 13: pValues[nProp] <<= m_bPrintHiddenText; break;
         }
     }
 
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index faaa6b72c478..e931789c41bf 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -307,7 +307,7 @@ void SwXPrintSettings::_setSingleValue( const 
comphelper::PropertyInfo & rInfo,
         break;
         case HANDLE_PRINTSET_REVERSED:
         {
-            mpPrtOpt->SetPrintReverse(tryBoolAccess(rInfo.maName, rValue));
+            // no action
         }
         break;
         case HANDLE_PRINTSET_PROSPECT:
@@ -428,7 +428,7 @@ void SwXPrintSettings::_getSingleValue( const 
comphelper::PropertyInfo & rInfo,
             rValue <<= mpPrtOpt->IsPrintRightPage();
         break;
         case HANDLE_PRINTSET_REVERSED:
-            rValue <<= mpPrtOpt->IsPrintReverse();
+            rValue <<= false;
         break;
         case HANDLE_PRINTSET_PROSPECT:
             rValue <<= mpPrtOpt->IsPrintProspect();
diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 7ff979bd0190..8e1a5847b22e 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2442,7 +2442,6 @@ static void lcl_SavePrintUIOptionsToDocumentPrintData(
     aDocPrintData.SetPrintControl( rPrintUIOptions.IsPrintFormControls() );
     aDocPrintData.SetPrintLeftPage( rPrintUIOptions.IsPrintLeftPages() );
     aDocPrintData.SetPrintRightPage( rPrintUIOptions.IsPrintRightPages() );
-    aDocPrintData.SetPrintReverse( false ); /*handled by print dialog now*/
     aDocPrintData.SetPaperFromSetup( rPrintUIOptions.IsPaperFromSetup() );
     aDocPrintData.SetPrintEmptyPages( rPrintUIOptions.IsPrintEmptyPages( 
bIsPDFEXport ) );
     aDocPrintData.SetPrintPostIts( rPrintUIOptions.GetPrintPostItsType() );
diff --git a/test/source/text/textprintersettings.cxx 
b/test/source/text/textprintersettings.cxx
index 77fc286e1951..6694b4bd0a07 100644
--- a/test/source/text/textprintersettings.cxx
+++ b/test/source/text/textprintersettings.cxx
@@ -24,7 +24,6 @@ void TextPrinterSettings::testPrinterSettingsProperties()
     testBooleanProperty(xPrinterSettings, "PrintLeftPages");
     testBooleanProperty(xPrinterSettings, "PrintRightPages");
     testBooleanProperty(xPrinterSettings, "PrintControls");
-    testBooleanProperty(xPrinterSettings, "PrintReversed");
     testBooleanProperty(xPrinterSettings, "PrintControls");
     testStringProperty(xPrinterSettings, "PrintFaxName", "FaxName");
     testBooleanProperty(xPrinterSettings, "PrintProspect");

Reply via email to