[ooo-build-commit] Branch 'ooo/master' - 3 commits - fpicker/source officecfg/registry sfx2/inc sfx2/sdi sfx2/source svx/inc svx/source xmloff/source

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Jul 16 18:00:06 PDT 2009


 fpicker/source/win32/filepicker/VistaFilePicker.cxx                 |   20 +++++
 fpicker/source/win32/filepicker/VistaFilePicker.hxx                 |    2 
 fpicker/source/win32/filepicker/asyncrequests.cxx                   |    2 
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu      |   10 ++
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |    5 +
 sfx2/inc/sfx2/docfile.hxx                                           |    3 
 sfx2/inc/sfx2/sfxsids.hrc                                           |    1 
 sfx2/sdi/sfx.sdi                                                    |   26 +++++++
 sfx2/source/doc/docfile.cxx                                         |   25 ++++--
 sfx2/source/doc/objstor.cxx                                         |    9 ++
 sfx2/source/toolbox/tbxitem.cxx                                     |   19 +++++
 svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx           |    2 
 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx            |   20 +++--
 xmloff/source/text/txtparae.cxx                                     |   36 +++++-----
 14 files changed, 145 insertions(+), 35 deletions(-)

New commits:
commit 425452b3124e58031319900f1fcaef312b75b8af
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Thu Jul 16 16:59:45 2009 +0000

    CWS-TOOLING: integrate CWS mav53_DEV300
    2009-06-29 13:42:56 +0200 hbrinkm  r273471 : #i101593# switched off optimization in table layout, that caused frames to be layouted incorrectly
    2009-06-25 12:29:11 +0200 cd  r273376 : #i101774# Don't rely on initialize call for VistaFilePicker
    2009-06-25 11:48:33 +0200 tl  r273373 : #i101420# Gnome accessibility fix
    2009-06-24 18:16:49 +0200 od  r273361 : #i97309 method <XMLTextParagraphExport::exportListChange(..)>
    	- export text:start-value at correct list item.
    2009-06-23 14:11:44 +0200 b_michaelsen  r273281 : #i103032#: cutting of URL-parameters for usage tracking
    2009-06-22 11:49:12 +0200 b_michaelsen  r273207 : #i102805#: Added usage tracking to SfxToolboxControl
    2009-06-22 11:46:00 +0200 b_michaelsen  r273205 : whitespace fixes
    2009-06-05 14:21:12 +0200 mav  r272683 : #i101741# check the file date only in document file locking context

diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index b5f9d4b..fe6ebbf 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -165,6 +165,7 @@ VistaFilePicker::VistaFilePicker(const css::uno::Reference< css::lang::XMultiSer
     , m_rDialog             (new VistaFilePickerImpl())
     , m_aAsyncExecute       (m_rDialog                )
     , m_nFilePickerThreadId (0                        )
+    , m_bInitialized		(false					  )
 {
 }
 
@@ -345,6 +346,20 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL VistaFilePicker::getSelectedFiles
 ::sal_Int16 SAL_CALL VistaFilePicker::execute()
     throw(css::uno::RuntimeException)
 {
+    bool bInitialized(false);
+    {
+        osl::MutexGuard aGuard(m_aMutex);
+        bInitialized = m_bInitialized;
+    }
+
+    if ( !bInitialized )
+    {
+        sal_Int16 nTemplateDescription = css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
+        css::uno::Sequence < css::uno::Any > aInitArguments(1);
+        aInitArguments[0] <<= nTemplateDescription;
+        initialize(aInitArguments);
+    }
+
     RequestRef rRequest(new Request());
     rRequest->setRequest (VistaFilePickerImpl::E_SHOW_DIALOG_MODAL);
     
@@ -640,6 +655,11 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
     if ( ! m_aAsyncExecute.isRunning())
         m_aAsyncExecute.create();
     m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED);
+    
+    {
+        osl::MutexGuard aGuard(m_aMutex);
+        m_bInitialized = true;
+    }
 }
 
 //------------------------------------------------------------------------------------
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.hxx b/fpicker/source/win32/filepicker/VistaFilePicker.hxx
index b398fd1..11ef555 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.hxx
@@ -305,6 +305,8 @@ public:
     
         //---------------------------------------------------------------------
         oslThreadIdentifier m_nFilePickerThreadId;
