[Libreoffice-commits] core.git: sd/inc sd/source

Radek Doulik rodo at novell.com
Fri Feb 22 03:08:13 PST 2013


 sd/inc/drawdoc.hxx                          |    5 +++++
 sd/source/core/drawdoc.cxx                  |    1 +
 sd/source/ui/docshell/docshel4.cxx          |   13 +++++++++++++
 sd/source/ui/inc/DrawDocShell.hxx           |    2 ++
 sd/source/ui/unoidl/UnoDocumentSettings.cxx |   21 ++++++++++++++++++++-
 5 files changed, 41 insertions(+), 1 deletion(-)

New commits:
commit 64cdf8072a79491903c5d1b107c6486b33da04d3
Author: Radek Doulik <rodo at novell.com>
Date:   Fri Feb 22 12:03:54 2013 +0100

    added EmbedFonts property, added File/Properties/Font tab
    
    Change-Id: Id2a812c4b5347e2851149a1bd46eaec4b40d0f12

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 2ab95ab..56bab28 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -188,6 +188,8 @@ private:
 
     std::vector< rtl::OUString > maAnnotationAuthors;
 
+    bool                mbUseEmbedFonts;
+
 protected:
 
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel();
@@ -557,6 +559,9 @@ public:
 
     sal_uInt16 GetAnnotationAuthorIndex( const rtl::OUString& rAuthor );
 
+    bool IsUsingEmbededFonts() { return mbUseEmbedFonts; }
+    void SetIsUsingEmbededFonts( bool bUse ) { mbUseEmbedFonts = bUse; }
+
 private:
     /** This member stores the printer independent layout mode.  Please
         refer to <member>SetPrinterIndependentLayout()</member> for its
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 18a04bd..5b7d3e4 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -163,6 +163,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
 , mpLocale(NULL)
 , mpDrawPageListWatcher(0)
 , mpMasterPageListWatcher(0)
+, mbUseEmbedFonts(false)
 {
     mpDrawPageListWatcher = ::std::auto_ptr<ImpDrawPageListWatcher>(
         new ImpDrawPageListWatcher(*this));
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 936e86e..195ca1c 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -29,6 +29,7 @@
 #include <svl/aeitem.hxx>
 #include <svl/flagitem.hxx>
 #include <sot/storage.hxx>
+#include <sfx2/dinfdlg.hxx>
 #include <sfx2/docfile.hxx>
 #include <sfx2/docfilt.hxx>
 #include <sfx2/dispatch.hxx>
@@ -997,6 +998,18 @@ void DrawDocShell::OpenBookmark( const String& rBookmarkURL )
     ( mpViewShell ? mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs );
 }
 
+SfxDocumentInfoDialog* DrawDocShell::CreateDocumentInfoDialog( ::Window *pParent, const SfxItemSet &rSet )
+{
+    SfxDocumentInfoDialog* pDlg   = new SfxDocumentInfoDialog( pParent, rSet );
+    DrawDocShell*          pDocSh = PTR_CAST(DrawDocShell,SfxObjectShell::Current());
+
+    if( pDocSh == this )
+    {
+        pDlg->AddFontTabPage();
+    }
+    return pDlg;
+}
+
 } // end of namespace sd
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index bcf7d4a..eb75a3c 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -98,6 +98,8 @@ public:
     virtual Size            GetFirstPageSize();
     virtual void            FillClass(SvGlobalName* pClassName, sal_uInt32*  pFormat, String* pAppName, String* pFullTypeName, String* pShortTypeName, sal_Int32 nFileFormat, sal_Bool bTemplate = sal_False ) const;
     virtual void            SetModified( sal_Bool = sal_True );
+    virtual SfxDocumentInfoDialog*  CreateDocumentInfoDialog( ::Window *pParent,
+                                                              const SfxItemSet &rSet );
 
     using SotObject::GetInterface;
     using SfxObjectShell::GetVisArea;
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index c83a3f8..7c3ba84 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -141,7 +141,7 @@ enum SdDocumentSettingsPropertyHandles
     HANDLE_PRINTER_INDEPENDENT_LAYOUT
     // #i33095#
     ,HANDLE_LOAD_READONLY, HANDLE_SAVE_VERSION
-    ,HANDLE_SLIDESPERHANDOUT, HANDLE_HANDOUTHORIZONTAL
+    ,HANDLE_SLIDESPERHANDOUT, HANDLE_HANDOUTHORIZONTAL, HANDLE_EMBED_FONTS
 };
 
 #define MID_PRINTER 1
@@ -202,6 +202,7 @@ enum SdDocumentSettingsPropertyHandles
             // --> #i33095#
             { MAP_LEN("LoadReadonly"),          HANDLE_LOAD_READONLY,       &::getBooleanCppuType(),                0,  0 },
             { MAP_LEN("SaveVersionOnClose"),    HANDLE_SAVE_VERSION,        &::getBooleanCppuType(),                0,  0 },
+            { MAP_LEN("EmbedFonts"),            HANDLE_EMBED_FONTS,         &::getBooleanCppuType(),                0,  0 },
             { NULL, 0, 0, NULL, 0, 0 }
         };
 
@@ -902,6 +903,18 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
             }
             break;
 
+            case HANDLE_EMBED_FONTS:
+            {
+                sal_Bool bNewValue = sal_False;
+                if ( *pValues >>= bNewValue )
+                {
+                    bChanged = ( pDoc->IsUsingEmbededFonts() != bNewValue );
+                    pDoc->SetIsUsingEmbededFonts( bNewValue );
+                    bOk = true;
+                }
+            }
+            break;
+
             default:
                 throw UnknownPropertyException();
         }
@@ -1129,6 +1142,12 @@ void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, A
             }
             break;
 
+            case HANDLE_EMBED_FONTS:
+            {
+                *pValue <<= pDoc->IsUsingEmbededFonts();
+            }
+            break;
+
             default:
                 throw UnknownPropertyException();
         }


More information about the Libreoffice-commits mailing list