summaryrefslogtreecommitdiff
path: root/sc/source/ui/optdlg/tpprint.cxx
diff options
context:
space:
mode:
authorEilidh McAdam <eilidh@lanedo.com>2013-11-02 20:35:44 +0000
committerEike Rathke <erack@redhat.com>2013-11-04 09:40:03 -0600
commit7e4f8eb5eff642c7fc8bfa665289d55a1c5b054b (patch)
treeecb84ba465c3721a5150a05af629f5c0a015ba3c /sc/source/ui/optdlg/tpprint.cxx
parenta37092075791ccbe6081e3e01990df6d9e6cdce6 (diff)
fdo#40788: Allow manual breaks in Calc to be forced
If the scale settings specify that the print ranges must be scaled across a specific number of pages, the default behaviour is to ignore breaks to avoid the case where breaks force more pages than specified. Here, an option under Calc -> Print -> Pages is added so that the user can specify that manual row and column breaks should be forced. Change-Id: I445cd7ce9e16e4ec2d0c320f059edad62b40f22d Reviewed-on: https://gerrit.libreoffice.org/6531 Tested-by: Eike Rathke <erack@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/ui/optdlg/tpprint.cxx')
-rw-r--r--sc/source/ui/optdlg/tpprint.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index cdfc5eb6759e..0c9564133210 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -40,6 +40,7 @@ ScTpPrintOptions::ScTpPrintOptions( Window* pParent,
{
get( m_pSkipEmptyPagesCB , "suppressCB" );
get( m_pSelectedSheetsCB , "printCB" );
+ get( m_pForceBreaksCB, "forceBreaksCB" );
}
ScTpPrintOptions::~ScTpPrintOptions()
@@ -87,6 +88,8 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
m_pSkipEmptyPagesCB->Check( aOptions.GetSkipEmpty() );
m_pSkipEmptyPagesCB->SaveValue();
m_pSelectedSheetsCB->SaveValue();
+ m_pForceBreaksCB->Check( aOptions.GetForceBreaks() );
+ m_pForceBreaksCB->SaveValue();
}
// -----------------------------------------------------------------------
@@ -97,12 +100,14 @@ sal_Bool ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs )
bool bSkipEmptyChanged = ( m_pSkipEmptyPagesCB->GetSavedValue() != m_pSkipEmptyPagesCB->IsChecked() );
bool bSelectedSheetsChanged = ( m_pSelectedSheetsCB->GetSavedValue() != m_pSelectedSheetsCB->IsChecked() );
+ bool bForceBreaksChanged = ( m_pForceBreaksCB->GetSavedValue() != m_pForceBreaksCB->IsChecked() );
- if ( bSkipEmptyChanged || bSelectedSheetsChanged )
+ if ( bSkipEmptyChanged || bSelectedSheetsChanged || bForceBreaksChanged )
{
ScPrintOptions aOpt;
aOpt.SetSkipEmpty( m_pSkipEmptyPagesCB->IsChecked() );
aOpt.SetAllSheets( !m_pSelectedSheetsCB->IsChecked() );
+ aOpt.SetForceBreaks( m_pForceBreaksCB->IsChecked() );
rCoreAttrs.Put( ScTpPrintItem( SID_SCPRINTOPTIONS, aOpt ) );
if ( bSelectedSheetsChanged )
{