+
+        bool m_bInitialized;
 }; 
 
 } // namespace vista
diff --git a/fpicker/source/win32/filepicker/asyncrequests.cxx b/fpicker/source/win32/filepicker/asyncrequests.cxx
index 486d86a..704ffd9 100644
--- a/fpicker/source/win32/filepicker/asyncrequests.cxx
+++ b/fpicker/source/win32/filepicker/asyncrequests.cxx
@@ -53,7 +53,7 @@ void lcl_sleep(::osl::Condition& aCondition   ,
     {
         TimeValue aTime;
         aTime.Seconds = (nMilliSeconds / 1000);
-        aTime.Nanosec = (nMilliSeconds % 1000);
+        aTime.Nanosec = (nMilliSeconds % 1000) * 1000000;
         aCondition.wait(&aTime);
     }
 
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index feba3e0..c92891a 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -183,7 +183,8 @@ public:
 #endif
 
     void                CheckFileDate( const ::com::sun::star::util::DateTime& aInitDate );
-    ::com::sun::star::util::DateTime GetInitFileDate();
+    sal_Bool            DocNeedsFileDateCheck();
+    ::com::sun::star::util::DateTime GetInitFileDate( sal_Bool bIgnoreOldValue );
 
     ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > GetContent() const;
     const String&       GetPhysicalName() const;
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index f778243..7028edc 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -568,7 +568,7 @@ long SfxMedium::GetFileVersion() const
 //------------------------------------------------------------------
 void SfxMedium::CheckFileDate( const util::DateTime& aInitDate )
 {
-    GetInitFileDate();
+    GetInitFileDate( sal_True );
     if ( pImp->m_aDateTime.Seconds != aInitDate.Seconds
       || pImp->m_aDateTime.Minutes != aInitDate.Minutes
       || pImp->m_aDateTime.Hours != aInitDate.Hours
@@ -607,9 +607,15 @@ void SfxMedium::CheckFileDate( const util::DateTime& aInitDate )
 }
 
 //------------------------------------------------------------------
-util::DateTime SfxMedium::GetInitFileDate()
+sal_Bool SfxMedium::DocNeedsFileDateCheck()
 {
-    if ( !pImp->m_bGotDateTime && GetContent().is() )
+    return ( !IsReadOnly() && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) );
+}
+
+//------------------------------------------------------------------
+util::DateTime SfxMedium::GetInitFileDate( sal_Bool bIgnoreOldValue )
+{
+    if ( ( bIgnoreOldValue || !pImp->m_bGotDateTime ) && GetContent().is() )
     {
         try
         {
@@ -866,11 +872,8 @@ sal_Bool SfxMedium::Commit()
 
     sal_Bool bResult = ( GetError() == SVSTREAM_OK );
 
-    if ( bResult )
-    {
-        pImp->m_bGotDateTime = sal_False;
-        GetInitFileDate();
-    }
+    if ( bResult && DocNeedsFileDateCheck() )
+        GetInitFileDate( sal_True );
 
     // remove truncation mode from the flags
     nStorOpenMode &= (~STREAM_TRUNC);
@@ -1400,6 +1403,10 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
             GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) );
     }
 
+    // when the file is locked, get the current file date
+    if ( bResult && DocNeedsFileDateCheck() )
+        GetInitFileDate( sal_True );
+
     return bResult;
 }
 
@@ -2662,8 +2669,6 @@ void SfxMedium::GetMedium_Impl()
                 pInStream = utl::UcbStreamHelper::CreateStream( pImp->xInputStream );
         }
 
-        GetInitFileDate();
-
         pImp->bDownloadDone = sal_True;
         pImp->aDoneLink.ClearPendingCall();
         pImp->aDoneLink.Call( (void*) GetError() );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index a32dba5..1590d15 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1233,7 +1233,8 @@ sal_Bool SfxObjectShell::SaveTo_Impl
         bStoreToSameLocation = sal_True;
         AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Save" ) ) );
 
