include/svx/svdotext.hxx        |   12 ++--
 svx/source/table/tablemodel.cxx |  105 ++++++++++++++++++----------------------
 2 files changed, 55 insertions(+), 62 deletions(-)

New commits:
commit 7f8c7b96cc7f9752122a615524000665583ebb52
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Wed Aug 31 22:57:16 2022 +0200
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Sep 6 21:35:05 2022 +0200

    svx: fix description of SdrTextObj
    
    bTextFrame is now mbTextFrame and the type is changed to bool,
    so no more sal_True and sal_False.
    
    Change-Id: I55572df1b717444bdcc9ae875856bc9f9bb2674f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139530
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <[email protected]>

diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 2df27cb77b5c..edb061ca0802 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -131,7 +131,7 @@ private:
     friend class TextChainFlow;
     friend class EditingTextChainFlow;
 
-    // CustomShapeproperties need to access the "bTextFrame" member:
+    // CustomShapeproperties need to access the "mbTextFrame" member:
     friend class sdr::properties::CustomShapeProperties;
 
 protected:
@@ -163,8 +163,8 @@ private:
 
 protected:
     // The "aRect" is also the rect of RectObj and CircObj.
-    // When bTextFrame=sal_True the text will be formatted into this rect
-    // When bTextFrame=sal_False the text will be centered around its middle
+    // When mbTextFrame=true the text will be formatted into this rect
+    // When mbTextFrame=false the text will be centered around its middle
     tools::Rectangle maRect;
 
     // The GeoStat contains the rotation and shear angles
@@ -185,7 +185,7 @@ protected:
     //     SdrObjKind::Text         regular text frame
     //     SdrObjKind::TitleText    TitleText for presentations
     //     SdrObjKind::OutlineText  OutlineText for presentations
-    // eTextKind only has meaning when bTextFrame=sal_True, since otherwise
+    // eTextKind only has meaning when mbTextFrame=true, since otherwise
     // we're dealing with a labeled graphical object
     SdrObjKind meTextKind;
 
@@ -211,9 +211,9 @@ protected:
 
     // For labeled graphical objects bTextFrame is FALSE. The block of text
     // will then be centered horizontally and vertically on aRect.
-    // For bTextFalse=sal_True the text will be formatted into aRect.
+    // For mbTextFrame=true the text will be formatted into aRect.
     // The actual text frame is realized by an SdrRectObj with
-    // bTextFrame=sal_True.
+    // mbTextFrame=true.
     bool mbTextFrame : 1;
     bool mbNoShear : 1; // disable shearing (->graphic+Ole+TextFrame)
     bool mbTextSizeDirty : 1;
commit e71b7c917eab6357350f86e05936d25d4192f42e
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Wed Aug 31 22:51:34 2022 +0200
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Sep 6 21:34:54 2022 +0200

    svx: remove "using namespace *" in tablemodel.cxx
    
    UNO types are clearer when written from com::sun::star as root
    namespace.
    
    Change-Id: I9e063a904ecbdf471c9ca295a2f0c5bd727b9711
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139529
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <[email protected]>

diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx
index 86a5e76a5ec8..0e0cb45179c7 100644
--- a/svx/source/table/tablemodel.cxx
+++ b/svx/source/table/tablemodel.cxx
@@ -44,14 +44,7 @@
 #include <svx/strings.hrc>
 #include <svx/dialmgr.hxx>
 
-using namespace ::osl;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::table;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::util;
-
+using namespace css;
 
 namespace sdr::table {
 
@@ -199,7 +192,7 @@ sal_Int32 TableModel::getBottom()
 }
 
 
-Reference< XTable > TableModel::getTable()
+uno::Reference<css::table::XTable> TableModel::getTable()
 {
     return this;
 }
