[Libreoffice-commits] core.git: include/sfx2 sfx2/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Mar 31 06:59:36 UTC 2017


 include/sfx2/event.hxx          |    8 ++++----
 sfx2/source/doc/printhelper.cxx |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 7fca8e61ce992e9dc6f900b77142a123c0c10b6d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Mar 30 15:32:16 2017 +0200

    use actual UNO enums in sfx2
    
    Change-Id: Ide3ce0bc1afc9de46c2d06b161acff8d32fe1193
    Reviewed-on: https://gerrit.libreoffice.org/35911
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/sfx2/event.hxx b/include/sfx2/event.hxx
index f0fc85500c72..ec57c9d5bf55 100644
--- a/include/sfx2/event.hxx
+++ b/include/sfx2/event.hxx
@@ -116,11 +116,11 @@ class Printer;
 
 class SfxPrintingHint : public SfxViewEventHint
 {
-    sal_Int32 mnPrintableState;
+    css::view::PrintableState mnPrintableState;
     css::uno::Sequence < css::beans::PropertyValue > aOpts;
 public:
         SfxPrintingHint(
-                sal_Int32 nState,
+                css::view::PrintableState nState,
                 const css::uno::Sequence < css::beans::PropertyValue >& rOpts,
                 SfxObjectShell *pObj,
                 const css::uno::Reference< css::frame::XController2 >& xController )
@@ -133,12 +133,12 @@ public:
         , aOpts( rOpts )
         {}
 
-        SfxPrintingHint( sal_Int32 nState )
+        SfxPrintingHint( css::view::PrintableState nState )
         : SfxViewEventHint( SfxEventHintId::PrintDoc, rtl::OUString(), nullptr, css::uno::Reference< css::frame::XController >() )
         , mnPrintableState( nState )
         {}
 
-    sal_Int32 GetWhich() const { return mnPrintableState; }
+    css::view::PrintableState GetWhich() const { return mnPrintableState; }
     const css::uno::Sequence < css::beans::PropertyValue >& GetOptions() const { return aOpts; }
 };
 
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index f217aa73d642..f0d2bac19464 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -55,7 +55,7 @@
 #include <sfx2/objsh.hxx>
 #include <sfx2/event.hxx>
 
-#define SFX_PRINTABLESTATE_CANCELJOB    -2
+#define SFX_PRINTABLESTATE_CANCELJOB    (css::view::PrintableState)-2
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -240,7 +240,7 @@ namespace
             case view::PaperFormat_USER:
                 eRet = PAPER_USER;
                 break;
-            case view::PaperFormat_MAKE_FIXED_SIZE:
+            case view::PaperFormat::PaperFormat_MAKE_FIXED_SIZE:
                 break;
             //deliberate no default to force warn on a new papersize
         }
@@ -812,7 +812,7 @@ void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHin
 
     view::PrintJobEvent aEvent;
     aEvent.Source = m_xPrintJob;
-    aEvent.State = (css::view::PrintableState) pPrintHint->GetWhich();
+    aEvent.State = pPrintHint->GetWhich();
 
     ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
     while (pIterator.hasMoreElements())


More information about the Libreoffice-commits mailing list