summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-12-06 21:05:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-12-07 09:32:12 +0000
commitd1660f19d5c8c60d8549b594a36d13a5edcf15a3 (patch)
tree24e3c82332ece088bb6d23a48d39f7b6f5de2ebc /sc/source/ui
parent8dd1581a4f65eacc2a0f62b79873b533e8237a43 (diff)
an app can have print options without a print options dialog
e.g. draw and impress have print options, but no print options dialog (It's plausible that we should merge the print options in the print dialog with the print options in the options... dialog of the printer settings dialog) Change-Id: I25c029ad8ba482b1e8d8d5974cc8de99584b9a55
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/inc/prevwsh.hxx3
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx1
-rw-r--r--sc/source/ui/view/prevwsh.cxx5
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx5
4 files changed, 13 insertions, 1 deletions
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 60d0872a0662..753047843fc4 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -110,7 +110,8 @@ public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
virtual SfxPrinter* GetPrinter( sal_Bool bCreate = false );
- virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
+ virtual bool HasPrintOptionsPage() const;
virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
void AddAccessibilityObject( SfxListener& rObject );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 54606fad3c71..d1e53adb39e4 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -353,6 +353,7 @@ public:
virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter,
sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false );
+ virtual bool HasPrintOptionsPage() const;
virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
void ConnectObject( SdrOle2Obj* pObj );
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 505544e7fba6..37e0e8678d95 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -570,6 +570,11 @@ sal_uInt16 ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiff
return pDocShell->SetPrinter( pNewPrinter, nDiffFlags );
}
+bool ScPreviewShell::HasPrintOptionsPage() const
+{
+ return true;
+}
+
SfxTabPage* ScPreviewShell::CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 799f95322a1c..d154b0148b53 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1093,6 +1093,11 @@ sal_uInt16 ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiff
return GetViewData()->GetDocShell()->SetPrinter( pNewPrinter, nDiffFlags );
}
+bool ScTabViewShell::HasPrintOptionsPage() const
+{
+ return true;
+}
+
SfxTabPage* ScTabViewShell::CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();