@@ -278,20 +271,20 @@ void TableModel::UndoRemoveColumns( sal_Int32 nIndex, 
ColumnVector& aCols, CellV
 // XTable
 
 
-Reference< XCellCursor > SAL_CALL TableModel::createCursor()
+uno::Reference<css::table::XCellCursor> SAL_CALL TableModel::createCursor()
 {
     ::SolarMutexGuard aGuard;
-    return createCursorByRange( Reference< XCellRange >( this ) );
+    return createCursorByRange( uno::Reference< XCellRange >( this ) );
 }
 
 
-Reference< XCellCursor > SAL_CALL TableModel::createCursorByRange( const 
Reference< XCellRange >& rRange )
+uno::Reference<css::table::XCellCursor> SAL_CALL 
TableModel::createCursorByRange( const uno::Reference< XCellRange >& rRange )
 {
     ::SolarMutexGuard aGuard;
 
     ICellRange* pRange = dynamic_cast< ICellRange* >( rRange.get() );
     if( (pRange == nullptr) || (pRange->getTable().get() != this) )
-        throw IllegalArgumentException();
+        throw lang::IllegalArgumentException();
 
     TableModelRef xModel( this );
     return new CellCursor( xModel, pRange->getLeft(), pRange->getTop(), 
pRange->getRight(), pRange->getBottom() );
@@ -352,22 +345,22 @@ void SAL_CALL TableModel::setModified( sal_Bool bModified 
)
 // XModifyBroadcaster
 
 
-void SAL_CALL TableModel::addModifyListener( const Reference< XModifyListener 
>& xListener )
+void SAL_CALL TableModel::addModifyListener( const 
uno::Reference<util::XModifyListener>& xListener )
 {
-    rBHelper.addListener( cppu::UnoType<XModifyListener>::get() , xListener );
+    rBHelper.addListener( cppu::UnoType<util::XModifyListener>::get() , 
xListener );
 }
 
 
-void SAL_CALL TableModel::removeModifyListener( const Reference< 
XModifyListener >& xListener )
+void SAL_CALL TableModel::removeModifyListener( const 
uno::Reference<util::XModifyListener>& xListener )
 {
-    rBHelper.removeListener( cppu::UnoType<XModifyListener>::get() , xListener 
);
+    rBHelper.removeListener( cppu::UnoType<util::XModifyListener>::get() , 
xListener );
 }
 
 
 // XColumnRowRange
 
 
-Reference< XTableColumns > SAL_CALL TableModel::getColumns()
+uno::Reference<css::table::XTableColumns> SAL_CALL TableModel::getColumns()
 {
     ::SolarMutexGuard aGuard;
 
@@ -377,7 +370,7 @@ Reference< XTableColumns > SAL_CALL TableModel::getColumns()
 }
 
 
-Reference< XTableRows > SAL_CALL TableModel::getRows()
+uno::Reference<css::table::XTableRows> SAL_CALL TableModel::getRows()
 {
     ::SolarMutexGuard aGuard;
 
@@ -390,7 +383,7 @@ Reference< XTableRows > SAL_CALL TableModel::getRows()
 // XCellRange
 
 
-Reference< XCell > SAL_CALL TableModel::getCellByPosition( sal_Int32 nColumn, 
sal_Int32 nRow )
+uno::Reference<css::table::XCell> SAL_CALL TableModel::getCellByPosition( 
sal_Int32 nColumn, sal_Int32 nRow )
 {
     ::SolarMutexGuard aGuard;
 
@@ -398,11 +391,11 @@ Reference< XCell > SAL_CALL 
TableModel::getCellByPosition( sal_Int32 nColumn, sa
     if( xCell.is() )
         return xCell;
 
-    throw IndexOutOfBoundsException();
+    throw lang::IndexOutOfBoundsException();
 }
 
 
-Reference< XCellRange > SAL_CALL TableModel::getCellRangeByPosition( sal_Int32 
nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom )
+uno::Reference<css::table::XCellRange> SAL_CALL 
TableModel::getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 
nRight, sal_Int32 nBottom )
 {
     ::SolarMutexGuard aGuard;
 
@@ -412,53 +405,53 @@ Reference< XCellRange > SAL_CALL 
TableModel::getCellRangeByPosition( sal_Int32 n
         return new CellRange( xModel, nLeft, nTop, nRight, nBottom );
     }
 
-    throw IndexOutOfBoundsException();
+    throw lang::IndexOutOfBoundsException();
 }
 
 
-Reference< XCellRange > SAL_CALL TableModel::getCellRangeByName( const 
OUString& /*aRange*/ )
+uno::Reference<css::table::XCellRange> SAL_CALL 
TableModel::getCellRangeByName( const OUString& /*aRange*/ )
 {
-    return Reference< XCellRange >();
+    return uno::Reference< XCellRange >();
 }
 
 
 // XPropertySet
 
 
-Reference< XPropertySetInfo > SAL_CALL TableModel::getPropertySetInfo(  )
+uno::Reference<beans::XPropertySetInfo> SAL_CALL 
TableModel::getPropertySetInfo(  )
 {
-    Reference< XPropertySetInfo > xInfo;
+    uno::Reference<beans::XPropertySetInfo> xInfo;
     return xInfo;
 }
 
 
-void SAL_CALL TableModel::setPropertyValue( const OUString& /*aPropertyName*/, 
const Any& /*aValue*/ )
+void SAL_CALL TableModel::setPropertyValue( const OUString& /*aPropertyName*/, 
const uno::Any& /*aValue*/ )
 {
 }
 
 
-Any SAL_CALL TableModel::getPropertyValue( const OUString& /*PropertyName*/ )
+uno::Any SAL_CALL TableModel::getPropertyValue( const OUString& 
/*PropertyName*/ )
 {
-    return Any();
+    return uno::Any();
 }
 
 
-void SAL_CALL TableModel::addPropertyChangeListener( const OUString& 
/*aPropertyName*/, const Reference< XPropertyChangeListener >& /*xListener*/ )
+void SAL_CALL TableModel::addPropertyChangeListener( const OUString& 
/*aPropertyName*/, const uno::Reference<beans::XPropertyChangeListener>& 
/*xListener*/ )
 {
 }
 
 
-void SAL_CALL TableModel::removePropertyChangeListener( const OUString& 
/*aPropertyName*/, const Reference< XPropertyChangeListener >& /*xListener*/ )
+void SAL_CALL TableModel::removePropertyChangeListener( const OUString& 
/*aPropertyName*/, const uno::Reference<beans::XPropertyChangeListener>& 
/*xListener*/ )
 {
 }
 
 
-void SAL_CALL TableModel::addVetoableChangeListener( const OUString& 
/*aPropertyName*/, const Reference< XVetoableChangeListener >& /*xListener*/ )
+void SAL_CALL TableModel::addVetoableChangeListener( const OUString& 
/*aPropertyName*/, const uno::Reference<beans::XVetoableChangeListener>& 
/*xListener*/ )
 {
 }
 
 
-void SAL_CALL TableModel::removeVetoableChangeListener( const OUString& 
/*aPropertyName*/, const Reference< XVetoableChangeListener >& /*xListener*/ )
+void SAL_CALL TableModel::removeVetoableChangeListener( const OUString& 
/*aPropertyName*/, const uno::Reference<beans::XVetoableChangeListener>& 
/*xListener*/ )
 {
 }
 
@@ -466,14 +459,14 @@ void SAL_CALL TableModel::removeVetoableChangeListener( 
const OUString& /*aPrope
 // XFastPropertySet
 
 
-void SAL_CALL TableModel::setFastPropertyValue( ::sal_Int32 /*nHandle*/, const 
Any& /*aValue*/ )
+void SAL_CALL TableModel::setFastPropertyValue( ::sal_Int32 /*nHandle*/, const 
uno::Any& /*aValue*/ )
 {
 }
 
 
-Any SAL_CALL TableModel::getFastPropertyValue( ::sal_Int32 /*nHandle*/ )
+uno::Any SAL_CALL TableModel::getFastPropertyValue( ::sal_Int32 /*nHandle*/ )
 {
-    Any aAny;
+    uno::Any aAny;
     return aAny;
 }
 
@@ -555,12 +548,12 @@ void TableModel::notifyModification()
     {
         mbNotifyPending = false;
 
-        ::cppu::OInterfaceContainerHelper * pModifyListeners = 
rBHelper.getContainer( cppu::UnoType<XModifyListener>::get() );
+        ::cppu::OInterfaceContainerHelper * pModifyListeners = 
rBHelper.getContainer( cppu::UnoType<util::XModifyListener>::get() );
         if( pModifyListeners )
         {
-            EventObject aSource;
+            lang::EventObject aSource;
             aSource.Source = static_cast< ::cppu::OWeakObject* >(this);
-            pModifyListeners->notifyEach( &XModifyListener::modified, aSource);
+            pModifyListeners->notifyEach(&util::XModifyListener::modified, 
aSource);
         }
     }
     else
@@ -662,7 +655,7 @@ void TableModel::insertColumns( sal_Int32 nIndex, sal_Int32 
nCount )
 
         rModel.SetChanged();
     }
-    catch( Exception& )
+    catch( uno::Exception& )
     {
         TOOLS_WARN_EXCEPTION("svx", "");
     }
@@ -773,7 +766,7 @@ void TableModel::removeColumns( sal_Int32 nIndex, sal_Int32 
nCount )
 
         rModel.SetChanged();
     }
-    catch( Exception& )
+    catch( uno::Exception& )
     {
         TOOLS_WARN_EXCEPTION("svx", "");
     }
@@ -831,7 +824,7 @@ void TableModel::insertRows( sal_Int32 nIndex, sal_Int32 
nCount )
             }
         }
     }