-        rMedium.CheckFileDate( pMedium->GetInitFileDate() );
+        if ( pMedium->DocNeedsFileDateCheck() )
+            rMedium.CheckFileDate( pMedium->GetInitFileDate( sal_False ) );
 
         if ( bCopyTo && GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
         {
@@ -2089,6 +2090,12 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
                 InvalidateName();
             SetModified(sal_False); // nur bei gesetztem Medium zur"ucksetzen
             Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) );
+
+            // this is the end of the saving process, it is possible that the file was changed
+            // between medium commit and this step ( attributes change and so on )
+            // so get the file date again
+            if ( pNewMed->DocNeedsFileDateCheck() )
+                pNewMed->GetInitFileDate( sal_True );
         }
     }
 
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index f0ebaf4..f0efa2d 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -1029,6 +1029,25 @@ void SfxToolBoxControl::Select( USHORT nModifier )
 
 void SfxToolBoxControl::Select( BOOL /*bMod1*/ )
 {
+    if(::comphelper::UiEventsLogger::isEnabled()) //#i88653# #i102805#
+    {
+        ::rtl::OUString sAppName;
+        try
+        {
+            static ::rtl::OUString our_aModuleManagerName = ::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager");
+            ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager =
+                ::comphelper::getProcessServiceFactory();
+            ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > xModuleManager(
+                xServiceManager->createInstance(our_aModuleManagerName)
+                , ::com::sun::star::uno::UNO_QUERY_THROW);
+            sAppName = xModuleManager->identify(m_xFrame);
+        } catch(::com::sun::star::uno::Exception&) {}
+        Sequence<PropertyValue> vSource;
+        ::comphelper::UiEventsLogger::appendDispatchOrigin(vSource, sAppName, ::rtl::OUString::createFromAscii("SfxToolBoxControl"));
+        URL aURL;
+        aURL.Complete = m_aCommandURL;
+        ::comphelper::UiEventsLogger::logDispatch(aURL, vSource);
+    }
     svt::ToolboxController::execute( pImpl->nSelectModifier );
 }
 
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index e3d71f7..85fa30a 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -966,23 +966,29 @@ void XMLTextParagraphExport::exportListChange(
                 // <text:list-header> or <text:list-item>
                 GetExport().CheckAttrList();
 
-                if ( nListLevelsToBeOpened == 1 &&
-                     rNextInfo.HasStartValue() )
+                // --> OD 2009-06-24 #i97309#
+                // export start value in case of <bRestartNumberingAtContinuedRootList>
+                // at correct list item
+                if ( nListLevelsToBeOpened == 1 )
                 {
-                    OUStringBuffer aBuffer;
-                    aBuffer.append( (sal_Int32)rNextInfo.GetStartValue() );
-                    GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE,
-                                  aBuffer.makeStringAndClear() );
-                }
-                else if ( bRestartNumberingAtContinuedRootList )
-                {
-                    OUStringBuffer aBuffer;
-                    aBuffer.append( (sal_Int32)nRestartValueForContinuedRootList );
-                    GetExport().AddAttribute( XML_NAMESPACE_TEXT,
-                                              XML_START_VALUE,
-                                              aBuffer.makeStringAndClear() );
-                    bRestartNumberingAtContinuedRootList = false;
+                    if ( rNextInfo.HasStartValue() )
+                    {
+                        OUStringBuffer aBuffer;
+                        aBuffer.append( (sal_Int32)rNextInfo.GetStartValue() );
+                        GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE,
+                                      aBuffer.makeStringAndClear() );
+                    }
+                    else if ( bRestartNumberingAtContinuedRootList )
+                    {
+                        OUStringBuffer aBuffer;
+                        aBuffer.append( (sal_Int32)nRestartValueForContinuedRootList );
+                        GetExport().AddAttribute( XML_NAMESPACE_TEXT,
+                                                  XML_START_VALUE,
+                                                  aBuffer.makeStringAndClear() );
+                        bRestartNumberingAtContinuedRootList = false;
+                    }
                 }
