You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by st...@apache.org on 2013/04/23 11:51:53 UTC
svn commit: r1470868 [15/40] - in /openoffice/branches/ia2: ./
ext_libraries/coinmp/ ext_libraries/serf/ ext_libraries/serf/win/
extras/l10n/source/fi/ main/ main/animations/source/animcore/
main/automation/source/communi/ main/basctl/source/basicide/ ...
Modified: openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.cxx Tue Apr 23 09:51:15 2013
@@ -105,7 +105,7 @@ TableDesignPane::TableDesignPane( ::Wind
{
Window* pControlParent = mbModal ? pParent : this;
- mxControls[FL_TABLE_STYLES].reset( new FixedLine( pControlParent, SdResId( FL_TABLE_STYLES + 1 ) ) );
+ // mxControls[FL_TABLE_STYLES].reset( new FixedLine( pControlParent, SdResId( FL_TABLE_STYLES + 1 ) ) );
ValueSet* pValueSet = new ValueSet( pControlParent, SdResId( CT_TABLE_STYLES+1 ) );
mxControls[CT_TABLE_STYLES].reset( pValueSet );
@@ -122,7 +122,7 @@ TableDesignPane::TableDesignPane( ::Wind
}
pValueSet->SetSelectHdl (LINK(this, TableDesignPane, implValueSetHdl));
- mxControls[FL_STYLE_OPTIONS].reset( new FixedLine( pControlParent, SdResId( FL_STYLE_OPTIONS + 1 ) ) );
+ // mxControls[FL_STYLE_OPTIONS].reset( new FixedLine( pControlParent, SdResId( FL_STYLE_OPTIONS + 1 ) ) );
sal_uInt16 i;
for( i = CB_HEADER_ROW; i <= CB_BANDED_COLUMNS; ++i )
{
@@ -132,8 +132,15 @@ TableDesignPane::TableDesignPane( ::Wind
}
for( i = 0; i < DESIGNPANE_CONTROL_COUNT; i++ )
- mnOrgOffsetY[i] = mxControls[i]->GetPosPixel().Y();
-
+ {
+ if (mxControls[i])
+ mnOrgOffsetY[i] = mxControls[i]->GetPosPixel().Y();
+ else if (i > 0)
+ mnOrgOffsetY[i] = mnOrgOffsetY[i-1];
+ else
+ mnOrgOffsetY[i] = 0;
+ }
+
// get current controller and initialize listeners
try
{
@@ -180,6 +187,60 @@ void TableDesignPane::Resize()
updateLayout();
}
+
+
+
+LayoutSize TableDesignPane::GetHeightForWidth (const sal_Int32 nWidth)
+{
+ if ( ! IsVisible() || nWidth<=0)
+ return LayoutSize(0,0,0);
+
+ // Initialize the height with the offset above and below the value
+ // set and below the check boxes.
+ const Point aOffset (LogicToPixel( Point(3,3), MAP_APPFONT));
+ sal_Int32 nHeight (3 * aOffset.Y());
+
+ // Add the height for the check boxes.
+ nHeight += mnOrgOffsetY[CB_BANDED_COLUMNS] - mnOrgOffsetY[CB_HEADER_ROW]
+ + mxControls[CB_BANDED_COLUMNS]->GetSizePixel().Height();
+
+ // Setup minimal and maximal heights that include all check boxes
+ // and a small or large value set.
+ const sal_Int32 nMinimalHeight (nHeight+100);
+ const sal_Int32 nMaximalHeight (nHeight+450);
+
+ // Calculate the number of rows and columns and then add the
+ // preferred size of the value set.
+ ValueSet* pValueSet = static_cast< ValueSet* >( mxControls[CT_TABLE_STYLES].get() );
+ if (pValueSet->GetItemCount() > 0)
+ {
+ Image aImage = pValueSet->GetItemImage(pValueSet->GetItemId(0));
+ Size aItemSize = pValueSet->CalcItemSizePixel(aImage.GetSizePixel());
+ aItemSize.Width() += 10;
+ aItemSize.Height() += 10;
+
+ int nColumnCount = (pValueSet->GetSizePixel().Width() - pValueSet->GetScrollWidth()) / aItemSize.Width();
+ if (nColumnCount < 1)
+ nColumnCount = 1;
+
+ int nRowCount = (pValueSet->GetItemCount() + nColumnCount - 1) / nColumnCount;
+ if (nRowCount < 1)
+ nRowCount = 1;
+
+ nHeight += nRowCount * aItemSize.Height();
+ }
+
+ // Clip the requested height.
+ if (nHeight<nMinimalHeight)
+ nHeight = nMinimalHeight;
+ else if (nHeight>nMaximalHeight)
+ nHeight = nMaximalHeight;
+ return LayoutSize(nMinimalHeight, nMaximalHeight, nHeight);
+}
+
+
+
+
// --------------------------------------------------------------------
static SfxBindings* getBindings( ViewShellBase& rBase )
@@ -378,16 +439,19 @@ void TableDesignPane::updateLayout()
const long nStylesHeight = aPaneSize.Height() - nOptionsHeight;
- // set with of controls to size of pane
+ // set width of controls to size of pane
for( sal_Int32 nId = 0; nId < DESIGNPANE_CONTROL_COUNT; ++nId )
{
- Size aSize( mxControls[nId]->GetSizePixel() );
- aSize.Width() = aPaneSize.Width() - aOffset.X() - mxControls[nId]->GetPosPixel().X();
- mxControls[nId]->SetSizePixel( aSize );
- mxControls[nId]->SetPaintTransparent(sal_True);
- mxControls[nId]->SetBackground();
+ if (mxControls[nId])
+ {
+ Size aSize( mxControls[nId]->GetSizePixel() );
+ aSize.Width() = aPaneSize.Width() - aOffset.X() - mxControls[nId]->GetPosPixel().X();
+ mxControls[nId]->SetSizePixel( aSize );
+ mxControls[nId]->SetPaintTransparent(sal_True);
+ mxControls[nId]->SetBackground();
+ }
}
- aValueSetSize = Size( pValueSet->GetSizePixel().Width(), nStylesHeight - mxControls[FL_TABLE_STYLES]->GetSizePixel().Height() - mnOrgOffsetY[FL_TABLE_STYLES] );
+ aValueSetSize = Size( pValueSet->GetSizePixel().Width(), nStylesHeight );
}
else
{
@@ -449,18 +513,22 @@ void TableDesignPane::updateLayout()
// shift show options section down
const long nOptionsPos = aPos.Y() + aValueSetSize.Height();
- for( sal_Int32 nId = FL_STYLE_OPTIONS; nId <= CB_BANDED_COLUMNS; ++nId )
+ sal_Int32 nMaxY (0);
+ for( sal_Int32 nId = FL_STYLE_OPTIONS+1; nId <= CB_BANDED_COLUMNS; ++nId )
{
- Point aCPos( mxControls[nId]->GetPosPixel() );
- aCPos.X() = ( nId == FL_STYLE_OPTIONS ? 1 : 2 ) * aOffset.X();
- aCPos.Y() = mnOrgOffsetY[nId] + nOptionsPos;
- mxControls[nId]->SetPosPixel( aCPos );
+ if (mxControls[nId])
+ {
+ Point aCPos( mxControls[nId]->GetPosPixel() );
+ aCPos.X() = ( nId == FL_STYLE_OPTIONS ? 1 : 2 ) * aOffset.X();
+ aCPos.Y() = mnOrgOffsetY[nId] + nOptionsPos;
+ mxControls[nId]->SetPosPixel( aCPos );
+ const sal_Int32 nBottom (aCPos.Y() + mxControls[nId]->GetSizePixel().Height());
+ if (nBottom > nMaxY)
+ nMaxY = nBottom;
+ }
}
}
}
-
- if( !mbModal )
- SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
}
// --------------------------------------------------------------------
Modified: openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.hxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.hxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.hxx Tue Apr 23 09:51:15 2013
@@ -26,6 +26,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/ui/XUIElement.hpp>
+#include <com/sun/star/ui/LayoutSize.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -33,6 +34,7 @@
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>
#include <svtools/valueset.hxx>
+#include <sfx2/sidebar/ILayoutableWindow.hxx>
#include <boost/scoped_ptr.hpp>
@@ -49,7 +51,7 @@ class ViewShellBase;
// --------------------------------------------------------------------
-class TableDesignPane : public Control
+class TableDesignPane : public Control, public sfx2::sidebar::ILayoutableWindow
{
public:
TableDesignPane( ::Window* pParent, ViewShellBase& rBase, bool bModal );
@@ -61,6 +63,9 @@ public:
// Control
virtual void Resize();
+ // ILayoutableWindow
+ virtual ::com::sun::star::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth);
+
virtual void DataChanged( const DataChangedEvent& rDCEvt );
void ApplyOptions();
Modified: openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.src?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.src (original)
+++ openoffice/branches/ia2/main/sd/source/ui/table/TableDesignPane.src Tue Apr 23 09:51:15 2013
@@ -30,7 +30,7 @@ Control DLG_TABLEDESIGNPANE
DialogControl = TRUE;
Border = FALSE;
- Size = MAP_APPFONT( 264, 160 );
+ Size = MAP_APPFONT( 264, 134 );
Text [ en-US ] = "Table Design";
FixedLine FL_STYLE_OPTIONS+1
@@ -43,7 +43,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_HEADER_ROW+1
{
- Pos = MAP_APPFONT ( 146, 16 ) ;
+ Pos = MAP_APPFONT ( 146, 3 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Header Row" ;
@@ -51,7 +51,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_TOTAL_ROW+1
{
- Pos = MAP_APPFONT ( 146, 29 ) ;
+ Pos = MAP_APPFONT ( 146, 16 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Total Row" ;
@@ -59,7 +59,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_BANDED_ROWS+1
{
- Pos = MAP_APPFONT ( 146, 42 ) ;
+ Pos = MAP_APPFONT ( 146, 29 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Banded Rows" ;
@@ -67,7 +67,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_FIRST_COLUMN+1
{
- Pos = MAP_APPFONT ( 146, 55 ) ;
+ Pos = MAP_APPFONT ( 146, 42 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "First Column" ;
@@ -75,7 +75,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_LAST_COLUMN+1
{
- Pos = MAP_APPFONT ( 146, 68 ) ;
+ Pos = MAP_APPFONT ( 146, 55 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Last Column" ;
@@ -83,7 +83,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_BANDED_COLUMNS+1
{
- Pos = MAP_APPFONT ( 146, 82 ) ;
+ Pos = MAP_APPFONT ( 146, 68 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Banded Columns" ;
@@ -99,7 +99,7 @@ Control DLG_TABLEDESIGNPANE
Control CT_TABLE_STYLES+1
{
- Pos = MAP_APPFONT ( 6, 14 ) ;
+ Pos = MAP_APPFONT ( 4, 3 ) ;
Size = MAP_APPFONT( 120, 143 );
Border = TRUE ;
TabStop = TRUE ;
Modified: openoffice/branches/ia2/main/sd/source/ui/table/tablefunction.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/table/tablefunction.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/table/tablefunction.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/table/tablefunction.cxx Tue Apr 23 09:51:15 2013
@@ -206,7 +206,7 @@ SfxViewShell* pViewShell = GetViewShell(
{
// Make the slide transition panel visible (expand it) in the
// tool pane.
- framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel(
+ framework::FrameworkHelper::Instance(GetViewShellBase())->RequestSidebarPanel(
framework::FrameworkHelper::msTableDesignPanelURL);
}
Modified: openoffice/branches/ia2/main/sd/source/ui/table/tableobjectbar.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/table/tableobjectbar.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/table/tableobjectbar.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/table/tableobjectbar.cxx Tue Apr 23 09:51:15 2013
@@ -32,6 +32,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/msgpool.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <svl/whiter.hxx>
#include <svl/itempool.hxx>
#include <svx/svdomedia.hxx>
@@ -104,6 +105,7 @@ TableObjectBar::TableObjectBar( ViewShel
SetRepeatTarget( mpView );
SetHelpId( SD_IF_SDDRAWTABLEOBJECTBAR );
SetName( String( SdResId( RID_DRAW_TABLE_TOOLBOX ) ) );
+ SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Table));
}
// -----------------------------------------------------------------------------
@@ -203,6 +205,8 @@ void TableObjectBar::Execute( SfxRequest
pBindings->Invalidate( SID_FRAME_LINECOLOR );
pBindings->Invalidate( SID_ATTR_BORDER );
pBindings->Invalidate( SID_ATTR_FILL_STYLE );
+ pBindings->Invalidate( SID_ATTR_FILL_TRANSPARENCE );
+ pBindings->Invalidate( SID_ATTR_FILL_FLOATTRANSPARENCE );
pBindings->Invalidate( SID_TABLE_MERGE_CELLS );
pBindings->Invalidate( SID_TABLE_SPLIT_CELLS );
pBindings->Invalidate( SID_OPTIMIZE_TABLE );
Modified: openoffice/branches/ia2/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx Tue Apr 23 09:51:15 2013
@@ -278,7 +278,7 @@ void DocumentSettings::_setPropertyValue
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XColorTable* pColTab = new XColorTable( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), (XOutdevItemPool*)&pDoc->GetPool() );
+ XColorList* pColTab = new XColorList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), (XOutdevItemPool*)&pDoc->GetPool() );
pColTab->SetName( aURL.getName() );
if( pColTab->Load() )
{
@@ -734,7 +734,7 @@ void DocumentSettings::_setPropertyValue
pDoc->SetSummationOfParagraphs( bIsSummationOfParagraphs );
SdDrawDocument* pDocument = pDocSh->GetDoc();
- SdrOutliner& rOutl = pDocument->GetDrawOutliner( sal_False );
+ SdrOutliner& rOutl = pDocument->GetDrawOutliner( NULL );
nCntrl = rOutl.GetControlWord() &~ EE_CNTRL_ULSPACESUMMATION;
rOutl.SetControlWord( nCntrl | nSum );
::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False );
@@ -763,7 +763,7 @@ void DocumentSettings::_setPropertyValue
pDoc->SetCharCompressType( (sal_uInt16)nCharCompressType );
SdDrawDocument* pDocument = pDocSh->GetDoc();
- SdrOutliner& rOutl = pDocument->GetDrawOutliner( sal_False );
+ SdrOutliner& rOutl = pDocument->GetDrawOutliner( NULL );
rOutl.SetAsianCompressionMode( (sal_uInt16)nCharCompressType );
::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False );
if( pOutl )
@@ -788,7 +788,7 @@ void DocumentSettings::_setPropertyValue
pDoc->SetKernAsianPunctuation( bAsianPunct );
SdDrawDocument* pDocument = pDocSh->GetDoc();
- SdrOutliner& rOutl = pDocument->GetDrawOutliner( sal_False );
+ SdrOutliner& rOutl = pDocument->GetDrawOutliner( NULL );
rOutl.SetKernAsianPunctuation( bAsianPunct );
::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False );
if( pOutl )
Modified: openoffice/branches/ia2/main/sd/source/ui/unoidl/facreg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/unoidl/facreg.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/unoidl/facreg.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/unoidl/facreg.cxx Tue Apr 23 09:51:15 2013
@@ -122,13 +122,6 @@ extern OUString BasicViewFactory_getImpl
extern uno::Sequence<OUString> SAL_CALL BasicViewFactory_getSupportedServiceNames (void)
throw (uno::RuntimeException);
-extern uno::Reference<uno::XInterface> SAL_CALL TaskPanelFactory_createInstance(
- const uno::Reference<uno::XComponentContext>& rxContext)
- throw(uno::Exception);
-extern OUString TaskPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
-extern uno::Sequence<OUString> SAL_CALL TaskPanelFactory_getSupportedServiceNames (void)
- throw (uno::RuntimeException);
-
extern uno::Reference<uno::XInterface> SAL_CALL ResourceId_createInstance(
const uno::Reference<uno::XComponentContext>& rxContext)
throw(uno::Exception);
@@ -145,14 +138,13 @@ extern uno::Sequence<OUString> SAL_CALL
throw (uno::RuntimeException);
} }
+namespace sd { namespace sidebar {
-namespace sd { namespace toolpanel {
-
-extern uno::Reference<uno::XInterface> SAL_CALL ToolPanelFactory_createInstance(
+extern uno::Reference<uno::XInterface> SAL_CALL PanelFactory_createInstance(
const uno::Reference<uno::XComponentContext>& rxContext)
throw(uno::Exception);
-extern OUString ToolPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
-extern uno::Sequence<OUString> SAL_CALL ToolPanelFactory_getSupportedServiceNames (void)
+extern OUString PanelFactory_getImplementationName(void) throw (uno::RuntimeException);
+extern uno::Sequence<OUString> SAL_CALL PanelFactory_getSupportedServiceNames (void)
throw (uno::RuntimeException);
} }
@@ -214,7 +206,7 @@ using namespace ::sd;
using namespace ::sd::framework;
using namespace ::sd::presenter;
using namespace ::sd::slidesorter;
-using namespace ::sd::toolpanel;
+using namespace ::sd::sidebar;
@@ -237,8 +229,7 @@ enum FactoryId
BasicPaneFactoryFactoryId,
BasicToolBarFactoryFactoryId,
BasicViewFactoryFactoryId,
- TaskPanelFactoryFactoryId,
- ToolPanelFactoryFactoryId,
+ PanelFactoryFactoryId,
ResourceIdFactoryId,
PresentationFactoryProviderFactoryId,
SlideRendererFactoryId,
@@ -271,8 +262,7 @@ static ::boost::shared_ptr<FactoryMap> s
(*spFactoryMap)[BasicPaneFactory_getImplementationName()] = BasicPaneFactoryFactoryId;
(*spFactoryMap)[BasicToolBarFactory_getImplementationName()] = BasicToolBarFactoryFactoryId;
(*spFactoryMap)[BasicViewFactory_getImplementationName()] = BasicViewFactoryFactoryId;
- (*spFactoryMap)[TaskPanelFactory_getImplementationName()] = TaskPanelFactoryFactoryId;
- (*spFactoryMap)[ToolPanelFactory_getImplementationName()] = ToolPanelFactoryFactoryId;
+ (*spFactoryMap)[sidebar::PanelFactory_getImplementationName()] = PanelFactoryFactoryId;
(*spFactoryMap)[ResourceId_getImplementationName()] = ResourceIdFactoryId;
(*spFactoryMap)[PresentationFactoryProvider_getImplementationName()] = PresentationFactoryProviderFactoryId;
(*spFactoryMap)[SlideRenderer_getImplementationName()] = SlideRendererFactoryId;
@@ -402,18 +392,11 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL com
sd::framework::BasicViewFactory_getSupportedServiceNames());
break;
- case TaskPanelFactoryFactoryId:
- xComponentFactory = ::cppu::createSingleComponentFactory(
- sd::framework::TaskPanelFactory_createInstance,
- sd::framework::TaskPanelFactory_getImplementationName(),
- sd::framework::TaskPanelFactory_getSupportedServiceNames());
- break;
-
- case ToolPanelFactoryFactoryId:
+ case PanelFactoryFactoryId:
xComponentFactory = ::cppu::createSingleComponentFactory(
- sd::toolpanel::ToolPanelFactory_createInstance,
- sd::toolpanel::ToolPanelFactory_getImplementationName(),
- sd::toolpanel::ToolPanelFactory_getSupportedServiceNames());
+ sd::sidebar::PanelFactory_createInstance,
+ sd::sidebar::PanelFactory_getImplementationName(),
+ sd::sidebar::PanelFactory_getSupportedServiceNames());
break;
case ResourceIdFactoryId:
Modified: openoffice/branches/ia2/main/sd/source/ui/view/ToolBarManager.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/ToolBarManager.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/ToolBarManager.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/ToolBarManager.cxx Tue Apr 23 09:51:15 2013
@@ -1230,7 +1230,7 @@ void ToolBarRules::MainViewShellChanged
case ViewShell::ST_NONE:
case ViewShell::ST_PRESENTATION:
- case ViewShell::ST_TASK_PANE:
+ case ViewShell::ST_SIDEBAR:
default:
break;
}
Modified: openoffice/branches/ia2/main/sd/source/ui/view/ViewShellBase.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/ViewShellBase.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/ViewShellBase.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/ViewShellBase.cxx Tue Apr 23 09:51:15 2013
@@ -62,7 +62,7 @@
#include "PresentationViewShell.hxx"
#include "FormShellManager.hxx"
#include "ToolBarManager.hxx"
-#include "taskpane/PanelId.hxx"
+#include "SidebarPanelId.hxx"
#include "Window.hxx"
#include "framework/ConfigurationController.hxx"
#include "DocumentRenderer.hxx"
@@ -729,13 +729,6 @@ void ViewShellBase::Execute (SfxRequest&
framework::FrameworkHelper::msSlideSorterURL);
break;
- case SID_TASKPANE:
- mpImpl->SetPaneVisibility(
- rRequest,
- framework::FrameworkHelper::msRightPaneURL,
- framework::FrameworkHelper::msTaskPaneURL);
- break;
-
case SID_NORMAL_MULTI_PANE_GUI:
case SID_SLIDE_SORTER_MULTI_PANE_GUI:
case SID_DRAWINGMODE:
@@ -1449,11 +1442,6 @@ void ViewShellBase::Implementation::GetS
xContext, FrameworkHelper::msLeftDrawPaneURL);
break;
- case SID_TASKPANE:
- xResourceId = ResourceId::create(
- xContext, FrameworkHelper::msRightPaneURL);
- break;
-
case SID_NORMAL_MULTI_PANE_GUI:
xResourceId = ResourceId::createWithAnchorURL(
xContext,
@@ -1553,8 +1541,7 @@ void ViewShellBase::Implementation::Proc
// Set the visibility state of the toolpanel and one of its top
// level panels.
sal_Bool bShowToolPanel = sal_True;
- toolpanel::PanelId nPanelId (
- toolpanel::PID_UNKNOWN);
+ sidebar::PanelId nPanelId (sidebar::PID_UNKNOWN);
bool bPanelIdGiven = false;
// Extract the given arguments.
@@ -1574,9 +1561,7 @@ void ViewShellBase::Implementation::Proc
ID_VAL_PANEL_INDEX, sal_False);
if (pPanelId != NULL)
{
- nPanelId = static_cast<
- toolpanel::PanelId>(
- pPanelId->GetValue());
+ nPanelId = static_cast<sidebar::PanelId>(pPanelId->GetValue());
bPanelIdGiven = true;
}
}
@@ -1585,11 +1570,11 @@ void ViewShellBase::Implementation::Proc
// Ignore the request for some combinations of panels and view
// shell types.
if (bPanelIdGiven
- && ! (nPanelId==toolpanel::PID_LAYOUT
+ && ! (nPanelId==sidebar::PID_LAYOUT
&& mrBase.GetMainViewShell()!=NULL
&& mrBase.GetMainViewShell()->GetShellType()==ViewShell::ST_OUTLINE))
{
- framework::FrameworkHelper::Instance(mrBase)->RequestTaskPanel(
+ framework::FrameworkHelper::Instance(mrBase)->RequestSidebarPanel(
framework::FrameworkHelper::msLayoutTaskPanelURL);
}
}
Modified: openoffice/branches/ia2/main/sd/source/ui/view/ViewShellImplementation.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/ViewShellImplementation.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/ViewShellImplementation.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/ViewShellImplementation.cxx Tue Apr 23 09:51:15 2013
@@ -47,7 +47,7 @@
#include "FrameView.hxx"
#include "DrawViewShell.hxx"
#include "ViewShellHint.hxx"
-#include "taskpane/PanelId.hxx"
+#include "SidebarPanelId.hxx"
#include "framework/FrameworkHelper.hxx"
#include <sfx2/bindings.hxx>
@@ -148,8 +148,7 @@ void ViewShell::Implementation::ProcessM
// Make the layout menu visible in the tool pane.
SfxBoolItem aMakeToolPaneVisible (ID_VAL_ISVISIBLE, sal_True);
- SfxUInt32Item aPanelId (ID_VAL_PANEL_INDEX,
- ::sd::toolpanel::PID_LAYOUT);
+ SfxUInt32Item aPanelId (ID_VAL_PANEL_INDEX, sidebar::PID_LAYOUT);
SfxViewFrame* pFrame = mrViewShell.GetViewFrame();
if (pFrame!=NULL && pFrame->GetDispatcher()!=NULL)
{
@@ -349,7 +348,7 @@ sal_uInt16 ViewShell::Implementation::Ge
// Since we have to return a view id for every possible shell type
// and there is not (yet) a proper ViewShellBase sub class for the
// remaining types we chose the Impress factory as a fall back.
- case ViewShell::ST_TASK_PANE:
+ case ViewShell::ST_SIDEBAR:
case ViewShell::ST_NONE:
default:
return IMPRESS_FACTORY_ID;
Modified: openoffice/branches/ia2/main/sd/source/ui/view/ViewShellManager.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/ViewShellManager.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/ViewShellManager.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/ViewShellManager.cxx Tue Apr 23 09:51:15 2013
@@ -61,6 +61,8 @@ public:
SfxShell* mpShell;
ShellId mnId;
ViewShellManager::SharedShellFactory mpFactory;
+ bool mbIsListenerAddedToWindow;
+
ShellDescriptor ();
ShellDescriptor (SfxShell* pShell, ShellId nId);
ShellDescriptor (const ShellDescriptor& rDescriptor);
@@ -241,7 +243,7 @@ private:
ShellId nShellId,
::Window* pParentWindow,
FrameView* pFrameView);
- void DestroyViewShell (const ShellDescriptor& rDescriptor);
+ void DestroyViewShell (ShellDescriptor& rDescriptor);
void DestroySubShell (
const SfxShell& rViewShell,
const ShellDescriptor& rDescriptor);
@@ -519,8 +521,11 @@ void ViewShellManager::Implementation::A
{
::Window* pWindow = aResult.GetWindow();
if (pWindow != NULL)
+ {
pWindow->AddEventListener(
LINK(this, ViewShellManager::Implementation, WindowEventHandler));
+ aResult.mbIsListenerAddedToWindow = true;
+ }
else
{
DBG_ASSERT(false,
@@ -1181,6 +1186,23 @@ IMPL_LINK(ViewShellManager::Implementati
case VCLEVENT_WINDOW_LOSEFOCUS:
break;
+
+ case VCLEVENT_OBJECT_DYING:
+ // Remember that we do not have to remove the window
+ // listener for this window.
+ for (ActiveShellList::iterator
+ iShell(maActiveViewShells.begin()),
+ iEnd(maActiveViewShells.end());
+ iShell!=iEnd;
+ ++iShell)
+ {
+ if (iShell->GetWindow() == pEventWindow)
+ {
+ iShell->mbIsListenerAddedToWindow = false;
+ break;
+ }
+ }
+ break;
}
}
return sal_True;
@@ -1225,15 +1247,19 @@ ShellDescriptor ViewShellManager::Implem
void ViewShellManager::Implementation::DestroyViewShell (
- const ShellDescriptor& rDescriptor)
+ ShellDescriptor& rDescriptor)
{
OSL_ASSERT(rDescriptor.mpShell != NULL);
-
- ::Window* pWindow = rDescriptor.GetWindow();
- if (pWindow != NULL)
+
+ if (rDescriptor.mbIsListenerAddedToWindow)
{
- pWindow->RemoveEventListener(
- LINK(this, ViewShellManager::Implementation, WindowEventHandler));
+ rDescriptor.mbIsListenerAddedToWindow = false;
+ ::Window* pWindow = rDescriptor.GetWindow();
+ if (pWindow != NULL)
+ {
+ pWindow->RemoveEventListener(
+ LINK(this, ViewShellManager::Implementation, WindowEventHandler));
+ }
}
// Destroy the sub shell factories.
@@ -1395,7 +1421,8 @@ namespace {
ShellDescriptor::ShellDescriptor (void)
: mpShell(NULL),
mnId(0),
- mpFactory()
+ mpFactory(),
+ mbIsListenerAddedToWindow(false)
{
}
@@ -1407,7 +1434,8 @@ ShellDescriptor::ShellDescriptor (
ShellId nId)
: mpShell(pShell),
mnId(nId),
- mpFactory()
+ mpFactory(),
+ mbIsListenerAddedToWindow(false)
{
}
@@ -1415,9 +1443,10 @@ ShellDescriptor::ShellDescriptor (
ShellDescriptor::ShellDescriptor (const ShellDescriptor& rDescriptor)
- : mpShell(rDescriptor.mpShell),
- mnId(rDescriptor.mnId),
- mpFactory(rDescriptor.mpFactory)
+ : mpShell(rDescriptor.mpShell),
+ mnId(rDescriptor.mnId),
+ mpFactory(rDescriptor.mpFactory),
+ mbIsListenerAddedToWindow(rDescriptor.mbIsListenerAddedToWindow)
{
}
@@ -1426,9 +1455,13 @@ ShellDescriptor::ShellDescriptor (const
ShellDescriptor& ShellDescriptor::operator= (const ShellDescriptor& rDescriptor)
{
- mpShell = rDescriptor.mpShell;
- mnId = rDescriptor.mnId;
- mpFactory = rDescriptor.mpFactory;
+ if (this != &rDescriptor)
+ {
+ mpShell = rDescriptor.mpShell;
+ mnId = rDescriptor.mnId;
+ mpFactory = rDescriptor.mpFactory;
+ mbIsListenerAddedToWindow = rDescriptor.mbIsListenerAddedToWindow;
+ }
return *this;
}
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drtxtob.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drtxtob.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drtxtob.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drtxtob.cxx Tue Apr 23 09:51:15 2013
@@ -39,6 +39,7 @@
#include <editeng/ulspitem.hxx>
#include <editeng/lspcitem.hxx>
#include <editeng/adjitem.hxx>
+#include <editeng/kernitem.hxx>
#include <vcl/vclenum.hxx>
#include <sfx2/app.hxx>
#include <svl/whiter.hxx>
@@ -153,6 +154,27 @@ TextObjectBar::~TextObjectBar()
SetRepeatTarget(NULL);
}
+void TextObjectBar::GetCharState( SfxItemSet& rSet )
+{
+ SfxItemSet aCharAttrSet( mpView->GetDoc()->GetPool() );
+ mpView->GetAttributes( aCharAttrSet );
+
+ SfxItemSet aNewAttr( mpViewShell->GetPool(),EE_ITEMS_START,EE_ITEMS_END);
+
+ aNewAttr.Put(aCharAttrSet, sal_False);
+ rSet.Put(aNewAttr, sal_False);
+
+ SvxKerningItem aKern = ( (const SvxKerningItem&) aCharAttrSet.Get( EE_CHAR_KERNING ) );
+ //aKern.SetWhich(SID_ATTR_CHAR_KERNING);
+ rSet.Put(aKern);
+
+ SfxItemState eState = aCharAttrSet.GetItemState( EE_CHAR_KERNING, sal_True );
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ rSet.InvalidateItem(EE_CHAR_KERNING);
+ }
+}
+
/*************************************************************************
|*
|* Status der Attribut-Items
@@ -183,6 +205,8 @@ void TextObjectBar::GetAttrState( SfxIte
case SID_ATTR_CHAR_FONTHEIGHT:
case SID_ATTR_CHAR_WEIGHT:
case SID_ATTR_CHAR_POSTURE:
+ case SID_ATTR_CHAR_SHADOWED:
+ case SID_ATTR_CHAR_STRIKEOUT:
{
SvxScriptSetItem aSetItem( nSlotId, GetPool() );
aSetItem.GetItemSet().Put( aAttrSet, sal_False );
@@ -464,7 +488,9 @@ void TextObjectBar::GetAttrState( SfxIte
}
// Absatzausrichtung
- SvxAdjust eAdj = ( (const SvxAdjustItem&) aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust();
+ SvxLRSpaceItem aLR = ( (const SvxLRSpaceItem&) aAttrSet.Get( EE_PARA_LRSPACE ) );
+ rSet.Put(aLR);
+ SvxAdjust eAdj = ( (const SvxAdjustItem&) aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust();
switch( eAdj )
{
case SVX_ADJUST_LEFT:
@@ -483,6 +509,13 @@ void TextObjectBar::GetAttrState( SfxIte
break;
}
+ Invalidate(SID_ATTR_PARA_ADJUST_LEFT);
+ Invalidate(SID_ATTR_PARA_ADJUST_CENTER);
+ Invalidate(SID_ATTR_PARA_ADJUST_RIGHT);
+ Invalidate(SID_ATTR_PARA_ADJUST_BLOCK);
+ Invalidate(SID_ATTR_PARA_LINESPACE);
+ Invalidate(SID_ATTR_PARA_ULSPACE);
+
// paragraph text direction
if( bDisableParagraphTextDirection )
{
@@ -547,6 +580,17 @@ void TextObjectBar::GetAttrState( SfxIte
}
}
*/
+ SvxLRSpaceItem aLRSpace = ( (const SvxLRSpaceItem&) aAttrSet.Get( EE_PARA_LRSPACE ) );
+ aLRSpace.SetWhich(SID_ATTR_PARA_LRSPACE);
+ rSet.Put(aLRSpace);
+ Invalidate(SID_ATTR_PARA_LRSPACE);
+ //Added by xuxu
+ SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE );
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ rSet.InvalidateItem(EE_PARA_LRSPACE);
+ rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
+ }
sal_uInt16 nLineSpace = (sal_uInt16) ( (const SvxLineSpacingItem&) aAttrSet.
Get( EE_PARA_SBL ) ).GetPropLineSpace();
switch( nLineSpace )
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drtxtob1.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drtxtob1.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drtxtob1.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drtxtob1.cxx Tue Apr 23 09:51:15 2013
@@ -270,6 +270,22 @@ void TextObjectBar::Execute( SfxRequest
}
break;
+ case SID_ATTR_PARA_LRSPACE:
+ {
+ sal_uInt16 nSlot = SID_ATTR_PARA_LRSPACE;
+ SvxLRSpaceItem aLRSpace = (const SvxLRSpaceItem&)pArgs->Get(
+ GetPool().GetWhich(nSlot));
+
+ SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ aLRSpace.SetWhich( EE_PARA_LRSPACE );
+
+ aEditAttr.Put( aLRSpace );
+ mpView->SetAttributes( aEditAttr );
+
+ Invalidate(SID_ATTR_PARA_LRSPACE);
+ }
+ break;
+
case SID_OUTLINE_UP:
{
if (pOLV)
@@ -585,6 +601,71 @@ void TextObjectBar::Execute( SfxRequest
rReq.Done( aNewAttr );
pArgs = rReq.GetArgs();
}
+ else if (nSlot == SID_ATTR_PARA_ADJUST_LEFT ||
+ nSlot == SID_ATTR_PARA_ADJUST_CENTER ||
+ nSlot == SID_ATTR_PARA_ADJUST_RIGHT ||
+ nSlot == SID_ATTR_PARA_ADJUST_BLOCK)
+ {
+ switch( nSlot )
+ {
+ case SID_ATTR_PARA_ADJUST_LEFT:
+ {
+ aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ }
+ break;
+ case SID_ATTR_PARA_ADJUST_CENTER:
+ {
+ aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ }
+ break;
+ case SID_ATTR_PARA_ADJUST_RIGHT:
+ {
+ aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ }
+ break;
+ case SID_ATTR_PARA_ADJUST_BLOCK:
+ {
+ aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ) );
+ }
+ break;
+ }
+ rReq.Done( aNewAttr );
+ pArgs = rReq.GetArgs();
+ }
+ else if(nSlot == SID_ATTR_CHAR_KERNING)
+ {
+ aNewAttr.Put(pArgs->Get(pArgs->GetPool()->GetWhich(nSlot)));
+ rReq.Done( aNewAttr );
+ pArgs = rReq.GetArgs();
+ }
+ else if(nSlot == SID_SET_SUPER_SCRIPT )
+ {
+ SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT);
+ SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+ aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+
+ if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
+ aItem.SetEscapement( SVX_ESCAPEMENT_OFF );
+ else
+ aItem.SetEscapement( SVX_ESCAPEMENT_SUPERSCRIPT );
+ aNewAttr.Put( aItem );
+ rReq.Done( aNewAttr );
+ pArgs = rReq.GetArgs();
+ }
+ else if( nSlot == SID_SET_SUB_SCRIPT )
+ {
+ SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT);
+ SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+ aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+
+ if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
+ aItem.SetEscapement( SVX_ESCAPEMENT_OFF );
+ else
+ aItem.SetEscapement( SVX_ESCAPEMENT_SUBSCRIPT );
+ aNewAttr.Put( aItem );
+ rReq.Done( aNewAttr );
+ pArgs = rReq.GetArgs();
+ }
mpView->SetAttributes(*pArgs);
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviews2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviews2.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviews2.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviews2.cxx Tue Apr 23 09:51:15 2013
@@ -63,6 +63,26 @@
#include <svx/xlnedwit.hxx>
#include <svx/fontworkbar.hxx>
+#include <editeng/escpitem.hxx>
+#include <editeng/kernitem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/crsditem.hxx>
+#include <editeng/cntritem.hxx>
+#include <editeng/shdditem.hxx>
+#include <svx/xtable.hxx>
+#include <svx/svdobj.hxx>
+#include <editeng/outlobj.hxx>
+#include <editeng/flstitem.hxx>
+#include <editeng/scripttypeitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/brshitem.hxx>
+
+#include <svl/whiter.hxx>
+
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
@@ -84,6 +104,7 @@
#include "unmodpg.hxx"
#include "slideshow.hxx"
#include "fuvect.hxx"
+#include "futext.hxx"
#include "stlpool.hxx"
// #90356#
@@ -135,12 +156,19 @@ void DrawViewShell::FuTemporary(SfxReque
case SID_ATTR_FILL_HATCH:
case SID_ATTR_FILL_BITMAP:
case SID_ATTR_FILL_SHADOW:
+ case SID_ATTR_FILL_TRANSPARENCE:
+ case SID_ATTR_FILL_FLOATTRANSPARENCE:
case SID_ATTR_LINE_STYLE:
case SID_ATTR_LINE_DASH:
case SID_ATTR_LINE_WIDTH:
case SID_ATTR_LINE_COLOR:
case SID_ATTR_LINEEND_STYLE:
+ case SID_ATTR_LINE_START:
+ case SID_ATTR_LINE_END:
+ case SID_ATTR_LINE_TRANSPARENCE:
+ case SID_ATTR_LINE_JOINT:
+ case SID_ATTR_LINE_CAP:
case SID_ATTR_TEXT_FITTOSIZE:
{
@@ -287,12 +315,17 @@ void DrawViewShell::FuTemporary(SfxReque
case SID_ATTR_FILL_GRADIENT:
case SID_ATTR_FILL_HATCH:
case SID_ATTR_FILL_BITMAP:
+ case SID_ATTR_FILL_TRANSPARENCE:
+ case SID_ATTR_FILL_FLOATTRANSPARENCE:
GetViewFrame()->GetDispatcher()->Execute( SID_ATTRIBUTES_AREA, SFX_CALLMODE_ASYNCHRON );
break;
case SID_ATTR_LINE_STYLE:
case SID_ATTR_LINE_DASH:
case SID_ATTR_LINE_WIDTH:
case SID_ATTR_LINE_COLOR:
+ case SID_ATTR_LINE_TRANSPARENCE:
+ case SID_ATTR_LINE_JOINT:
+ case SID_ATTR_LINE_CAP:
GetViewFrame()->GetDispatcher()->Execute( SID_ATTRIBUTES_LINE, SFX_CALLMODE_ASYNCHRON );
break;
case SID_ATTR_TEXT_FITTOSIZE:
@@ -985,7 +1018,176 @@ void DrawViewShell::FuTemporary(SfxReque
}
}
+void DrawViewShell::ExecChar( SfxRequest &rReq )
+{
+ SdDrawDocument* pDoc = GetDoc();
+ if (!pDoc || !mpDrawView)
+ return;
+
+ SfxItemSet aEditAttr( pDoc->GetPool() );
+ mpDrawView->GetAttributes( aEditAttr );
+
+ //modified by wj for sym2_1580, if put old itemset into new set,
+ //when mpDrawView->SetAttributes(aNewAttr) it will invalidate all the item
+ // and use old attr to update all the attributes
+// SfxItemSet aNewAttr( GetPool(),
+// EE_ITEMS_START, EE_ITEMS_END );
+// aNewAttr.Put( aEditAttr, sal_False );
+ SfxItemSet aNewAttr( pDoc->GetPool() );
+ //modified end
+
+ sal_uInt16 nSId = rReq.GetSlot();
+
+ MapSlot( nSId );
+
+ switch ( nSId )
+ {
+ case SID_ATTR_CHAR_FONT:
+ if( rReq.GetArgs() )
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SvxFontItem, SID_ATTR_CHAR_FONT , sal_False );
+ if (pItem)
+ {
+ aNewAttr.Put(*pItem);
+ }
+ }
+ break;
+ case SID_ATTR_CHAR_FONTHEIGHT:
+ if( rReq.GetArgs() )
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SvxFontHeightItem, SID_ATTR_CHAR_FONTHEIGHT , sal_False );
+ if (pItem)
+ {
+ aNewAttr.Put(*pItem);
+ }
+ }
+ break;
+ case SID_ATTR_CHAR_WEIGHT:
+ if( rReq.GetArgs() )
+ {
+ //const SvxWeightItem *pItem = (const SvxWeightItem*) rReq.GetArg( SID_ATTR_CHAR_WEIGHT, sal_False, TYPE(SvxWeightItem) );
+ SFX_REQUEST_ARG( rReq, pItem, SvxWeightItem, SID_ATTR_CHAR_WEIGHT , sal_False );
+ if (pItem)
+ {
+ aNewAttr.Put(*pItem);
+ }
+ }
+ break;
+ case SID_ATTR_CHAR_POSTURE:
+ if( rReq.GetArgs() )
+ {
+ //const SvxPostureItem *pItem = (const SvxPostureItem*) rReq.GetArg( SID_ATTR_CHAR_POSTURE, sal_False, TYPE(SvxPostureItem) );
+ SFX_REQUEST_ARG( rReq, pItem, SvxPostureItem, SID_ATTR_CHAR_POSTURE , sal_False );
+ if (pItem)
+ {
+ aNewAttr.Put(*pItem);
+ }
+ }
+ break;
+ case SID_ATTR_CHAR_UNDERLINE:
+ if( rReq.GetArgs() )
+ {
+ //<<modify by wj for sym2_1873
+ //SFX_REQUEST_ARG( rReq, pItem, SvxTextLineItem, SID_ATTR_CHAR_UNDERLINE , sal_False );
+ SFX_REQUEST_ARG( rReq, pItem, SvxUnderlineItem, SID_ATTR_CHAR_UNDERLINE , sal_False );
+ //end>>
+ if (pItem)
+ {
+ aNewAttr.Put(*pItem);
+ }
+ else
+ {
+ FontUnderline eFU = ( (const SvxUnderlineItem&) aEditAttr.Get( EE_CHAR_UNDERLINE ) ).GetLineStyle();
+ aNewAttr.Put( SvxUnderlineItem( eFU != UNDERLINE_NONE ?UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_UNDERLINE ) );
+ }//aNewAttr.Put( (const SvxUnderlineItem&)aEditAttr.Get( EE_CHAR_UNDERLINE ) );
+ }
+ break;
+ case SID_ATTR_CHAR_SHADOWED:
+ if( rReq.GetArgs() )
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SvxShadowedItem, SID_ATTR_CHAR_SHADOWED , sal_False );
+ if (pItem)
+ {
+ aNewAttr.Put(*pItem);
+ }
+ }
+ break;
+ case SID_ATTR_CHAR_STRIKEOUT:
+ if( rReq.GetArgs() )
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SvxCrossedOutItem, SID_ATTR_CHAR_STRIKEOUT , sal_False );
+ if (pItem)
+ {
+ aNewAttr.Put(*pItem);
+ }
+ }
+ break;
+ case SID_ATTR_CHAR_COLOR:
+ if( rReq.GetArgs() )
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SvxColorItem, SID_ATTR_CHAR_COLOR , sal_False );
+ if (pItem)
+ {
+ aNewAttr.Put(*pItem);
+ }
+ }
+ break;
+ case SID_ATTR_CHAR_KERNING:
+ if( rReq.GetArgs() )
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SvxKerningItem, SID_ATTR_CHAR_KERNING , sal_False );
+ if (pItem)
+ {
+ aNewAttr.Put(*pItem);
+ }
+ }
+ break;
+ case SID_SET_SUB_SCRIPT:
+ if( rReq.GetArgs() )
+ {
+ SvxEscapementItem aItem( EE_CHAR_ESCAPEMENT );
+ SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&)
+ aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+ if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
+ aItem.SetEscapement( SVX_ESCAPEMENT_OFF );
+ else
+ aItem.SetEscapement( SVX_ESCAPEMENT_SUBSCRIPT );
+ aNewAttr.Put( aItem );
+ }
+ break;
+ case SID_SET_SUPER_SCRIPT:
+ if( rReq.GetArgs() )
+ {
+ SvxEscapementItem aItem( EE_CHAR_ESCAPEMENT );
+ SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&)
+ aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+ if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
+ aItem.SetEscapement( SVX_ESCAPEMENT_OFF );
+ else
+ aItem.SetEscapement( SVX_ESCAPEMENT_SUPERSCRIPT );
+ aNewAttr.Put( aItem );
+ }
+ break;
+ case SID_SHRINK_FONT_SIZE:
+ case SID_GROW_FONT_SIZE:
+ //if (rReq.GetArgs())
+ {
+ const SvxFontListItem* pFonts = dynamic_cast<const SvxFontListItem*>(GetDocSh()->GetItem( SID_ATTR_CHAR_FONTLIST ) );
+ const FontList* pFontList = pFonts->GetFontList();
+ if( pFontList )
+ {
+ FuText::ChangeFontSize( nSId == SID_GROW_FONT_SIZE, NULL, pFontList, mpView );
+ GetViewFrame()->GetBindings().Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
+ }
+ }
+ default:
+ ;
+ }
+ mpDrawView->SetAttributes(aNewAttr);
+ rReq.Done();
+ Cancel();
+}
/** This method consists basically of three parts:
@@ -1011,4 +1213,86 @@ SdPage* DrawViewShell::CreateOrDuplicate
return pNewPage;
}
+void DrawViewShell::ExecutePropPanelAttr (SfxRequest& rReq)
+{
+ if(SlideShow::IsRunning( GetViewShellBase() ))
+ return;
+
+ SdDrawDocument* pDoc = GetDoc();
+ if (!pDoc || !mpDrawView)
+ return;
+
+ sal_uInt16 nSId = rReq.GetSlot();
+ SfxItemSet aAttrs( pDoc->GetPool() );
+
+ switch ( nSId )
+ {
+ case SID_TABLE_VERT_NONE:
+ case SID_TABLE_VERT_CENTER:
+ case SID_TABLE_VERT_BOTTOM:
+ SdrTextVertAdjust eTVA = SDRTEXTVERTADJUST_TOP;
+ if (nSId == SID_TABLE_VERT_CENTER)
+ eTVA = SDRTEXTVERTADJUST_CENTER;
+ else if (nSId == SID_TABLE_VERT_BOTTOM)
+ eTVA = SDRTEXTVERTADJUST_BOTTOM;
+
+ aAttrs.Put( SdrTextVertAdjustItem(eTVA) );
+ mpDrawView->SetAttributes(aAttrs);
+
+ break;
+ }
+}
+
+void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet)
+{
+ SfxWhichIter aIter( rSet );
+ sal_uInt16 nWhich = aIter.FirstWhich();
+
+ SdDrawDocument* pDoc = GetDoc();
+ if (!pDoc || !mpDrawView)
+ return;
+
+ SfxItemSet aAttrs( pDoc->GetPool() );
+ mpDrawView->GetAttributes( aAttrs );
+
+ while ( nWhich )
+ {
+ sal_uInt16 nSlotId = SfxItemPool::IsWhich(nWhich)
+ ? GetPool().GetSlotId(nWhich)
+ : nWhich;
+ switch ( nSlotId )
+ {
+ case SID_TABLE_VERT_NONE:
+ case SID_TABLE_VERT_CENTER:
+ case SID_TABLE_VERT_BOTTOM:
+ sal_Bool bContour = sal_False;
+ SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME );
+ if( eConState != SFX_ITEM_DONTCARE )
+ {
+ bContour = ( ( const SdrTextContourFrameItem& )aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ }
+ if (bContour) break;
+
+ SfxItemState eVState = aAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST );
+ //SfxItemState eHState = aAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST );
+
+ //if(SFX_ITEM_DONTCARE != eVState && SFX_ITEM_DONTCARE != eHState)
+ if(SFX_ITEM_DONTCARE != eVState)
+ {
+ SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ sal_Bool bSet = nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP||
+ nSlotId == SID_TABLE_VERT_CENTER && eTVA == SDRTEXTVERTADJUST_CENTER ||
+ nSlotId == SID_TABLE_VERT_BOTTOM && eTVA == SDRTEXTVERTADJUST_BOTTOM;
+ rSet.Put(SfxBoolItem(nSlotId, bSet));
+ }
+ else
+ {
+ rSet.Put(SfxBoolItem(nSlotId, sal_False));
+ }
+ break;
+ }
+ nWhich = aIter.NextWhich();
+ }
+}
+
} // end of namespace sd
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviews3.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviews3.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviews3.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviews3.cxx Tue Apr 23 09:51:15 2013
@@ -32,6 +32,7 @@
#include <editeng/lrspitem.hxx>
#include <editeng/protitem.hxx>
#include <editeng/frmdiritem.hxx>
+#include <editeng/adjitem.hxx>
#include <svx/ruler.hxx>
#ifndef _SVX_RULERITEM_HXX
#include <svx/rulritem.hxx>
@@ -96,7 +97,8 @@
#include <com/sun/star/drawing/framework/XConfigurationController.hpp>
#include <com/sun/star/drawing/framework/XConfiguration.hpp>
#include <com/sun/star/frame/XFrame.hpp>
-
+#include <editeng/lspcitem.hxx>
+#include <editeng/ulspitem.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::com::sun::star::frame::XFrame;
@@ -677,17 +679,106 @@ void DrawViewShell::ExecRuler(SfxReques
break;
}
+ case SID_ATTR_PARA_LINESPACE:
+ {
+ sal_uInt16 nSlot = SID_ATTR_PARA_LINESPACE;
+ SvxLineSpacingItem aParaLineSP = (const SvxLineSpacingItem&)pArgs->Get(
+ GetPool().GetWhich(nSlot));
+
+ SfxItemSet aEditAttr( GetPool(), EE_PARA_SBL, EE_PARA_SBL );
+ aParaLineSP.SetWhich( EE_PARA_SBL );
+
+ aEditAttr.Put( aParaLineSP );
+ mpDrawView->SetAttributes( aEditAttr );
+
+ Invalidate(SID_ATTR_PARA_LINESPACE);
+ }
+ break;
+ case SID_ATTR_PARA_ADJUST_LEFT:
+ {
+ SvxAdjustItem aItem( SVX_ADJUST_LEFT, EE_PARA_JUST );
+ SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
+
+ aEditAttr.Put( aItem );
+ mpDrawView->SetAttributes( aEditAttr );
+
+ Invalidate(SID_ATTR_PARA_ADJUST_LEFT);
+ }
+ break;
+ case SID_ATTR_PARA_ADJUST_CENTER:
+ {
+ SvxAdjustItem aItem( SVX_ADJUST_CENTER, EE_PARA_JUST );
+ SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
+
+ aEditAttr.Put( aItem );
+ mpDrawView->SetAttributes( aEditAttr );
+
+ Invalidate(SID_ATTR_PARA_ADJUST_CENTER);
+ }
+ break;
+ case SID_ATTR_PARA_ADJUST_RIGHT:
+ {
+ SvxAdjustItem aItem( SVX_ADJUST_RIGHT, EE_PARA_JUST );
+ SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
+
+ aEditAttr.Put( aItem );
+ mpDrawView->SetAttributes( aEditAttr );
+
+ Invalidate(SID_ATTR_PARA_ADJUST_RIGHT);
+ }
+ break;
+ case SID_ATTR_PARA_ADJUST_BLOCK:
+ {
+ SvxAdjustItem aItem( SVX_ADJUST_BLOCK, EE_PARA_JUST );
+ SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
+
+ aEditAttr.Put( aItem );
+ mpDrawView->SetAttributes( aEditAttr );
+
+ Invalidate(SID_ATTR_PARA_ADJUST_BLOCK);
+ }
+ break;
+ case SID_ATTR_PARA_ULSPACE:
+ {
+ sal_uInt16 nSlot = SID_ATTR_PARA_ULSPACE;
+ SvxULSpaceItem aULSP = (const SvxULSpaceItem&)pArgs->Get(
+ GetPool().GetWhich(nSlot));
+ SfxItemSet aEditAttr( GetPool(), EE_PARA_ULSPACE, EE_PARA_ULSPACE );
+ aULSP.SetWhich( EE_PARA_ULSPACE );
+
+ aEditAttr.Put( aULSP );
+ mpDrawView->SetAttributes( aEditAttr );
+
+ Invalidate(SID_ATTR_PARA_ULSPACE);
+ }
+ break;
+
case SID_ATTR_PARA_LRSPACE:
{
+ sal_uInt16 nSlot = SID_ATTR_PARA_LRSPACE;
+ SvxLRSpaceItem aLRSpace = (const SvxLRSpaceItem&)pArgs->Get(
+ GetPool().GetWhich(nSlot));
+
+ SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ aLRSpace.SetWhich( EE_PARA_LRSPACE );
+
+ aEditAttr.Put( aLRSpace );
+ mpDrawView->SetAttributes( aEditAttr );
+
+ Invalidate(SID_ATTR_PARA_LRSPACE);
+ break;
+ }
+ case SID_ATTR_LRSPACE:
+ {
if( mpDrawView->IsTextEdit() )
{
sal_uInt16 nId = SID_ATTR_PARA_LRSPACE;
const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&)
pArgs->Get( nId );
- SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
- nId = EE_PARA_LRSPACE;
+ nId = EE_PARA_LRSPACE;
SvxLRSpaceItem aLRSpaceItem( rItem.GetLeft(),
rItem.GetRight(), rItem.GetTxtLeft(),
rItem.GetTxtFirstLineOfst(), nId );
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviews6.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviews6.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviews6.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviews6.cxx Tue Apr 23 09:51:15 2013
@@ -46,8 +46,7 @@
#ifndef _IMAPDLG_HXX
#include <svx/imapdlg.hxx>
#endif
-#include <svx/xftsfit.hxx>
-#include <svx/colrctrl.hxx>
+#include <svx/SvxColorChildWindow.hxx>
#include <svx/f3dchild.hxx>
#include "optsitem.hxx"
#include <svx/extrusionbar.hxx>
@@ -78,6 +77,7 @@
#include "Window.hxx"
#include "DrawDocShell.hxx"
#include "framework/FrameworkHelper.hxx"
+#include <svx/svdoashp.hxx>
namespace sd {
@@ -101,34 +101,11 @@ void DrawViewShell::ExecFormText(SfxRequ
mpDrawView && !mpDrawView->IsPresObjSelected() )
{
const SfxItemSet& rSet = *rReq.GetArgs();
- const SfxPoolItem* pItem;
if ( mpDrawView->IsTextEdit() )
mpDrawView->SdrEndTextEdit();
- if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) ==
- SFX_ITEM_SET &&
- ((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE )
- {
-
- sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
-
- SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)GetViewFrame()->
- GetChildWindow(nId)->GetWindow();
-
- pDlg->CreateStdFormObj(*mpDrawView, *mpDrawView->GetSdrPageView(),
- rSet, *rMarkList.GetMark(0)->GetMarkedSdrObj(),
- ((const XFormTextStdFormItem*) pItem)->
- GetValue());
-
- if(HasCurrentFunction(SID_BEZIER_EDIT))
- { // ggf. die richtige Editfunktion aktivieren
- GetViewFrame()->GetDispatcher()->Execute(SID_SWITCH_POINTEDIT,
- SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
- }
- }
- else
- mpDrawView->SetAttributes(rSet);
+ mpDrawView->SetAttributes(rSet);
}
}
@@ -152,25 +129,30 @@ void DrawViewShell::GetFormTextState(Sfx
if ( rMarkList.GetMarkCount() == 1 )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- if ( pObj == NULL || !pObj->ISA(SdrTextObj) ||
- !((SdrTextObj*) pObj)->HasText() )
+ const SdrTextObj* pTextObj = dynamic_cast< const SdrTextObj* >(pObj);
+ const bool bDeactivate(
+ !pObj ||
+ !pTextObj ||
+ !pTextObj->HasText() ||
+ dynamic_cast< const SdrObjCustomShape* >(pObj)); // #121538# no FontWork for CustomShapes
+
+ if(bDeactivate)
{
// automatisches Auf/Zuklappen des FontWork-Dialog; erstmal deaktiviert
// if ( pDlg )
// pDlg->SetActive(sal_False);
- rSet.DisableItem(XATTR_FORMTXTSTYLE);
- rSet.DisableItem(XATTR_FORMTXTADJUST);
- rSet.DisableItem(XATTR_FORMTXTDISTANCE);
- rSet.DisableItem(XATTR_FORMTXTSTART);
- rSet.DisableItem(XATTR_FORMTXTMIRROR);
- rSet.DisableItem(XATTR_FORMTXTSTDFORM);
- rSet.DisableItem(XATTR_FORMTXTHIDEFORM);
- rSet.DisableItem(XATTR_FORMTXTOUTLINE);
- rSet.DisableItem(XATTR_FORMTXTSHADOW);
- rSet.DisableItem(XATTR_FORMTXTSHDWCOLOR);
- rSet.DisableItem(XATTR_FORMTXTSHDWXVAL);
- rSet.DisableItem(XATTR_FORMTXTSHDWYVAL);
+ rSet.DisableItem(XATTR_FORMTXTSTYLE);
+ rSet.DisableItem(XATTR_FORMTXTADJUST);
+ rSet.DisableItem(XATTR_FORMTXTDISTANCE);
+ rSet.DisableItem(XATTR_FORMTXTSTART);
+ rSet.DisableItem(XATTR_FORMTXTMIRROR);
+ rSet.DisableItem(XATTR_FORMTXTHIDEFORM);
+ rSet.DisableItem(XATTR_FORMTXTOUTLINE);
+ rSet.DisableItem(XATTR_FORMTXTSHADOW);
+ rSet.DisableItem(XATTR_FORMTXTSHDWCOLOR);
+ rSet.DisableItem(XATTR_FORMTXTSHDWXVAL);
+ rSet.DisableItem(XATTR_FORMTXTSHDWYVAL);
}
else
{
@@ -594,7 +576,7 @@ void DrawViewShell::FuTemp04(SfxRequest&
{
// Make the slide transition panel visible (expand it) in the
// tool pane.
- framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel(
+ framework::FrameworkHelper::Instance(GetViewShellBase())->RequestSidebarPanel(
framework::FrameworkHelper::msCustomAnimationTaskPanelURL);
Cancel();
@@ -606,7 +588,7 @@ void DrawViewShell::FuTemp04(SfxRequest&
{
// Make the slide transition panel visible (expand it) in the
// tool pane.
- framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel(
+ framework::FrameworkHelper::Instance(GetViewShellBase())->RequestSidebarPanel(
framework::FrameworkHelper::msSlideTransitionTaskPanelURL);
Cancel();
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviews7.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviews7.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviews7.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviews7.cxx Tue Apr 23 09:51:15 2013
@@ -206,6 +206,18 @@ IMPL_LINK( DrawViewShell, ClipboardChang
return 0;
}
+
+
+
+void DrawViewShell::GetDrawAttrState(SfxItemSet& rSet)
+{
+ SfxItemSet aSet( mpDrawView->GetGeoAttrFromMarked() );
+ rSet.Put(aSet,sal_False);
+}
+
+
+
+
/*************************************************************************
|*
|* Status (Enabled/Disabled) von Menue-SfxSlots setzen
@@ -512,6 +524,8 @@ void DrawViewShell::GetMenuState( SfxIte
{
rSet.DisableItem( SID_HORIZONTAL );
rSet.DisableItem( SID_VERTICAL );
+ rSet.DisableItem( SID_FLIP_HORIZONTAL );
+ rSet.DisableItem( SID_FLIP_VERTICAL );
}
if( !mpDrawView->IsMirrorAllowed() )
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviews8.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviews8.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviews8.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviews8.cxx Tue Apr 23 09:51:15 2013
@@ -118,6 +118,7 @@ void DrawViewShell::FuTemp01(SfxRequest&
}
break;
+ case SID_CHAR_DLG_EFFECT:
case SID_CHAR_DLG: // BASIC
{
SetCurrentFunction( FuChar::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
@@ -131,8 +132,24 @@ void DrawViewShell::FuTemp01(SfxRequest&
Cancel();
}
break;
+ case FN_NUM_BULLET_ON:
+ {
+ // The value (sal_uInt16)0xFFFF means set bullet on/off.
+ SfxUInt16Item aItem(FN_SVX_SET_BULLET, (sal_uInt16)0xFFFF);
+ GetViewFrame()->GetDispatcher()->Execute( FN_SVX_SET_BULLET, SFX_CALLMODE_RECORD, &aItem, 0L );
+ }
+ break;
+ case FN_NUM_NUMBERING_ON:
+ {
+ // The value (sal_uInt16)0xFFFF means set bullet on/off.
+ SfxUInt16Item aItem(FN_SVX_SET_NUMBER, (sal_uInt16)0xFFFF);
+ GetViewFrame()->GetDispatcher()->Execute( FN_SVX_SET_NUMBER, SFX_CALLMODE_RECORD, &aItem, 0L );
+ }
+ break;
case SID_OUTLINE_BULLET:
+ case FN_SVX_SET_BULLET:
+ case FN_SVX_SET_NUMBER:
{
SetCurrentFunction( FuOutlineBullet::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
Cancel();
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviews9.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviews9.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviews9.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviews9.cxx Tue Apr 23 09:51:15 2013
@@ -386,13 +386,13 @@ void DrawViewShell::AttrExec (SfxRequest
if (pEntry->GetName () == pName->GetValue ())
{
- XGradient &rGradient = pEntry->GetGradient ();
+ XGradient aGradient(pEntry->GetGradient());
- if (rReq.GetSlot () == SID_SETGRADSTARTCOLOR) rGradient.SetStartColor (aColor);
- else rGradient.SetEndColor (aColor);
+ if (rReq.GetSlot () == SID_SETGRADSTARTCOLOR) aGradient.SetStartColor (aColor);
+ else aGradient.SetEndColor (aColor);
pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE);
- pAttr->Put (XFillGradientItem (pName->GetValue (), rGradient), XATTR_FILLGRADIENT);
+ pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient), XATTR_FILLGRADIENT);
break;
}
}
@@ -446,12 +446,12 @@ void DrawViewShell::AttrExec (SfxRequest
if (pEntry->GetName () == pName->GetValue ())
{
- XHatch &rHatch = pEntry->GetHatch ();
+ XHatch aHatch(pEntry->GetHatch());
- rHatch.SetColor (aColor);
+ aHatch.SetColor (aColor);
pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE);
- pAttr->Put (XFillHatchItem (pName->GetValue (), rHatch), XATTR_FILLHATCH);
+ pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch), XATTR_FILLHATCH);
break;
}
}
@@ -557,18 +557,18 @@ void DrawViewShell::AttrExec (SfxRequest
if (pEntry->GetName () == pName->GetValue ())
{
- XGradient &rGradient = pEntry->GetGradient ();
+ XGradient aGradient(pEntry->GetGradient());
- rGradient.SetGradientStyle ((XGradientStyle) pStyle->GetValue ());
- rGradient.SetAngle (pAngle->GetValue () * 10);
- rGradient.SetBorder ((short) pBorder->GetValue ());
- rGradient.SetXOffset ((short) pCenterX->GetValue ());
- rGradient.SetYOffset ((short) pCenterY->GetValue ());
- rGradient.SetStartIntens ((short) pStart->GetValue ());
- rGradient.SetEndIntens ((short) pEnd->GetValue ());
+ aGradient.SetGradientStyle ((XGradientStyle) pStyle->GetValue ());
+ aGradient.SetAngle (pAngle->GetValue () * 10);
+ aGradient.SetBorder ((short) pBorder->GetValue ());
+ aGradient.SetXOffset ((short) pCenterX->GetValue ());
+ aGradient.SetYOffset ((short) pCenterY->GetValue ());
+ aGradient.SetStartIntens ((short) pStart->GetValue ());
+ aGradient.SetEndIntens ((short) pEnd->GetValue ());
pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE);
- pAttr->Put (XFillGradientItem (pName->GetValue (), rGradient), XATTR_FILLGRADIENT);
+ pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient), XATTR_FILLGRADIENT);
break;
}
}
@@ -623,14 +623,14 @@ void DrawViewShell::AttrExec (SfxRequest
if (pEntry->GetName () == pName->GetValue ())
{
- XHatch &rHatch = pEntry->GetHatch ();
+ XHatch aHatch(pEntry->GetHatch());
- rHatch.SetHatchStyle ((XHatchStyle) pStyle->GetValue ());
- rHatch.SetDistance (pDistance->GetValue ());
- rHatch.SetAngle (pAngle->GetValue () * 10);
+ aHatch.SetHatchStyle ((XHatchStyle) pStyle->GetValue ());
+ aHatch.SetDistance (pDistance->GetValue ());
+ aHatch.SetAngle (pAngle->GetValue () * 10);
pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE);
- pAttr->Put (XFillHatchItem (pName->GetValue (), rHatch), XATTR_FILLHATCH);
+ pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch), XATTR_FILLHATCH);
break;
}
}
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviewsa.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviewsa.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviewsa.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviewsa.cxx Tue Apr 23 09:51:15 2013
@@ -57,6 +57,7 @@
#include <sfx2/dispatch.hxx>
#include <svtools/cliplistener.hxx>
#include <svx/float3d.hxx>
+#include <svx/sidebar/SelectionAnalyzer.hxx>
#include "helpids.h"
#include "view/viewoverlaymanager.hxx"
@@ -80,9 +81,12 @@
#include "ToolBarManager.hxx"
#include "annotationmanager.hxx"
+#include <boost/bind.hpp>
+
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using sfx2::sidebar::EnumContext;
namespace {
static const ::rtl::OUString MASTER_VIEW_TOOL_BAR_NAME(
@@ -137,13 +141,20 @@ void SAL_CALL ScannerEventListener::disp
DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, ::Window* pParentWindow, PageKind ePageKind, FrameView* pFrameViewArgument )
: ViewShell (pFrame, pParentWindow, rViewShellBase)
, maTabControl(this, pParentWindow)
-, mbIsInSwitchPage(false)
+, mbIsInSwitchPage(false),
+ mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler(
+ ::boost::bind(&DrawViewShell::GetContextForSelection, this),
+ uno::Reference<frame::XController>(&rViewShellBase.GetDrawController()),
+ sfx2::sidebar::EnumContext::Context_Default))
+
{
if (pFrameViewArgument != NULL)
mpFrameView = pFrameViewArgument;
else
mpFrameView = new FrameView(GetDoc());
Construct(GetDocSh(), ePageKind);
+
+ mpSelectionChangeHandler->Connect();
}
/*************************************************************************
@@ -154,6 +165,8 @@ DrawViewShell::DrawViewShell( SfxViewFra
DrawViewShell::~DrawViewShell()
{
+ mpSelectionChangeHandler->Disconnect();
+
mpAnnotationManager.reset();
mpViewOverlayManager.reset();
@@ -853,4 +866,20 @@ void DrawViewShell::GetAnnotationState (
}
+EnumContext::Context DrawViewShell::GetContextForSelection (void) const
+{
+ if (mpDrawView->GetMarkedObjectList().GetMarkCount() == 1)
+ if (mpDrawView->GetTextEditObject() != NULL)
+ if (mpDrawView->GetTextEditOutlinerView() != NULL)
+ return EnumContext::Context_DrawText;
+
+ // All other cases are handled by the SelectionAnalyzer.
+ return ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SD(
+ mpDrawView->GetMarkedObjectList(),
+ meEditMode == EM_MASTERPAGE,
+ mePageKind == PK_HANDOUT,
+ mePageKind == PK_NOTES);
+}
+
+
} // end of namespace sd
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviewsc.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviewsc.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviewsc.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviewsc.cxx Tue Apr 23 09:51:15 2013
@@ -472,14 +472,16 @@ void DrawViewShell::FuTemp03(SfxRequest&
break;
case SID_HORIZONTAL: // BASIC
+ case SID_FLIP_HORIZONTAL:
{
- mpDrawView->MirrorAllMarkedHorizontal();
+ mpDrawView->MirrorAllMarkedHorizontal();
Cancel();
rReq.Done ();
}
break;
case SID_VERTICAL: // BASIC
+ case SID_FLIP_VERTICAL:
{
mpDrawView->MirrorAllMarkedVertical();
Cancel();
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviewse.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviewse.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviewse.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviewse.cxx Tue Apr 23 09:51:15 2013
@@ -29,6 +29,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <comphelper/processfactory.hxx>
@@ -102,6 +103,7 @@
#include "fuformatpaintbrush.hxx"
using ::rtl::OUString;
+using com::sun::star::ui::dialogs::XExecutableDialog;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::presentation;
@@ -1472,6 +1474,34 @@ void DrawViewShell::FuSupport(SfxRequest
}
break;
+ case SID_PRESENTATION_MINIMIZER:
+ {
+ if ( GetDoc()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS &&
+ GetViewShellBase().GetController() != NULL )
+ {
+ try
+ {
+ uno::Reference< uno::XComponentContext > xContext(
+ ::comphelper::getProcessComponentContext() );
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[0] <<= GetViewShellBase().GetController();
+
+ uno::Reference< XExecutableDialog > xDialog(
+ xContext->getServiceManager()->
+ createInstanceWithArgumentsAndContext(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.ui.dialogs.PresentationMinimizerDialog")),
+ aArgs, xContext), uno::UNO_QUERY_THROW );
+ xDialog->execute();
+ }
+ catch (...)
+ {}
+ }
+
+ rReq.Done();
+ }
+ break;
+
default:
break;
}
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviewsf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviewsf.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviewsf.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviewsf.cxx Tue Apr 23 09:51:15 2013
@@ -73,6 +73,16 @@
#include "cfgids.hxx"
#include "anminfo.hxx"
+#include <editeng/lspcitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/escpitem.hxx>
+#include <editeng/numitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <svx/nbdtmgfact.hxx>
+#include <svx/nbdtmg.hxx>
+
+using namespace svx::sidebar;
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -302,17 +312,133 @@ void DrawViewShell::GetAttrState( SfxIte
: nWhich;
switch ( nSlotId )
{
+ case SID_ATTR_PARA_ADJUST_LEFT:
+ {
+ SfxItemSet aAttrs( GetDoc()->GetPool() );
+ mpDrawView->GetAttributes( aAttrs );
+
+ SvxAdjustItem aItem= ( (const SvxAdjustItem&) aAttrs.Get( EE_PARA_JUST ) );
+ SvxAdjust eAdj = aItem.GetAdjust();
+ if ( eAdj == SVX_ADJUST_LEFT)
+ {
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, sal_True ) );
+ }
+
+ bAttr = sal_True;
+
+ Invalidate(nSlotId);
+ }
+ break;
+ case SID_ATTR_PARA_ADJUST_CENTER:
+ {
+ SfxItemSet aAttrs( GetDoc()->GetPool() );
+ mpDrawView->GetAttributes( aAttrs );
+
+ SvxAdjustItem aItem= ( (const SvxAdjustItem&) aAttrs.Get( EE_PARA_JUST ) );
+ SvxAdjust eAdj = aItem.GetAdjust();
+ if ( eAdj == SVX_ADJUST_CENTER)
+ {
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, sal_True ) );
+ }
+
+ bAttr = sal_True;
+
+ Invalidate(nSlotId);
+ }
+ break;
+ case SID_ATTR_PARA_ADJUST_RIGHT:
+ {
+ SfxItemSet aAttrs( GetDoc()->GetPool() );
+ mpDrawView->GetAttributes( aAttrs );
+
+ SvxAdjustItem aItem= ( (const SvxAdjustItem&) aAttrs.Get( EE_PARA_JUST ) );
+ SvxAdjust eAdj = aItem.GetAdjust();
+ if ( eAdj == SVX_ADJUST_RIGHT)
+ {
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, sal_True ) );
+ }
+
+ bAttr = sal_True;
+
+ Invalidate(nSlotId);
+ }
+ break;
+ case SID_ATTR_PARA_ADJUST_BLOCK:
+ {
+ SfxItemSet aAttrs( GetDoc()->GetPool() );
+ mpDrawView->GetAttributes( aAttrs );
+
+ SvxAdjustItem aItem= ( (const SvxAdjustItem&) aAttrs.Get( EE_PARA_JUST ) );
+ SvxAdjust eAdj = aItem.GetAdjust();
+ if ( eAdj == SVX_ADJUST_BLOCK)
+ {
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, sal_True ) );
+ }
+
+ bAttr = sal_True;
+
+ Invalidate(nSlotId);
+ }
+ break;
+ case SID_ATTR_PARA_LRSPACE:
+ {
+ SfxItemSet aAttrs( GetDoc()->GetPool() );
+ mpDrawView->GetAttributes( aAttrs );
+ SvxLRSpaceItem aLRSpace = ( (const SvxLRSpaceItem&) aAttrs.Get( EE_PARA_LRSPACE ) );
+ aLRSpace.SetWhich(SID_ATTR_PARA_LRSPACE);
+ rSet.Put(aLRSpace);
+ bAttr = sal_True;
+ Invalidate(SID_ATTR_PARA_LRSPACE);
+ }
+ break;
+ case SID_ATTR_PARA_LINESPACE:
+ {
+ SfxItemSet aAttrs( GetDoc()->GetPool() );
+ mpDrawView->GetAttributes( aAttrs );
+ SvxLineSpacingItem aLineLR = ( (const SvxLineSpacingItem&) aAttrs.Get( EE_PARA_SBL ) );
+ rSet.Put(aLineLR);
+ bAttr = sal_True;
+ Invalidate(SID_ATTR_PARA_LINESPACE);
+ }
+ break;
+ case SID_ATTR_PARA_ULSPACE:
+ {
+ SfxItemSet aAttrs( GetDoc()->GetPool() );
+ mpDrawView->GetAttributes( aAttrs );
+ SvxULSpaceItem aULSP = ( (const SvxULSpaceItem&) aAttrs.Get( EE_PARA_ULSPACE ) );
+ aULSP.SetWhich(SID_ATTR_PARA_ULSPACE);
+ rSet.Put(aULSP);
+ bAttr = sal_True;
+ Invalidate(SID_ATTR_PARA_ULSPACE);
+ }
+ break;
case SID_ATTR_FILL_STYLE:
case SID_ATTR_FILL_COLOR:
case SID_ATTR_FILL_GRADIENT:
case SID_ATTR_FILL_HATCH:
case SID_ATTR_FILL_BITMAP:
case SID_ATTR_FILL_SHADOW:
+ case SID_ATTR_FILL_TRANSPARENCE:
+ case SID_ATTR_FILL_FLOATTRANSPARENCE:
case SID_ATTR_LINE_STYLE:
case SID_ATTR_LINE_DASH:
case SID_ATTR_LINE_WIDTH:
case SID_ATTR_LINE_COLOR:
+ case SID_ATTR_LINE_TRANSPARENCE:
+ case SID_ATTR_LINE_JOINT:
+ case SID_ATTR_LINE_CAP:
case SID_ATTR_TEXT_FITTOSIZE:
+ case SID_ATTR_CHAR_FONT:
+ case SID_ATTR_CHAR_FONTHEIGHT:
+ case SID_ATTR_CHAR_SHADOWED:
+ case SID_ATTR_CHAR_POSTURE:
+ case SID_ATTR_CHAR_UNDERLINE:
+ case SID_ATTR_CHAR_STRIKEOUT:
+ case SID_ATTR_CHAR_WEIGHT:
+ case SID_ATTR_CHAR_COLOR:
+ case SID_ATTR_CHAR_KERNING:
+ case SID_SET_SUB_SCRIPT:
+ case SID_SET_SUPER_SCRIPT:
{
bAttr = sal_True;
}
@@ -454,6 +580,118 @@ void DrawViewShell::GetAttrState( SfxIte
}
}
break;
+ case FN_BUL_NUM_RULE_INDEX:
+ case FN_NUM_NUM_RULE_INDEX:
+ {
+ SfxItemSet aEditAttr( GetDoc()->GetPool() );
+ mpDrawView->GetAttributes( aEditAttr );
+
+ SfxItemSet aNewAttr( GetPool(), EE_ITEMS_START, EE_ITEMS_END );
+ aNewAttr.Put( aEditAttr, sal_False );
+
+
+ sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF;
+ SvxNumRule* pNumRule = NULL;
+ const SfxPoolItem* pTmpItem=NULL;
+ sal_uInt16 nNumItemId = SID_ATTR_NUMBERING_RULE;
+
+ //if(SFX_ITEM_SET == aNewAttr.GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pTmpItem))
+ // nActNumLvl = ((const SfxUInt16Item*)pTmpItem)->GetValue();
+ rSet.Put(SfxUInt16Item(FN_NUM_NUM_RULE_INDEX,DEFAULT_NONE));
+ rSet.Put(SfxUInt16Item(FN_BUL_NUM_RULE_INDEX,DEFAULT_NONE));
+ nActNumLvl = mpDrawView->GetSelectionLevel();
+ pTmpItem=GetNumBulletItem(aNewAttr, nNumItemId);
+
+ if (pTmpItem)
+ pNumRule = new SvxNumRule(*((SvxNumBulletItem*)pTmpItem)->GetNumRule());
+
+ if ( pNumRule )
+ {
+ sal_uInt16 nMask = 1;
+ sal_uInt16 nCount = 0;
+ sal_uInt16 nCurLevel = (sal_uInt16)0xFFFF;
+ for(sal_uInt16 i = 0; i < pNumRule->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ nCount++;
+ nCurLevel = i;
+ }
+ nMask <<= 1;
+ }
+ if ( nCount == 1 )
+ {
+ sal_Bool bBullets = sal_False;
+ const SvxNumberFormat* pNumFmt = pNumRule->Get(nCurLevel);
+ if ( pNumFmt )
+ {
+ switch(pNumFmt->GetNumberingType())
+ {
+ case SVX_NUM_CHAR_SPECIAL:
+ case SVX_NUM_BITMAP:
+ bBullets = sal_True;
+ break;
+
+ default:
+ bBullets = sal_False;
+ }
+
+ rSet.Put(SfxUInt16Item(FN_BUL_NUM_RULE_INDEX,(sal_uInt16)0xFFFF));
+ rSet.Put(SfxUInt16Item(FN_NUM_NUM_RULE_INDEX,(sal_uInt16)0xFFFF));
+ if ( bBullets )
+ {
+ NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
+ if ( pBullets )
+ {
+ sal_uInt16 nBulIndex = pBullets->GetNBOIndexForNumRule(*pNumRule,nActNumLvl);
+ rSet.Put(SfxUInt16Item(FN_BUL_NUM_RULE_INDEX,nBulIndex));
+ }
+ }else
+ {
+ NBOTypeMgrBase* pNumbering = NBOutlineTypeMgrFact::CreateInstance(eNBOType::NUMBERING);
+ if ( pNumbering )
+ {
+ sal_uInt16 nBulIndex = pNumbering->GetNBOIndexForNumRule(*pNumRule,nActNumLvl);
+ rSet.Put(SfxUInt16Item(FN_NUM_NUM_RULE_INDEX,nBulIndex));
+ }
+ }
+ }
+ }
+ }
+ }
+ break;
+ //End
+ // Added by Li Hui for story 179.
+ case FN_NUM_BULLET_ON:
+ case FN_NUM_NUMBERING_ON:
+ {
+ sal_Bool bEnable = sal_False;
+ const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
+ const sal_uInt32 nMarkCount = rMarkList.GetMarkCount();
+ for (sal_uInt32 nIndex = 0; nIndex < nMarkCount; nIndex++)
+ {
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(rMarkList.GetMark(nIndex)->GetMarkedSdrObj());
+ if (pTextObj && pTextObj->GetObjInventor() == SdrInventor)
+ {
+ if (pTextObj->GetObjIdentifier() != OBJ_OLE2)
+ {
+ bEnable = sal_True;
+ break;
+ }
+ }
+ }
+ if (bEnable)
+ {
+ rSet.Put(SfxBoolItem(FN_NUM_BULLET_ON, sal_False));
+ rSet.Put(SfxBoolItem(FN_NUM_NUMBERING_ON, sal_False));
+ }
+ else
+ {
+ rSet.DisableItem(FN_NUM_BULLET_ON);
+ rSet.DisableItem(FN_NUM_NUMBERING_ON);
+ }
+ }
+ break;
}
nWhich = aIter.NextWhich();
}
@@ -488,25 +726,45 @@ void DrawViewShell::GetAttrState( SfxIte
nWhich = aNewIter.NextWhich();
}
}
+
+ SfxItemState eState = pSet->GetItemState( EE_PARA_LRSPACE );
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ rSet.InvalidateItem(EE_PARA_LRSPACE);
+ rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
+ }
+ eState = pSet->GetItemState( EE_PARA_SBL );
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ rSet.InvalidateItem(EE_PARA_SBL);
+ rSet.InvalidateItem(SID_ATTR_PARA_LINESPACE);
+ }
+ eState = pSet->GetItemState( EE_PARA_ULSPACE );
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ rSet.InvalidateItem(EE_PARA_ULSPACE);
+ rSet.InvalidateItem(SID_ATTR_PARA_ULSPACE);
+ }
+
+ SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+ pSet->Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+ if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
+ {
+ rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, sal_True ) );
+ }
+ else if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
+ {
+ rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, sal_True ) );
+ }
+
+ eState = pSet->GetItemState( EE_CHAR_KERNING, sal_True );
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ rSet.InvalidateItem(EE_CHAR_KERNING);
+ rSet.InvalidateItem(SID_ATTR_CHAR_KERNING);
+ }
delete pSet;
}
-
-// const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
-// sal_uLong nMarkCount = rMarkList.GetMarkCount();
-// sal_Bool bDisabled = sal_False;
-//
-// for (sal_uLong i = 0;
-// i < nMarkCount && !bDisabled && i < 50; i++)
-// {
-// SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
-//
-// if (pObj->GetObjInventor() == E3dInventor)
-// {
-// bDisabled = sal_True;
-// rSet.ClearItem(SDRATTR_SHADOW);
-// rSet.DisableItem(SDRATTR_SHADOW);
-// }
-// }
}
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drviewsj.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drviewsj.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drviewsj.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drviewsj.cxx Tue Apr 23 09:51:15 2013
@@ -91,6 +91,8 @@ void DrawViewShell::GetMenuStateSel( Sfx
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_TITLE_DESCRIPTION ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_STYLE ) ||
+ SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_TRANSPARENCE ) ||
+ SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_FLOATTRANSPARENCE ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CHANGEBEZIER ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CHANGEPOLYGON ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_LINEEND_POLYGON ) ||
@@ -189,6 +191,8 @@ void DrawViewShell::GetMenuStateSel( Sfx
{
//rSet.DisableItem( SID_ATTRIBUTES_AREA ); // wieder raus!
rSet.DisableItem( SID_ATTR_FILL_STYLE );
+ rSet.DisableItem( SID_ATTR_FILL_TRANSPARENCE );
+ rSet.DisableItem( SID_ATTR_FILL_FLOATTRANSPARENCE );
}
if( (!pObj->ISA( SdrPathObj ) && !aInfoRec.bCanConvToPath) || pObj->ISA( SdrObjGroup ) ) // Solange es JOE fehlerhaft behandelt!
{ // JOE: Ein Gruppenobjekt kann eben u.U. in ein PathObj gewandelt werden
@@ -411,6 +415,8 @@ void DrawViewShell::GetMenuStateSel( Sfx
{
//rSet.DisableItem( SID_ATTRIBUTES_AREA );
rSet.DisableItem( SID_ATTR_FILL_STYLE );
+ rSet.DisableItem( SID_ATTR_FILL_TRANSPARENCE );
+ rSet.DisableItem( SID_ATTR_FILL_FLOATTRANSPARENCE );
}
if( !bEdgeObj )
rSet.DisableItem( SID_CONNECTION_DLG );
@@ -532,6 +538,8 @@ void DrawViewShell::GetMenuStateSel( Sfx
rSet.DisableItem( SID_COPYOBJECTS );
rSet.DisableItem( SID_HORIZONTAL );
rSet.DisableItem( SID_VERTICAL );
+ rSet.DisableItem( SID_FLIP_HORIZONTAL );
+ rSet.DisableItem( SID_FLIP_VERTICAL );
rSet.DisableItem( SID_GROUP );
rSet.DisableItem( SID_UNGROUP );
rSet.DisableItem( SID_NAME_GROUP );
Modified: openoffice/branches/ia2/main/sd/source/ui/view/drvwshrg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/drvwshrg.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/drvwshrg.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/drvwshrg.cxx Tue Apr 23 09:51:15 2013
@@ -31,8 +31,9 @@
#include <svx/bmpmask.hxx>
#include <svx/galbrws.hxx>
#include <svx/imapdlg.hxx>
-#include <svx/colrctrl.hxx>
+#include <svx/SvxColorChildWindow.hxx>
#include <sfx2/objface.hxx>
+#include <sfx2/sidebar/SidebarChildWindow.hxx>
#include <svx/f3dchild.hxx>
#include <svx/tbxcustomshapes.hxx>
@@ -89,6 +90,7 @@ SFX_IMPL_INTERFACE(DrawViewShell, SfxShe
SFX_CHILDWINDOW_REGISTRATION( ::sd::SpellDialogChildWindow::GetChildWindowId() );
SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG );
SFX_CHILDWINDOW_REGISTRATION( ::avmedia::MediaPlayer::GetChildWindowId() );
+ SFX_CHILDWINDOW_REGISTRATION(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
}
@@ -115,6 +117,7 @@ SFX_IMPL_INTERFACE(GraphicViewShell, Sfx
SFX_CHILDWINDOW_REGISTRATION( ::sd::SpellDialogChildWindow::GetChildWindowId() );
SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG );
SFX_CHILDWINDOW_REGISTRATION( ::avmedia::MediaPlayer::GetChildWindowId() );
+ SFX_CHILDWINDOW_REGISTRATION(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
}
TYPEINIT1( GraphicViewShell, DrawViewShell );
Modified: openoffice/branches/ia2/main/sd/source/ui/view/outlnvs2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/outlnvs2.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/outlnvs2.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/outlnvs2.cxx Tue Apr 23 09:51:15 2013
@@ -330,12 +330,16 @@ void OutlineViewShell::FuTemporary(SfxRe
void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
{
- OutlineViewModelChangeGuard aGuard( *pOlView );
-
+ sal_uInt16 nSId = rReq.GetSlot();
+ std::auto_ptr< OutlineViewModelChangeGuard > aGuard;
+ if (nSId != SID_OUTLINE_BULLET && nSId != FN_SVX_SET_BULLET && nSId != FN_SVX_SET_NUMBER)
+ {
+ aGuard.reset( new OutlineViewModelChangeGuard(*pOlView) );
+ }
DeactivateCurrentFunction();
OutlinerView* pOutlinerView = pOlView->GetViewByWindow( GetActiveWindow() );
- sal_uInt16 nSId = rReq.GetSlot();
+ //sal_uInt16 nSId = rReq.GetSlot();
switch( nSId )
{
@@ -380,6 +384,8 @@ void OutlineViewShell::FuTemporaryModify
break;
case SID_OUTLINE_BULLET:
+ case FN_SVX_SET_BULLET:
+ case FN_SVX_SET_NUMBER:
{
SetCurrentFunction( FuOutlineBullet::Create( this, GetActiveWindow(), pOlView, GetDoc(), rReq ) );
Cancel();
@@ -394,6 +400,7 @@ void OutlineViewShell::FuTemporaryModify
}
break;
+ case SID_CHAR_DLG_EFFECT:
case SID_CHAR_DLG:
{
SetCurrentFunction( FuChar::Create( this, GetActiveWindow(), pOlView, GetDoc(), rReq ) );
Modified: openoffice/branches/ia2/main/sd/source/ui/view/outlnvsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/sd/source/ui/view/outlnvsh.cxx?rev=1470868&r1=1470867&r2=1470868&view=diff
==============================================================================
--- openoffice/branches/ia2/main/sd/source/ui/view/outlnvsh.cxx (original)
+++ openoffice/branches/ia2/main/sd/source/ui/view/outlnvsh.cxx Tue Apr 23 09:51:15 2013
@@ -52,6 +52,8 @@
#include <editeng/editstat.hxx>
#include <svl/itempool.hxx>
#include <sfx2/tplpitem.hxx>
+#include <sfx2/sidebar/SidebarChildWindow.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <svx/svdorect.hxx>
#include <sot/formats.hxx>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
@@ -128,6 +130,7 @@ SFX_IMPL_INTERFACE(OutlineViewShell, Sfx
SFX_CHILDWINDOW_REGISTRATION( SvxHlinkDlgWrapper::GetChildWindowId() );
SFX_CHILDWINDOW_REGISTRATION( ::sd::SpellDialogChildWindow::GetChildWindowId() );
SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG );
+ SFX_CHILDWINDOW_REGISTRATION(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
}
@@ -230,6 +233,8 @@ OutlineViewShell::OutlineViewShell (
mpFrameView->Connect();
Construct(GetDocSh());
+
+ SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_OutlineText));
}
/*************************************************************************