-    catch( Exception& )
+    catch( uno::Exception& )
     {
         TOOLS_WARN_EXCEPTION("svx", "");
     }
@@ -933,7 +926,7 @@ void TableModel::removeRows( sal_Int32 nIndex, sal_Int32 
nCount )
 
         rModel.SetChanged();
     }
-    catch( Exception& )
+    catch( uno::Exception& )
     {
         TOOLS_WARN_EXCEPTION("svx", "");
     }
@@ -948,7 +941,7 @@ TableRowRef const & TableModel::getRow( sal_Int32 nRow ) 
const
     if( (nRow >= 0) && (nRow < getRowCountImpl()) )
         return maRows[nRow];
 
-    throw IndexOutOfBoundsException();
+    throw lang::IndexOutOfBoundsException();
 }
 
 
@@ -957,7 +950,7 @@ TableColumnRef const & TableModel::getColumn( sal_Int32 
nColumn ) const
     if( (nColumn >= 0) && (nColumn < getColumnCountImpl()) )
         return maColumns[nColumn];
 
-    throw IndexOutOfBoundsException();
+    throw lang::IndexOutOfBoundsException();
 }
 
 
@@ -977,7 +970,7 @@ void TableModel::optimize()
             bool bEmpty = true;
             for( sal_Int32 nRow = 0; (nRow < nRows) && bEmpty; nRow++ )
             {
-                Reference< XMergeableCell > xCell( getCellByPosition( nCol, 
nRow ), UNO_QUERY );
+                uno::Reference<css::table::XMergeableCell> xCell( 
getCellByPosition( nCol, nRow ), uno::UNO_QUERY );
                 if( xCell.is() && !xCell->isMerged() )
                     bEmpty = false;
             }
