diff options
Diffstat (limited to 'sw/source/ui/vba/vbaparagraphformat.cxx')
-rw-r--r-- | sw/source/ui/vba/vbaparagraphformat.cxx | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 2caa2e64001c..df635ecc8a47 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -48,33 +48,33 @@ SwVbaParagraphFormat::~SwVbaParagraphFormat() sal_Int32 SAL_CALL SwVbaParagraphFormat::getAlignment() throw (uno::RuntimeException) { style::ParagraphAdjust aParaAdjust = style::ParagraphAdjust_LEFT; - mxParaProps->getPropertyValue( rtl::OUString("ParaAdjust") ) >>= aParaAdjust; + mxParaProps->getPropertyValue( OUString("ParaAdjust") ) >>= aParaAdjust; return getMSWordAlignment( aParaAdjust ); } void SAL_CALL SwVbaParagraphFormat::setAlignment( sal_Int32 _alignment ) throw (uno::RuntimeException) { style::ParagraphAdjust aParaAdjust = ( style::ParagraphAdjust ) getOOoAlignment( _alignment ); - mxParaProps->setPropertyValue( rtl::OUString("ParaAdjust"), uno::makeAny( aParaAdjust ) ); + mxParaProps->setPropertyValue( OUString("ParaAdjust"), uno::makeAny( aParaAdjust ) ); } float SAL_CALL SwVbaParagraphFormat::getFirstLineIndent() throw (uno::RuntimeException) { sal_Int32 indent = 0; - mxParaProps->getPropertyValue( rtl::OUString("ParaFirstLineIndent") ) >>= indent; + mxParaProps->getPropertyValue( OUString("ParaFirstLineIndent") ) >>= indent; return (float)( Millimeter::getInPoints( indent ) ); } void SAL_CALL SwVbaParagraphFormat::setFirstLineIndent( float _firstlineindent ) throw (uno::RuntimeException) { sal_Int32 indent = Millimeter::getInHundredthsOfOneMillimeter( _firstlineindent ); - mxParaProps->setPropertyValue( rtl::OUString("ParaFirstLineIndent"), uno::makeAny( indent ) ); + mxParaProps->setPropertyValue( OUString("ParaFirstLineIndent"), uno::makeAny( indent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getKeepTogether() throw (uno::RuntimeException) { sal_Bool bKeep = sal_False; - mxParaProps->getPropertyValue( rtl::OUString("ParaKeepTogether") ) >>= bKeep; + mxParaProps->getPropertyValue( OUString("ParaKeepTogether") ) >>= bKeep; return uno::makeAny ( bKeep ); } @@ -83,18 +83,18 @@ void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogeth sal_Bool bKeep = sal_False; if( _keeptogether >>= bKeep ) { - mxParaProps->setPropertyValue( rtl::OUString("ParaKeepTogether"), uno::makeAny( bKeep ) ); + mxParaProps->setPropertyValue( OUString("ParaKeepTogether"), uno::makeAny( bKeep ) ); } else { - DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); + DebugHelper::exception( SbERR_BAD_PARAMETER, OUString() ); } } uno::Any SAL_CALL SwVbaParagraphFormat::getKeepWithNext() throw (uno::RuntimeException) { sal_Bool bKeep = sal_False; - mxParaProps->getPropertyValue( rtl::OUString("ParaSplit") ) >>= bKeep; + mxParaProps->getPropertyValue( OUString("ParaSplit") ) >>= bKeep; return uno::makeAny ( bKeep ); } @@ -103,18 +103,18 @@ void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithne sal_Bool bKeep = sal_False; if( _keepwithnext >>= bKeep ) { - mxParaProps->setPropertyValue( rtl::OUString("ParaSplit"), uno::makeAny( bKeep ) ); + mxParaProps->setPropertyValue( OUString("ParaSplit"), uno::makeAny( bKeep ) ); } else { - DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); + DebugHelper::exception( SbERR_BAD_PARAMETER, OUString() ); } } uno::Any SAL_CALL SwVbaParagraphFormat::getHyphenation() throw (uno::RuntimeException) { sal_Bool bHypn = sal_False; - mxParaProps->getPropertyValue( rtl::OUString("ParaIsHyphenation") ) >>= bHypn; + mxParaProps->getPropertyValue( OUString("ParaIsHyphenation") ) >>= bHypn; return uno::makeAny ( bHypn ); } @@ -123,46 +123,46 @@ void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation sal_Bool bHypn = sal_False; if( _hyphenation >>= bHypn ) { - mxParaProps->setPropertyValue( rtl::OUString("ParaIsHyphenation"), uno::makeAny( bHypn ) ); + mxParaProps->setPropertyValue( OUString("ParaIsHyphenation"), uno::makeAny( bHypn ) ); } else { - DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); + DebugHelper::exception( SbERR_BAD_PARAMETER, OUString() ); } } float SAL_CALL SwVbaParagraphFormat::getLineSpacing() throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( rtl::OUString("ParaLineSpacing") ) >>= aLineSpacing; + mxParaProps->getPropertyValue( OUString("ParaLineSpacing") ) >>= aLineSpacing; return getMSWordLineSpacing( aLineSpacing ); } void SAL_CALL SwVbaParagraphFormat::setLineSpacing( float _linespacing ) throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( rtl::OUString("ParaLineSpacing") ) >>= aLineSpacing; + mxParaProps->getPropertyValue( OUString("ParaLineSpacing") ) >>= aLineSpacing; aLineSpacing = getOOoLineSpacing( _linespacing, aLineSpacing.Mode ); - mxParaProps->setPropertyValue( rtl::OUString("ParaLineSpacing"), uno::makeAny( aLineSpacing ) ); + mxParaProps->setPropertyValue( OUString("ParaLineSpacing"), uno::makeAny( aLineSpacing ) ); } sal_Int32 SAL_CALL SwVbaParagraphFormat::getLineSpacingRule() throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( rtl::OUString("ParaLineSpacing") ) >>= aLineSpacing; + mxParaProps->getPropertyValue( OUString("ParaLineSpacing") ) >>= aLineSpacing; return getMSWordLineSpacingRule( aLineSpacing ); } void SAL_CALL SwVbaParagraphFormat::setLineSpacingRule( sal_Int32 _linespacingrule ) throw (uno::RuntimeException) { style::LineSpacing aLineSpacing = getOOoLineSpacingFromRule( _linespacingrule ); - mxParaProps->setPropertyValue( rtl::OUString("ParaLineSpacing"), uno::makeAny( aLineSpacing ) ); + mxParaProps->setPropertyValue( OUString("ParaLineSpacing"), uno::makeAny( aLineSpacing ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getNoLineNumber() throw (uno::RuntimeException) { sal_Bool noLineNum = sal_False; - mxParaProps->getPropertyValue( rtl::OUString("ParaLineNumberCount") ) >>= noLineNum; + mxParaProps->getPropertyValue( OUString("ParaLineNumberCount") ) >>= noLineNum; return uno::makeAny ( noLineNum ); } @@ -171,20 +171,20 @@ void SAL_CALL SwVbaParagraphFormat::setNoLineNumber( const uno::Any& _nolinenumb sal_Bool noLineNum = sal_False; if( _nolinenumber >>= noLineNum ) { - mxParaProps->setPropertyValue( rtl::OUString("ParaLineNumberCount"), uno::makeAny( noLineNum ) ); + mxParaProps->setPropertyValue( OUString("ParaLineNumberCount"), uno::makeAny( noLineNum ) ); } else { - DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); + DebugHelper::exception( SbERR_BAD_PARAMETER, OUString() ); } } sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel() throw (uno::RuntimeException) { sal_Int32 nLevel = word::WdOutlineLevel::wdOutlineLevelBodyText; - rtl::OUString aHeading; - const rtl::OUString HEADING = rtl::OUString("Heading"); - mxParaProps->getPropertyValue( rtl::OUString("ParaStyleName") ) >>= aHeading; + OUString aHeading; + const OUString HEADING = OUString("Heading"); + mxParaProps->getPropertyValue( OUString("ParaStyleName") ) >>= aHeading; if( aHeading.indexOf( HEADING ) == 0 ) { // get the sub string after "Heading" @@ -204,7 +204,7 @@ void SAL_CALL SwVbaParagraphFormat::setOutlineLevel( sal_Int32 _outlinelevel ) t uno::Any SAL_CALL SwVbaParagraphFormat::getPageBreakBefore() throw (uno::RuntimeException) { style::BreakType aBreakType; - mxParaProps->getPropertyValue( rtl::OUString("BreakType") ) >>= aBreakType; + mxParaProps->getPropertyValue( OUString("BreakType") ) >>= aBreakType; sal_Bool bBreakBefore = ( aBreakType == style::BreakType_PAGE_BEFORE || aBreakType == style::BreakType_PAGE_BOTH ); return uno::makeAny( bBreakBefore ); } @@ -215,7 +215,7 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe if( _breakbefore >>= bBreakBefore ) { style::BreakType aBreakType; - mxParaProps->getPropertyValue( rtl::OUString("BreakType") ) >>= aBreakType; + mxParaProps->getPropertyValue( OUString("BreakType") ) >>= aBreakType; if( bBreakBefore ) { if( aBreakType == style::BreakType_NONE ) @@ -230,64 +230,64 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe else if ( aBreakType == style::BreakType_PAGE_BEFORE ) aBreakType = style::BreakType_PAGE_AFTER; } - mxParaProps->setPropertyValue( rtl::OUString("BreakType"), uno::makeAny( aBreakType ) ); + mxParaProps->setPropertyValue( OUString("BreakType"), uno::makeAny( aBreakType ) ); } else { - DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); + DebugHelper::exception( SbERR_BAD_PARAMETER, OUString() ); } } float SAL_CALL SwVbaParagraphFormat::getSpaceBefore() throw (uno::RuntimeException) { sal_Int32 nSpace = 0; - mxParaProps->getPropertyValue( rtl::OUString("ParaTopMargin") ) >>= nSpace; + mxParaProps->getPropertyValue( OUString("ParaTopMargin") ) >>= nSpace; return (float)( Millimeter::getInPoints( nSpace ) ); } void SAL_CALL SwVbaParagraphFormat::setSpaceBefore( float _space ) throw (uno::RuntimeException) { sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space ); - mxParaProps->setPropertyValue( rtl::OUString("ParaTopMargin"), uno::makeAny( nSpace ) ); + mxParaProps->setPropertyValue( OUString("ParaTopMargin"), uno::makeAny( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getSpaceAfter() throw (uno::RuntimeException) { sal_Int32 nSpace = 0; - mxParaProps->getPropertyValue( rtl::OUString("ParaBottomMargin") ) >>= nSpace; + mxParaProps->getPropertyValue( OUString("ParaBottomMargin") ) >>= nSpace; return (float)( Millimeter::getInPoints( nSpace ) ); } void SAL_CALL SwVbaParagraphFormat::setSpaceAfter( float _space ) throw (uno::RuntimeException) { sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space ); - mxParaProps->setPropertyValue( rtl::OUString("ParaBottomMargin"), uno::makeAny( nSpace ) ); + mxParaProps->setPropertyValue( OUString("ParaBottomMargin"), uno::makeAny( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getLeftIndent() throw (uno::RuntimeException) { sal_Int32 nIndent = 0; - mxParaProps->getPropertyValue( rtl::OUString("ParaLeftMargin") ) >>= nIndent; + mxParaProps->getPropertyValue( OUString("ParaLeftMargin") ) >>= nIndent; return (float)( Millimeter::getInPoints( nIndent ) ); } void SAL_CALL SwVbaParagraphFormat::setLeftIndent( float _leftindent ) throw (uno::RuntimeException) { sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _leftindent ); - mxParaProps->setPropertyValue( rtl::OUString("ParaLeftMargin"), uno::makeAny( nIndent ) ); + mxParaProps->setPropertyValue( OUString("ParaLeftMargin"), uno::makeAny( nIndent ) ); } float SAL_CALL SwVbaParagraphFormat::getRightIndent() throw (uno::RuntimeException) { sal_Int32 nIndent = 0; - mxParaProps->getPropertyValue( rtl::OUString("ParaRightMargin") ) >>= nIndent; + mxParaProps->getPropertyValue( OUString("ParaRightMargin") ) >>= nIndent; return (float)( Millimeter::getInPoints( nIndent ) ); } void SAL_CALL SwVbaParagraphFormat::setRightIndent( float _rightindent ) throw (uno::RuntimeException) { sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _rightindent ); - mxParaProps->setPropertyValue( rtl::OUString("ParaRightMargin"), uno::makeAny( nIndent ) ); + mxParaProps->setPropertyValue( OUString("ParaRightMargin"), uno::makeAny( nIndent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeException) @@ -297,16 +297,16 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeExcepti void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( rtl::OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() throw (uno::RuntimeException) { sal_Bool bWidow = sal_False; sal_Int8 nWidow = 0; - mxParaProps->getPropertyValue( rtl::OUString("ParaWidows") ) >>= nWidow; + mxParaProps->getPropertyValue( OUString("ParaWidows") ) >>= nWidow; sal_Int8 nOrphan = 0; - mxParaProps->getPropertyValue( rtl::OUString("ParaOrphans") ) >>= nOrphan; + mxParaProps->getPropertyValue( OUString("ParaOrphans") ) >>= nOrphan; // if the amount of single lines on one page > 1 and the same of start and end of the paragraph, // true is retured. bWidow = ( nWidow > 1 && nOrphan == nWidow ); @@ -321,12 +321,12 @@ void SAL_CALL SwVbaParagraphFormat::setWidowControl( const uno::Any& _widowcontr if( _widowcontrol >>= bWidow ) { sal_Int8 nControl = bWidow? 2:1; - mxParaProps->setPropertyValue( rtl::OUString("ParaWidows"), uno::makeAny( nControl ) ); - mxParaProps->setPropertyValue( rtl::OUString("ParaOrphans"), uno::makeAny( nControl ) ); + mxParaProps->setPropertyValue( OUString("ParaWidows"), uno::makeAny( nControl ) ); + mxParaProps->setPropertyValue( OUString("ParaOrphans"), uno::makeAny( nControl ) ); } else { - DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); + DebugHelper::exception( SbERR_BAD_PARAMETER, OUString() ); } } @@ -404,7 +404,7 @@ style::LineSpacing SwVbaParagraphFormat::getOOoLineSpacingFromRule( sal_Int32 _l } default: { - DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); + DebugHelper::exception( SbERR_BAD_PARAMETER, OUString() ); break; } } @@ -469,7 +469,7 @@ sal_Int32 SwVbaParagraphFormat::getMSWordLineSpacingRule( style::LineSpacing& rL } default: { - DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); + DebugHelper::exception( SbERR_BAD_PARAMETER, OUString() ); } } return wdLineSpacing; @@ -478,7 +478,7 @@ sal_Int32 SwVbaParagraphFormat::getMSWordLineSpacingRule( style::LineSpacing& rL sal_Int16 SwVbaParagraphFormat::getCharHeight() throw (uno::RuntimeException) { float fCharHeight = 0.0; - mxParaProps->getPropertyValue( rtl::OUString("CharHeight") ) >>= fCharHeight; + mxParaProps->getPropertyValue( OUString("CharHeight") ) >>= fCharHeight; return (sal_Int16)( Millimeter::getInHundredthsOfOneMillimeter( fCharHeight ) ); } @@ -509,7 +509,7 @@ sal_Int32 SwVbaParagraphFormat::getOOoAlignment( sal_Int32 _alignment ) } default: { - DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); + DebugHelper::exception( SbERR_BAD_PARAMETER, OUString() ); } } return nParaAjust; @@ -542,26 +542,26 @@ sal_Int32 SwVbaParagraphFormat::getMSWordAlignment( sal_Int32 _alignment ) } default: { - DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); + DebugHelper::exception( SbERR_BAD_PARAMETER, OUString() ); } } return wdAlignment; } -rtl::OUString +OUString SwVbaParagraphFormat::getServiceImplName() { - return rtl::OUString("SwVbaParagraphFormat"); + return OUString("SwVbaParagraphFormat"); } -uno::Sequence< rtl::OUString > +uno::Sequence< OUString > SwVbaParagraphFormat::getServiceNames() { - static uno::Sequence< rtl::OUString > aServiceNames; + static uno::Sequence< OUString > aServiceNames; if ( aServiceNames.getLength() == 0 ) { aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = rtl::OUString("ooo.vba.word.ParagraphFormat" ); + aServiceNames[ 0 ] = OUString("ooo.vba.word.ParagraphFormat" ); } return aServiceNames; } |