+                // <--
 
                 eLName = ( rNextInfo.IsNumbered() || nListLevelsToBeOpened > 1 )
                          ? XML_LIST_ITEM
commit d2fbbeec49de7ad24a6fed7339ba09aad231b9c3
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Thu Jul 16 15:07:54 2009 +0000

    CWS-TOOLING: integrate CWS mox01
    2009-07-07 09:26:41 +0200 hde  r273770 : added testcase tShortcutPasteUnformattedText
    2009-07-07 09:26:04 +0200 hde  r273769 : added testcase tShortcutPasteUnformattedText
    2009-06-26 17:27:39 +0200 mba  r273431 : #i17563#: moved slot to sfx2
    2009-06-26 17:26:40 +0200 mba  r273430 : #i17563#: moved slot to sfx2
    2009-06-24 21:16:18 +0200 mox  r273365 : Update UI strings to follow the Uppercase All Convention.
    2009-06-13 23:26:58 +0200 mox  r272958 : CWS-TOOLING: rebase CWS mox01 to trunk at 272827 (milestone: DEV300:m50)
    2009-04-04 14:26:36 +0200 mox  r270524 : Fix bugs to make shortcut work
    2009-04-04 12:38:36 +0200 mox  r270523 : Command definition for shortcut
    2009-04-04 08:56:29 +0200 mox  r270522 : Revert changes of menu item
    2009-04-04 08:28:46 +0200 mox  r270521 : Revert changes
    2009-03-02 20:41:11 +0100 mox  r268690 : Menu item and shortcut key for Paste and Match Style
    2009-03-02 20:40:45 +0100 mox  r268689 : Menu item and shortcut key for Paste and Match Style

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index bec89fc..6858c2a 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -2852,6 +2852,11 @@
       <value xml:lang="de">.uno:Underline</value>
      </prop>
     </node>
+    <node oor:name="V_SHIFT_MOD1_MOD2" oor:op="replace">
+     <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+      <value xml:lang="en-US">.uno:PasteUnformatted</value>
+     </prop>
+    </node>
     <node oor:name="V_SHIFT_MOD1" oor:op="replace">
      <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
       <value xml:lang="en-US">.uno:PasteSpecial</value>
@@ -4683,6 +4688,11 @@
       <value xml:lang="de">.uno:Underline</value>
      </prop>
     </node>
+    <node oor:name="V_SHIFT_MOD1_MOD2" oor:op="replace">
+     <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+      <value xml:lang="en-US">.uno:PasteUnformatted</value>
+     </prop>
+    </node>
     <node oor:name="V_SHIFT_MOD1" oor:op="replace">
      <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
       <value xml:lang="en-US">.uno:PasteSpecial</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 9fd1976..5536597 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -1039,6 +1039,11 @@
                     <value>1</value>
                 </prop>
             </node>
+            <node oor:name=".uno:PasteUnformatted" oor:op="replace">
+                <prop oor:name="Label" oor:type="xs:string">
+                    <value xml:lang="en-US">Paste Unformatted Text</value>
+                </prop>
+            </node>
             <node oor:name=".uno:PasteSpecial" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
                     <value xml:lang="en-US">Paste ~Special...</value>
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 3e95514..6a937d2 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -143,6 +143,7 @@
 #define SID_CURRENTTIME                     (SID_SFX_START + 311)
 #define SID_CURRENTDATE                     (SID_SFX_START + 312)
 #define SID_VERSION_VISIBLE                 (SID_SFX_START + 313)
+#define SID_PASTE_UNFORMATTED				(SID_SFX_START + 314)
 #define SID_PRINTER_NOTFOUND_WARN           (SID_SFX_START + 320)
 #define SID_PRINTER_USETHREAD               (SID_SFX_START + 321)
 #define SID_PRINTER_NAME                    (SID_SFX_START + 322)
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index b8597d8..32db454 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -8777,3 +8777,29 @@ SfxBoolItem DockingWindow9 SID_DOCKWIN_9
     ToolBoxConfig = FALSE,
     GroupId = GID_APPLICATION;
 ]