@@ -988,14 +981,14 @@ void TableModel::optimize()
                 {
                     static const OUStringLiteral sWidth(u"Width");
                     sal_Int32 nWidth1 = 0, nWidth2 = 0;
-                    Reference< XPropertySet > xSet1( static_cast< XCellRange* 
>( maColumns[nCol].get() ), UNO_QUERY_THROW );
-                    Reference< XPropertySet > xSet2( static_cast< XCellRange* 
>( maColumns[nCol-1].get() ), UNO_QUERY_THROW );
+                    uno::Reference<beans::XPropertySet> xSet1( static_cast< 
XCellRange* >( maColumns[nCol].get() ), uno::UNO_QUERY_THROW );
+                    uno::Reference<beans::XPropertySet> xSet2( static_cast< 
XCellRange* >( maColumns[nCol-1].get() ), uno::UNO_QUERY_THROW );
                     xSet1->getPropertyValue( sWidth ) >>= nWidth1;
                     xSet2->getPropertyValue( sWidth ) >>= nWidth2;
                     nWidth1 = o3tl::saturating_add(nWidth1, nWidth2);
-                    xSet2->setPropertyValue( sWidth, Any( nWidth1 ) );
+                    xSet2->setPropertyValue( sWidth, uno::Any( nWidth1 ) );
                 }
-                catch( Exception& )
+                catch( uno::Exception& )
                 {
                     TOOLS_WARN_EXCEPTION("svx", "");
                 }
@@ -1014,7 +1007,7 @@ void TableModel::optimize()
             bool bEmpty = true;
             for( nCol = 0; (nCol < nCols) && bEmpty; nCol++ )
             {
-                Reference< XMergeableCell > xCell( getCellByPosition( nCol, 
nRow ), UNO_QUERY );
+                uno::Reference<css::table::XMergeableCell> xCell( 
getCellByPosition( nCol, nRow ), uno::UNO_QUERY );
                 if( xCell.is() && !xCell->isMerged() )
                     bEmpty = false;
             }
@@ -1025,14 +1018,14 @@ void TableModel::optimize()
                 {
                     static const OUStringLiteral sHeight(u"Height");
                     sal_Int32 nHeight1 = 0, nHeight2 = 0;
-                    Reference< XPropertySet > xSet1( static_cast< XCellRange* 
>( maRows[nRow].get() ), UNO_QUERY_THROW );
-                    Reference< XPropertySet > xSet2( static_cast< XCellRange* 
>( maRows[nRow-1].get() ), UNO_QUERY_THROW );
+                    uno::Reference<beans::XPropertySet> xSet1( static_cast< 
XCellRange* >( maRows[nRow].get() ), uno::UNO_QUERY_THROW );
+                    uno::Reference<beans::XPropertySet> xSet2( static_cast< 
XCellRange* >( maRows[nRow-1].get() ), uno::UNO_QUERY_THROW );
                     xSet1->getPropertyValue( sHeight ) >>= nHeight1;
                     xSet2->getPropertyValue( sHeight ) >>= nHeight2;
                     nHeight1 = o3tl::saturating_add(nHeight1, nHeight2);
-                    xSet2->setPropertyValue( sHeight, Any( nHeight1 ) );
+                    xSet2->setPropertyValue( sHeight, uno::Any( nHeight1 ) );
                 }
-                catch( Exception& )
+                catch( uno::Exception& )
                 {
                     TOOLS_WARN_EXCEPTION("svx", "");
                 }

Reply via email to