summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/inc/orienthelper.hxx19
-rw-r--r--svx/source/dialog/align.cxx4
-rw-r--r--svx/source/dialog/orienthelper.cxx64
-rw-r--r--xmloff/inc/xmloff/xmlprmap.hxx3
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx8
-rw-r--r--xmloff/source/style/xmlprmap.cxx11
6 files changed, 65 insertions, 44 deletions
diff --git a/svx/inc/orienthelper.hxx b/svx/inc/orienthelper.hxx
index 1deaa906837d..3bbbaac77e9a 100644
--- a/svx/inc/orienthelper.hxx
+++ b/svx/inc/orienthelper.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: orienthelper.hxx,v $
- * $Revision: 1.5 $
+ * $Revision: 1.5.274.1 $
*
* This file is part of OpenOffice.org.
*
@@ -63,26 +63,21 @@ struct OrientationHelper_Impl;
direct modifications of the "Stacked text" check box. Otherwise the update
mechanism of registered controls will not work.
*/
-class SVX_DLLPUBLIC OrientationHelper : public Window
+class SVX_DLLPUBLIC OrientationHelper
{
public:
explicit OrientationHelper(
- Window* pParent,
DialControl& rCtrlDial,
CheckBox& rCbStacked );
/** @param rNfRotation A numeric field that will be connected to the DialControl. */
explicit OrientationHelper(
- Window* pParent,
DialControl& rCtrlDial,
NumericField& rNfRotation,
CheckBox& rCbStacked );
virtual ~OrientationHelper();
- /** Handles Enable/Show events for all registered windows. */
- virtual void StateChanged( StateChangedType nStateChange );
-
/** Registers the passed window to be enabled/disabled on call of Enable().
@param eDisableIfStacked
STATE_CHECK: Window always disabled, if stacked text is turned on.
@@ -90,6 +85,16 @@ public:
STATE_DONTKNOW: Window will be enabled/disabled independent from stacked text. */
void AddDependentWindow( Window& rWindow, TriState eDisableIfStacked = STATE_DONTKNOW );
+ /** Enables or disables the dial control and all dependent windows. */
+ void Enable( bool bEnable = true );
+ /** Disables the dial control and all dependent windows. */
+ inline void Disable() { Enable( false ); }
+
+ /** Shows or hides the dial control and all dependent windows. */
+ void Show( bool bShow = true );
+ /** Hides the dial control and all dependent windows. */
+ inline void Hide() { Show( false ); }
+
/** Sets the "stacked" check box to the passed state and updates dependent controls. */
void SetStackedState( TriState eState );
/** Returns the state of the "stacked" check box. */
diff --git a/svx/source/dialog/align.cxx b/svx/source/dialog/align.cxx
index 4797fb384c4b..e6e65efc31f2 100644
--- a/svx/source/dialog/align.cxx
+++ b/svx/source/dialog/align.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: align.cxx,v $
- * $Revision: 1.26 $
+ * $Revision: 1.26.272.1 $
*
* This file is part of OpenOffice.org.
*
@@ -145,7 +145,7 @@ AlignmentTabPage::AlignmentTabPage( Window* pParent, const SfxItemSet& rCoreAttr
maVsRefEdge ( this, SVX_RES( CTR_BORDER_LOCK ) ),
maCbStacked ( this, SVX_RES( BTN_TXTSTACKED ) ),
maCbAsianMode ( this, SVX_RES( BTN_ASIAN_VERTICAL ) ),
- maOrientHlp ( this, maCtrlDial, maNfRotate, maCbStacked ),
+ maOrientHlp ( maCtrlDial, maNfRotate, maCbStacked ),
maFlProperties ( this, SVX_RES( FL_WRAP ) ),
maBtnWrap ( this, SVX_RES( BTN_WRAP ) ),
diff --git a/svx/source/dialog/orienthelper.cxx b/svx/source/dialog/orienthelper.cxx
index d55bf0307e38..d61923324651 100644
--- a/svx/source/dialog/orienthelper.cxx
+++ b/svx/source/dialog/orienthelper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: orienthelper.cxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.274.1 $
*
* This file is part of OpenOffice.org.
*
@@ -49,15 +49,13 @@ struct OrientationHelper_Impl
typedef std::pair< Window*, TriState > WindowPair;
typedef std::vector< WindowPair > WindowVec;
- OrientationHelper& mrParent;
- WindowVec maWinVec;
- svx::DialControl& mrCtrlDial;
+ DialControl& mrCtrlDial;
CheckBox& mrCbStacked;
+ WindowVec maWinVec;
+ bool mbEnabled;
+ bool mbVisible;
- explicit OrientationHelper_Impl(
- OrientationHelper& rParent,
- svx::DialControl& rCtrlDial,
- CheckBox& rCbStacked );
+ explicit OrientationHelper_Impl( DialControl& rCtrlDial, CheckBox& rCbStacked );
void AddDependentWindow( Window& rWindow, TriState eDisableIfStacked );
@@ -71,11 +69,11 @@ struct OrientationHelper_Impl
// ----------------------------------------------------------------------------
-OrientationHelper_Impl::OrientationHelper_Impl(
- OrientationHelper& rParent, svx::DialControl& rCtrlDial, CheckBox& rCbStacked ) :
- mrParent( rParent ),
+OrientationHelper_Impl::OrientationHelper_Impl( DialControl& rCtrlDial, CheckBox& rCbStacked ) :
mrCtrlDial( rCtrlDial ),
- mrCbStacked( rCbStacked )
+ mrCbStacked( rCbStacked ),
+ mbEnabled( rCtrlDial.IsEnabled() ),
+ mbVisible( rCtrlDial.IsVisible() )
{
maWinVec.push_back( WindowPair( &mrCtrlDial, STATE_CHECK ) );
maWinVec.push_back( WindowPair( &mrCbStacked, STATE_DONTKNOW ) );
@@ -96,7 +94,6 @@ void OrientationHelper_Impl::EnableDependentWindows()
void OrientationHelper_Impl::EnableWindow( Window& rWindow, TriState eDisableIfStacked )
{
- bool bEnabled = mrParent.IsEnabled();
bool bDisableOnStacked = false;
switch( eDisableIfStacked )
{
@@ -106,14 +103,13 @@ void OrientationHelper_Impl::EnableWindow( Window& rWindow, TriState eDisableIfS
case STATE_NOCHECK: bDisableOnStacked = (mrCbStacked.GetState() != STATE_CHECK); break;
default: ;//prevent warning
}
- rWindow.Enable( bEnabled && !bDisableOnStacked );
+ rWindow.Enable( mbEnabled && !bDisableOnStacked );
}
void OrientationHelper_Impl::ShowDependentWindows()
{
- bool bVisible = mrParent.IsVisible();
for( WindowVec::iterator aIt = maWinVec.begin(), aEnd = maWinVec.end(); aIt != aEnd; ++aIt )
- aIt->first->Show( bVisible );
+ aIt->first->Show( mbVisible );
}
IMPL_LINK( OrientationHelper_Impl, ClickHdl, void*, EMPTYARG )
@@ -124,40 +120,40 @@ IMPL_LINK( OrientationHelper_Impl, ClickHdl, void*, EMPTYARG )
// ============================================================================
-OrientationHelper::OrientationHelper(
- Window* pParent, svx::DialControl& rCtrlDial, CheckBox& rCbStacked ) :
- Window( pParent ),
- mpImpl( new OrientationHelper_Impl( *this, rCtrlDial, rCbStacked ) )
+OrientationHelper::OrientationHelper( DialControl& rCtrlDial, CheckBox& rCbStacked ) :
+ mpImpl( new OrientationHelper_Impl( rCtrlDial, rCbStacked ) )
{
mpImpl->EnableDependentWindows();
+ mpImpl->ShowDependentWindows();
}
-OrientationHelper::OrientationHelper(
- Window* pParent,
- svx::DialControl& rCtrlDial, NumericField& rNfRotation, CheckBox& rCbStacked ) :
- Window( pParent ),
- mpImpl( new OrientationHelper_Impl( *this, rCtrlDial, rCbStacked ) )
+OrientationHelper::OrientationHelper( DialControl& rCtrlDial, NumericField& rNfRotation, CheckBox& rCbStacked ) :
+ mpImpl( new OrientationHelper_Impl( rCtrlDial, rCbStacked ) )
{
- mpImpl->mrCtrlDial.SetLinkedField( &rNfRotation );
+ rCtrlDial.SetLinkedField( &rNfRotation );
mpImpl->EnableDependentWindows();
+ mpImpl->ShowDependentWindows();
}
OrientationHelper::~OrientationHelper()
{
}
-void OrientationHelper::StateChanged( StateChangedType nStateChange )
+void OrientationHelper::AddDependentWindow( Window& rWindow, TriState eDisableIfStacked )
{
- if( nStateChange == STATE_CHANGE_ENABLE )
- mpImpl->EnableDependentWindows();
- if( nStateChange == STATE_CHANGE_VISIBLE )
- mpImpl->ShowDependentWindows();
- Window::StateChanged( nStateChange );
+ mpImpl->AddDependentWindow( rWindow, eDisableIfStacked );
}
-void OrientationHelper::AddDependentWindow( Window& rWindow, TriState eDisableIfStacked )
+void OrientationHelper::Enable( bool bEnable )
{
- mpImpl->AddDependentWindow( rWindow, eDisableIfStacked );
+ mpImpl->mbEnabled = bEnable;
+ mpImpl->EnableDependentWindows();
+}
+
+void OrientationHelper::Show( bool bShow )
+{
+ mpImpl->mbVisible = bShow;
+ mpImpl->ShowDependentWindows();
}
void OrientationHelper::SetStackedState( TriState eState )
diff --git a/xmloff/inc/xmloff/xmlprmap.hxx b/xmloff/inc/xmloff/xmlprmap.hxx
index 19f77be19732..5fba2b33e05f 100644
--- a/xmloff/inc/xmloff/xmlprmap.hxx
+++ b/xmloff/inc/xmloff/xmlprmap.hxx
@@ -184,6 +184,9 @@ public:
/** searches for an entry that matches the given ContextId or gives -1 if nothing found */
sal_Int32 FindEntryIndex( const sal_Int16 nContextId ) const;
+
+ /** Remove an entry */
+ void RemoveEntry( sal_Int32 nIndex );
};
#endif // _XMLOFF_PROPERTYSETMAPPER_HXX
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 99a392ef4949..9ec7e327d076 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: PropertyMaps.cxx,v $
- * $Revision: 1.56 $
+ * $Revision: 1.56.40.1 $
*
* This file is part of OpenOffice.org.
*
@@ -465,6 +465,12 @@ XMLChartImportPropertyMapper::XMLChartImportPropertyMapper( const UniReference<
uno::Reference< frame::XModel > xEmptyModel;
ChainImportMapper( XMLShapeImportHelper::CreateShapePropMapper( xEmptyModel, mrImport ));
+ //#i14365# save and load writing-mode for chart elements
+ //The property TextWritingMode is mapped wrongly in the underlying draw mapper, but for draw it is necessary
+ //We remove that property here only for chart thus the chart can use the correct mapping from the writer paragraph settings (attribute 'writing-mode' <-> property 'WritingMode')
+ sal_Int32 nUnwantedWrongEntry = maPropMapper->FindEntryIndex( "TextWritingMode", XML_NAMESPACE_STYLE, GetXMLToken(XML_WRITING_MODE) );
+ maPropMapper->RemoveEntry(nUnwantedWrongEntry);
+
// do not chain text properties: on import this is done by shape mapper
// to import old documents
// ChainImportMapper( XMLTextImportHelper::CreateParaExtPropMapper());
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index 7178a641a9f2..4cc091911c06 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -242,3 +242,14 @@ sal_Int32 XMLPropertySetMapper::FindEntryIndex( const sal_Int16 nContextId ) con
return -1;
}
+
+void XMLPropertySetMapper::RemoveEntry( sal_Int32 nIndex )
+{
+ const sal_Int32 nEntries = GetEntryCount();
+ if( nIndex>=nEntries || nIndex<0 )
+ return;
+ vector < XMLPropertySetMapperEntry_Impl >::iterator aEIter = aMapEntries.begin();
+ for( sal_Int32 nN=0; nN<nIndex; nN++ )
+ aEIter++;
+ aMapEntries.erase( aEIter );
+}