+
+//--------------------------------------------------------------------------
+SfxInt16Item PasteUnformatted SID_PASTE_UNFORMATTED
+()
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Volatile,
+    FastCall = TRUE,
+    HasCoreId = FALSE,
+    HasDialog = FALSE,
+    ReadOnlyDoc = FALSE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Asynchron;
+
+    /* config: */
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = FALSE,
+    GroupId = GID_EDIT;
+]
+
commit 30524c5e77107574d959cb3f9a247306831ceed1
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Thu Jul 16 10:46:51 2009 +0000

    CWS-TOOLING: integrate CWS dba311a_DEV300
    2009-07-03 13:24:10 +0200 msc  r273691 : #i100000#
    2009-06-24 11:31:54 +0200 fs  r273323 : line ends
    2009-06-24 11:30:25 +0200 fs  r273322 : line ends
    2009-06-09 07:29:25 +0200 oj  r272747 : #i102557# default 2nd table
    2009-06-08 15:59:51 +0200 fs  r272737 : #i102089# PrintOrPreviewContact: do not create a Primitive2DSequence for non-printable controls
    2009-06-05 11:22:36 +0200 fs  r272673 : #i102090# do not 'paint' controls which are in alive mode, and manually switched to invisible
    2009-06-02 11:44:34 +0200 oj  r272490 : #i102409# correct deletion in array list

diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
index b58ce7f..b505756 100644
--- a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
+++ b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
@@ -153,6 +153,8 @@ namespace sdr { namespace contact {
         UnoControlPrintOrPreviewContact();                                                 // never implemented
         UnoControlPrintOrPreviewContact( const UnoControlPrintOrPreviewContact& );            // never implemented
         UnoControlPrintOrPreviewContact& operator=( const UnoControlPrintOrPreviewContact& ); // never implemented
+
+        virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const;
     };
 
     //====================================================================
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index b3c5429..2ba5085 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -1231,18 +1231,16 @@ namespace sdr { namespace contact {
     //--------------------------------------------------------------------
     bool ViewObjectContactOfUnoControl_Impl::isPrintableControl() const
     {
-        if ( !m_aControl.is() )
+        SdrUnoObj* pUnoObject( NULL );
+        if ( !getUnoObject( pUnoObject ) )
             return false;
 
         bool bIsPrintable = false;
         try
         {
-            Reference< XPropertySet > xModelProperties( m_aControl.getModel(), UNO_QUERY );
-            Reference< XPropertySetInfo > xPropertyInfo( xModelProperties.is() ? xModelProperties->getPropertySetInfo() : Reference< XPropertySetInfo >() );
-            const ::rtl::OUString sPrintablePropertyName( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) );
-
-            if ( xPropertyInfo.is() && xPropertyInfo->hasPropertyByName( sPrintablePropertyName ) )
-                OSL_VERIFY( xModelProperties->getPropertyValue( sPrintablePropertyName ) >>= bIsPrintable );
+            Reference< XPropertySet > xModelProperties( pUnoObject->GetUnoControlModel(), UNO_QUERY_THROW );
+            static const ::rtl::OUString s_sPrintablePropertyName( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) );
+            OSL_VERIFY( xModelProperties->getPropertyValue( s_sPrintablePropertyName ) >>= bIsPrintable );
         }
         catch( const Exception& )
         {
@@ -1714,6 +1712,14 @@ namespace sdr { namespace contact {
         DBG_DTOR( UnoControlPrintOrPreviewContact, NULL );
     }
 
+    //--------------------------------------------------------------------
+    drawinglayer::primitive2d::Primitive2DSequence UnoControlPrintOrPreviewContact::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const
+    {
+        if ( !m_pImpl->isPrintableControl() )
+            return drawinglayer::primitive2d::Primitive2DSequence();
+        return ViewObjectContactOfUnoControl::createPrimitive2DSequence( rDisplayInfo );
+    }
+
     //====================================================================
     //= UnoControlPDFExportContact
     //====================================================================


More information about the ooo-build-commit mailing list