Kaydet (Commit) 1d3a0741 authored tarafından Heiko Tietze's avatar Heiko Tietze

tdf#121759 Revert "tdf#99296 - Disable headers/footers by default"

This reverts commit 08b50481.

Disabled h/f lead to an inactive menu entry (tdf#121759).
Also, the change was not accepted by the OP (tdf#99296).
See discussion on the mailing list, Gerrit, and BZ.

Change-Id: Ie3dcf14c173a1813da05d8f2a9c8f2eda14cee46
Reviewed-on: https://gerrit.libreoffice.org/64727
Tested-by: Jenkins
Reviewed-by: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
(cherry picked from commit d08e63fb)
Reviewed-on: https://gerrit.libreoffice.org/64728
üst 03287ddd
......@@ -106,35 +106,6 @@ public class ScAccessiblePageHeader extends TestCase {
e.printStackTrace(log);
}
XStyleFamiliesSupplier StyleFam = UnoRuntime.queryInterface(
XStyleFamiliesSupplier.class,
xSpreadsheetDoc );
XNameAccess StyleFamNames = StyleFam.getStyleFamilies();
XStyle StdStyle = null;
XNameAccess PageStyles = (XNameAccess) AnyConverter.toObject(
new Type(XNameAccess.class),
StyleFamNames.getByName("PageStyles"));
StdStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class), PageStyles.getByName("Default"));
//get the property-set
final XPropertySet PropSet = UnoRuntime.queryInterface(XPropertySet.class, StdStyle);
// tdf#99296 - Disable headers/footers by default
try {
PropSet.setPropertyValue("HeaderIsOn", Boolean.TRUE);
PropSet.setPropertyValue("FooterIsOn", Boolean.TRUE);
} catch (com.sun.star.beans.UnknownPropertyException upe) {
log.println("Don't know the Property 'HeaderIsOn' or 'FooterIsOn'");
} catch (com.sun.star.lang.WrappedTargetException wte) {
log.println("WrappedTargetException while setting Property 'HeaderIsOn' or 'FooterIsOn'");
} catch (com.sun.star.lang.IllegalArgumentException iae) {
log.println("IllegalArgumentException while setting Property 'HeaderIsOn' or 'FooterIsOn'");
} catch (com.sun.star.beans.PropertyVetoException pve) {
log.println("PropertyVetoException while setting Property 'HeaderIsOn' or 'FooterIsOn'");
}
XModel aModel = UnoRuntime.queryInterface(XModel.class, xSpreadsheetDoc);
XController xController = aModel.getCurrentController();
......@@ -180,6 +151,21 @@ public class ScAccessiblePageHeader extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
XStyleFamiliesSupplier StyleFam = UnoRuntime.queryInterface(
XStyleFamiliesSupplier.class,
xSpreadsheetDoc );
XNameAccess StyleFamNames = StyleFam.getStyleFamilies();
XStyle StdStyle = null;
XNameAccess PageStyles = (XNameAccess) AnyConverter.toObject(
new Type(XNameAccess.class),
StyleFamNames.getByName("PageStyles"));
StdStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class), PageStyles.getByName("Default"));
//get the property-set
final XPropertySet PropSet = UnoRuntime.queryInterface(XPropertySet.class, StdStyle);
XHeaderFooterContent RPHC = null;
// creation of testobject here
// first we write what we are intend to do to log file
......
......@@ -290,7 +290,7 @@ ScDocumentPool::ScDocumentPool()
mvPoolDefaults[ ATTR_PAGE_SIZE - ATTR_STARTINDEX ] = new SvxSizeItem( ATTR_PAGE_SIZE );
mvPoolDefaults[ ATTR_PAGE_HORCENTER - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_HORCENTER );
mvPoolDefaults[ ATTR_PAGE_VERCENTER - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_VERCENTER );
mvPoolDefaults[ ATTR_PAGE_ON - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_ON, false );
mvPoolDefaults[ ATTR_PAGE_ON - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_ON, true );
mvPoolDefaults[ ATTR_PAGE_DYNAMIC - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_DYNAMIC, true );
mvPoolDefaults[ ATTR_PAGE_SHARED - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_SHARED, true );
mvPoolDefaults[ ATTR_PAGE_NOTES - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_PAGE_NOTES, false );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment