summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-03-25 14:35:54 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-03-26 08:44:52 +0100
commiteb08ea4fb03ed8db54cda2e87fa36be9a7301757 (patch)
treef6bbaf5fe6546e26c98e5e9b40dd08a25363adb5 /filter
parentfd652cf5cbd4480ca8754f8faaf96f0f4455ddc0 (diff)
A little tiny insignificant cleanup
Change-Id: I285da1f12711e9e96b666a3ce1560c203870cac3
Diffstat (limited to 'filter')
-rw-r--r--filter/source/t602/t602filter.cxx27
1 files changed, 8 insertions, 19 deletions
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 164fd8f4e762..0282d19f8657 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -136,42 +136,31 @@ T602ImportFilter::~T602ImportFilter()
}
// XExtendedTypeDetection
-::rtl::OUString T602ImportFilter::detect( Sequence<PropertyValue>& Descriptor)
+OUString T602ImportFilter::detect( Sequence<PropertyValue>& Descriptor)
throw(RuntimeException)
{
- // checks for filter or type name would be necessary in case we want to use the filter also for "602" files
- // without the magic bytes at the beginning; I leave the code as comment in case of
- // ::rtl::OUString aFilterName, aTypeName;
sal_Int32 nLength = Descriptor.getLength();
const PropertyValue * pValue = Descriptor.getConstArray();
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
if ( pValue[i].Name == "InputStream" )
pValue[i].Value >>= mxInputStream;
-/* else if ( pValue[i].Name == "FilterName" )
- pValue[i].Value >>= aFilterName;
- else if ( pValue[i].Name == "TypeName" )
- pValue[i].Value >>= aTypeName; */
}
if (!mxInputStream.is())
- return ::rtl::OUString();
-
-/* if ( aFilterName == "T602Document" || aTypeName == "writer_T602_Document" )
- // preselection by type (extension) or filter name: no reason to check type
- return rtl::OUString( "writer_T602_Document" ); */
+ return OUString();
::com::sun::star::uno::Sequence< sal_Int8 > aData;
- size_t numBytes = 4;
+ const size_t numBytes = 4;
size_t numBytesRead = 0;
numBytesRead = mxInputStream->readSomeBytes (aData, numBytes);
if ((numBytesRead != numBytes) || (aData[0] != '@') ||
(aData[1] != 'C') || (aData[2] != 'T') || (aData[3] != ' '))
- return ::rtl::OUString();
+ return OUString();
- return rtl::OUString( "writer_T602_Document" );
+ return OUString( "writer_T602_Document" );
}
// XFilter
@@ -1144,7 +1133,7 @@ ResMgr* T602ImportFilterDialog::getResMgr()
return mpResMgr;
}
-void SAL_CALL T602ImportFilterDialog::setTitle( const ::rtl::OUString& )
+void SAL_CALL T602ImportFilterDialog::setTitle( const OUString& )
throw (::com::sun::star::uno::RuntimeException)
{
}
@@ -1158,9 +1147,9 @@ sal_Int16 SAL_CALL T602ImportFilterDialog::execute()
return com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
}
-rtl::OUString T602ImportFilterDialog::getResStr( sal_Int16 resid )
+OUString T602ImportFilterDialog::getResStr( sal_Int16 resid )
{
- rtl::OUString sStr = String( ResId( resid, *getResMgr() ) );
+ OUString sStr( ResId( resid, *getResMgr() ) );
return sStr;
}